question_id
int64
37.6M
73.2M
input_text
stringlengths
88
52.4k
output_text
stringlengths
37
35.6k
title
stringlengths
15
150
tags
stringlengths
1
107
q_score
int64
-19
397
view_count
int64
3
879k
answer_count
int64
1
21
accepted_answer_id
int64
37.6M
73.8M
answer_id
int64
37.6M
73.8M
a_score
int64
-5
1.29k
is_accepted
bool
1 class
creation_date
stringlengths
20
24
input_text_instruct
stringlengths
251
52.6k
72,813,971
Comparing array elements using mathematical symbols in Python<p>I have an array <code>A</code>. I am comparing <code>A[i+1]=A[i]</code> but the current output is in terms of 0's and 1's. Instead I want it to give in terms of <code>&lt; or = or &gt;</code>. I present the expected output.</p> <pre><code>import numpy as n...
<p>You can do it using <code>np.select</code></p> <pre><code>for i in range(len(A)-1): B = np.select([A[i+1]==A[i],A[i+1]&gt;A[i],A[i+1]&lt;A[i]], [&quot;=&quot;,&quot;&gt;&quot;,&quot;&lt;&quot;]) print([B]) </code></pre>
Comparing array elements using mathematical symbols in Python
python|numpy
1
47
2
72,814,180
72,814,180
3
true
2022-06-30T10:09:35.050Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Comparing array elements using mathematical symbols in Python<p>I have an array <code>A</code>. I am comparing <code>A[i+1]=A[i]</code> but the current outpu...
72,856,012
R data table leave out mean by group<p>I'm looking for an efficient solution, preferably in <code>data.table</code>, to compute leave-out means by group. To be precise, for each value of <code>id</code> I want to compute the mean of the remaining id-values in each group. Following examples illustrates what I want:</p> ...
<p>Considering the definition of the mean:</p> <pre><code>df[, &quot;:=&quot;(sum_group = sum(value), n_group = .N), by = group] df[, desired_output := (sum_group - sum(value)) / (n_group - .N), by = id] # group id value sum_group n_group desired_output # &lt;char&gt; &lt;num&gt; &lt;num&gt; &lt;num&gt;...
R data table leave out mean by group
r|data.table|aggregate|mean|group
1
47
1
72,856,101
72,856,101
3
true
2022-07-04T11:31:05.943Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: R data table leave out mean by group<p>I'm looking for an efficient solution, preferably in <code>data.table</code>, to compute leave-out means by group. To ...
72,793,132
Java : Is it possible to set paramters selectively?<p>Using jdk1.8. I need to set a param in a jpa-native-query based on a boolean value. Something like <strong>(Please see the part where based on &quot;addEmail&quot;'s true/false value , trying to set/ignore &quot;param3&quot;. em is the entityManager)</strong>:</p> ...
<p>Wouldn't this work for you?</p> <pre><code>var executionQuery = addEmail ? queryWithEmail : queryNoEmail; var query = em.createNativeQuery(executionQuery) .setParameter(&quot;param1&quot;, val1) .setParameter(&quot;param2&quot;, val2) .setFirstResult(offset) ...
Java : Is it possible to set paramters selectively?
java|spring|hibernate|jpa|spring-data-jpa
0
47
1
72,793,327
72,793,327
3
true
2022-06-28T21:04:47.993Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Java : Is it possible to set paramters selectively?<p>Using jdk1.8. I need to set a param in a jpa-native-query based on a boolean value. Something like <str...
72,822,853
How to get the cumulative sum of n days in different months?<p>I have this df:</p> <pre><code> CODE DATE PP 17594 000130 1991-01-01 0.5 17595 000130 1991-01-02 11 17596 000130 1991-01-03 1 17597 000130 1991-01-04 2 17598 000130 1991-01-05 5 17599 000130 1991-01-06 2 17598 000130 1991-01-07 ...
<p>I believe this should work:</p> <pre><code>s = df['DATE'] (df .groupby([ s.dt.year, s.dt.month, s.dt.day.clip(upper=30).sub(1).floordiv(10) ], as_index=False) .agg({'CODE':'first', 'DATE':'first', 'PP':'sum'})) </code></pre> <p>Output:</p> <pre><code> CODE DATE PP 0 130 1991-01-01 39....
How to get the cumulative sum of n days in different months?
python|pandas
0
47
1
72,823,181
72,823,181
3
true
2022-06-30T23:02:07.323Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to get the cumulative sum of n days in different months?<p>I have this df:</p> <pre><code> CODE DATE PP 17594 000130 1991-01-01 0.5 1759...
73,016,158
How to git ignore subfolders but not the files in first level<p>I have this folder structure and I need to ignore everything except the files (.R) in the scenario1,2 folders</p> <pre><code>--workspace |--scenario1 |--data (folder) |--outputs (folder) |--xx1.R |--xx2.R ...
<p>Assuming the scenario folders are in the root of your project, <code>scenario1/*/</code> isn't what you're after. That will ignore everything inside scenario1. It sounds to me that you want to ignore the <code>data</code> and <code>outputs</code> folders, but include the <code>.R</code> files. There are two solution...
How to git ignore subfolders but not the files in first level
git
1
47
1
73,016,466
73,016,466
3
true
2022-07-17T23:58:53.570Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to git ignore subfolders but not the files in first level<p>I have this folder structure and I need to ignore everything except the files (.R) in the sce...
72,791,812
Python matplotlib: how to plot vertical bars with both a bottom and a top value<p>Is there a way to plot bars which do not all start from the same baseline and have their own top value, but rather specify both a bottom and a top value?</p> <p>In other words if I had the following dataframe:</p> <pre><code>import pandas...
<p>You can do the following:</p> <pre><code>from matplotlib import pyplot pyplot.bar( x=df['Seconds'], height=df['SYS'] - df['DIA'], bottom=df['DIA'], ) </code></pre> <p>output:</p> <p><a href="https://i.stack.imgur.com/bpuBo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bpuBo.png" alt...
Python matplotlib: how to plot vertical bars with both a bottom and a top value
pandas|dataframe|matplotlib|plot
0
47
1
72,791,914
72,791,914
3
true
2022-06-28T18:54:45.957Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python matplotlib: how to plot vertical bars with both a bottom and a top value<p>Is there a way to plot bars which do not all start from the same baseline a...
72,799,635
Segmentation Fault while working on a Hash Table<p>I am just learning c with the cs50 course and I just got introduced to pointers and data structures (It is very confusing please help). So I got a project where I need to make a hash table and I started first by trying to add some nodes to the zero index of the list in...
<p>You are initializing all <code>table</code> elements to <code>NULL</code>, and later you attempt to access the first (null) element: <code>table[0]-&gt;next</code>. This will result in dereferencing a null pointer, hence the segmentation fault you got.</p> <p>What you need to do is allocating a node for each <code>t...
Segmentation Fault while working on a Hash Table
c|data-structures|hashtable|cs50
3
47
2
72,799,763
72,799,763
3
true
2022-06-29T10:14:01.523Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Segmentation Fault while working on a Hash Table<p>I am just learning c with the cs50 course and I just got introduced to pointers and data structures (It is...
72,873,916
Why does ggplot suddenly change formate of y-axis numbers to exponential?<p>I found various posts solving the issue to change the y-axis from exponential back to a noraml decimal:</p> <p><a href="https://stackoverflow.com/questions/52758313/avoid-scientific-notation-x-axis-ggplot">avoid scientific notation x axis ggplo...
<p>This can be further simplified to a comparison of the two sequences directly:</p> <pre><code>options(scipen = 20) # Show more digits before resorting # to scientific notation seq(-0.2,0.35,0.05) [1] -0.20 -0.15 -0.10 -0.05 0.00 0.05 0.10 0.15 0.20 0.25 0.30 0.35 seq(-0.3,0.35,0.05) [...
Why does ggplot suddenly change formate of y-axis numbers to exponential?
r|ggplot2|axis-labels|decimalformat
0
47
1
72,874,029
72,874,029
3
true
2022-07-05T18:20:23.700Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why does ggplot suddenly change formate of y-axis numbers to exponential?<p>I found various posts solving the issue to change the y-axis from exponential bac...
72,916,246
How do you create an async version of a TypeScript function type?<p>I have a non-async function type in TypeScript and I want the same function type but async.</p> <pre class="lang-js prettyprint-override"><code>// this is a function type type MyFunction = (x: number) =&gt; void; // this is an async version of the same...
<p>Here is a simple solution using the utility types <a href="https://www.typescriptlang.org/docs/handbook/utility-types.html#parameterstype" rel="nofollow noreferrer"><code>Parameters</code></a> and <a href="https://www.typescriptlang.org/docs/handbook/utility-types.html#returntypetype" rel="nofollow noreferrer"><code...
How do you create an async version of a TypeScript function type?
typescript
1
47
1
72,916,279
72,916,279
3
true
2022-07-08T19:38:59.420Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do you create an async version of a TypeScript function type?<p>I have a non-async function type in TypeScript and I want the same function type but asyn...
72,803,766
Data is going left to right<p>I have a data set</p> <pre><code>email,code 1, code 2, code 3, .. a@domain.com,abcd,code-efg,code-hij d@domain.com,code-lmn,code-opq,code-ble ... </code></pre> <p>The email address are unique and there are 8 or more codes each line</p> <p>I know that I can do</p> <pre><code>$PeopleAndCodes...
<p>The following uses the <a href="https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_Intrinsic_Members#psobject" rel="nofollow noreferrer">intrinsic <code>psobject</code> property</a> to reflect on each CSV object (row) to get the value of those properties (columns) whose name sta...
Data is going left to right
powershell
0
47
2
72,804,146
72,804,146
4
true
2022-06-29T15:08:59.630Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Data is going left to right<p>I have a data set</p> <pre><code>email,code 1, code 2, code 3, .. a@domain.com,abcd,code-efg,code-hij d@domain.com,code-lmn,cod...
72,903,507
In Vaadin 14's Uploader, how do I clear the previously uploaded files?<p>In Vaadin 14, I've used Vaadin Designer to add an Uploader component. It works fine. However, I don't know how to clear previously uploaded files. I tried:</p> <pre><code>multiFileMemoryBuffer.getFiles().clear(); </code></pre> <p>but it didn't do ...
<p>Yes, use <code>upload.getElement().setPropertyJson(&quot;files&quot;, Json.createArray());</code> to clear the visual file representation on the client side. This was improved in V23 where you can just call <code>upload.clearFileList();</code></p>
In Vaadin 14's Uploader, how do I clear the previously uploaded files?
vaadin|vaadin-flow
2
47
1
72,903,737
72,903,737
4
true
2022-07-07T19:52:05.690Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: In Vaadin 14's Uploader, how do I clear the previously uploaded files?<p>In Vaadin 14, I've used Vaadin Designer to add an Uploader component. It works fine....
72,919,664
Django: Problem with passing parameters from a template {% url %} to a view<p>I have this urlpath:</p> <pre class="lang-py prettyprint-override"><code>path('download/&lt;str:fpath&gt;/&lt;str:fname&gt;', views.download, name='download'), </code></pre> <p>And this is the view:</p> <pre class="lang-py prettyprint-overrid...
<p>Url arguments of type <code>str</code> cannot contains <code>/</code> characters. You can see this in the error message which has translated your <code>&lt;str:fpath&gt;</code> to a regex:</p> <pre><code>tried: ['download/(?P&lt;fpath&gt;[^/]+)/(?P&lt;fname&gt;[^/]+)\\Z'] </code></pre> <p>You should use a <code>path...
Django: Problem with passing parameters from a template {% url %} to a view
python|django|django-templates|django-urls|django-url-reverse
0
47
1
72,920,257
72,920,257
4
true
2022-07-09T07:22:32.810Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Django: Problem with passing parameters from a template {% url %} to a view<p>I have this urlpath:</p> <pre class="lang-py prettyprint-override"><code>path('...
72,789,727
How to initalise Elixir module with random constant?<p>I know in Elixir I can initiate a module with a random variable like so:</p> <pre><code>defmodule MyMod do @word = &quot;test&quot; end </code></pre> <p>but is it possible to initiate this module with a random word something like</p> <pre><code>defmodule MyMod do...
<p>I wanted to clarify the earlier comment in an answer: yes, you can use <code>Enum.random/1</code> e.g.</p> <pre><code>defmodule MyMod do @words [&quot;test&quot;, &quot;hello&quot;, &quot;bye&quot;] @word Enum.random(@words) end </code></pre> <p>or you could reference an existing function (e.g. one providing mor...
How to initalise Elixir module with random constant?
elixir
0
47
1
72,790,564
72,790,564
4
true
2022-06-28T15:59:14.377Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to initalise Elixir module with random constant?<p>I know in Elixir I can initiate a module with a random variable like so:</p> <pre><code>defmodule MyMo...
72,921,782
How to get all the deepest elements of a given type?<pre><code>&lt;table&gt; &lt;tr&gt; &lt;td&gt;cell 1&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;b&gt;cell 2&lt;/b&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;table&gt; &lt;tr&gt; &lt;td...
<p><code>//td</code> will return every <code>td</code> in the document.</p> <p><code>//td[not(.//td)]</code> will return every <code>td</code> that does not contain (as one of its descendants) a <code>td</code> element.</p>
How to get all the deepest elements of a given type?
python|xpath|lxml
1
47
2
72,921,859
72,921,859
4
true
2022-07-09T13:33:15.810Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to get all the deepest elements of a given type?<pre><code>&lt;table&gt; &lt;tr&gt; &lt;td&gt;cell 1&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; ...
72,777,474
get all soup above a certain div<p>I have a soup of this format:</p> <pre><code>&lt;div class = 'foo'&gt; &lt;table&gt; &lt;/table&gt; &lt;p&gt; &lt;/p&gt; &lt;p&gt; &lt;/p&gt; &lt;p&gt; &lt;/p&gt; &lt;div class = 'bar'&gt; &lt;p&gt; &lt;/p&gt; . . &lt;/div&gt; </code></pre> <p>I want to scrape all the ...
<p>You could select your element, iterate over its <code>siblings</code> and <code>break</code> if there is no <code>p</code>:</p> <pre><code>for t in soup.div.table.find_next_siblings(): if t.name != 'p': break print(t) </code></pre> <p>or other way around and closer to your initial question - select t...
get all soup above a certain div
python|web-scraping|beautifulsoup
0
47
2
72,777,537
72,777,537
4
true
2022-06-27T19:34:20.170Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: get all soup above a certain div<p>I have a soup of this format:</p> <pre><code>&lt;div class = 'foo'&gt; &lt;table&gt; &lt;/table&gt; &lt;p&gt; &lt;/p&g...
72,850,153
Why is function call treated as instantiation when I cast in template arguments?<p>I've got the following code:</p> <pre><code>template &lt;bool condition&gt; struct enable_if { }; template &lt;&gt; struct enable_if&lt;true&gt; { using type = bool; }; template &lt;typename T&gt; class is_callable { using Yes = ch...
<p>No, your understanding is not correct.</p> <p>Firstly, a name can't refer to both a class template and a function template. If that happens the program is ill-formed. (And defining both in the same scope is not allowed to begin with.)</p> <p>Secondly, <code>is_callable&lt;Lambda&gt;()</code> as template argument is ...
Why is function call treated as instantiation when I cast in template arguments?
c++|templates|metaprogramming|template-meta-programming
1
47
1
72,850,246
72,850,246
4
true
2022-07-03T21:51:18.240Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why is function call treated as instantiation when I cast in template arguments?<p>I've got the following code:</p> <pre><code>template &lt;bool condition&gt...
72,793,104
How to do tuple augmentation<p>The following code is from chapter 5 of &quot;F# 4.0 Design Patterns&quot;.</p> <pre><code>let a = 1,&quot;car&quot; type System.Tuple&lt;'T1,'T2&gt; with member t.AsString() = sprintf &quot;[[%A]:[%A]]&quot; t.Item1 t.Item2 (a |&gt; box :?&gt; System.Tuple&lt;int,string&gt;).As...
<p>This is a bit odd code sample - I suspect the point that this is making is that F# tuples are actually .NET tuples represented using <code>System.Tuple</code> - by showing that an extension to <code>System.Tuple</code> can be invoked on ordinary F# tuples.</p> <p>I suspect the behaviour of F# has changed and it no l...
How to do tuple augmentation
f#
2
47
1
72,793,169
72,793,169
5
true
2022-06-28T21:02:14.603Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to do tuple augmentation<p>The following code is from chapter 5 of &quot;F# 4.0 Design Patterns&quot;.</p> <pre><code>let a = 1,&quot;car&quot; type Sys...
72,861,338
Why does dbase save files with the same name in 3 different extensions(*.mdx, *.dbf, *.dbt)?<p>I found an old dbase database. Each &quot;table&quot; has 3 files with the same name but different extensions.</p> <p>Example:</p> <ul> <li>user.mdx</li> <li>user.dft</li> <li>user.dbf</li> </ul> <p>Why are these different. I...
<p>See details here: <a href="https://en.wikipedia.org/wiki/.dbf" rel="noreferrer">https://en.wikipedia.org/wiki/.dbf</a></p> <p>The various files for a dBase database are:</p> <ul> <li><code>.dbf</code> - the actual data file - contains the table data</li> <li><code>.dbt</code> - the memo file for the database, to hol...
Why does dbase save files with the same name in 3 different extensions(*.mdx, *.dbf, *.dbt)?
dbf|dbase
1
47
1
72,861,646
72,861,646
5
true
2022-07-04T19:39:33.040Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why does dbase save files with the same name in 3 different extensions(*.mdx, *.dbf, *.dbt)?<p>I found an old dbase database. Each &quot;table&quot; has 3 fi...
72,909,274
How to retrieve URL from browse in Vaadin<p>I want to store URL of from browser in a Java String. Below is my code URL which opens up UI for creating password.</p> <p>http://localhost:8080/createpassword?userId=1</p> <p>I'm using Vaadin 23</p>
<pre><code>UI.getCurrent().getPage().fetchCurrentURL(currentUrl -&gt; { // This is your own method that you may do something with the url. // Please note that this method runs asynchronously storeCurrentURL(currentUrl); }); </code></pre> <p>Read more: <a href="https://vaadin.com/docs/latest/advanced/browser...
How to retrieve URL from browse in Vaadin
java|vaadin
1
47
1
72,909,436
72,909,436
5
true
2022-07-08T09:21:08.760Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to retrieve URL from browse in Vaadin<p>I want to store URL of from browser in a Java String. Below is my code URL which opens up UI for creating passwor...
72,968,446
Status of values generated by OVER and PARTITION BY in SQL Server<p>I have a source table as follow:</p> <p><a href="https://i.stack.imgur.com/JvMjH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JvMjH.png" alt="enter image description here" /></a></p> <p>I want to get the below result:</p> <p><a hr...
<p>A slightly more efficient version of @Larnu's excellent answer:</p> <pre class="lang-sql prettyprint-override"><code>SELECT RequestNumber, Task, StartDate, ROW_NUMBER() OVER (PARTITION BY RequestNumber, TaskName ORDER BY StartDate) AS score, CASE WHEN ROW_NUMBER() OVER (PARTITION BY RequestNumber, TaskN...
Status of values generated by OVER and PARTITION BY in SQL Server
sql|sql-server
2
47
3
72,968,753
72,968,753
5
true
2022-07-13T15:00:39.903Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Status of values generated by OVER and PARTITION BY in SQL Server<p>I have a source table as follow:</p> <p><a href="https://i.stack.imgur.com/JvMjH.png" rel...
72,770,932
Different behavior of regexp() on linux and windows in matlab<p>I am encountering a different behavior of <a href="https://se.mathworks.com/help/matlab/ref/regexp.html#btn_p45_sep_shared-outkey" rel="nofollow noreferrer">regexp()</a> on linux and windows using MatLab. I am trying to separate a string based on a separat...
<p>The path separators are different in Linux (<code>/</code>) and Windows (<code>\</code>).</p> <p>The <code>\</code> character is a special regex metacharacter, it is used to form &quot;regex escapes&quot;, like <code>\d</code> to match digits, etc. To match a literal backslash, it must be doubled, or <em>escaped</em...
Different behavior of regexp() on linux and windows in matlab
regex|linux|windows|matlab
4
47
1
72,771,102
72,771,102
6
true
2022-06-27T10:54:52.297Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Different behavior of regexp() on linux and windows in matlab<p>I am encountering a different behavior of <a href="https://se.mathworks.com/help/matlab/ref/r...
73,014,118
ModernGL depth-test ignoring vertices in the back (sometimes?)<p>When rendering this cube, I'm using the moderngl DEPTH_TEST to properly draw in the faces at the correct depth, which works fine as shown:</p> <p><a href="https://i.stack.imgur.com/hkH06.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/h...
<p><a href="https://www.khronos.org/opengl/wiki/Blending" rel="noreferrer">Blending</a> doesn't work properly when <a href="https://www.khronos.org/opengl/wiki/Depth_Test" rel="noreferrer">Depth Test</a> is enabled, because the fragments behind already drawn objects are discarded by depth test before they can be blende...
ModernGL depth-test ignoring vertices in the back (sometimes?)
python|opengl|python-moderngl
1
47
1
73,014,170
73,014,170
6
true
2022-07-17T17:55:47.850Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: ModernGL depth-test ignoring vertices in the back (sometimes?)<p>When rendering this cube, I'm using the moderngl DEPTH_TEST to properly draw in the faces at...
72,966,672
Converting VarChaer Ids to BigInt in SQL without a case statement<p>I am trying to convert IDs with characters such as 'VS23333Hg87808' to BigInt so I can have this on the same column as the other ids that are simply BigInt and I tried</p> <p>Try_Convert(BIGINT, id) as set_id</p> <p>But that did not seem to solve the e...
<p>try this code</p> <pre><code>CAST(id AS bigint) </code></pre> <p>this should be work</p>
Converting VarChaer Ids to BigInt in SQL without a case statement
sql|tsql
-3
47
1
72,966,856
72,966,856
-2
true
2022-07-13T12:52:58.230Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Converting VarChaer Ids to BigInt in SQL without a case statement<p>I am trying to convert IDs with characters such as 'VS23333Hg87808' to BigInt so I can ha...
72,818,329
Jest - how to expect for a thrown error on an async function, which gets caught<p>I try to do this:</p> <pre><code>it('should throw an error', async ()=&gt; { expect.assertions(1); try { await processor({}, MODULE_CONFIG) } catch (e) { expect(e).toBe(&quot;[TypeError: Cannot read propert...
<p>The best answer I found seems to be getting the <code>message</code> property from the error (which is essentially just the error as a string), and comparing that.</p> <p><code>expect(e.message).toBe(&quot;Cannot read properties of undefined (reading 'match')&quot;)</code></p>
Jest - how to expect for a thrown error on an async function, which gets caught
javascript|node.js|unit-testing|testing|jestjs
1
47
2
72,833,035
72,833,035
-1
true
2022-06-30T15:23:38.210Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Jest - how to expect for a thrown error on an async function, which gets caught<p>I try to do this:</p> <pre><code>it('should throw an error', async ()=&gt; ...
72,860,672
Error message when sending embed discord.js<p>here is my code:</p> <pre class="lang-js prettyprint-override"><code>client.on('messageCreate', async(msg) =&gt; { if (msg.content.startsWith('do avatar')) { const user = msg.mentions.users.first() || msg.author; const avatarEmbed = new discord_js_1.MessageEmbed() .setCol...
<p>you have are using <code>embed</code> property while sending the message, that doesn't exist. It should be embed<strong>s</strong></p>
Error message when sending embed discord.js
javascript|node.js|discord|discord.js
0
47
1
72,862,720
72,862,720
-1
true
2022-07-04T18:17:04.597Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Error message when sending embed discord.js<p>here is my code:</p> <pre class="lang-js prettyprint-override"><code>client.on('messageCreate', async(msg) =&gt...
72,923,635
python how to reassign dupilcate string values to a new string<ul> <li><p>I take in a string <code>aabullc</code></p> </li> <li><p>newstring should be assigned <code>aall</code> after the loop since <code>a</code> and <code>l</code> are duplicates</p> </li> <li><p>strings with more then 1 dupe like <code>aaabullc</code...
<p>Try this:</p> <pre><code>def rearrangeLetters(S): s = [S[i] for i in range(len(S))] newstring = &quot;&quot; for t in s: if s.count(t) &gt; 1: newstring += t return newstring </code></pre> <p>call function:</p> <pre><code>output = rearrangeLetters(&quot;aabullc&quot;)...
python how to reassign dupilcate string values to a new string
python
0
47
3
72,923,721
72,923,721
-1
true
2022-07-09T18:08:26.513Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: python how to reassign dupilcate string values to a new string<ul> <li><p>I take in a string <code>aabullc</code></p> </li> <li><p>newstring should be assign...
72,776,372
FullCalendar view rolling 30 days<p>I am using the <a href="https://fullcalendar.io/" rel="nofollow noreferrer">FullCalendar</a> library and need to implement a rolling 30 days view using the month grid style view (with day headers, etc). I also need to be able to set the first/starting day in the grid. For example, I ...
<p>This may not be possible because <code>dayGridMonth</code> really wants to be an entire month.</p> <p>This example I made is close to what you're looking for, I just couldn't get the calendar to end at 30 days.</p> <pre><code>var startDate = new Date('2022-07-13'); // This logic is needed because of the way FullCal...
FullCalendar view rolling 30 days
angular|fullcalendar
0
48
1
72,777,740
72,777,740
0
true
2022-06-27T17:48:15.187Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: FullCalendar view rolling 30 days<p>I am using the <a href="https://fullcalendar.io/" rel="nofollow noreferrer">FullCalendar</a> library and need to implemen...
72,778,496
Unable to obtain table info through python selenium<p>I am new bee on python selenium environment. I am trying to get the SQL version table from <a href="https://sqlserverbuilds.blogspot.com/" rel="nofollow noreferrer">enter link description here</a></p> <pre><code>from selenium.webdriver.common.by import By from selen...
<p>If you need data only from first table:</p> <pre><code>from selenium.webdriver.common.by import By from selenium import webdriver website = &quot;https://www.sqlserverversions.com&quot; driver = webdriver.Chrome(executable_path='/Users//Downloads/chromedriver/chromedriver.exe') driver.get(website) show_service_pac...
Unable to obtain table info through python selenium
python|selenium|web-scraping
2
48
3
72,779,084
72,779,084
0
true
2022-06-27T21:29:31.103Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Unable to obtain table info through python selenium<p>I am new bee on python selenium environment. I am trying to get the SQL version table from <a href="htt...
72,780,268
org.apache.hadoop.security.token.TokenIdentifier: Provider org.apache.hadoop.yarn.security.DockerCredentialTokenIdentifier not found<p><strong>While Connecting to kerberos hadoop cluster from the api deployed on tomcat to upload file to the hdfs, I am getting the above error.</strong> The keytab file is working fine on...
<p>As the message in the exception clearly states,</p> <pre><code>Provider org.apache.hadoop.yarn.security.DockerCredentialTokenIdentifier not found </code></pre> <p>DockerCredentialTokenIdentifier class is missing on the classpath.</p> <p>In my case when I started analyzing how does it know that the token should be re...
org.apache.hadoop.security.token.TokenIdentifier: Provider org.apache.hadoop.yarn.security.DockerCredentialTokenIdentifier not found
scala|kerberos
1
48
1
72,780,330
72,780,330
0
true
2022-06-28T02:56:12.483Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: org.apache.hadoop.security.token.TokenIdentifier: Provider org.apache.hadoop.yarn.security.DockerCredentialTokenIdentifier not found<p><strong>While Connecti...
72,781,135
How to convert a dictionary into a javascript object<p>I want to convert a dictionary like this:</p> <pre class="lang-py prettyprint-override"><code>{ &quot;name&quot;: &quot;Paul&quot;, &quot;age&quot;: &quot;20&quot;, &quot;gender&quot;: &quot;male&quot; } </code></pre> <p>to this :</p> <pre class="lang-js prettyp...
<p>In the end I did it using regex:</p> <pre class="lang-py prettyprint-override"><code> def saveFile(dictionary, fileName): jsonStr = json.dumps(dictionary, indent=4, ensure_ascii=False); removeQuotes = re.sub(&quot;\&quot;([^\&quot;]+)\&quot;:&quot;, r&quot;\1:&quot;, jsonStr); fileNameCleaned = fileName....
How to convert a dictionary into a javascript object
python
1
48
2
72,781,561
72,781,561
0
true
2022-06-28T05:28:15.230Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to convert a dictionary into a javascript object<p>I want to convert a dictionary like this:</p> <pre class="lang-py prettyprint-override"><code>{ &quot...
72,782,620
How to close a navigated child view from the main view in MVVMCross?<p>I'am pretty new in MVVMCross and I am using MVVMCross 8.0.2 for a <strong>WPF</strong> application. Basically what I'am trying to do is to have main view that have mode selections for the application. When i change the mode selection (with buttons) ...
<p>Problem is solved with the help of the owner of the sample project. Solution is using the GUI commands, which are explained in the <a href="https://github.com/eiadxp/MvvmCross.Platforms.Wpf.ItemsViewPresenter" rel="nofollow noreferrer">Mvx.Wpf.ItemsPresenter github repository.</a></p> <p>By adding the behaviors name...
How to close a navigated child view from the main view in MVVMCross?
wpf|navigation|mvvmcross
0
48
1
72,784,717
72,784,717
0
true
2022-06-28T07:52:29.400Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to close a navigated child view from the main view in MVVMCross?<p>I'am pretty new in MVVMCross and I am using MVVMCross 8.0.2 for a <strong>WPF</strong>...
72,782,823
Nuxt breaks after hard refresh<p>So, I set up a website using Nuxt 2 and there is something odd going on with it. I set up my site without using trailing slashes (router options). On refresh the server adds a trailing slash anyway. Normally that wouldn't be a problem, because both pages would just work, but now it just...
<p>I recommend using the <a href="https://nuxtjs.org/docs/configuration-glossary/configuration-router/#example-behavior-with-child-routes" rel="nofollow noreferrer">default behavior</a> for Nuxt's <code>trailingSlash</code> setting.</p> <p>Google <a href="https://developers.google.com/search/blog/2010/04/to-slash-or-no...
Nuxt breaks after hard refresh
nuxt.js
1
48
1
72,786,646
72,786,646
0
true
2022-06-28T08:06:32.353Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Nuxt breaks after hard refresh<p>So, I set up a website using Nuxt 2 and there is something odd going on with it. I set up my site without using trailing sla...
72,777,661
How to skip rows with no entry in a cell?<p>I am using code to generate emails from an Excel sheet.</p> <p>Example Spreadsheet<br /> <a href="https://i.stack.imgur.com/J0Vt5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/J0Vt5.png" alt="enter image description here" /></a></p> <p>The code generates ...
<p>Like this:</p> <pre class="lang-vb prettyprint-override"><code>Sub CreateEmails() Dim wsSrc As Worksheet Dim lastRow As Long Dim OutlookApp As Object Dim rowIndex As Long Dim MItem As Object, sTo As String, rw As Range Set wsSrc = Worksheets(&quot;Sheet1&quot;) Set OutlookApp =...
How to skip rows with no entry in a cell?
excel|vba
0
48
1
72,789,863
72,789,863
0
true
2022-06-27T19:56:19.810Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to skip rows with no entry in a cell?<p>I am using code to generate emails from an Excel sheet.</p> <p>Example Spreadsheet<br /> <a href="https://i.stack...
72,788,985
How Do I Detect And Properly Display Events On Calendar That Overlaps Months in Python?<p>I used a tutorial I found online to create an event calendar in Python. I've tried to improve it to schedule events that may have a start and end time range that overlap months. Meaning it may start in June and end in July. I'v...
<pre><code>requests = VacationRequest.objects.filter(Q(vacation_calendar=self.dropdown,start_time__year=self.year,start_time__month=self.month) | Q(vacation_calendar=self.dropdown,start_time__year=self.year,end_time__month=self.month)).distinct() </code></pre> <p>Seemed to do the trick.</p>
How Do I Detect And Properly Display Events On Calendar That Overlaps Months in Python?
python|python-3.x|django|django-templates
0
48
1
72,793,115
72,793,115
0
true
2022-06-28T15:09:51.507Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How Do I Detect And Properly Display Events On Calendar That Overlaps Months in Python?<p>I used a tutorial I found online to create an event calendar in Pyt...
72,791,845
Laravel Model Class Cant Be Found In Routes<p>I look around about this issue but still can't understand why I'm getting error :</p> <blockquote> <p>Class &quot;App\Models\MenuList&quot; not found</p> </blockquote> <p><code>app/Models/Listing.php</code></p> <pre class="lang-php prettyprint-override"><code>&lt;?php name...
<p>Try this</p> <p>create model using command</p> <pre><code>php artisan make:model MenuList </code></pre> <p><code>App\Models\MenuList.php</code></p> <pre><code>&lt;?php namespace App\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; class MenuList extends Model ...
Laravel Model Class Cant Be Found In Routes
php|laravel
0
48
1
72,796,358
72,796,358
0
true
2022-06-28T18:57:47.113Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Laravel Model Class Cant Be Found In Routes<p>I look around about this issue but still can't understand why I'm getting error :</p> <blockquote> <p>Class &qu...
72,796,143
flutter : value not passed to the previous screen and is shown null while using constructor<p>Basically, I have two classes Register and AddUser. I want to navigate value from the AddUser page to the RegisterPage but I am not getting any values despite using the constructor and getting null value while debugging. User ...
<p>You can achive this things by then callback in navigator and pass your value when you pop add screen. Please replace your code with below code</p> <p><strong>Register</strong></p> <pre><code>class Register extends StatefulWidget { @override _RegisterState createState() =&gt; _RegisterState(); } class _Register...
flutter : value not passed to the previous screen and is shown null while using constructor
list|flutter|android-studio|dart|constructor
1
48
3
72,796,610
72,796,610
0
true
2022-06-29T05:22:39.483Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: flutter : value not passed to the previous screen and is shown null while using constructor<p>Basically, I have two classes Register and AddUser. I want to n...
72,781,510
React Native iOS build failed after react native upgrade<p>Upgraded the react native app from v0.65.1 to v0.67.0. The build failed with the below error. Tried deleting the node modules, pods and installed them again and still facing the issue. The Xcode version is 13.4.1. <a href="https://i.stack.imgur.com/cC7y1.png" r...
<p>The solution to the error was easy. Checked the path to the project folder. The folder name has a space in-between. Renamed the folder by removing all the spaces in-between. Tried to run the project and it worked. Not sure why it ran with this fix.</p>
React Native iOS build failed after react native upgrade
ios|xcode|react-native
2
48
2
72,797,279
72,797,279
0
true
2022-06-28T06:13:37.357Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: React Native iOS build failed after react native upgrade<p>Upgraded the react native app from v0.65.1 to v0.67.0. The build failed with the below error. Trie...
72,773,261
Cannot import newly added class<p>Very strange issue. I have angular project (vs code as IDE). I add new file named <code>'log-logger'</code> with empty class <code>'LogLogger'</code>.</p> <pre><code>export class LogLogger{ } </code></pre> <p>I want to import this class in other file from other directory (but obvi...
<p>I fixed it. <strong>Remember that if you adding new file with new class add extension at the end of the name of file. In my case <code>log-logger.ts</code></strong> - IDE (VS Code) didn't show any error, class was properly colored and everything seemed to be fine.</p>
Cannot import newly added class
angular|typescript|visual-studio-code
1
48
2
72,799,856
72,799,856
0
true
2022-06-27T13:51:27.900Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Cannot import newly added class<p>Very strange issue. I have angular project (vs code as IDE). I add new file named <code>'log-logger'</code> with empty clas...
72,812,460
Separate the three-digit numbers in Windows form(C # ) and return them to the original state<p>In Windows Form (C #), I enter my number in the text box and separate the three digits with the following code (for better readability of the number). For example, the:</p> <p>2500000 =&gt; 2,500,000</p> <p>But I have a probl...
<p>Since the <code>Text</code> property is a string, you will need to parse it to a number in order to make math operations. You can do this safely by calling the <a href="https://docs.microsoft.com/en-us/dotnet/api/system.int64.tryparse?redirectedfrom=MSDN&amp;view=net-6.0#overloads" rel="nofollow noreferrer">TryParse...
Separate the three-digit numbers in Windows form(C # ) and return them to the original state
c#|winforms|text
1
48
1
72,814,194
72,814,194
0
true
2022-06-30T08:19:00.920Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Separate the three-digit numbers in Windows form(C # ) and return them to the original state<p>In Windows Form (C #), I enter my number in the text box and s...
72,786,196
Electron Builde errror on GitLab CI<p>On GitLab CI the electron build fails with: <strong><code>x509: certificate signed by unknown authority</code></strong></p> <p>Since we have set the env-var <code>GIT_SSL_NO_VERIFY</code> to <code>true</code>, this should not happen, right? <a href="https://docs.gitlab.com/runner/...
<p>The error was not related to git, so <code>GIT_SSL_NO_VERIFY</code> was useless.<br /> The error occurred when electron-builder tried to download some files from GitHub via https.</p> <p>The solution is to update the CA certficates in the docker-container before executing electron-builder:</p> <pre class="lang-bash ...
Electron Builde errror on GitLab CI
gitlab|gitlab-ci|electron-builder
0
48
1
72,815,564
72,815,564
0
true
2022-06-28T12:10:45.650Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Electron Builde errror on GitLab CI<p>On GitLab CI the electron build fails with: <strong><code>x509: certificate signed by unknown authority</code></strong>...
72,771,800
python3 venv vs ansible 2.9.x installation fails<p>I'm trying to update our venv of ansible to a newer version on an older RHEL 7 box :), only it seems to fail for some unclear reasons in some python code.</p> <p>Running python 3.6.8 on RHEL 7.9 (Maipo)</p> <p>Any hints are most appreciated, TIA!</p> <pre><code>$ sourc...
<p>found this: realpython.com/intro-to-pyenv which enabled me to create a newer python env and apply in multiple virtual env each with their version of ansible compiled from sources.</p>
python3 venv vs ansible 2.9.x installation fails
python|python-3.x|pip|ansible
0
48
1
72,817,108
72,817,108
0
true
2022-06-27T12:05:00.960Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: python3 venv vs ansible 2.9.x installation fails<p>I'm trying to update our venv of ansible to a newer version on an older RHEL 7 box :), only it seems to fa...
72,816,940
Use full name as one word using Google Custom Search<p>I have a list of 14 keywords, as well as the name. I need to send a request through the Custom Search JSON API by building the following query:</p> <pre><code>&quot;name * keyword1&quot; OR &quot;name * keyword2&quot; OR &quot;name * keyword3&quot; OR ... </code></...
<p>Yes, it turned out that everything can be solved by changing the query. The final request looks something like this:</p> <pre><code>&quot;name&quot; AND (&quot;keyword1&quot; OR &quot;keyword2&quot; OR &quot;keyword3&quot; OR ...) </code></pre>
Use full name as one word using Google Custom Search
google-api|search-engine|google-search|google-custom-search|google-search-api
0
48
1
72,817,805
72,817,805
0
true
2022-06-30T13:46:06.440Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Use full name as one word using Google Custom Search<p>I have a list of 14 keywords, as well as the name. I need to send a request through the Custom Search ...
72,817,582
How to set different color vuetify card with foreach VUEJS<p><em><strong>Problem statement -</strong></em> I'm creating cards with vuetify that will loop in foreach, but I wanna each card has different color that I get from my <code>generateColor()</code> function, here's what I mean <strong>:</strong></p> <p><a href="...
<p>You can try to call method for random color:</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override"><code>Vue.component('projectCard', { template: ` &lt;v-card :color="colorCard"&g...
How to set different color vuetify card with foreach VUEJS
javascript|vue.js|vuetify.js|v-for
1
48
2
72,818,043
72,818,043
0
true
2022-06-30T14:28:56.923Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to set different color vuetify card with foreach VUEJS<p><em><strong>Problem statement -</strong></em> I'm creating cards with vuetify that will loop in ...
72,818,991
Multiple IF statements in Python in a for loop or while loop?<p>Let's say I buy a certain volume of petrol at price X, which is usually sold within a 30 days. During these 30 days, I will need to adjust my petrol station gas price according to average State gas price. If State price goes up by 1.2% from my purchased pr...
<p>Use a loop over the multipliers:</p> <pre><code>for multiplier in (1.01, 1.02, 1.03, 1.04, 1.05): if last_gas_price &gt; last_gas_price[&quot;price&quot;]*multiplier: adj_price(price=last_gas_price[&quot;price&quot;]*multiplier) </code></pre> <p>With <a href="https://peps.python.org/pep-0572/" rel="nofol...
Multiple IF statements in Python in a for loop or while loop?
python|for-loop|if-statement
-1
48
2
72,819,026
72,819,026
0
true
2022-06-30T16:15:14.210Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Multiple IF statements in Python in a for loop or while loop?<p>Let's say I buy a certain volume of petrol at price X, which is usually sold within a 30 days...
72,822,905
(Unity, 2D, C#) How can I make the player let go of a button before needing to press it again?<p>This is a weirdly phrased question...and I don't know how to explain it well. I'm making a ledge hang mechanic for my game I'm making, you press either of the directions to get onto the ledge, but you also press the directi...
<p>Since you don't have the code. I can't exactly help you out with the specifics, but I still understand what you're asking and can still help you out. Here is the &quot;sample&quot; code that I'd use in your case:</p> <pre><code>bool isHanging = false; void Update() { if (Input.GetKeyDown(&quot;space&quot...
(Unity, 2D, C#) How can I make the player let go of a button before needing to press it again?
c#|unity3d
1
48
2
72,823,085
72,823,085
0
true
2022-06-30T23:10:15.347Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: (Unity, 2D, C#) How can I make the player let go of a button before needing to press it again?<p>This is a weirdly phrased question...and I don't know how to...
72,814,076
Buttons calling custom methods for Laravel Backpack<p>I'm looking to add buttons to call my own methods instead of the CRUD methods (send to print, or download a PDF, or send an email, etc.) I see that I can create a button using addButtonFromModelFunction is this the only way to do it? Thanks in advance.</p>
<p>Yes, you can create a button from Model function like below:</p> <pre><code>CRUD::addButtonFromModelFunction('top', 'export', 'getExportButtonHtml', 'beginning'); </code></pre> <p>and the function <code>getExportButtonHtml</code> will look like:</p> <pre><code>public function getExportButtonHtml(): string { ...
Buttons calling custom methods for Laravel Backpack
laravel-backpack
0
48
1
72,823,580
72,823,580
0
true
2022-06-30T10:17:04.530Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Buttons calling custom methods for Laravel Backpack<p>I'm looking to add buttons to call my own methods instead of the CRUD methods (send to print, or downlo...
72,823,697
Why does my React button no longer link to an external site using anchor tags?<p>I created a few buttons for my site in react. I used an anchor tag and everything was working fine but for some reason they no longer work. I don't remember making any changes and am confused as to why it stopped. Here's the button importe...
<p>You shouldn't use the <code>a</code> tag inside the <code>button</code>. It will confuse the screen reader for some browsers. Instead, you should use the tag as its functionality</p> <p>I've updated your code:</p> <pre><code>import React from &quot;react&quot;; import styled from &quot;styled-components&quot;; cons...
Why does my React button no longer link to an external site using anchor tags?
javascript|html|css|reactjs
0
48
3
72,823,830
72,823,830
0
true
2022-07-01T02:04:19.080Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why does my React button no longer link to an external site using anchor tags?<p>I created a few buttons for my site in react. I used an anchor tag and every...
72,810,996
How to optimize querying multiple unrelated tables in SQLite?<p>I have scenario when I have to iterate through multiple tables in quite big sqlite database. In tables I store informations about planet position on sky through years. So e.g. for Mars I have tables Mars_2000, Mars_2001 and so on. Table structure is always...
<p>I solved the issue programmatically. Whole thing was done with Rust and <code>r2d2_sqlite</code> library. I'm still doing a lot of queries, but now it's done in threads. It allowed me to reduce execution time from 25s to around 3s. Here's the code:</p> <pre class="lang-rust prettyprint-override"><code>use std::sync:...
How to optimize querying multiple unrelated tables in SQLite?
sql|sqlite|rust|rusqlite|r2d2
0
48
1
72,824,795
72,824,795
0
true
2022-06-30T06:06:41.823Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to optimize querying multiple unrelated tables in SQLite?<p>I have scenario when I have to iterate through multiple tables in quite big sqlite database. ...
72,824,580
How to have edited task update local storage?<p>I am almost done with my to-do app, what is left is to do the local storage for the completed list and edited task.</p> <p>The local storage I have done for when the task is added and removed. But I am not sure how to do the local storage for when the task is set to compl...
<p>here in some changes in your js file look into it.</p> <ol> <li>in <code>editItem</code> function on behalf of <code>i</code> we change value in taskList.</li> <li>in <code>completeItem</code> function on behalf of <code>i</code> we add one more prop in object <code>textDecoration: true</code> and in <code>renderLis...
How to have edited task update local storage?
javascript
1
48
2
72,825,155
72,825,155
0
true
2022-07-01T05:05:39.853Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to have edited task update local storage?<p>I am almost done with my to-do app, what is left is to do the local storage for the completed list and edited...
72,825,805
Can't set lat, lng in state<p>I get the lat and lng when the user clicks on the map, and I console.log them. This works fine, but after when I would like to set them in a state I get this error: <a href="https://i.stack.imgur.com/dwDaw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dwDaw.png" alt="e...
<p>you should pass the whole object to useState defined setter:</p> <pre><code>setUserPickPos({lat: lat, lng: lng}) </code></pre>
Can't set lat, lng in state
reactjs|next.js|leaflet|react-leaflet
0
48
1
72,825,875
72,825,875
0
true
2022-07-01T07:32:21.100Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can't set lat, lng in state<p>I get the lat and lng when the user clicks on the map, and I console.log them. This works fine, but after when I would like to ...
72,826,840
Unable to locate package postgresql-client-11 in python v3.9.6 or above base image<pre><code>FROM python:3.9.5 RUN apt-get update &amp;&amp; apt-get install -y postgresql-client-11 </code></pre> <p>for Dockerfile above, <code>docker build</code> commands works smoothly.</p> <p>But</p> <pre><code>FROM python:3.9.6 RU...
<p>This works for me</p> <pre><code>FROM python:3.9.6-buster RUN apt-get update &amp;&amp; apt-get install -y postgresql-client-11 </code></pre> <p>Looks like the <code>bullseye</code> version (by default for python:3.9.6 image) does not have <code>postgresql-client-11</code> library, but the <code>buster</code> vers...
Unable to locate package postgresql-client-11 in python v3.9.6 or above base image
python|python-3.x|database|postgresql|docker
1
48
2
72,827,071
72,827,071
0
true
2022-07-01T09:02:00.490Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Unable to locate package postgresql-client-11 in python v3.9.6 or above base image<pre><code>FROM python:3.9.5 RUN apt-get update &amp;&amp; apt-get install...
72,833,380
How to get value from Configuration object via HostBuilder?<p>Started a new Console app in .NET 6 and am adding Dependency Injection. In the code below, how can I get access to the IConfiguration object to read a value from appsettings (after calling Build?</p> <p>The configuration is available within the StoreFactory...
<p>The <code>Host.CreateDefaultBuilder</code> defines the behavior to discover the JSON configuration and expose it through the <code>IConfiguration</code> instance. From the <code>host</code> instance, you can ask the service provider for the <code>IConfiguration</code> instance and then ask it for values.</p> <pre><c...
How to get value from Configuration object via HostBuilder?
.net-core|dependency-injection
0
48
1
72,834,221
72,834,221
0
true
2022-07-01T18:33:33.273Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to get value from Configuration object via HostBuilder?<p>Started a new Console app in .NET 6 and am adding Dependency Injection. In the code below, how...
72,840,112
599Item.js:12 Uncaught TypeError: product.map is not a function in react<p>I'm putting together my first react as an exercise to understand but I get this error</p> <p>599Item.js:12 Uncaught TypeError: product.map is not a function in component item.js on line 12</p> <p>I copy the component item,js, it has a prop that ...
<p>In Item component instead of</p> <pre><code>product.map((item)... </code></pre> <p>replace it with</p> <pre><code>product &amp;&amp; product.map((item)... </code></pre>
599Item.js:12 Uncaught TypeError: product.map is not a function in react
javascript|reactjs|dom
0
48
2
72,840,184
72,840,184
0
true
2022-07-02T15:06:05.467Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: 599Item.js:12 Uncaught TypeError: product.map is not a function in react<p>I'm putting together my first react as an exercise to understand but I get this er...
72,830,625
How to integrate keras model with sequential backward selection code?<p>I am trying to integrate a Keras deep neural network as a classifier within code for sequential backward feature selection in Python. (Originally, I tried to wrap the Keras deep neural network within Scikeras to use within scikit-learn's built in s...
<p>This should work with SciKeras!</p> <p>I had to clean up your code / fix some bugs. I first did a &quot;sanity check&quot; using Scikit-Learn's MLPClassfier, then I ran it against an MLPClassfier created using Keras. Details may differ for more complex model architectures, but this shows that it does work.</p> <pre ...
How to integrate keras model with sequential backward selection code?
python|tensorflow|machine-learning|keras|neural-network
0
48
1
72,841,277
72,841,277
0
true
2022-07-01T14:16:21.767Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to integrate keras model with sequential backward selection code?<p>I am trying to integrate a Keras deep neural network as a classifier within code for ...
72,847,642
How to see array or list in console tap (Unity)<p>How to see Array or List in console tap?<br /> Is there the way to see them in console tap?<br /> I want <code>Debug.Log(array) -&gt; [1,2,3,4]</code></p>
<pre><code>for(int i = 0; i &lt; array.Length; i++) { Debug.Log(array[i]); } </code></pre> <p>Almost the same for the list. Or if you need a single-line variant</p> <pre><code>StringBuilder sb = new StringBuilder(); for(int i = 0; i &lt; array.Length; i++) { sb.Append(array[i]); sb.Append(&quot; &quot;); } ...
How to see array or list in console tap (Unity)
c#|unity3d
-1
48
1
72,847,674
72,847,674
0
true
2022-07-03T15:15:54.870Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to see array or list in console tap (Unity)<p>How to see Array or List in console tap?<br /> Is there the way to see them in console tap?<br /> I want <c...
72,846,068
Prevent users from writing other user's data in node.js<p>I have three different types of users in my node-js schema: 1 -&gt; user, 2 -&gt; merchant 3 -&gt; provider</p> <p>Now i am giving only merchant users to post the data about parking.</p> <p>I have this query in node.js to update the parking data:</p> <pre><code>...
<p>If the request is authenticated with a JWT <code>token</code>, you can obtain the user (probably their email address) as</p> <pre class="lang-js prettyprint-override"><code>const jwt = require(&quot;jsonwebtoken&quot;); var user = jwt.decode(token).sub; </code></pre> <p>If you store the user in every <code>Parking</...
Prevent users from writing other user's data in node.js
node.js|mongodb|express|mongoose
0
48
2
72,848,081
72,848,081
0
true
2022-07-03T11:24:48.247Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Prevent users from writing other user's data in node.js<p>I have three different types of users in my node-js schema: 1 -&gt; user, 2 -&gt; merchant 3 -&gt; ...
72,848,692
div relative position and sizing<p>I am trying to set out a page layout within a containing <code>div</code>. I've been back and forth over what combination of <code>height</code>, <code>min-height</code>, <code>width</code>, <code>min-width</code>, and <code>position</code> I need to do this - and additionally what th...
<p>I have no idea what kind of layout you are doing! I hope I have met all the requirements.</p> <p>For the SVG part, the only way I have found to respect the height of the image, is to use javascript, and you must at least know the height and width of the image (or if you use the TAG <code>img</code>, instead of <code...
div relative position and sizing
html|css|svg
0
48
1
72,849,411
72,849,411
0
true
2022-07-03T17:47:17.213Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: div relative position and sizing<p>I am trying to set out a page layout within a containing <code>div</code>. I've been back and forth over what combination ...
72,849,786
make a duplication of a branch with identical but not the same commits as of the original branch<p>I have this project added to a git repository with the main branch consisting of a number of commits.</p> <pre><code> A---&gt;B---&gt;C---&gt;D---&gt;E </code></pre> <p>as i'm doing some experimental modifications on...
<h1>TL;DR</h1> <p>All you need to do is create a branch name before you start experimenting.</p> <h1>Long-ish</h1> <blockquote> <p>... I'm doing some experimental modifications on commits A through ...</p> </blockquote> <p>No, you're not.</p> <p>I don't mean you aren't <em>trying</em> to do that. I mean it's literally...
make a duplication of a branch with identical but not the same commits as of the original branch
git|github|version-control|git-branch
0
48
1
72,850,115
72,850,115
0
true
2022-07-03T20:44:28.337Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: make a duplication of a branch with identical but not the same commits as of the original branch<p>I have this project added to a git repository with the mai...
72,844,520
Unable to iterate to next ListNode, since the current node is getting overridden with the listnode.next value<p>This is a <a href="https://leetcode.com/problems/add-two-numbers/" rel="nofollow noreferrer">leetcode</a> problem.</p> <p>I saw the solution however while trying to use my own logic, I cannot iterate over to ...
<blockquote> <p>In the above solution where I am assigning <code>ans = ans.next</code>, there the current node is overridden with the next node, however, I just want to move to the next node in order to iterate.</p> </blockquote> <p>The assignment is to a <em>variable</em>. That never mutates your linked list. This way...
Unable to iterate to next ListNode, since the current node is getting overridden with the listnode.next value
c#|data-structures|linked-list|singly-linked-list
0
48
1
72,853,547
72,853,547
0
true
2022-07-03T07:00:13.427Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Unable to iterate to next ListNode, since the current node is getting overridden with the listnode.next value<p>This is a <a href="https://leetcode.com/probl...
72,856,991
Sending and initializing data to another component with vue 3<p>what I want to do is to send a value to the file &quot;Notification.vue&quot; when the button is clicked in the <code>hello word</code> file and I want to show <code>Notification</code></p> <p><a href="https://szboynono.github.io/mosha-vue-toastify/" rel="...
<p>I just created a demo with Vue 2 for your understanding how components will communicate. You can migrate this in Vue 3.</p> <p>Demo <strong>:</strong></p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js pr...
Sending and initializing data to another component with vue 3
vue.js
0
48
1
72,857,359
72,857,359
0
true
2022-07-04T12:44:26.240Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Sending and initializing data to another component with vue 3<p>what I want to do is to send a value to the file &quot;Notification.vue&quot; when the button...
72,860,825
Scoped css class with elements<p>I use vue with vuetify. I have to use sass to override the style of vuetify components. With the following code I want to update the style of my text field.</p> <pre><code>&lt;style scoped lang=&quot;scss&quot;&gt; .center { input { text-align: center; } } &lt;/style&gt;...
<p>For Vue2 you need to add <code>::v-deep</code> before the class.</p> <p>Ex:</p> <pre><code>::v-deep .target-class { background-color: #000; } </code></pre> <p>For Vue3</p> <pre><code>:deep(.target-class) { background-color: #000; } </code></pre>
Scoped css class with elements
css|vue.js|sass|vuetify.js
1
48
1
72,860,992
72,860,992
0
true
2022-07-04T18:35:04.027Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Scoped css class with elements<p>I use vue with vuetify. I have to use sass to override the style of vuetify components. With the following code I want to up...
72,861,074
How to bring the colour of button upon activation?<p>I am writing this code.</p> <pre class="lang-html prettyprint-override"><code> &lt;div class=&quot;button-row&quot;&gt; &lt;button mat-flat-button matStepperNext (click)=&quot;validate17()&quot; [disabled]=&quot;!uploadedSuccessfully&quot;&gt;Validate&lt;/butt...
<p>You can define a css class so that you can use it whenever you want. Add in you styles.css (or in the component.css class, if you want this class visibility to be limited at that page) the following code:</p> <pre><code>.button-bg-blue{ color: white !important; background: blue !important; border-color: bluevi...
How to bring the colour of button upon activation?
html|css|angular|button
0
48
2
72,865,192
72,865,192
0
true
2022-07-04T19:06:36.823Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to bring the colour of button upon activation?<p>I am writing this code.</p> <pre class="lang-html prettyprint-override"><code> &lt;div class=&quot;bu...
72,865,804
How can i convert an array in Json string to c# object?<p>I have a json return result like the following:</p> <p>Json =</p> <p>{ &quot;Id&quot;:&quot;12345&quot;, &quot;FirstName&quot;:&quot;Bob&quot;, &quot;LastName&quot;:&quot;Builder&quot;, &quot;Links&quot;:[] }</p> <p>Links can have a list of objects of type LinkS...
<p>You can convert the jToken to an object using the <a href="https://www.newtonsoft.com/json/help/html/M_Newtonsoft_Json_Linq_JToken_ToObject__1.htm" rel="nofollow noreferrer">ToObject</a> method:</p> <pre><code>var links = token[&quot;Links&quot;].TObject&lt;List&lt;LinkService&gt;&gt;(); </code></pre>
How can i convert an array in Json string to c# object?
c#|json
0
48
1
72,865,844
72,865,844
0
true
2022-07-05T07:50:10.107Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can i convert an array in Json string to c# object?<p>I have a json return result like the following:</p> <p>Json =</p> <p>{ &quot;Id&quot;:&quot;12345&q...
72,844,727
Redirect scp output that matches pattern<p>I want redirect output from scp into a file, but only lines that match a pattern. For example, I'm getting a lot of permission denied errors, so I want to log all the files where that is the case. I found that I can redirect all output of scp into a file like this:</p> <pre><c...
<p>There is nothing special about <code>scp</code>; you just need to get familiar with shell I/O <a href="https://www.gnu.org/software/bash/manual/html_node/Redirections.html" rel="nofollow noreferrer">redirections</a>. (<em>The Linux Documentation Project's</em> <a href="https://tldp.org/LDP/abs/html/index.html" rel="...
Redirect scp output that matches pattern
bash|grep|scp
-1
48
1
72,867,841
72,867,841
0
true
2022-07-03T07:42:43.993Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Redirect scp output that matches pattern<p>I want redirect output from scp into a file, but only lines that match a pattern. For example, I'm getting a lot o...
72,860,955
Problem in Grails application started suddenly<p>I have a Grails 4.0.3 rest api in production running since last year without major problems.</p> <p>Unfortunately since last week It is in trouble because of some RabbitMQ request in the queue. My applicaion tries to read the queue and this message is show in the applica...
<blockquote> <p>I started investigating this problem and I saw some devs saying that it is possible to be the Groovy version, but I don't remember where I can check it out.</p> <p>Could you help me?</p> </blockquote> <p>There are a number of ways to identify which version of Groovy is being used, including looking at G...
Problem in Grails application started suddenly
grails|rabbitmq|java.util.date
0
48
2
72,870,989
72,870,989
0
true
2022-07-04T18:51:33.403Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Problem in Grails application started suddenly<p>I have a Grails 4.0.3 rest api in production running since last year without major problems.</p> <p>Unfortun...
72,872,532
Add a new object to array via useRecoilState<p>I face with a problem with useRecoilState. I have an external file with an array of objects:</p> <pre><code>export const objectPositionState = atom({ key: &quot;objectPosition&quot;, // unique ID (with respect to other atoms/selectors) default: [ // {id:1, ...
<p>I search in documentation and found that its works like useState in React. So try to use it with callback function, it should look like this</p> <pre><code>setObjects(previous =&gt; [...previous, { id:uuidv4(), x:objectPosition.x, y:objectPosition.y, z:objectPo...
Add a new object to array via useRecoilState
javascript|reactjs|recoiljs
0
48
1
72,872,623
72,872,623
0
true
2022-07-05T16:09:13.397Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Add a new object to array via useRecoilState<p>I face with a problem with useRecoilState. I have an external file with an array of objects:</p> <pre><code>ex...
72,877,781
Unable to validate form using js<p>I am trying to validate a form by seeing if all the inputs are filled. So here when either email or password are empty, it should return an alert. But when I run this html file, it isn't alerting me of that.</p> <p>My code:</p> <p><div class="snippet" data-lang="js" data-hide="false" ...
<p>You should access the value of DOM elements by <strong>DOM Methods</strong> like <code>document.getElementById()</code>, <code>document.querySelector()</code>, <code>document.getElementsByClassName()</code>, <code>document.querySelectorAll()</code> etc.</p> <p>You can do the validation in two ways:</p> <ol> <li>With...
Unable to validate form using js
javascript|forms|validation
0
48
5
72,877,997
72,877,997
0
true
2022-07-06T03:53:14.857Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Unable to validate form using js<p>I am trying to validate a form by seeing if all the inputs are filled. So here when either email or password are empty, it...
72,869,869
QML DoubleValidator changing decimal to int on focus change<p>I'm using QML and I need textfields that only accept doubles. I used DoubleValidator for this. However, when I enter, for example a 0.2 in the textfield and hit tab, it will change the value to 2. The same holds for any number formatted as &quot;0.00...0x&qu...
<p>Paraphrasing my answer from forum.qt.io:</p> <p>The DoubleValidator's behavior depends on the locale being used. In some country like France for example, the period (.) is not a decimal marker but just a separator for thousands, millons, etc. The actual decimal marker is the comma (,).</p> <p>If you want to force yo...
QML DoubleValidator changing decimal to int on focus change
qml
-1
48
2
72,879,937
72,879,937
0
true
2022-07-05T12:59:06.347Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: QML DoubleValidator changing decimal to int on focus change<p>I'm using QML and I need textfields that only accept doubles. I used DoubleValidator for this. ...
72,879,529
Is there a way to interact with the object that contains an Action?<p>I'm working on a project, where I have Interactible objects that have Actions properties.</p> <p>Something like</p> <pre><code>class Interactible { Action OnInteract; public function DoStuff() { // Do Something } } </code></...
<p>You currently have:</p> <pre><code>var myObj = new Interactible(); myObj.OnInteract = delegate { myObj.DoStuff(); }; </code></pre> <p>and your question is if it is possible to rewrite this in <a href="https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/object-and-collection-initi...
Is there a way to interact with the object that contains an Action?
c#|action
0
48
1
72,880,763
72,880,763
0
true
2022-07-06T07:34:56.990Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is there a way to interact with the object that contains an Action?<p>I'm working on a project, where I have Interactible objects that have Actions propertie...
72,883,246
Is there solution to this error "TypeError: can only concatenate str (not "NoneType") to str"?<p>My Code in Flask</p> <pre><code> print('Image List= ', imgNameList) print('App_version= ', App_Version) print('Provider_Name= ', Provider_Name) print('Order_ID= ', Order_ID) print('Unique_Device_ID= ', Un...
<p>You are building a string concatenating vars, but one of them is not a string, it is <code>None</code> instead. My guess is that the error happens in this line (next time add the full stack trace please):</p> <pre><code>filenameArr[i] = Provider_Name + '/' + Order_ID + '/' + Visit_ID + '/' + filenameArr[i] </code><...
Is there solution to this error "TypeError: can only concatenate str (not "NoneType") to str"?
python|python-3.x|flask
-4
48
1
72,883,394
72,883,394
0
true
2022-07-06T12:02:14.970Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is there solution to this error "TypeError: can only concatenate str (not "NoneType") to str"?<p>My Code in Flask</p> <pre><code> print('Image List= ', im...
72,884,440
SQl Query with even distribution of samples<p>Is there a way to query SQL to get an even distribution of samples. For example if one of my fields is a State field... I want to query top 5000 results with (100 from each state)... Or another example, if I have a field that says whether a client is a new client or an exi...
<p>You can do this by using <code>ROW_NUMBER</code>. You partition your data on one or more columns, so the row numbering starts from 1 in every partition. You then select the top x rows and ORDER BY the row number column.</p> <p>e.g.</p> <pre><code>WITH cte AS ( SELECT *,ROW_NUMBER() OVER (PARTITION BY StateName...
SQl Query with even distribution of samples
sql-server
0
48
1
72,884,558
72,884,558
0
true
2022-07-06T13:29:29.163Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: SQl Query with even distribution of samples<p>Is there a way to query SQL to get an even distribution of samples. For example if one of my fields is a State...
72,873,681
VBA Dictionary add texbox values to a dictionary<p>I need some help on looping through all my textboxes and adding the values to a dictionary.</p> <p>Currently, I'm adding all textboxes name's as the key the dictionary.</p> <pre><code>Dim dict as New Dictionary Dim Week as Class1, wID as String Dim ctrl as Control ...
<p>I managed to figure out what I was trying to do.</p> <pre><code>Dim txtname as string, txtvalue as string txtname = ctrl.name txtvalue = userform1(txtname).value </code></pre> <p>which then I changed this bit to be:</p> <pre><code>week.count = week.count + txtvalue </code></pre> <p>now for each textbox the value e...
VBA Dictionary add texbox values to a dictionary
excel|vba|dictionary
0
48
1
72,887,983
72,887,983
0
true
2022-07-05T17:56:57.610Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: VBA Dictionary add texbox values to a dictionary<p>I need some help on looping through all my textboxes and adding the values to a dictionary.</p> <p>Current...
72,888,896
Accepting a Discord Invite using Selenium<p>I'm trying to create a simple script to accept a Discord Invite. I've managed to login to an account however I cannot get it to accept the invite.</p> <p>I've tried using the XPath aswell as using CSS selector to try and find the button but i'm having no luck (examples seen b...
<p>The desired element is a dynamic element, so to click on the element you need to induce <a href="https://stackoverflow.com/a/59130336/7429447">WebDriverWait</a> for the <a href="https://stackoverflow.com/a/54194511/7429447"><em>element_to_be_clickable()</em></a> and you can use either of the following <a href="https...
Accepting a Discord Invite using Selenium
python|selenium|xpath|css-selectors|webdriverwait
0
48
1
72,889,253
72,889,253
0
true
2022-07-06T19:25:16.163Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Accepting a Discord Invite using Selenium<p>I'm trying to create a simple script to accept a Discord Invite. I've managed to login to an account however I ca...
72,882,456
WiX installer nested start-menu directory, LGHT0204 error<p>I'm using CPACK and something like this for my WiX3 installer to create a nested start menu folder like <code>My Company/My Product</code>:</p> <pre class="lang-xml prettyprint-override"><code>&lt;Product&gt; ... etc ... &lt;DirectoryRef Id=&quot;ProgramMenuF...
<p>You need to add a <code>ComponentRef</code> under the Feature you want to control the install of your Component.</p>
WiX installer nested start-menu directory, LGHT0204 error
installation|wix|cpack
0
48
1
72,891,154
72,891,154
0
true
2022-07-06T11:03:45.050Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: WiX installer nested start-menu directory, LGHT0204 error<p>I'm using CPACK and something like this for my WiX3 installer to create a nested start menu folde...
72,802,665
Gseapy: how to get gene list used for each pathway<p>I am running an enrichment analysis with gseapy enrichr on a list of genes. I am using the following code:</p> <pre><code>enr_res = gseapy.enrichr(gene_list = glist[:5000], organism = 'Mouse', gene_sets = ['GO...
<pre><code>pd.set_option('display.max_colwidth', 3000) </code></pre> <p>This increases the number of displayed characters and somehow this solves the problem for me. :)</p>
Gseapy: how to get gene list used for each pathway
pandas|list|bioinformatics|rna-seq|scanpy
0
48
1
72,894,161
72,894,161
0
true
2022-06-29T13:58:02.400Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Gseapy: how to get gene list used for each pathway<p>I am running an enrichment analysis with gseapy enrichr on a list of genes. I am using the following cod...
72,895,723
How to support List/Range of arguments in argparse?<p>In python I have:</p> <pre><code>parser = argparse.ArgumentParser(description='RANGES') parser.add_argument('IP_Address', action='store', type=str) </code></pre> <p>How can I let the user provide a single IP adresses or range or separate data?</p> <p>for example I w...
<p>You could try something like <a href="https://docs.python.org/3/library/argparse.html#nargs" rel="nofollow noreferrer">this</a>:</p> <pre><code>parser.add_argument('IP_Address', nargs='+', action='store', type=str) </code></pre> <p>This would only solve your first question.</p> <p><code>nargs='*'</code> might also b...
How to support List/Range of arguments in argparse?
python|argparse
-1
48
2
72,895,875
72,895,875
0
true
2022-07-07T09:49:57.367Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to support List/Range of arguments in argparse?<p>In python I have:</p> <pre><code>parser = argparse.ArgumentParser(description='RANGES') parser.add_argu...
72,898,888
(TS) Types of parameters are incompatible<p>I have this code</p> <pre><code> const [data, setData] = useState([] as object[]); const dataHandle = ( recipes: object[] ) =&gt; { setData( recipes.map((recipe: { recipe_id: string, title: string, image_url: string }) =&gt; { return { id: rec...
<p>Hey I think the problem here is that <code>object[]</code> is too vague to describe the object you want to type so typescript doesn't know if <code>recipe</code> indeed has those fields inside so you can describe this better for typescript like this:</p> <pre><code>interface IRecipe{ recipe_id: string; title...
(TS) Types of parameters are incompatible
typescript
0
48
1
72,899,552
72,899,552
0
true
2022-07-07T13:40:50.320Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: (TS) Types of parameters are incompatible<p>I have this code</p> <pre><code> const [data, setData] = useState([] as object[]); const dataHandle = ( recipe...
72,899,223
SQL Server 2019 Express : reading from / writing to SQL Server database (serverless) - working in SSMS but failing when in an INSERT trigger<p>I've been struggling with a trigger on my SQL Server Express database that verifies an incoming record and then writes it to my Azure SQL database (serverless).</p> <p>Initially...
<p>Distributed transactions in SQL Server (Express) relies on MSDTC which does not exist for cloud services as Azure SQL Database. You cannot include an insert in your local db and in cloud db in the same transaction. Perhaps you are better off with building a solution based on <a href="https://docs.microsoft.com/en-us...
SQL Server 2019 Express : reading from / writing to SQL Server database (serverless) - working in SSMS but failing when in an INSERT trigger
sql-server|azure-sql-database|linked-server
0
48
2
72,900,871
72,900,871
0
true
2022-07-07T14:02:18.143Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: SQL Server 2019 Express : reading from / writing to SQL Server database (serverless) - working in SSMS but failing when in an INSERT trigger<p>I've been stru...
72,902,415
Retrieve Array from Firebase Firestore using REST API on iOS<p>I'm using REST APIs to retrieve data from my Firestore DB. I'm forced to use REST API instead of the Firebase SDK since App Clip don't allow to use the latter.</p> <p>The JSON file is the following: <a href="https://i.stack.imgur.com/Hz5Ip.png" rel="nofollo...
<p>Well. <code>listaRefsLinea</code> is a custom object just like your <code>StringValue</code></p> <p>So add these structs:</p> <pre><code>// MARK: - ListaRefsLinea struct ListaRefsLinea: Codable { let arrayValue: ArrayValue } // MARK: - ArrayValue struct ArrayValue: Codable { let values: [Value] } // MARK: ...
Retrieve Array from Firebase Firestore using REST API on iOS
ios|swift|firebase|rest|google-cloud-firestore
1
48
1
72,903,006
72,903,006
0
true
2022-07-07T18:07:03.640Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Retrieve Array from Firebase Firestore using REST API on iOS<p>I'm using REST APIs to retrieve data from my Firestore DB. I'm forced to use REST API instead ...
72,881,973
Regex spaces between chars except the beginning Java<p>I've been struggling my mind for the past couple of hours in order to get the following behaviour in a sentence of characters:</p> <p><code>John is $@^&amp;%$#@&amp;$^12(random chars...)</code> - match<br> <code>John is $@^&amp;%$#@&amp;$^12(random chars...) </co...
<p>You can use</p> <pre class="lang-java prettyprint-override"><code>text.matches(&quot;\\S.*&quot;) </code></pre> <p>The <code>String#matches</code> requires a full string match and the pattern matches a string that matches</p> <ul> <li><code>\S</code> - a non-whitespace as the first char and then</li> <li><code>.*</c...
Regex spaces between chars except the beginning Java
java|regex|filter
2
48
1
72,904,482
72,904,482
0
true
2022-07-06T10:32:22.967Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Regex spaces between chars except the beginning Java<p>I've been struggling my mind for the past couple of hours in order to get the following behaviour in a...
72,904,586
Google Admin API to Restore Permanently Deleted Files<p>Is there a way to restore permanently deleted files in Google Drive via the API? I know that it is possible from the admin console, butI can't seem to find anything about an API to do it.</p>
<p>Currently there is no way to perform such action through the <a href="https://developers.google.com/admin-sdk/directory" rel="nofollow noreferrer"><code>Admin SDK</code></a> so at the moment you could only submit a feedback a feature request, you do this through an <a href="https://issuetracker.google.com/issues/new...
Google Admin API to Restore Permanently Deleted Files
google-drive-api|google-admin-sdk
0
48
1
72,904,880
72,904,880
0
true
2022-07-07T21:46:42.163Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Google Admin API to Restore Permanently Deleted Files<p>Is there a way to restore permanently deleted files in Google Drive via the API? I know that it is po...
72,902,868
How to parse array column in the spark that contains the list of key-> value pair<p>I have a dataframe that contains five columns (A1,B1,C1,D1,E1)</p> <p>Column E1 is an Array that contains a list [[a1 -&gt; V1, a2-&gt; V2, a3 -&gt; V3]]</p> <p>Could you please guide me how can I get the data as format below in PySpar...
<p>You could go through every map in your array and select elements accordingly. Python's <code>enumerate</code> may be of use.</p> <pre class="lang-py prettyprint-override"><code>df = df.select( 'A1', 'B1', 'C1', 'D1', *[F.col('E1')[i][c].alias(c) for i, c in enumerate(['a1', 'a2', 'a3'])] ) </code></pre> <hr ...
How to parse array column in the spark that contains the list of key-> value pair
python|dataframe|apache-spark|pyspark|apache-spark-sql
0
48
1
72,907,849
72,907,849
0
true
2022-07-07T18:51:44.703Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to parse array column in the spark that contains the list of key-> value pair<p>I have a dataframe that contains five columns (A1,B1,C1,D1,E1)</p> <p>Col...
72,898,258
React - Functional split page<p>I am a beginner in React and I would like to show two different things in my project but on the same page: I want to split the screen in 2 and achieve this (example: left side -&gt; I want to show a map which is functional; right side -&gt; I want to show a video). Also, how should I org...
<p>You need to style it in CSS. The container permit to have the two components in a line, then you tell that each component as a 50% width</p> <p>JS:</p> <pre class="lang-js prettyprint-override"><code>&lt;div className='container'&gt; &lt;div className='map'&gt; &lt;Map /&gt; &lt;/div&gt; &lt;div classNam...
React - Functional split page
css|reactjs|flexbox
-3
48
1
72,908,361
72,908,361
0
true
2022-07-07T12:58:38.463Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: React - Functional split page<p>I am a beginner in React and I would like to show two different things in my project but on the same page: I want to split th...
72,909,878
Should flexbox containers be used to add text to a page?<p>I am currently making a page with flexboxes, and when it comes to adding text areas, I wonder if I should make a new container for each text area or is it not the way to do ?</p> <p>Let's say I have the following code for my page:</p> <pre><code> &lt;div class=...
<p>If you need columns in your <strong>flex-container</strong> you can use flexbox. I mean something like this. from your code I think you can use <p> directly in flexbox. that will reduce DOM size. <a href="https://i.stack.imgur.com/d9zYM.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/d9zYM.jpg" al...
Should flexbox containers be used to add text to a page?
html
-2
48
2
72,910,133
72,910,133
0
true
2022-07-08T10:11:28.490Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Should flexbox containers be used to add text to a page?<p>I am currently making a page with flexboxes, and when it comes to adding text areas, I wonder if I...
72,910,575
Getter function to return values of a struct in c<p>I'm practicing c and I want to return data of a struct to access it within an other location.</p> <p>Let's say I have something like this:</p> <pre><code>typedef struct { int8 x; u64 y; u32 z; } myData_t; myData_t myData_g; /*Set...
<p>First of all, for things like this consider making the &quot;global&quot; a private variable instead, by adding <code>static myData_t myData_g;</code>. Now nobody outside this .c file can access it intentionally/by accident.</p> <p>As for your function <code>GettmyData</code>, it will work fine. However, passing/ret...
Getter function to return values of a struct in c
c|struct
0
48
1
72,910,691
72,910,691
0
true
2022-07-08T11:14:40.237Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Getter function to return values of a struct in c<p>I'm practicing c and I want to return data of a struct to access it within an other location.</p> <p>Let'...
72,911,401
is there any way i could do to be specific to my if else statements?<p>im a java newbie and can't seem to terminate my code wisely,here is my if else statement and what it does is just subtracts the other if statements,is there anyway i could do to subtract the availAmount to a specific if statement? thank you</p> <pre...
<p>If you only want one if statement to run then you need to use the <code>if (...) { ...} else if</code> syntax. Changing your code so that the <code>availAmount</code> is only reduced once could be done with something like the following:</p> <pre><code>double upgradeAccessories(double availAmount) { hasAC = a...
is there any way i could do to be specific to my if else statements?
java|class|object
0
48
2
72,911,569
72,911,569
0
true
2022-07-08T12:26:12.767Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: is there any way i could do to be specific to my if else statements?<p>im a java newbie and can't seem to terminate my code wisely,here is my if else stateme...
72,910,187
NoClassDefFoundError error with JDBCPool in vertx 4.3.2<p>I am getting error with new JDBCClient API.</p> <pre><code>java.lang.NoClassDefFoundError: io/agroal/api/configuration/supplier/AgroalDataSourceConfigurationSupplier </code></pre> <p>Created project from starter, included jdbc-client and H2 database API.</p> <pr...
<p>Given that the vert.x client requires a pool, all pool implementations are marked as optional dependencies and your build tool does not pull it to your project. Which means you need to explicitly add it; otherwise you will see that error. For this case, you will need:</p> <pre><code>io.agroal:agroal-api1.16 io.agroa...
NoClassDefFoundError error with JDBCPool in vertx 4.3.2
jdbc|vert.x|vertx4
0
48
1
72,913,229
72,913,229
0
true
2022-07-08T10:38:00.827Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: NoClassDefFoundError error with JDBCPool in vertx 4.3.2<p>I am getting error with new JDBCClient API.</p> <pre><code>java.lang.NoClassDefFoundError: io/agroa...
72,778,858
neural network not optimizing weights of first layer, returning all 1's for z1<p>So im building a neural network in python right now losely following Andrew Ng's machine learning course. It has 3 layers (all sigmoid) and works on predicting the MNIST dataset. But it fails to actually predict the dataset, and while the ...
<p>Ok so i did some more testing and figured out that it really was both wrongly initialized theta values as well as a learning rate that was to high and not having the MNIST dataset normalized (which kept theta1 from learning as there are a lot of 0's in the MNIST dataset due to a lot of pixels being black which made ...
neural network not optimizing weights of first layer, returning all 1's for z1
python|machine-learning|neural-network|mnist
0
48
1
72,917,818
72,917,818
0
true
2022-06-27T22:22:00.900Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: neural network not optimizing weights of first layer, returning all 1's for z1<p>So im building a neural network in python right now losely following Andrew ...
72,850,442
PHP prevent SIGTERM to bubble to proc_open process<p><strong>Original question (Send SIGTERM to child on CTRL+C and parent should wait for it to close). See update below!</strong></p> <p>I have a PHP script (see below) starting a process and tailing it's output. This process keeps running until I ask PHP to stop by hit...
<p>So after a few days of puzzling around with this issue if found out that proc_open seems to sort of inherit PHP's setting regarding the SIG_IGN signal.</p> <p>When saying <code>pcntl_signal(SIGTERM, SIG_IGN, false);</code> PHP and process opened by proc_open both ignore this signal.</p> <p>When saying <code>pcntl_si...
PHP prevent SIGTERM to bubble to proc_open process
php|process|signals
0
48
1
72,922,463
72,922,463
0
true
2022-07-03T22:58:53.990Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: PHP prevent SIGTERM to bubble to proc_open process<p><strong>Original question (Send SIGTERM to child on CTRL+C and parent should wait for it to close). See ...
72,915,063
Why new password is saved even if you don't respect validation strength meter?<p>I am trying to increase the security of my website and user account settings. So I wanted to insert a password strength meter to give the password a security level. Everything works correctly but it seems to be just a question of style.</p...
<p>After a few days of looking for a solution I found one. I realized woocommerce provides its own password strength meter, but I didn't know it was there. Since it's already there I've used that.</p> <p><strong>Password Strength Meter file</strong>: <a href="https://github.com/woocommerce/woocommerce/blob/5175a6820b1e...
Why new password is saved even if you don't respect validation strength meter?
javascript|php|wordpress|forms|woocommerce
1
48
1
72,923,989
72,923,989
0
true
2022-07-08T17:38:04.547Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why new password is saved even if you don't respect validation strength meter?<p>I am trying to increase the security of my website and user account settings...
72,923,998
How to use Docker at GitLab stage if I already use another image?<p>This is a working code when I only need Docker:</p> <pre class="lang-yaml prettyprint-override"><code>build_stage: stage: build image: docker:20.10.16 # This is mandatory to use Docker services: - docker:20.10.16-dind script: - docker ...
<p>I've found that I do not need to use <code>image: docker</code> to use Docker, but I must to specify variables then:</p> <pre class="lang-yaml prettyprint-override"><code>deploy_stage: stage: deploy image: google/cloud-sdk:latest # Note that I do not use Docker. I use another image. services: - docker:20....
How to use Docker at GitLab stage if I already use another image?
gitlab-ci
-1
48
1
72,928,228
72,928,228
0
true
2022-07-09T19:13:09.923Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to use Docker at GitLab stage if I already use another image?<p>This is a working code when I only need Docker:</p> <pre class="lang-yaml prettyprint-ove...
72,928,962
cannot import name 'reder_template' from 'flask'<p>How to fix this error :</p> <blockquote> <p>cannot import name 'reder_template' from 'flask' (/usr/local/lib/python3.9/site-packages/flask/<strong>init</strong>.py)</p> </blockquote> <pre><code>from flask import Flask, request, reder_template, redirect import os import...
<p>The problem is a typo, you have imported <code>reder_template</code> instead of <code>render_template</code> from <code>flask</code>.</p>
cannot import name 'reder_template' from 'flask'
python|flask
-3
48
1
72,928,985
72,928,985
0
true
2022-07-10T13:47:20.687Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: cannot import name 'reder_template' from 'flask'<p>How to fix this error :</p> <blockquote> <p>cannot import name 'reder_template' from 'flask' (/usr/local/l...
72,931,994
C++ Template Argument Deduction with Additional Specified Template Arguments<p>I have encountered an issue with template argument deduction. The following complies without issues, the compiler can deduce the template argument:</p> <pre><code>template&lt;size_t a_size&gt; class DummyBase { public: DummyBase() = dele...
<p>Unfortunately, &quot;Class template argument deduction is only performed if no template argument list is present. If a template argument list is specified, deduction does not take place.&quot; - <a href="https://en.cppreference.com/w/cpp/language/class_template_argument_deduction" rel="nofollow noreferrer">https://e...
C++ Template Argument Deduction with Additional Specified Template Arguments
c++|templates
0
48
1
72,932,771
72,932,771
0
true
2022-07-10T21:22:51.320Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: C++ Template Argument Deduction with Additional Specified Template Arguments<p>I have encountered an issue with template argument deduction. The following co...
72,939,535
Calculator display value reset after clicking operator sign<p>I'm trying to make an if statement that does the following: reset the display when you click a number after an operator sign.</p> <p>The issue is it only displays up to a maximum of one number after running the if statement.</p> <p>Kindly check out what I'm ...
<p>Is it okay to hardcode display value to <code>0</code> ?</p> <p>It does the same thing regarding the <em>resetting</em> of the display, and you can keep typing on as much as you want afterwards.</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-c...
Calculator display value reset after clicking operator sign
javascript|calculator
1
48
1
72,939,635
72,939,635
0
true
2022-07-11T13:41:34.400Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Calculator display value reset after clicking operator sign<p>I'm trying to make an if statement that does the following: reset the display when you click a ...
72,941,761
For loop - Struct with lifetime 'a cannot borrow as mutable because it is also borrowed as immutable<p>I have a struct which maps ids to indices and vice versa.</p> <pre><code>struct IdMapping&lt;'a&gt; { external_2_internal: HashMap&lt;&amp;'a str, usize&gt;, internal_2_external: HashMap&lt;usize, String&gt;, ...
<p>The problem is due to the self reference in your struct.</p> <p>Let's first look at whether this is theoretically sound (assuming we're writing unsafe code):</p> <ol> <li><code>HashMap</code> uses a flat array (quadratic probing), so objects in the HashMap aren't address stable under insertion of a new element. Thi...
For loop - Struct with lifetime 'a cannot borrow as mutable because it is also borrowed as immutable
rust|lifetime-scoping
0
48
1
72,942,371
72,942,371
0
true
2022-07-11T16:29:34.627Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: For loop - Struct with lifetime 'a cannot borrow as mutable because it is also borrowed as immutable<p>I have a struct which maps ids to indices and vice ver...
72,922,084
How to add arbitrary inline images in Rails Mailer?<p>I'm working on a Rails app that sends emails with arbitrary HTML content. In the mailer, we have:</p> <pre><code>class YeetMailer &lt; ActionMailer::Base def welcome_email(html) # custom method that returns string[] where each string is an image src attri...
<p>Turns out you can:</p> <pre><code> @images.each_with_index { |i, idx| attachments.inline[i] = URI.open(i).read cid = attachments[idx].header.find { |h| h.name == 'Content-ID' }.field.value html = html.sub(i, &quot;cid:#{cid}&quot;) } </code></pre>
How to add arbitrary inline images in Rails Mailer?
ruby-on-rails|email|ruby-on-rails-5|slim
0
48
1
72,945,096
72,945,096
0
true
2022-07-09T14:14:51.773Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to add arbitrary inline images in Rails Mailer?<p>I'm working on a Rails app that sends emails with arbitrary HTML content. In the mailer, we have:</p> <...
72,942,199
Assign a manager to a user using Microsoft Python SDK for Azure<p>Ok MS Graph/Python Gurus. How do I populate (assign a manager) to a user via the Azure Python SDK? If there is a way can you point me to it. I went as far as looking through the Python SDK source and I cannot find a solution.</p>
<blockquote> <p>How do I populate (assign a manager) to a user via the Azure Python SDK?</p> </blockquote> <p>AFAIK, as of now, assigning a manager via Python SDK is not possible.</p> <p>Alternatively, you can use REST API, according to <a href="https://docs.microsoft.com/en-us/graph/api/user-post-manager?view=graph-re...
Assign a manager to a user using Microsoft Python SDK for Azure
python|azure|api|assign
0
48
1
72,946,956
72,946,956
0
true
2022-07-11T17:07:13.720Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Assign a manager to a user using Microsoft Python SDK for Azure<p>Ok MS Graph/Python Gurus. How do I populate (assign a manager) to a user via the Azure Pyt...
72,938,347
why arrow function gives different result that inline callback function?<p>I want to remove everything from an array but numbers, so I wrote this code:</p> <pre class="lang-js prettyprint-override"><code>// test array let array = [NaN, 0, 15, false, -22, '', undefined, 47, null]; // using arrow function let a = array....
<p>sorry, my bad :(</p> <p>as mentioned in the comments:</p> <pre class="lang-js prettyprint-override"><code>if (typeof val === 'number') { return val; } </code></pre> <pre class="lang-js prettyprint-override"><code>return typeof val === 'number'; </code></pre> <p>these two things are NOT the same.</p>
why arrow function gives different result that inline callback function?
javascript|arrays|filter|callback|arrow-functions
-1
48
1
72,948,634
72,948,634
0
true
2022-07-11T12:08:24.957Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: why arrow function gives different result that inline callback function?<p>I want to remove everything from an array but numbers, so I wrote this code:</p> <...
72,950,675
Find an element and add character to the string<p>I have an object (obj) containing an array (create), I would like to access the create.field and modify 'OWNER' to 'OWNER_ID'. I have other data in the create array so I do not wish to erase it.</p> <pre><code> const obj = { pro: 0, gr: 0, create: [ { field: &quot;...
<p>You can achieve that using a <code>.map</code> function and an if check easily:</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override"><code>const obj = { pro: 0, gr: 0, create: [ ...
Find an element and add character to the string
javascript|reactjs
0
48
5
72,950,745
72,950,745
0
true
2022-07-12T10:17:02.127Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Find an element and add character to the string<p>I have an object (obj) containing an array (create), I would like to access the create.field and modify 'OW...
72,951,136
Style only show's correct button after refreshing the page<p>we use WordPress and Elementor to build a page. We currently have 2 different checkout systems - one for ourselves and 1 with Shopify for Affiliates.</p> <p>Because of that, we have 2 &quot;Buy now&quot; buttons, and we display only 1, depending on a cookie &...
<p>You can test for <code>$_COOKIE</code> &amp; <code>$_GET</code></p> <pre><code>&lt;?php if(isset($_COOKIE[&quot;ref&quot;]) || isset($_GET['ref'])) : ?&gt; &lt;style&gt; .btn-ds24{ display: none !important; } &lt;/style&gt; &lt;?php else: ?&gt; &lt;style&gt; .btn-shopify{ ...
Style only show's correct button after refreshing the page
php|html|wordpress|elementor
0
48
2
72,951,598
72,951,598
0
true
2022-07-12T10:54:31.227Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Style only show's correct button after refreshing the page<p>we use WordPress and Elementor to build a page. We currently have 2 different checkout systems -...