question_id
int64
37.6M
73.2M
input_text
stringlengths
88
52.4k
output_text
stringlengths
37
35.6k
title
stringlengths
15
150
tags
stringlengths
1
107
q_score
int64
-19
397
view_count
int64
3
879k
answer_count
int64
1
21
accepted_answer_id
int64
37.6M
73.8M
answer_id
int64
37.6M
73.8M
a_score
int64
-5
1.29k
is_accepted
bool
1 class
creation_date
stringlengths
20
24
input_text_instruct
stringlengths
251
52.6k
71,969,770
How can I replace the certbot ssl certicate with a commercial ssl certifcate?<p>I enabled https on my nodejs application hosted on digital ocean. I used certbot. I want to replace the free certificate with a commercial certificate so not it shows up as &quot;secure&quot;. How can I do that?</p>
<p>If your site does not show <strong>secure</strong> with a free certificate, there is a problem with your configuration. Buying one will not fix that problem unless the issue is an expired certificate.</p> <p>To change certificates copy the private key and certificate to a safe location on your server and then chang...
How can I replace the certbot ssl certicate with a commercial ssl certifcate?
node.js|digital-ocean|certbot
0
24
1
72,025,337
72,025,337
1
true
2022-04-22T13:43:44.193Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I replace the certbot ssl certicate with a commercial ssl certifcate?<p>I enabled https on my nodejs application hosted on digital ocean. I used cert...
72,024,023
How to use :hover affects to child element?<p>I have this html structure:</p> <pre><code>.Gallery &gt; .Gallery__container &gt; .Gallery__container-item &gt; .Gallery__container-item-image </code></pre> <p>I want to <code>:hover</code> on <code>.Gallery__container-item</code> affects to <code>.Gallery__container-item-i...
<p>The ampersand <code>&amp;</code> in your code will not compile to what you want.<br /> <strong>Here is a simplified example (with less markup and less styling):</strong></p> <pre><code>.Gallery { &amp;-item { &amp;:hover { &amp;-image { transition: scale 1s linear; ...
How to use :hover affects to child element?
sass
0
32
1
72,025,384
72,025,384
1
true
2022-04-27T06:11:22.470Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to use :hover affects to child element?<p>I have this html structure:</p> <pre><code>.Gallery &gt; .Gallery__container &gt; .Gallery__container-item &gt;...
72,025,315
how to update react hooks array state?<p>I have react-hooks with array state. I would like to update my date data from this code.</p> <pre><code>const [[birthYear, birthMonth, birthDay], setStudentDob] = useState([]); </code></pre> <p>how can I change with the OnChange event on reacts?</p> <pre><code>//date &lt;select ...
<p>The <strong>handleDate</strong> can be like this:</p> <pre><code>const handleDate = (value, index) =&gt; { setStudentDob(s =&gt; { let arr = [...s]; arr[index] = value; return arr; }) } </code></pre> <p>Make sure to pass the correct parameters in the onChange handler:</p> <pre><code>&lt;sel...
how to update react hooks array state?
arrays|reactjs|react-hooks
0
26
1
72,025,563
72,025,563
1
true
2022-04-27T08:05:46.360Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to update react hooks array state?<p>I have react-hooks with array state. I would like to update my date data from this code.</p> <pre><code>const [[birt...
72,016,843
How to integrate new cdk stack with existed aws EventBridge (EventTarget)<p>Since the resources on AWS have been created by manual on console. e.g. <strong>Rule</strong>, <strong>EventBus</strong>, <strong>APIDestination</strong> (Target). Means these resource doesn't provide any cdk code.</p> <p>Point is I want to add...
<p>The L1 <a href="https://docs.aws.amazon.com/cdk/api/v2/python/aws_cdk.aws_events/CfnRule.html#cfnrule" rel="nofollow noreferrer">CfnRule</a> construct can create a new Rule targeting an existing API Destination and custom bus. It can also optionally apply input transforms:</p> <pre class="lang-py prettyprint-overri...
How to integrate new cdk stack with existed aws EventBridge (EventTarget)
python|amazon-web-services|aws-cdk|aws-event-bridge
0
531
1
72,026,218
72,026,218
1
true
2022-04-26T15:44:19.637Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to integrate new cdk stack with existed aws EventBridge (EventTarget)<p>Since the resources on AWS have been created by manual on console. e.g. <strong>R...
72,026,283
Powershell, Installed Software List from Registry Export Csv<p>been trying to get this to output to a csv. Works fine in of itself, but can't figure out how to do it. I guess because I'm using write-host it never actually goes in the pipeline which gives me a null pipeline input error. I've tried playing aroung with a ...
<p>You need to create first an object with the information about the specific program and the add this information to an array. Then you can export the array as an CSV. You could also export one entry at a time and append it to the csv. But if find this approach cleaner:</p> <pre><code>$InstalledSoftware = Get-ChildIte...
Powershell, Installed Software List from Registry Export Csv
powershell|csv|registry|windows-scripting|installed-applications
0
274
2
72,026,427
72,026,427
1
true
2022-04-27T09:18:48.817Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Powershell, Installed Software List from Registry Export Csv<p>been trying to get this to output to a csv. Works fine in of itself, but can't figure out how ...
72,026,202
Filter SQlite unix timestamp data on hh:mm:ss part<p>I have the following records in my SQlite DB.</p> <pre><code> **SESSION** **DATETIME **BID** ASK** 25e309b5-eecd-49f7-a1e4-0a77d4804978 1650240126 1979.74 1979.99 25e309b5-eecd-49f7-a1e4-0a77d4804978 1650240129 1979.73 1979.97 2...
<p>You need the function <code>time()</code> with the <code>'unixepoch'</code> modifier:</p> <pre><code>SELECT * FROM tablename WHERE time(DATETIME, 'unixepoch') &lt; '00:02:05'; </code></pre>
Filter SQlite unix timestamp data on hh:mm:ss part
sql|sqlite|date|unix-timestamp
0
22
1
72,026,507
72,026,507
1
true
2022-04-27T09:12:41.063Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Filter SQlite unix timestamp data on hh:mm:ss part<p>I have the following records in my SQlite DB.</p> <pre><code> **SESSION** **DAT...
72,026,425
TYPO3 8.7.32: html is output as text in setup<p>Hello I use the mindshap cookie hint extention which is also displayed in the frontend. everything except the link is also output correctly. Does anyone know how I can add a link to hint.message or what I did wrong.</p> <pre><code>plugin.tx_mindshapecookiehint { _LOCAL...
<p>hit the Local Language lables are just plaintext. the encoding usually happens at the output. most likly fluid templating is used for the output. which html-encodeds by default to avoid security problems.</p> <p>you might use the fluid view helper &lt;f:format.raw&gt; to avoid escaping in your template. (but your la...
TYPO3 8.7.32: html is output as text in setup
html|cookies|typo3|typo3-8.x
0
35
1
72,026,580
72,026,580
1
true
2022-04-27T09:30:07.197Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: TYPO3 8.7.32: html is output as text in setup<p>Hello I use the mindshap cookie hint extention which is also displayed in the frontend. everything except the...
72,025,006
Why does my dash app not update with RadioItems<p>In the dash app below, my figure legend only updates when I change the values of 'points_category' - if I click a button on the 'legend_display' object then the legend does not appear or disappear until I change a value in the 'points_category' object.</p> <p>Can someon...
<p>To solve this problem remove the transition, the following line:</p> <pre><code>fig.update_layout(transition_duration=500) </code></pre> <p>It seems that there is a problem of synchronization between updating the layout and the speed of callback. Callback cannot wait for the update of layout to update of the legend,...
Why does my dash app not update with RadioItems
python|plotly|radio-button|plotly-dash|plotly-python
0
259
1
72,026,851
72,026,851
1
true
2022-04-27T07:41:26.363Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why does my dash app not update with RadioItems<p>In the dash app below, my figure legend only updates when I change the values of 'points_category' - if I c...
72,027,167
How do I group 2 columns with a max value in a third column using MySQL?<p>With this table....</p> <pre><code>CREATE TABLE test ( id INT, date VARCHAR(50), g1 VARCHAR(50), stats INT ); INSERT INTO test VALUES (1,'2002-01-01','a',2); INSERT INTO test VALUES (2,'2002-01-02','a',3); INSERT INTO test VALUES (...
<p>If your mysql version suuport <code>ROW_NUMBER</code> window function you can try this.</p> <pre><code>SELECT * FROM ( SELECT *,ROW_NUMBER() OVER(PARTITION BY g1 ORDER BY stats DESC) rn FROM test ) t1 WHERE rn = 1 </code></pre> <p>or <code>EXISTS</code> subquery</p> <pre><code>SELECT * FROM test t1 WHERE EXISTS ( ...
How do I group 2 columns with a max value in a third column using MySQL?
mysql|group
0
27
2
72,027,277
72,027,277
1
true
2022-04-27T10:25:47.943Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I group 2 columns with a max value in a third column using MySQL?<p>With this table....</p> <pre><code>CREATE TABLE test ( id INT, date VARCHAR(50...
72,018,072
Having what week day is on left column<p>I have the following <a href="http://snippet.dhtmlx.com/5/314bf7ab3" rel="nofollow noreferrer">http://snippet.dhtmlx.com/5/314bf7ab3</a> but where i have the day of the calendar, i also want to put if it's monday, tuesday or so on...</p> <p>In the documentation at <a href="https...
<p>Seems like the issue is in the scale label template definition.</p> <p>TLDR: Once you rename the template like the following, it should work:</p> <pre><code>var dateToStr = scheduler.date.date_to_str(&quot;%j %F, %l&quot;); scheduler.templates[&quot;timeline_scale_label&quot;] = function(section_id, section_label, s...
Having what week day is on left column
dhtmlx-scheduler
0
24
1
72,027,356
72,027,356
1
true
2022-04-26T17:21:19.923Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Having what week day is on left column<p>I have the following <a href="http://snippet.dhtmlx.com/5/314bf7ab3" rel="nofollow noreferrer">http://snippet.dhtmlx...
72,026,323
Pivot_longer column groups<p>In this dataframe I need to <code>pivot_longer</code> the two column groups starting with <code>f</code>, with each group pivoted separately:</p> <pre><code>df &lt;- structure(list(bigr_1_2 = c(&quot;i_PNP 'm_VBB&quot;,NA, NA), bigr_2_3 = c(&quot;it_PNP 's_VBZ&quot;, &...
<p>This cannot be done by one <code>pivot_longer</code> name_vars per row are often similar. The closes you can get:</p> <pre><code>df %&gt;% pivot_longer(starts_with('f'), names_to = c('.value', 'grp'), names_pattern = '([^_]+)_?(\\d+)') # A tibble: 9 x 6 bigr_1_2 bigr_2_3 ...
Pivot_longer column groups
r|tidyr
0
34
2
72,027,476
72,027,476
1
true
2022-04-27T09:22:21.917Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Pivot_longer column groups<p>In this dataframe I need to <code>pivot_longer</code> the two column groups starting with <code>f</code>, with each group pivote...
72,027,452
Rendering string from MYSQL in div removes all white space<p>I am trying to render a string with spaces and line spaces in it.</p> <p>When I render the string as a value on an input, the spaces show as expected.</p> <pre><code>&lt;textarea rows={15} value={content} /&gt; </code></pre> <p>When I render the string in...
<p>You could apply <code>white-space: pre-wrap;</code> style to your <code>div</code>, so the white spaces will be displayed</p>
Rendering string from MYSQL in div removes all white space
javascript|html|reactjs
0
33
1
72,027,563
72,027,563
1
true
2022-04-27T10:47:41.880Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Rendering string from MYSQL in div removes all white space<p>I am trying to render a string with spaces and line spaces in it.</p> <p>When I render the strin...
72,027,824
AWS CDK: Don't build assets when running 'cdk bootstrap' command<p>I bundle my assets using Docker &amp; Dockerfile:</p> <pre><code>Code.from_docker_build( path='/path', build_args={}, ) </code></pre> <p>Every time I run <code>cdk deploy</code> or <code>cdk bootstrap</code> the code bundling is triggered.</p> <...
<blockquote> <p><a href="https://docs.aws.amazon.com/cdk/v2/guide/cli.html#cli-bootstrap" rel="nofollow noreferrer">Docs</a>: If issued with no arguments... the cdk bootstrap command synthesizes the current app and bootstraps the environments its stacks will be deployed to.</p> </blockquote> <p>So to have <code>cdk boo...
AWS CDK: Don't build assets when running 'cdk bootstrap' command
python|amazon-web-services|aws-cdk|aws-cdk-python
0
268
1
72,028,283
72,028,283
1
true
2022-04-27T11:19:29.523Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: AWS CDK: Don't build assets when running 'cdk bootstrap' command<p>I bundle my assets using Docker &amp; Dockerfile:</p> <pre><code>Code.from_docker_build( ...
72,025,648
My raycast is not detecting objects properly<p>Im trying to create a CameraFollow script for a 2.5d game where the camera follows the player with a tilted 60 degree angle, but when the player is hidden behind a wall the camera uses an eagle view of 90 degrees. For doing that Im doing a raycast from the camera to the pl...
<p>Okay first, pet peeve of mine is lerp. Lerp is a linear interpolation, from first to second argument, with the third argument being a value between 0 and 1 that determines the &quot;blend&quot; between the first argument (0) and the second (1).</p> <p>If you're getting camera jitter then you're probably using physic...
My raycast is not detecting objects properly
c#|unity3d
0
33
1
72,028,475
72,028,475
1
true
2022-04-27T08:33:03.100Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: My raycast is not detecting objects properly<p>Im trying to create a CameraFollow script for a 2.5d game where the camera follows the player with a tilted 60...
72,028,658
How do you generate a List of Lists from Long Strings in a DataFrame Column?<p>Have a very awkward setup. I have a DataFrame with long strings in the second column, which I want to break up and convert into a list of lists.</p> <pre><code> col1 col2 0 P mary jane clare 1 Q tom dick harry 2 ...
<p>Split col2 using white space and then apply the to_list() method to come up with a single list</p> <pre><code>df['col2'].str.split('\s').to_list() </code></pre>
How do you generate a List of Lists from Long Strings in a DataFrame Column?
python|pandas|string|list
0
26
1
72,028,801
72,028,801
1
true
2022-04-27T12:23:55.093Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do you generate a List of Lists from Long Strings in a DataFrame Column?<p>Have a very awkward setup. I have a DataFrame with long strings in the second ...
72,029,186
How can I make Widget class get parameters input?<p>I am making a custom slider example and the code is :</p> <pre><code> @override _MysliderState createState() =&gt; _MysliderState(); } class _MysliderState extends State&lt;Myslider&gt;{ double _value = 0; @override Widget build(BuildContext context)=&gt; ...
<p>You can define params in widget like this:</p> <pre><code>class MySlider extends StatefulWidget { const MySlider({ Key? key, // seems like default color is green in your case this.thumbColor = Colors.green, this.min = -1, this.max = 1, }) : super(key: key); final Color thumbColor; final ...
How can I make Widget class get parameters input?
flutter|dart
0
28
1
72,029,601
72,029,601
1
true
2022-04-27T12:56:34.803Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I make Widget class get parameters input?<p>I am making a custom slider example and the code is :</p> <pre><code> @override _MysliderState createS...
72,029,506
Moving files not woking in powershell<p>I have a code:</p> <pre><code>cls $folderPath = 'Y:\lit\Retail\abc\abc\FTP-FromClient\AMS\2022-03-23' $files = Get-ChildItem $folderPath $destination='Y:\lit\Retail\abc\abc\FTP-FromClient\AMS\2022-03-23\bz2' $leftfiles=('20220322054419', '20220322083959', '20220322084715', '20220...
<p>Your code could be simplified if you use a <code>Where-Object</code> clause that filters the files to move using the regex <code>-match</code> operator</p> <pre><code>$folderPath = 'Y:\lit\Retail\abc\abc\FTP-FromClient\AMS\2022-03-23' $destination = 'Y:\lit\Retail\abc\abc\FTP-FromClient\AMS\2022-03-23\bz2' $leftfil...
Moving files not woking in powershell
powershell
0
29
1
72,029,632
72,029,632
1
true
2022-04-27T13:18:59.393Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Moving files not woking in powershell<p>I have a code:</p> <pre><code>cls $folderPath = 'Y:\lit\Retail\abc\abc\FTP-FromClient\AMS\2022-03-23' $files = Get-Ch...
72,030,231
Grab n item in nested array jq<p>I am trying to grab 'n' item from a nested json array. The scenario is that I need to get the IP addresses from newly created cloud instances from my cloud provider so I can perform automation task with ansible. Here is a sample of the json output from the api that my cloud provider giv...
<p>It seems you want:</p> <pre><code>jq -r '.[0].ipv4[]' </code></pre> <p>or perhaps:</p> <pre><code>jq -r '.[].ipv4[]' </code></pre>
Grab n item in nested array jq
arrays|json|bash|jq
0
29
1
72,030,331
72,030,331
1
true
2022-04-27T14:06:26.503Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Grab n item in nested array jq<p>I am trying to grab 'n' item from a nested json array. The scenario is that I need to get the IP addresses from newly create...
72,022,050
Rails Ajax not displaying the result<p>I have created a new controller, that in future will be responsible only for translating strings for different objects. Here is the code of the controller:</p> <pre><code> # frozen_string_literal: true class Api::TranslationsController &lt; AuthenticatedController def translate...
<p>I finally found what was wrong with my code. The problem was with fact that I didn't pass sessions token in ajax. So now my ajax code will look like this:</p> <pre><code> $.ajax({ type: &quot;GET&quot;, headers: { &quot;Authorization&quot;: &quot;Bearer &quot; + window.sessionToken }, ...
Rails Ajax not displaying the result
ruby-on-rails|ajax
0
19
1
72,030,573
72,030,573
1
true
2022-04-27T00:43:49.787Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Rails Ajax not displaying the result<p>I have created a new controller, that in future will be responsible only for translating strings for different objects...
72,030,832
Does ruamel.yaml have a function to do the process with all files in one directory?<p>Does ruamel.yaml have a function to do the process with all files in one directory? Something like this: <code>data = yaml.load(Path(&quot;*.*&quot;))</code></p>
<p>No, it does not, but you can do it one line (assuming you have the imports and the <code>YAML()</code> instance):</p> <pre><code>from pathlib import Path import ruamel.yaml yaml = ruamel.yaml.YAML() data = [yaml.load(p) for p in Path('.').glob('*.yaml')] </code></pre>
Does ruamel.yaml have a function to do the process with all files in one directory?
ruamel.yaml
0
12
1
72,031,077
72,031,077
1
true
2022-04-27T14:48:15.603Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Does ruamel.yaml have a function to do the process with all files in one directory?<p>Does ruamel.yaml have a function to do the process with all files in on...
72,031,073
Unreasonable undefined method `email'<p>I am building a repo that imitates Evernote, and I have established the relationship between the models and their respective columns. Among them, I rely on the column email in the model User to identify the user.</p> <p>However, when I try to print <code>&lt;%= note.user.email %&...
<blockquote> <p>undefined method `email' for nil:NilClass&quot;</p> </blockquote> <p>This error means you are looking for the method <code>email</code> on a nilClass object which mean your <code>note.user</code> is nil.</p> <p>Rails can't find any user related to the note. You can first check if your <code>note</code> ...
Unreasonable undefined method `email'
ruby-on-rails
0
24
1
72,031,555
72,031,555
1
true
2022-04-27T15:05:50.657Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Unreasonable undefined method `email'<p>I am building a repo that imitates Evernote, and I have established the relationship between the models and their res...
71,999,647
Regular expression to validate US phone numbers using Formik and Yup<p>I'm trying to validate us phone numbers inside my formik form using yep. I found some information on regex here on stackoverflow but it doesn't seem to be working. I basically need to be able to allow brackets, dashes and spaces aswell as the countr...
<p>Try this regex it can meet your requirements</p> <pre><code> /^((\(\d{3}\) ?)|(\d{3}-))?\d{3}-\d{4}$/ </code></pre> <p>It would look something like that:</p> <pre><code>validationSchema={Yup.object({ AdministratorCell: Yup.string() .matches(/^((\(\d{3}\) ?)|(\d{3}-))?\d{3}-\d{4}$/, { message:...
Regular expression to validate US phone numbers using Formik and Yup
python|reactjs|django|formik
0
268
2
72,032,128
72,032,128
1
true
2022-04-25T12:36:38.320Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Regular expression to validate US phone numbers using Formik and Yup<p>I'm trying to validate us phone numbers inside my formik form using yep. I found some ...
72,032,082
postgresql merge 2 queries with different dates into 1 table<p>So I am new to postgres and would like to merge two queries into one. This is my table: <a href="https://i.stack.imgur.com/k2j7c.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/k2j7c.png" alt="enter image description here" /></a></p> <p>Q...
<p>You can use CASE inside the SUM.</p> <pre><code>SELECT area, SUM(case when report_date = '2022-04-18' then volume else 0 end ) as &quot;4/18/22 Volume&quot;, SUM(case when report_date = '2022-04-25' then volume else 0 end ) as &quot;4/25/22 Volume&quot; FROM test WHERE report_date = '2022-04-18' OR repor...
postgresql merge 2 queries with different dates into 1 table
postgresql
0
14
1
72,032,155
72,032,155
1
true
2022-04-27T16:10:48.790Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: postgresql merge 2 queries with different dates into 1 table<p>So I am new to postgres and would like to merge two queries into one. This is my table: <a hre...
72,008,178
Mutually dependent constexpr constructors<p>I have two classes, each constructible from the other.</p> <p>Example:</p> <pre><code>class B; class A{ public: double val; constexpr A(B b): val(b.val){}; }; class B{ public: double val; constexpr B(A a): val(a.val){}; }; </code></pre> <p>I need to forward-declar...
<p>Using gcc I get the error (<a href="https://godbolt.org/z/qvP7absdr" rel="nofollow noreferrer">https://godbolt.org/z/qvP7absdr</a>):</p> <pre><code>&lt;source&gt;:6:15: error: 'b' has incomplete type 6 | constexpr A(B b) : val(b.val){}; | ~~^ &lt;source&gt;:1:7: note: forward declaration of 'cl...
Mutually dependent constexpr constructors
constructor|dependencies|constexpr|forward-declaration
0
18
1
72,032,182
72,032,182
1
true
2022-04-26T03:54:09.573Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Mutually dependent constexpr constructors<p>I have two classes, each constructible from the other.</p> <p>Example:</p> <pre><code>class B; class A{ public:...
72,032,218
How to load JSON to Dataframe with key value pair as two colums<p>I have some JSON, that I would like to load into a dataframe, but would like to retain the key/value pair structure.</p> <p>I've tried this:</p> <pre><code> body = '''{ &quot;groupId&quot;: &quot;1&quot;, &quot;categories&quot;:[ ...
<p>Transposing is right, but you also need to reset the index and rename the columns:</p> <pre><code>dfQuery = dfQuery.T.reset_index().rename({'index': 'type', 0: 'value'}, axis=1) </code></pre> <p>Output:</p> <pre><code>&gt;&gt;&gt; dfQuery type value 0 model xxx 1 colour Black 2 width 100 3 height ...
How to load JSON to Dataframe with key value pair as two colums
python|json|pandas
0
33
1
72,032,266
72,032,266
1
true
2022-04-27T16:21:19.007Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to load JSON to Dataframe with key value pair as two colums<p>I have some JSON, that I would like to load into a dataframe, but would like to retain the ...
72,024,151
Where is Influxdb.conf in influxdb2.2(windows)<p>I try to find <code>Influxdb.conf</code>, but when I download <code>Influxdb2.2</code>, I find there is no file name <code>Influxdb.conf</code>, does anyone know how can I find this file?</p>
<p>Configuration has changed in InfluxDB 2. If you want to change some setting to non-default, you have to create config file in one of the supported formats yourself and make sure <code>influxd</code> will use it.</p> <p>Please see <a href="https://docs.influxdata.com/influxdb/v2.2/reference/config-options/" rel="nofo...
Where is Influxdb.conf in influxdb2.2(windows)
influxdb-2
0
268
1
72,032,372
72,032,372
1
true
2022-04-27T06:24:37.803Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Where is Influxdb.conf in influxdb2.2(windows)<p>I try to find <code>Influxdb.conf</code>, but when I download <code>Influxdb2.2</code>, I find there is no f...
72,033,263
how to write script inside jsx?<p>I'm trying to display data using table in my react js project but it gives an error Unexpected token, expected &quot;:&quot;. what's the correct way of writing this code?</p> <p>any help is appreciated.</p> <p>here's my problematic code:</p> <pre><code>return ( &lt;div className=&quot;...
<p>Return and map function brackets were missing.</p> <pre><code> return ( &lt;div className=&quot;mb-4&quot;&gt; {toko.length &gt; 0 ? ( &lt;Table striped&gt; &lt;thead&gt; &lt;tr&gt; &lt;th className=&quot;ps-3&quot;&gt;Info Toko&lt;/th&gt; &lt;th c...
how to write script inside jsx?
reactjs|jsx
0
29
2
72,033,419
72,033,419
1
true
2022-04-27T17:52:23.767Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to write script inside jsx?<p>I'm trying to display data using table in my react js project but it gives an error Unexpected token, expected &quot;:&quot...
71,980,329
backend user permissions for HR type role<p>I'm trying to set up an HR type role, so one of our users can do all the backend user and division management. Most of it is working apart form two things When creating the user the Access Settings tab is missing the normal admin user shows it but my HR role does not <a href=...
<p>The tab is hidden because the new role doesn't have an Organization view permission.</p>
backend user permissions for HR type role
orocommerce
0
23
1
72,034,099
72,034,099
1
true
2022-04-23T13:57:51.660Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: backend user permissions for HR type role<p>I'm trying to set up an HR type role, so one of our users can do all the backend user and division management. Mo...
72,030,025
JMeter reads the old version of csv<p>I am trying to test some APIs but first I need to get session keys for each customer I use in the test. I have a CSV file with customer login information and read it with each thread.</p> <p>I have the following form in my JMeter file.</p> <ul> <li>CSV Data Set Config - User Login ...
<p>Take a look at <a href="https://jmeter.apache.org/usermanual/test_plan.html#executionorder" rel="nofollow noreferrer">JMeter Test Elements Execution Order</a></p> <blockquote> <ol start="0"> <li><p>Configuration elements</p> </li> <li><p>Pre-Processors</p> </li> <li><p>Timers</p> </li> <li><p>Sampler</p> </li> <li><...
JMeter reads the old version of csv
csv|jmeter
0
22
2
72,034,163
72,034,163
1
true
2022-04-27T13:53:24.117Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: JMeter reads the old version of csv<p>I am trying to test some APIs but first I need to get session keys for each customer I use in the test. I have a CSV fi...
71,873,902
How to add only elements that i want from inner v-for to elements in outer v-for<pre><code>&lt;details v-for=&quot;(detail, index) in details&quot; v-bind:key=&quot;detail&quot; &gt; &lt;summary&gt;{{cities[detail]}} - {{index}}&lt;/summary&gt; &lt;div v-for=&quot;item in items&quot; v-bind:key=&qu...
<pre><code>&lt;details v-for=&quot;detail in details&quot; v-bind:key=&quot;detail&quot; &gt; &lt;summary&gt;{{detail}}&lt;/summary&gt; &lt;div v-for=&quot;item in innerSort(detail)&quot; v-bind:key=&quot;item.id&quot; &gt; {{item}} &lt;/div&gt; &lt;/details&gt; &lt;script&gt; computed:{ innerSort...
How to add only elements that i want from inner v-for to elements in outer v-for
arrays|vue.js|v-for
0
27
2
71,900,421
71,900,421
1
true
2022-04-14T15:15:52.793Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to add only elements that i want from inner v-for to elements in outer v-for<pre><code>&lt;details v-for=&quot;(detail, index) in details&quot; v-bin...
71,819,146
trello API add label to card in python<p>I have a trello board with a list, created some cards with python and labels manually. I'm able to get card_id's and label id`s using python.</p> <p>But I do not understand how to add an existing label to an existing card. Sample code at <a href="https://developer.atlassian.com/...
<p><strike>The url you send your request to + your request method are incorrect.</strike></p> <p>Apparently there is an endpoint to do this the way you do it, excuse me.</p> <hr /> <p>You need to send a PUT request with the idLabels as a parameter in the put data.</p> <p><a href="https://developer.atlassian.com/cloud/t...
trello API add label to card in python
python|rest|trello
0
280
1
71,819,224
71,819,224
1
true
2022-04-10T17:47:43.023Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: trello API add label to card in python<p>I have a trello board with a list, created some cards with python and labels manually. I'm able to get card_id's and...
71,859,735
State isn't updated on handler call from child to parent<p>I have a parent component <code>PlannerDetails</code> and a child component <code>PlannerDetailsFooter</code>. Now when I click the button <code>{props.emailConfig.buttonText}</code> doesn't update with string <code>Send Now</code>, the boolean does though.</p>...
<p>First you'll want to debug to confirm whether this condition is true or not:</p> <pre><code>if (event.id === &quot;mail-button&quot;) </code></pre> <p>Because if it's not then it looks like this is going to clobber your state object entirely:</p> <pre><code>setEmailConfig(event.target.value) </code></pre> <p>So it's...
State isn't updated on handler call from child to parent
reactjs
0
26
2
71,859,811
71,859,811
1
true
2022-04-13T15:03:49.633Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: State isn't updated on handler call from child to parent<p>I have a parent component <code>PlannerDetails</code> and a child component <code>PlannerDetailsFo...
71,896,616
Php code gets executed instead of displayed in textarea, how to solve?<p>Normally when we use:</p> <pre><code>&lt;textarea&gt;&lt;?php echo 'ok'; ?&gt;&lt;/textarea&gt; </code></pre> <p>We get <code>&lt;?php echo 'ok'; ?&gt;</code> displayed inside the textarea. But on my website I get the <code>ok</code> inside the te...
<p>If you're running a <code>.php</code> file on a PHP-enabled web server... Use the HTML entities for the text you want (specifically the <code>&lt;</code> and <code>&gt;</code>, though potentially more):</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="s...
Php code gets executed instead of displayed in textarea, how to solve?
php|forms|textarea
0
24
1
71,896,668
71,896,668
1
true
2022-04-16T18:49:58.603Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Php code gets executed instead of displayed in textarea, how to solve?<p>Normally when we use:</p> <pre><code>&lt;textarea&gt;&lt;?php echo 'ok'; ?&gt;&lt;/t...
71,438,173
How to write a function in TypeScript that can query deep object and return the type of the nested key when called?<p>I have the following predefined object:</p> <pre><code>export const catalog = { category1: { newDomain: 'Hello' }, category2: { otherStuff: 30 } }; </code></pre> <p>Now I need to achieve...
<p>Edit: I forgot to answer the first part (getting the union of nested keys):</p> <p><a href="https://www.typescriptlang.org/play?noUncheckedIndexedAccess=true&amp;target=99&amp;useUnknownInCatchVariables=true&amp;exactOptionalPropertyTypes=true#code/C4TwDgpgBAaghgGwK4QM4B4AqA+KBeKTAbQGsIQB7AM0IF0BuAWACgXRIoA5NYCAEwDS...
How to write a function in TypeScript that can query deep object and return the type of the nested key when called?
typescript
0
36
1
71,438,740
71,438,740
1
true
2022-03-11T11:56:57.150Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to write a function in TypeScript that can query deep object and return the type of the nested key when called?<p>I have the following predefined object:...
71,976,649
Trying to apply a Theme to my app but the custom configuration is not taking effect<p>The following is in my root <strong>index.tsx</strong> file:</p> <pre class="lang-js prettyprint-override"><code>const theme = createTheme({ typography: { h4: { color: &quot;red&quot; } } }); root.render( &lt;Stri...
<p>Your imports are from the legacy package <code>@mui/styles</code>. Instead, import them from <code>@mui/material/styles</code>.</p> <p>So the solution is to replace <code>createTheme</code> and <code>ThemeProvider</code> imports like this:</p> <pre><code>import { createTheme, ThemeProvider } from &quot;@mui/material...
Trying to apply a Theme to my app but the custom configuration is not taking effect
reactjs
0
24
1
71,977,303
71,977,303
1
true
2022-04-23T03:45:31.367Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Trying to apply a Theme to my app but the custom configuration is not taking effect<p>The following is in my root <strong>index.tsx</strong> file:</p> <pre c...
71,973,395
Bucketing based on whether a field exists or not<p>I have data that looks like this:</p> <pre><code>{ fname: &quot;bob&quot;, age: 33, description: &quot;brown eyes&quot;} { fname: &quot;sally&quot;, age: 20, description: &quot;tall&quot;} { fname: &quot;jim&quot;, age: 48 } </code></pre> <p>I'm trying to, in one query...
<p>Query</p> <ul> <li>group with expression on group, to make 2 groups, one that have description and one that doesnt (instead of a field to create the group, we create 2 groups based on a condtion)</li> <li>the other 3 stages is to fix the structure to be like the expected output</li> </ul> <p>*i don't think you need ...
Bucketing based on whether a field exists or not
mongodb
0
18
1
71,973,808
71,973,808
1
true
2022-04-22T18:49:37.153Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Bucketing based on whether a field exists or not<p>I have data that looks like this:</p> <pre><code>{ fname: &quot;bob&quot;, age: 33, description: &quot;bro...
71,908,768
Elasticsearch appends object fields on update instead of overwriting<p>I have an object in Elasticsearch which may contain different fields. In my app this object is Enum so it can't actually contain more than one field at the same time. But when i do an update in Elasticsearch - it appends the fields instead of overwr...
<p>You need to change the <code>action</code> in bulk request to <code>index</code> from <code>update</code>, correct request would be</p> <pre><code>{&quot;index&quot;:{&quot;_index&quot;:&quot;71908768&quot;,&quot;_id&quot;:1}} {&quot;doc&quot;:{&quot;id&quot;:&quot;1&quot;,&quot;users&quot;:{&quot;public&quot;: true...
Elasticsearch appends object fields on update instead of overwriting
elasticsearch
0
34
1
71,908,848
71,908,848
1
true
2022-04-18T07:22:08.733Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Elasticsearch appends object fields on update instead of overwriting<p>I have an object in Elasticsearch which may contain different fields. In my app this o...
71,841,966
How to affect a list of colors to histogram index bar in matplotlib?<p>I have the the folowing dataframe &quot;freqs2&quot; with index (SD to SD17) and associated values (frequencies) :</p> <pre><code> freqs SD 101 SD2 128 ... SD17 65 </code></pre> <p>I would like to affect a list of precise colors (in order) ...
<p>It looks like a bug in pandas, plotting directly in <code>matplotlib</code> or using <code>seaborn</code> (which I recommend) works:</p> <pre><code>import seaborn as sns colors=['#e5243b','#dda63a', '#4C9F38','#C5192D','#FF3A21','#26BDE2','#FCC30B','#A21942','#FD6925','#DD1367','#FD9D24','#BF8B2E','#3F7E44','#0A97D...
How to affect a list of colors to histogram index bar in matplotlib?
python|matplotlib|bar-chart|histogram
0
27
1
71,843,226
71,843,226
1
true
2022-04-12T11:37:39.540Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to affect a list of colors to histogram index bar in matplotlib?<p>I have the the folowing dataframe &quot;freqs2&quot; with index (SD to SD17) and assoc...
71,427,716
Minikube keeps showing error for invalid flag on start<p>I tried to start minikube with <code>--extra-config=apiserver.Features.Enable-SwaggerUI=true</code> flag, but for any reason it throws this error:</p> <blockquote> <p>❌ Problems detected in kube-apiserver [7152cdb4684e]:<br /> Error: unknown flag: --Features.Ena...
<p>Well as mentioned in <a href="https://minikube.sigs.k8s.io/docs/handbook/config/#kubernetes-configuration" rel="nofollow noreferrer">here</a>, the <code>--extra-config</code> is repeatedly being attached to <code>minikube start</code> command.<br /> This config is stored in <code>[home]/.minikube/profiles/minikube/c...
Minikube keeps showing error for invalid flag on start
kubernetes|minikube
0
301
2
71,429,119
71,429,119
1
true
2022-03-10T16:39:09.880Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Minikube keeps showing error for invalid flag on start<p>I tried to start minikube with <code>--extra-config=apiserver.Features.Enable-SwaggerUI=true</code> ...
71,796,827
Filtering multiple columns with conditions in Pandas<p>I am trying to filter multiple column values by conditions but I am wondering if there's a faster or concise way to do it without putting down one column by one column, like grouping the conditions or <code>map()</code>.</p> <pre><code>dt = pd.DataFrame( { ...
<p>If there is multiple conditions for compare by same value is possible use:</p> <pre><code>dt = dt[dt[['Num1','Num2','Num3']].abs().gt(2).any(1) &amp; (dt['Zum1'] &gt; 2)] print (dt) Num1 Num2 Num3 Zum1 Num5 2 3 -3 3 3 3 4 5 5 -5 5 5 </code></pre> <p>Or if need filter all ...
Filtering multiple columns with conditions in Pandas
python|pandas
0
36
1
71,796,884
71,796,884
1
true
2022-04-08T12:15:10.870Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Filtering multiple columns with conditions in Pandas<p>I am trying to filter multiple column values by conditions but I am wondering if there's a faster or c...
71,921,592
Pandas: How do you get column labels from one df based on row values and assign these as row values in new df?<p>I have a dataframe <code>df_1</code> with the following structure:</p> <pre><code>df_1: fruit_group_a fruit_group_b 0 apple banana 1 orange pineapple </code></pre> <p>Given a st...
<p>Use <a href="http://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.melt.html" rel="nofollow noreferrer"><code>DataFrame.melt</code></a>, then <a href="http://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.merge.html" rel="nofollow noreferrer"><code>DataFrame.merge</code></a...
Pandas: How do you get column labels from one df based on row values and assign these as row values in new df?
python|pandas
0
27
2
71,921,618
71,921,618
1
true
2022-04-19T08:07:34.610Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Pandas: How do you get column labels from one df based on row values and assign these as row values in new df?<p>I have a dataframe <code>df_1</code> with th...
71,844,650
Gstreamer x264enc invalid buffer size c<p>I've been trying to use this gstreamer c code(my system is running on ubuntu 20.04 with GStreamer 1.16.2 and gcc 9.4.0):</p> <pre><code>#include &lt;gst/gst.h&gt; #include &lt;glib.h&gt; #include &lt;stdio.h&gt; // gst-launch-1.0 videotestsrc pattern=ball ! 'video/x-raw, forma...
<p>First note that gstreamer booleans are not typed with capitals, so use <code>true</code> and <code>false</code> or just use 0 and 1.</p> <p>x264enc may not be that fast on Jetson. You may try the following :</p> <pre><code>#include &lt;gst/gst.h&gt; int main (gint argc, gchar * argv[]) { gst_init (&amp;argc,...
Gstreamer x264enc invalid buffer size c
c|gstreamer|encoder
0
269
1
71,848,582
71,848,582
1
true
2022-04-12T14:39:52.740Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Gstreamer x264enc invalid buffer size c<p>I've been trying to use this gstreamer c code(my system is running on ubuntu 20.04 with GStreamer 1.16.2 and gcc 9....
71,891,246
Turn Data from Streamlit into CSV file<p>I have the script below I typed in Pycharm for my Streamlit Data app:</p> <pre><code>import pandas as pd import plotly.express as px import streamlit as st st.set_page_config(page_title='Matching Application Number', layout='wide') df = pd.read_csv('Analysis...
<p>Have a look on the code comments.</p> <h4>Code</h4> <pre><code>... st.dataframe(df_selection) # Show download button for the selected frame. # Ref.: https://docs.streamlit.io/library/api-reference/widgets/st.download_button csv = df_selection.to_csv(index=False).encode('utf-8') st.download_button( label=&quot...
Turn Data from Streamlit into CSV file
python|pandas|pycharm|streamlit
0
533
2
71,891,435
71,891,435
1
true
2022-04-16T05:03:57.793Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Turn Data from Streamlit into CSV file<p>I have the script below I typed in Pycharm for my Streamlit Data app:</p> <pre><code>import pandas as pd import plot...
71,962,729
how to get a row number in a column if a cell in another column has some data using google apps script?<p>i have a sheet that have 5 columns (date , id , name , number ,row number) and i want the fifth column(row number) to be auto filled with the row number when i insert any data in the second column(id) i tried the m...
<h2>This is possible via formula:</h2> <ol> <li><strong>IF not blank</strong></li> </ol> <p>Insert this formula in the row number column:</p> <pre><code>=if(B2&lt;&gt;&quot;&quot;,row(),&quot;&quot;) </code></pre> <p>Result:</p> <p><a href="https://i.stack.imgur.com/UFLJr.png" rel="nofollow noreferrer"><img src="https:...
how to get a row number in a column if a cell in another column has some data using google apps script?
google-apps-script|google-sheets|google-apps-script-api
0
268
1
71,962,980
71,962,980
1
true
2022-04-22T02:10:56.183Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to get a row number in a column if a cell in another column has some data using google apps script?<p>i have a sheet that have 5 columns (date , id , nam...
71,974,428
Dealing with "expected fn pointer, found fn item"<p>I've been doing a lot of Google searching trying to figure this one out. I have a library that I would like for folks to be able to pass in a reference to a custom &quot;signer&quot; function (as an alternative to providing a secret key directly). This is the most rec...
<p>The problem with your initial code is that while you can cast (or coerce) a fn item (what the compiler calls <code>fn ... {name}</code>) to fn pointer (<code>fn ...</code>), this property is not recursive: you cannot cast a reference to fn item to a reference to fn pointer. That is, <code>signer_func as fn(&amp;[u8;...
Dealing with "expected fn pointer, found fn item"
rust
0
285
2
71,996,484
71,996,484
1
true
2022-04-22T20:43:21.370Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Dealing with "expected fn pointer, found fn item"<p>I've been doing a lot of Google searching trying to figure this one out. I have a library that I would li...
71,929,244
Group an array of nested objects by 'sector' keyword - Javascript<p>I have an object where the value is an array of objects. I want to go through the object and categorize it by sector. This is my data.</p> <pre><code>{ &quot;Word 1&quot;:[ { &quot;name&quot;:&quot;Walmart&quot;, &quot;id&quo...
<p>Object entries, forEach over the array, and reduce to get the total.</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>var foo = { "Word 1": [{ "name": "Walmart", ...
Group an array of nested objects by 'sector' keyword - Javascript
javascript|arrays|lodash
0
25
2
71,929,383
71,929,383
1
true
2022-04-19T17:51:37.180Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Group an array of nested objects by 'sector' keyword - Javascript<p>I have an object where the value is an array of objects. I want to go through the object ...
71,827,690
.htaccess Redirect except for Root of a single domain<p>Assuming I have three domains: domain1.tld, domain2.tld and domain3.tld</p> <p>All request should redirect to newdomain.tld/new except for the root of domain1.tld. But unfortunately my exception is not working:</p> <pre><code>RewriteEngine On RewriteCond %{HTTP_HO...
<p>Your first rule would seem to perform the specific redirect you are trying to prevent, if it wasn't for the <code>RewriteRule</code> <em>pattern</em> <code>^/$</code>, which will never match, so the first rule doesn't actually do anything.</p> <p>The second rule doesn't redirect any requests to <code>domain1.tld</co...
.htaccess Redirect except for Root of a single domain
apache|.htaccess|redirect
0
19
1
71,828,114
71,828,114
1
true
2022-04-11T12:16:21.530Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: .htaccess Redirect except for Root of a single domain<p>Assuming I have three domains: domain1.tld, domain2.tld and domain3.tld</p> <p>All request should red...
71,939,953
I need a 301 redirect for .htaccess<p>I need a redirect from</p> <ol> <li><code>https://example.com/shop/vip-schmuck/18-karat-gold/18-karat-gold-nasenstecker-spirale-schmetterling-kristalle/</code></li> </ol> <p>to</p> <ol start="2"> <li><code>https://example.com/shop/vip-schmuck/18-karat-gold/280419/18-karat-gold-nase...
<p>At the top of your root <code>.htaccess</code> file you can do something like this:</p> <pre><code>RewriteRule ^(shop/vip-schmuck/18-karat-gold)/(18-karat-gold-nasenstecker-spirale-schmetterling-kristalle/)$ /$1/280419/$2 [R=302,L] </code></pre> <p>The <code>$1</code> and <code>$2</code> backreferences in the <em>su...
I need a 301 redirect for .htaccess
.htaccess
0
21
1
71,940,603
71,940,603
1
true
2022-04-20T12:49:08.370Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: I need a 301 redirect for .htaccess<p>I need a redirect from</p> <ol> <li><code>https://example.com/shop/vip-schmuck/18-karat-gold/18-karat-gold-nasenstecker...
71,969,663
Print Whole List With Common Element<p>I am trying to print the whole list (not just one item) if it includes Sydney and I am unsure what code I need to complete this.</p> <pre><code>car1 = [&quot;Sydney&quot;, &quot;CM11CAR&quot;, &quot;Ford&quot;, &quot;Fiesta&quot;, &quot;Red&quot;, &quot;3000&quot;, &quot;1500&quot...
<p>First, you need to add an array holding all the other lists. Then, the program would if each of the vehicle lists has a value of &quot;Sydney&quot; using the <code>item in list</code> search. In the end, the last two lines of the code would print out the whole list as you've mentioned.</p> <pre><code>car1 = [&quot;S...
Print Whole List With Common Element
python|list
0
29
2
71,970,024
71,970,024
1
true
2022-04-22T13:36:24.690Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Print Whole List With Common Element<p>I am trying to print the whole list (not just one item) if it includes Sydney and I am unsure what code I need to comp...
71,967,915
How to check if 'next' field in loop is the same?<p>I am paginating through an API, which uses two different methods - next token &amp; next timestamp.</p> <p>For unknown to me reasons, sometimes at the end of a call the next token will be the same, which leaves me stuck in an endless loop. The same happens if I use th...
<p>If you want just the &quot;next next&quot; before you're passing on to the next iteration, send another request and check for equality between the next and the next next.</p> <pre class="lang-py prettyprint-override"><code>import time time_stamp= time.time() using_token = False while using_token or int(time_stamp...
How to check if 'next' field in loop is the same?
python
0
35
1
71,968,282
71,968,282
1
true
2022-04-22T11:19:50.627Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to check if 'next' field in loop is the same?<p>I am paginating through an API, which uses two different methods - next token &amp; next timestamp.</p> <...
71,436,482
String variable contains multiple entries, number of entries differs by observations. Can I turn it into byte and sum the number of entries?<p>I have a dataset of individuals in a certain group. Each has a unique numeric ID. We ask each to give the IDs of their friends in the group.</p> <p>The problem is the IDs of any...
<p>On #1 what do you want that is different? (Full disclosure: putative author of <code>split</code> here.)</p> <p>On #2 the number of identifiers is the number of commas plus 1.</p> <pre><code> gen wanted = 1 + strlen(coop) - strlen(subinstr(coop, &quot;,&quot;, &quot;&quot;, .)) </code></pre> <p>The number of comma...
String variable contains multiple entries, number of entries differs by observations. Can I turn it into byte and sum the number of entries?
split|stata
0
32
1
71,437,782
71,437,782
1
true
2022-03-11T09:39:06.470Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: String variable contains multiple entries, number of entries differs by observations. Can I turn it into byte and sum the number of entries?<p>I have a datas...
71,979,316
adding filter to the shiny for regression model<p>I have a fully functioning shiny app for performing regression analysis, with summary(), tidy(), and augment(). However, I would like to add a filter selection in the shiny for the uploaded data. My dataset is quite big and within the dataset, it is divided into 5 types...
<p>Perhaps you are looking for this</p> <pre><code>library(shiny) library(shinyWidgets) library(DT) library(dplyr) library(nlme) library(broom) data_set &lt;- data.frame (Simulation_1 = c(1,2,3,4,5,6,7,8,9,10), Simulation_2 = c(1,2,3,4,5,6,7,8,9,10), Simulation_3 = c(1,...
adding filter to the shiny for regression model
r|dplyr|shiny
0
32
1
71,979,594
71,979,594
1
true
2022-04-23T11:43:13.193Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: adding filter to the shiny for regression model<p>I have a fully functioning shiny app for performing regression analysis, with summary(), tidy(), and augmen...
71,423,906
textarea on vue not accepting null<p>I use: - &quot;vue&quot;: &quot;3.2.26&quot;, - &quot;vee-validate&quot;: &quot;4.5.6&quot;, - &quot;typescript&quot;: &quot;4.5.4&quot;</p> <p>While creating a textarea field on vue3 I ran into a problem</p> <p>i have</p> <p>example with vee-validate</p> <pre><code>import { Field, ...
<p>Unfortunately, you can't change the existing type of <code>value</code> for <code>TextareaHTMLAttributes</code> (at least not in TypeScript 4.5.5). Type augmentation only allows extension (adding properties to the type, or creating a new type that extends the original <code>TextareaHTMLAttributes </code> interface w...
textarea on vue not accepting null
node.js|typescript|vue.js|yup|vee-validate
0
266
1
71,432,712
71,432,712
1
true
2022-03-10T12:07:23.553Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: textarea on vue not accepting null<p>I use: - &quot;vue&quot;: &quot;3.2.26&quot;, - &quot;vee-validate&quot;: &quot;4.5.6&quot;, - &quot;typescript&quot;: &...
71,894,041
I want the logo to appear animatedly when the navbar becomes sticky<p><a href="https://weartuality.com/" rel="nofollow noreferrer">https://weartuality.com/</a></p> <p>You see the black navbar on that site. There is no logo on that black navbar, but when it becomes sticky, the logo appears. How can I do this using html ...
<p>Listen for the scroll event and show/hide the logo if a certain Y scroll position is reached.</p> <pre class="lang-js prettyprint-override"><code>const logoElement = document.querySelector(&quot;.logo&quot;); // &lt;--- update this selector const checkLogo = () =&gt; { if (window.scrollY &gt; 100) {// &lt;-- your...
I want the logo to appear animatedly when the navbar becomes sticky
javascript|html|css
0
31
1
71,894,100
71,894,100
1
true
2022-04-16T12:53:26.760Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: I want the logo to appear animatedly when the navbar becomes sticky<p><a href="https://weartuality.com/" rel="nofollow noreferrer">https://weartuality.com/</...
71,998,975
Typescript - Trying to call method on abstract base with derived type as parameter<p>The abstract base has a method that takes a base/derived and performs something on it. Seems like I'm missing something with the typing, trying to find out what.</p> <p>Attempt 1:</p> <pre><code>abstract class Base { protected runFun...
<p><a href="https://www.typescriptlang.org/play?#code/IYIwzgLgTsDGEAJYBthjAgQmgpgg3gFAIIAOUA9hDvDgCYJQCuAdgGKuwDyLAKgBYBLMAB5eCHAA9qLOhmxgcAPgAUEIWABcCXgBoEAM07aVIXFygARHFEEA3ett4BKBAF4lCOxUF1XREhIjFlg1DWcAbmIEAF8omMJCFDQMa1sHBikZOSxcAmjSJhBkQVgEOgoASUQ3BBVXD3zAhHVhADpmdk4eAWEVFTobe3oGzwDmpAoWMApkHDbkCgBzAaGMyOiSGI2t+M...
Typescript - Trying to call method on abstract base with derived type as parameter
javascript|typescript|inheritance|abstract
0
23
1
71,999,036
71,999,036
1
true
2022-04-25T11:42:06.557Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Typescript - Trying to call method on abstract base with derived type as parameter<p>The abstract base has a method that takes a base/derived and performs so...
72,012,155
Passing bash script variables to .yml file for use as child and subdirectories<p>I'm very new to bash scripting so please link me to places if I'm asking silly questions here!</p> <p>I'm trying to write a bash script <code>test-bash.sh</code> that will pass arguments from a txt file <code>test-text.txt</code> to a .yml...
<p>Does <code>envsubst</code> solve your problem?</p> <p>For example, if I have a <code>test-yaml.yml</code> that contains <code>$foo</code>:</p> <pre class="lang-sh prettyprint-override"><code>cat test-yaml.yml </code></pre> <p>output:</p> <pre><code>general: $foo: argument_from_bash_script rawdatadir: '/some/dat...
Passing bash script variables to .yml file for use as child and subdirectories
bash|shell|variables|yaml|script
0
1,045
1
72,012,300
72,012,300
1
true
2022-04-26T10:13:13.090Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Passing bash script variables to .yml file for use as child and subdirectories<p>I'm very new to bash scripting so please link me to places if I'm asking sil...
71,797,527
Angular Pipe extracts from Enum values, but generic for any Enum<p>I have an enum with strings assigned to elements. Unfortunately, it does not work with integers as indexes. RoleTypesEnum[0] =&gt; undefined. I made a Pipe which solves this problem.</p> <pre><code>export enum RoleTypesEnum { RoleA = 'Role is A', ...
<p>If you want to make it generic, you can pass the value of enum to the pipe.</p> <pre><code>{{ opt | enumIntToDescription: RoleTypesEnum }} </code></pre> <pre><code>@Pipe({ name: 'enumIntToDescription', }) export class EnumIntToDescriptionPipe implements PipeTransform { // enum object on which you want this ...
Angular Pipe extracts from Enum values, but generic for any Enum
angular|string|enums|type-conversion|pipe
0
527
1
71,797,707
71,797,707
1
true
2022-04-08T13:03:10.283Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Angular Pipe extracts from Enum values, but generic for any Enum<p>I have an enum with strings assigned to elements. Unfortunately, it does not work with int...
71,919,588
Replacing char in [row][col] index replaces all characters in col<p>Currently I am trying to place a word in a column of 2D array in Python 3.6</p> <pre><code> def __init__(self) -&gt; None: self.board = [[&quot;.&quot;] * 10] * 10 self.board[0][0] = 'T' def printBoardToTerminal(self): f...
<p>This is because list multiplication <code>[] * n</code> does not create new data, but pseudo copies the list as a reference. Use list comprehension:</p> <pre><code>self.board = [[&quot;.&quot; for a in range(10)] for b in range(10)] </code></pre> <hr /> <p>Using <code>[[&quot;.&quot;] * 10] * 10</code> does not crea...
Replacing char in [row][col] index replaces all characters in col
python
0
23
1
71,919,770
71,919,770
1
true
2022-04-19T04:12:30.497Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Replacing char in [row][col] index replaces all characters in col<p>Currently I am trying to place a word in a column of 2D array in Python 3.6</p> <pre><cod...
71,440,596
How to programmatically get Sinatra's active port?<p>I'm creating a simple and portable web application with Sinatra on Ruby, and I'm letting the system find an open port for the server to use with the following:</p> <pre class="lang-rb prettyprint-override"><code>require 'sinatra' require 'socket' socket = Socket.new...
<p>Try this</p> <pre><code>require 'sinatra' require 'socket' socket = Socket.new(:INET, :STREAM, 0) socket.bind(Addrinfo.tcp(&quot;127.0.0.1&quot;, 0)) port = socket.local_address.ip_port socket.close set :port, port set :bind, &quot;127.0.0.1&quot; get &quot;/&quot; do &quot;Hello, World!&quot; end </code></p...
How to programmatically get Sinatra's active port?
ruby|sockets|port|sinatra
0
31
1
71,441,683
71,441,683
1
true
2022-03-11T15:08:17.667Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to programmatically get Sinatra's active port?<p>I'm creating a simple and portable web application with Sinatra on Ruby, and I'm letting the system find...
71,799,429
updating xml, using xmlstarlet, with a sequence of letters<p>When I am having <code>input.xml</code>, and want to update it to get <code>output.xml</code> (see below) XMLSTARLET fails.</p> <p>First I tried to find the correct XSLT function to get the needed values, which led to this:</p> <pre><code>xmlstarlet sel -t -...
<p><code>position()</code> works with <code>xmlstarlet select</code>'s <code>-m (--match)</code> option (i.e. <code>xsl:for-each</code>) which determines the context position.</p> <pre class="lang-sh prettyprint-override"><code>xmlstarlet select --indent -t \ -e '{name(*)}' \ -m '//field' -e '{name()}' -v 'substr...
updating xml, using xmlstarlet, with a sequence of letters
xmlstarlet
0
28
1
71,803,671
71,803,671
1
true
2022-04-08T15:16:38.243Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: updating xml, using xmlstarlet, with a sequence of letters<p>When I am having <code>input.xml</code>, and want to update it to get <code>output.xml</code> (...
71,901,436
Problem positioning top 2 DIVs when scrolling<p>I am trying to make a webapp what has a 3 sections.</p> <p>1 - A search bar. 2 - a navigation menu. 3 - The main content.</p> <p>Ideally how I want it work is when the main content is scrolled down the search bar scrolls up out of site and the navigation goes to the top w...
<p>Is it ok to add 1 - A search bar. 2 - a navigation menu in one div? I tried with adding these two elements in one div. Also note that if you add CSS on search bar the height of navbar will be changed. So update that height in JS.</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-...
Problem positioning top 2 DIVs when scrolling
html|jquery|css
0
31
1
71,953,309
71,953,309
1
true
2022-04-17T11:21:32.177Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Problem positioning top 2 DIVs when scrolling<p>I am trying to make a webapp what has a 3 sections.</p> <p>1 - A search bar. 2 - a navigation menu. 3 - The m...
72,011,833
How to Recover from Creating a Branch from the Wrong Branch Instead of Main<p>I find myself in the following scenario with Git every so often:</p> <ol> <li>From the main branch, I create and checkout branch A</li> <li>On branch A, I do some work, create some commits, etc., then push my changes</li> <li>I need to do som...
<p><strong>Simplest solution: rebase onto</strong></p> <p><code>git rebase</code> has the onto mode to do exactly what you want:</p> <pre><code>git rebase --onto main A B </code></pre> <p>will take B off of A and rebase it onto main.</p> <p>If you have B checked out when you run this, you don't need to specify it on th...
How to Recover from Creating a Branch from the Wrong Branch Instead of Main
git
0
33
1
72,014,649
72,014,649
1
true
2022-04-26T09:49:12.830Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to Recover from Creating a Branch from the Wrong Branch Instead of Main<p>I find myself in the following scenario with Git every so often:</p> <ol> <li>F...
71,904,181
ASP.NET CORE API route authotization Policy should allow policy1 OR policy2<p>I Have two diffrent authorize that are valid to acess a specfic api route</p> <pre><code>[Authorize(Policy = &quot;Clients&quot;)] </code></pre> <p>OR</p> <pre><code>[Authorize(Policy = &quot;NewBusiness&quot;)] </code></pre> <p>My path retur...
<p>Maybe you should have just one policy</p> <pre><code>[Authorize(Policy = &quot;ClientsOrNewBusiness&quot;)] </code></pre> <p>and tweak your code into something like that</p> <pre><code>services.AddAuthorization(options =&gt; { options.AddPolicy(&quot;ClientsOrNewBusiness&quot;, policy =&gt; policy.Requir...
ASP.NET CORE API route authotization Policy should allow policy1 OR policy2
c#|asp.net-core
0
26
1
71,904,483
71,904,483
1
true
2022-04-17T17:55:44.650Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: ASP.NET CORE API route authotization Policy should allow policy1 OR policy2<p>I Have two diffrent authorize that are valid to acess a specfic api route</p> <...
71,963,693
How to make a linux pc go to sleep after a period of time?<p>I'm running an Arch Linux KDE PC, and I like to listen to calming music before sleeping.</p> <p>What command/script that I can run on my PC to make the device go to sleep (Or shutdown) after a period of time?</p> <p><em>Example: Shutdown in 1.5h OR Sleep in 1...
<p>To shutdown, use the relative format (+m) and schedule a shutdown in a defined number of minutes from the time you run the command. The command syntax is:</p> <pre><code>sudo shutdown +m </code></pre> <p>For example, to shut down the system in 90 minutes, run:</p> <pre><code>sudo shutdown +90 </code></pre> <p>To sus...
How to make a linux pc go to sleep after a period of time?
linux|console|script|archlinux|kde-plasma
0
272
1
71,963,774
71,963,774
1
true
2022-04-22T05:07:11.707Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to make a linux pc go to sleep after a period of time?<p>I'm running an Arch Linux KDE PC, and I like to listen to calming music before sleeping.</p> <p>...
71,937,720
Trying to get session data, works from one route does not work from other<p>I am trying to get session data, using passport js. When I use the /test or /test2 route, I get the session data. If I try to console.log in these routes, I get the whole session data. But when I try it with /user_data, I dont seem to get the e...
<p>In theory user_data is just another endpoint and on that basis it should work just like test and test2.</p> <p>However, user_data could be a reserved name. Try changing that endpoint to something else.</p>
Trying to get session data, works from one route does not work from other
node.js|express|oauth-2.0|passport.js|session-variables
0
31
1
71,943,576
71,943,576
1
true
2022-04-20T10:03:18.377Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Trying to get session data, works from one route does not work from other<p>I am trying to get session data, using passport js. When I use the /test or /test...
71,985,533
title: 'Unsupported Authentication', detail: 'Authenticating with OAuth 2.0 Application-Only is …OAuth 1.0a User Context, OAuth 2.0 User Context].'<p>I am using a Cloudflare worker and this is what my <code>index.ts</code> file looks like:</p> <pre><code>const tweet = async () =&gt; { console.log('tweet function ran'...
<p>The error message</p> <pre><code>Authenticating with OAuth 2.0 Application-Only </code></pre> <p>Indicates that the bearer token sent in the API request represents the application and not the user on whose behalf the tweet is sent. You need to obtain a token for the user who is sending the tweet.</p> <p>Tweet api on...
title: 'Unsupported Authentication', detail: 'Authenticating with OAuth 2.0 Application-Only is …OAuth 1.0a User Context, OAuth 2.0 User Context].'
typescript|twitter|oauth-2.0|oauth|twitter-oauth
0
286
1
71,986,312
71,986,312
1
true
2022-04-24T04:35:48.260Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: title: 'Unsupported Authentication', detail: 'Authenticating with OAuth 2.0 Application-Only is …OAuth 1.0a User Context, OAuth 2.0 User Context].'<p>I am us...
71,858,720
How to check wifi/cellular connection enable/disbale from settings<p>I have a use-case in my application, that I need to detect whether the network wifi or cellular is explicitly disabled by the user in settings.</p> <p>Thanks in advance!!</p>
<p>You can detect whether the cellular or wifi is active,</p> <pre><code>fun isNetworkAvailable(context: Context): Boolean { val manager = context.getSystemService(Context.CONNECTIVITY_SERVICE) as? ConnectivityManager val capabilities = manager?.getNetworkCapabilities(manager.activeNetwork) ?: return false ...
How to check wifi/cellular connection enable/disbale from settings
android
0
17
1
71,861,812
71,861,812
1
true
2022-04-13T13:54:16.383Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to check wifi/cellular connection enable/disbale from settings<p>I have a use-case in my application, that I need to detect whether the network wifi or c...
71,833,264
C++ Weird behavior while giving a value to the the predecessor element of a matrix column (v[i][j-1])<p>So I was trying to make a matrix where the elements of the main diagonal would increase by 3 one by one and I also wanted to change the values of the previous and the next element of the the main diagonal with their ...
<p>For starters there is no need to use nested for loops. It is enough to use only one for loop.</p> <p>When i is equal to 0 and j is equal to 0 then this expression v[i][j - 1] access memory outside the array that invokes undefined behavior.</p> <p>The same problem exists when n is equal to 22 for the expression and i...
C++ Weird behavior while giving a value to the the predecessor element of a matrix column (v[i][j-1])
c++|for-loop|matrix|multidimensional-array|nested-loops
0
32
1
71,833,475
71,833,475
1
true
2022-04-11T19:24:49.550Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: C++ Weird behavior while giving a value to the the predecessor element of a matrix column (v[i][j-1])<p>So I was trying to make a matrix where the elements o...
71,440,100
how does multi-stage Dockerfile interact with image layers?<p>I saw a dockerfile for building a Node.js app with npm:</p> <pre><code>FROM diamol/node AS builder, WORKDIR /src COPY src/package.json . RUN npm install &lt;-------------Q2 # app FROM diamol/node &lt;-------------Q1 EXPOSE 80 CMD [&quot;node&quot;, ...
<p>You can think as if they were 2 different Dockerfiles. So each one requires it's base image (FROM). And each one has its own layers.</p> <p>The additional benefit from multi-stage is that it allow you to copy from one image to the other (the --from=builder in COPY instruction).</p> <p>The <code>npm install</code> in...
how does multi-stage Dockerfile interact with image layers?
docker
0
36
1
71,440,257
71,440,257
1
true
2022-03-11T14:34:09.367Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how does multi-stage Dockerfile interact with image layers?<p>I saw a dockerfile for building a Node.js app with npm:</p> <pre><code>FROM diamol/node AS buil...
71,926,754
Run a trigger if no new message arrives after a timeout in Javascript<p>Let's say I have the following Javascript code:</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>let last...
<p><code>setTimeout</code> returns an ID that you can use to cancel the timeout (using <code>clearTimeout(ID)</code>). If you receive a message in time, cancel the timeout and re-start it to wait for the next message. If no next message is received, let the timeout run and print your message.</p> <p>Something like this...
Run a trigger if no new message arrives after a timeout in Javascript
javascript|timeout
0
34
1
71,926,976
71,926,976
1
true
2022-04-19T14:34:45.553Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Run a trigger if no new message arrives after a timeout in Javascript<p>Let's say I have the following Javascript code:</p> <p><div class="snippet" data-lang...
71,935,597
TOP on INNER JOIN<p>I have a table FISH which has a JOIN on HEALTHCHECK.</p> <p>FISH</p> <pre><code>ID | NAME ---------------- 1 | JAMES 2 | JOHN 3 | ERIC </code></pre> <p>HEALTHECK</p> <pre><code>ID | DATE | FISH_ID ------------------- 1 | 2022-03-01 | 1 2 | 2023-01-01 | 1 3 | 2021-01-03 | 2 4 | 2023-04-07 | 3 </code...
<p>I would use a pure join version here:</p> <pre class="lang-sql prettyprint-override"><code>SELECT f.NAME, f.ID FROM FISH f INNER JOIN HEALTH_CHECK hc1 ON hc1.FISH_ID = f.ID INNER JOIN ( SELECT FISH_ID, MAX(DATE) AS MAX_DATE FROM HEALTH_CHECK WHERE FISH_ID = &lt;some ID&gt; GROUP BY FISH_ID ) hc2 ...
TOP on INNER JOIN
sql|h2
0
32
1
71,935,653
71,935,653
1
true
2022-04-20T07:17:07.500Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: TOP on INNER JOIN<p>I have a table FISH which has a JOIN on HEALTHCHECK.</p> <p>FISH</p> <pre><code>ID | NAME ---------------- 1 | JAMES 2 | JOHN 3 | ERIC <...
71,431,617
What happens when an Azure Timer function has an execution duration that's longer shorter than the trigger period?<p>If an Azure function executes for say 10 minutes, but has a period of 5 minutes, does the trigger still fire at the 5 minute mark?</p>
<p>The easiest way to answer this question is to test it yourself.</p> <p>I created a small function that did nothing more than wait for 90 seconds after executing.</p> <p>The timer is set to run every minute and therefore, the test is to see if the function still executes every minute on the minute or if it delays by ...
What happens when an Azure Timer function has an execution duration that's longer shorter than the trigger period?
c#|.net|azure|azure-functions
0
283
2
71,431,809
71,431,809
1
true
2022-03-10T22:40:24.487Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What happens when an Azure Timer function has an execution duration that's longer shorter than the trigger period?<p>If an Azure function executes for say 10...
71,923,682
SQL*Plus how to execute environment set-up and query in one statement<p>I execute the following query which returns one value and it works fine.</p> <pre><code>echo &quot;select myquery ;&quot; | sqlplus user/pass@dbase | | head -4 | tail -1 </code></pre> <p>The issue is that when the one value returned is too large it...
<p>A heredoc (as shown in @Philippe's answer) is going to be easier to read and maintain, but if for some reason you really wanted to keep it in one line you could add the <code>-e</code> flag to <code>echo</code> and embed new lines:</p> <pre><code>echo -e &quot;SET LINESIZE 3200 \n select myquery ;&quot; | sqlplus us...
SQL*Plus how to execute environment set-up and query in one statement
linux|oracle|oracle12c|sqlplus
0
35
2
71,924,135
71,924,135
1
true
2022-04-19T10:48:59.880Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: SQL*Plus how to execute environment set-up and query in one statement<p>I execute the following query which returns one value and it works fine.</p> <pre><co...
71,907,525
Can snowflake masking policies be assigned to tags?<p>I know that masking policies can be assigned to columns, for example:</p> <pre><code>alter table if exists user_info modify column email set masking policy email_mask; </code></pre> <p>But can we assign one masking policy to a tag? So that all the columns with the t...
<p>The simple answer is No. Masking policies can only be attached on columns of Tables and Views.</p> <p>If you are looking to automatically assign Masking Policies to tagged columns, you can do the following:</p> <ol> <li>Join the <a href="https://docs.snowflake.com/en/sql-reference/info-schema/columns.html" rel="nofo...
Can snowflake masking policies be assigned to tags?
snowflake-cloud-data-platform|masking|tagging
0
259
2
71,908,480
71,908,480
1
true
2022-04-18T04:11:07.607Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can snowflake masking policies be assigned to tags?<p>I know that masking policies can be assigned to columns, for example:</p> <pre><code>alter table if exi...
71,961,556
How can format HTML with Visual Studio Code?<p>I found a file that I want to read with an unorder HTML code,</p> <p>There is any visual studio code extension that can fix it to order code?</p> <p>The code is something like and I want it to look prettier that each tag breaks the line.</p> <pre><code>div&gt;&lt;div class...
<p>You should be able to format, or &quot;beautify&quot; the code in the Visual Studio Code editor using the following:</p> <p>Windows: <kbd>Shift</kbd> + <kbd>Alt</kbd> + <kbd>F</kbd> Linux: <kbd>Alt</kbd> + <kbd>Shift</kbd> + <kbd>I</kbd> macOS: <kbd>⌥</kbd> + <kbd>⇧</kbd> + <kbd>F</kbd></p> <p>Alternatively Right...
How can format HTML with Visual Studio Code?
visual-studio-code
0
25
1
71,961,620
71,961,620
1
true
2022-04-21T22:32:43.997Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can format HTML with Visual Studio Code?<p>I found a file that I want to read with an unorder HTML code,</p> <p>There is any visual studio code extension...
71,807,506
Return rows if and only if all rows with same name are available during date range<p>I have the following table (that I can't change)</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>id</th> <th>name</th> <th>date</th> <th>available</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>Book_1</td>...
<p>You can use a subquery with <code>BOOL_AND</code> to check that <code>available</code> is <code>true</code> for all <code>date</code>s for a book:</p> <pre><code>SELECT * FROM books WHERE date BETWEEN '2019-10-11' AND '2019-10-13' AND name IN ( SELECT name FROM books WHERE date BETWEEN '2019-10-11' AND '2019...
Return rows if and only if all rows with same name are available during date range
sql|postgresql
0
32
2
71,807,578
71,807,578
1
true
2022-04-09T11:06:33.433Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Return rows if and only if all rows with same name are available during date range<p>I have the following table (that I can't change)</p> <div class="s-table...
71,856,503
Why can't I create a pointer to a TTreeNode in a TTreeView<p>Using C++ Builder in Rad Studio 10.4</p> <p>Why can't I create a pointer to a <code>TTreeNode</code>?</p> <p>I have a <code>TTreeView</code> called <code>BookmarksTree</code>, and I want to loop through all of its nodes. When I try and compile this:</p> <pre>...
<p><code>BookmarksTree-&gt;Items</code> is a pointer to a single <a href="https://docwiki.embarcadero.com/Libraries/Sydney/en/Vcl.ComCtrls.TTreeNodes" rel="nofollow noreferrer"><code>TTreeNodes</code></a> object. You are trying to perform pointer arithmetic to access a node as if the <code>Items</code> were an array o...
Why can't I create a pointer to a TTreeNode in a TTreeView
c++builder-10.4-sydney|ttreenodes
0
24
1
71,864,945
71,864,945
1
true
2022-04-13T11:09:54.943Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why can't I create a pointer to a TTreeNode in a TTreeView<p>Using C++ Builder in Rad Studio 10.4</p> <p>Why can't I create a pointer to a <code>TTreeNode</c...
71,798,655
Issue with passing constructor parameter via controller factory<p>I've got an issue with passing parameters to controller. The main program uses a controller factory to pass a stage object to my controller. The controller factory prints the address of the stage object, but the controller gets Null as stage object. Why ...
<p>The <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Class.html#getConstructors()" rel="nofollow noreferrer"><code>Class.getConstructors()</code></a> method</p> <blockquote> <p>Returns an array containing <code>Constructor</code> objects reflecting all the <em>public</em> constructors ...
Issue with passing constructor parameter via controller factory
javafx|controller-factory
0
32
1
71,798,968
71,798,968
1
true
2022-04-08T14:20:58.997Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Issue with passing constructor parameter via controller factory<p>I've got an issue with passing parameters to controller. The main program uses a controller...
71,799,733
How to name all rows in data.frame() whilst generating the data frame?<p>I want to produce a table similar to: <a href="https://i.stack.imgur.com/XIlot.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XIlot.png" alt="enter image description here" /></a></p> <p>But I'm having a hard time naming the row...
<p>Not sure if you want this. You can use the argument <code>row.names</code> to supply row names, and use <code>check.names = FALSE</code> to have column names with special syntax.</p> <pre><code>data.frame(&quot; &quot; = c(&quot;Yes&quot;, &quot;No&quot;), A = c(1, 4), B = c(2, 4), ...
How to name all rows in data.frame() whilst generating the data frame?
r
0
33
2
71,800,119
71,800,119
1
true
2022-04-08T15:36:22.593Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to name all rows in data.frame() whilst generating the data frame?<p>I want to produce a table similar to: <a href="https://i.stack.imgur.com/XIlot.png" ...
72,005,597
Post Repost May cause cycles or multiple cascade paths<blockquote> <p>Introducing FOREIGN KEY constraint 'FK_Posts_Posts_RepostId' on table 'Posts' may cause cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other FOREIGN KEY constraints.</p> </blockquote> <hr /> <h2>Attemp...
<p>Your first attempt was close, it's just that with self-references, or any reference where your property name differs from the Type name you need to explicitly configure the FK:</p> <p>This should work:</p> <pre><code>builder.Entity&lt;Post&gt;() .HasOne(s =&gt; s.Repost) .WithOne() .HasForeignKey&lt;Post&gt...
Post Repost May cause cycles or multiple cascade paths
entity-framework|entity-framework-core
0
27
1
72,006,333
72,006,333
1
true
2022-04-25T20:50:01.100Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Post Repost May cause cycles or multiple cascade paths<blockquote> <p>Introducing FOREIGN KEY constraint 'FK_Posts_Posts_RepostId' on table 'Posts' may cause...
71,807,512
Hibernate - SQL query: How to get all child descandants starting with specific node<p>I have the following sample data (<code>items</code>) with some kind of recursion. For the sake of simplicity I limited the sample to 2 level. Matter of fact - they could grow quite deep.</p> <pre><code>+----+-------------------------...
<p>Your query is invalid for the following reasons:</p> <ol> <li><a href="https://www.postgresql.org/docs/current/queries-with.html#QUERIES-WITH-RECURSIVE" rel="nofollow noreferrer">As documented in the manual</a> a recursive CTE requires the <code>RECURSIVE</code> keyword</li> <li>Your <a href="https://www.postgresql....
Hibernate - SQL query: How to get all child descandants starting with specific node
postgresql|hibernate
0
27
1
71,807,552
71,807,552
1
true
2022-04-09T11:07:15.743Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Hibernate - SQL query: How to get all child descandants starting with specific node<p>I have the following sample data (<code>items</code>) with some kind of...
71,796,818
During the update it increments a new data Springboot java<p>I'm training with springboot,h2 hibernate, tried to do a full crud. Everything works except that when I modify a data, it modifies the selected data but it adds one more to my list. Who can tell me what is wrong with my code? thanks in advance.</p> <p>control...
<p>You have a bug in your code. Instead of updating the existing record, you just save the inputed movie object, which will result in creating a new row in the db.</p> <p>Should be <code>return movieRepository.save(currentMovie);</code></p>
During the update it increments a new data Springboot java
java|spring-boot
0
31
1
71,796,886
71,796,886
1
true
2022-04-08T12:14:26.523Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: During the update it increments a new data Springboot java<p>I'm training with springboot,h2 hibernate, tried to do a full crud. Everything works except that...
71,972,254
Define type for array of array or number and use spread operator<p>I am trying to figure out how to define type for Array which has both Array and a number.</p> <pre><code>input: [[2,7,11,15], 9] // I tried input: Array&lt;Array&lt;number&gt; | number&gt; </code></pre> <p>However, when I use this with spread operator ...
<p>The <code>twoSumHashMap</code> expects only two arguments. Arrays might have sizes other then 2, so you should explicitly type <code>input</code> as a tuple with two items (<a href="https://www.typescriptlang.org/play?#code/MYewdgzgLgBAlmADgVygLhgbTMgtgIwFMAnTAXQBoYcCSyYBeGLTAJgoHYKBGbngVkowAnGQCwAKEmhIsKAHcQAZTwAJA...
Define type for array of array or number and use spread operator
typescript
0
23
1
71,972,306
71,972,306
1
true
2022-04-22T16:57:59.593Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Define type for array of array or number and use spread operator<p>I am trying to figure out how to define type for Array which has both Array and a number.<...
71,327,691
Unable to connect to HateBase API<p>I'm failing to connect to HateBase API. I have broken down the code here to make the debugging easier:</p> <pre><code>key ='blah blah' base_url = 'https://api.hatebase.org' url = &quot;https://api.hatebase.org/4-4/authenticate&quot; payload = &quot;api_key=&quot; + key response = req...
<p>Apparently Hatebase is no longer being actively maintained, so they retired the Hatebase API. I sent them an email about it and they suggested I try Weaponized Word instead.</p> <blockquote> <p>&quot;A good alternative is The Weaponized Word, a new project which is very similar to Hatebase: it's free for eligible ac...
Unable to connect to HateBase API
api|python-requests|token
0
35
1
71,472,688
71,472,688
1
true
2022-03-02T18:43:49.160Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Unable to connect to HateBase API<p>I'm failing to connect to HateBase API. I have broken down the code here to make the debugging easier:</p> <pre><code>key...
71,798,276
Uncaught TypeError: Cannot read properties of undefined (reading 'replace') in Syncfusion Gantt<p>I'm using the <strong>GanttComponent</strong> (from <strong>@syncfusion/ej2-react-gantt</strong>) in my app inside one of my react stateless component functions since quite a long time without any issue.</p> <p>My teammate...
<p>The reported issue was only replicated when the locale value was set to null. We wanted to know if the issue was replicated for you due to the same cause or if you were changing the locale value dynamically after setting it to null. We request that you set the locale value, and we have provided a locale sample for y...
Uncaught TypeError: Cannot read properties of undefined (reading 'replace') in Syncfusion Gantt
reactjs|syncfusion|gantt-chart|syncfusion-calendar
0
515
1
71,841,530
71,841,530
1
true
2022-04-08T13:53:27.320Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Uncaught TypeError: Cannot read properties of undefined (reading 'replace') in Syncfusion Gantt<p>I'm using the <strong>GanttComponent</strong> (from <strong...
71,849,520
GitHub Actions - run step only if job was triggered by specific "on" trigger<p>I have an action that lints the code and runs tests when a commit to master happens and on pull requests:</p> <pre class="lang-yaml prettyprint-override"><code>name: My Action on: push: branches: [master] pull_request: branches:...
<p>You can use conditionals on steps to turn them off in specific cases:</p> <pre class="lang-yaml prettyprint-override"><code>if: ${{ github.event_name == 'pull_request' }} </code></pre> <p>In your case you probably want to check for <code>push</code>:</p> <pre class="lang-yaml prettyprint-override"><code>jobs: buil...
GitHub Actions - run step only if job was triggered by specific "on" trigger
github|github-actions
0
288
1
71,849,723
71,849,723
1
true
2022-04-12T21:51:05.417Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: GitHub Actions - run step only if job was triggered by specific "on" trigger<p>I have an action that lints the code and runs tests when a commit to master ha...
71,805,207
How to avail "Forecasting: Methods and Application" dataset in Python?<p>I am using the book <em>Forecasting: Methods and Applications</em> by <em>Makridakis</em>, <em>Wheelwright</em> and <em>Hyndman</em>. I want to do the exercises along the way, but in Python, not R (as suggested in the book).</p> <p>I do not know h...
<p>one possibility:</p> <pre><code>## install and load package: install.packages('fma') library('fma') ## list example data of package fma: data(package = 'fma') ## export single data as csv: write.csv(cement, file = 'cement.csv') ## bulk export: ## data names are in `[,3]`rd column of list member &quot;results&quot...
How to avail "Forecasting: Methods and Application" dataset in Python?
python|r
0
27
1
71,805,998
71,805,998
1
true
2022-04-09T04:17:48.540Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to avail "Forecasting: Methods and Application" dataset in Python?<p>I am using the book <em>Forecasting: Methods and Applications</em> by <em>Makridakis...
71,798,920
select distinct data from postgres table<p>I have a table like this: <a href="https://i.stack.imgur.com/rfzEZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rfzEZ.png" alt="enter image description here" /></a></p> <p>I would like a query to return results similar to this:</p> <p><a href="https://i.s...
<p>First coalesce nulls in <code>device_type</code> to 'other',<br /> then group by <code>coalesce(device_type, 'other')</code> and use conditional sums with <code>filter</code> clause.</p> <pre class="lang-sql prettyprint-override"><code>select coalesce(device_type, 'other') as device, sum(sales) filter (where ...
select distinct data from postgres table
postgresql
0
26
1
71,799,022
71,799,022
1
true
2022-04-08T14:39:50.773Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: select distinct data from postgres table<p>I have a table like this: <a href="https://i.stack.imgur.com/rfzEZ.png" rel="nofollow noreferrer"><img src="https:...
72,031,687
RETAIN removalPolicy on secret stack so it doesn't get deleted on synth<p>I have a cdk stack, including a secrets stack and I'm currently trying to do a deployment my app, and I have recently deleted a secret stack and container from ecr. However, as the current deployed app relies on this I get the following when depl...
<p>This happens because it tries to update the stack with the secrets first, and then the stacks that used to import them.</p> <p>This fails because exports cannot be deleted before imports.</p> <p>The solution to removing the stack is to make it a two-step process. First, and this is the main part, we need to ensure t...
RETAIN removalPolicy on secret stack so it doesn't get deleted on synth
typescript|amazon-web-services|aws-cdk
0
33
1
72,033,478
72,033,478
1
true
2022-04-27T15:42:57.510Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: RETAIN removalPolicy on secret stack so it doesn't get deleted on synth<p>I have a cdk stack, including a secrets stack and I'm currently trying to do a depl...
71,828,132
GFG question implementation merge sorted linked list<p><a href="https://practice.geeksforgeeks.org/problems/merge-two-sorted-linked-lists" rel="nofollow noreferrer">https://practice.geeksforgeeks.org/problems/merge-two-sorted-linked-lists</a> I tried writing the code for this question and wrote two possible answers. On...
<p>In the first implementation, initially <code>temp= beforeHead-&gt;next</code>. which is <code>Null</code>.</p> <p>I got the point that you are initialising <code>temp</code> variable with required values. but where exactly those temp values are linked. For each iteration the <code>temp</code> values are changed with...
GFG question implementation merge sorted linked list
java|linked-list
0
25
1
71,830,127
71,830,127
1
true
2022-04-11T12:48:21.817Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: GFG question implementation merge sorted linked list<p><a href="https://practice.geeksforgeeks.org/problems/merge-two-sorted-linked-lists" rel="nofollow nore...
71,943,435
Angular cannot navigate to nested non-child component<p>This is in Angular 12. I have a payments controller in ClientApp/src/app with (not showing all code) payments.module.ts:</p> <pre><code>import { NgModule } from '@angular/core'; import { RouterModule } from '@angular/router'; import { PaymentsComponent } from &quo...
<p>I think you're trying to have nested routes. Basically, you should have a <code>&lt;router-outlet&gt;</code> inside <code>payments.component.ts</code> and add <code>children</code> to your path <code>payments</code> in <code>payments.module.ts</code>.</p> <p><code>payments.component.html</code></p> <pre class="lang-...
Angular cannot navigate to nested non-child component
angular
0
27
1
71,944,708
71,944,708
1
true
2022-04-20T16:49:22.510Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Angular cannot navigate to nested non-child component<p>This is in Angular 12. I have a payments controller in ClientApp/src/app with (not showing all code) ...
71,868,571
Netlogo - "agents-here" not behaving as expected<p>Thank you for earlier input on my question. In this model the boat moves diagonally across the world (which does not wrap, 00 bottom left, max-pycor &amp; max-pxcor 49) and 20 fish move in the opposite diagonal. It is the intention that the boat counts the fish it enco...
<p>For your specific example, they simply are not on the same patch. Fish 18 is on 7 43 while the boat is on 6 43. You can check this quickly by using <code>ask boat 0 [show patch-here]</code>. At tick 184, they have crossed into 6 42 and 7 42 respectively, neither one ever stepping on the same patch.</p> <p>Another pr...
Netlogo - "agents-here" not behaving as expected
netlogo|patch|neighbours
0
35
1
71,871,709
71,871,709
1
true
2022-04-14T08:21:46.857Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Netlogo - "agents-here" not behaving as expected<p>Thank you for earlier input on my question. In this model the boat moves diagonally across the world (whic...
71,991,969
custom `smooth()` method for a custom class<p>I'm wondering why a custom <code>smooth()</code> function for a custom class is not taking precedence over <code>stats::smooth()</code>. Here is an example:</p> <pre><code>create_my_class = function(mydata){ class(mydata) = c(&quot;my_class&quot;, &quot;data.frame&quot;) ...
<p>Yes, there is a bigger problem here. If you want to define a specific method to handle a particular class, the function in question needs to be a <em>generic</em> function.</p> <p>For example, look at the function definition for <code>print</code>:</p> <pre class="lang-r prettyprint-override"><code>print #&gt; funct...
custom `smooth()` method for a custom class
r
0
26
1
71,992,407
71,992,407
1
true
2022-04-24T20:08:05.837Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: custom `smooth()` method for a custom class<p>I'm wondering why a custom <code>smooth()</code> function for a custom class is not taking precedence over <cod...
71,816,127
ASP.NET "stacked" regular expression field validators<p>I have 2 ASP.NET regular expression validators:</p> <ol> <li><code>^\s*[-+.'\w]+@\w+(?:[-.]\w+)*\.(?!co\s*$)\w{2,}\s*$</code> check whether the email address is valid</li> <li><code>@(adres.pl|vp.pl)</code> check if value contains any of these strings</li> </ol> <...
<p>You can use a single pattern and you might write your existing pattern as:</p> <pre class="lang-none prettyprint-override"><code>^\s*[-+.'\w]+@(?!(?:adres|vp)\.pl\b)\w+(?:[-.]\w+)*\.(?!co\s*$)\w{2,}\s*$ </code></pre> <p>The part excluding either <code>adres.pl</code> or <code>vp.pl</code> can be written as <code>@(?...
ASP.NET "stacked" regular expression field validators
asp.net|regex|validation
0
34
1
71,816,164
71,816,164
1
true
2022-04-10T11:25:00.253Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: ASP.NET "stacked" regular expression field validators<p>I have 2 ASP.NET regular expression validators:</p> <ol> <li><code>^\s*[-+.'\w]+@\w+(?:[-.]\w+)*\.(?!...
71,884,087
Regex: drop numbers with some symbols<p>I try to clean my text. So I need to remove some numbers and also some combinations of numbers and symbols.</p> <p>I have a string</p> <pre><code>s = '4/13/2022 2:20:03 pm from our side a more detailed analysis4 +7 (495) 797-8700 77-8282' </code></pre> <p>And I want to get</p> <p...
<p>You might match at least a single non word character surrounded by optional digits and trim the result</p> <pre><code>(?&lt;!\S)\d*(?:[^\w\s]+\d*)+\s* </code></pre> <p><strong>Explanation</strong></p> <ul> <li><code>(?&lt;!\S)</code> Assert a whitspace boundary to the leeft</li> <li><code>\d*</code> Match optional d...
Regex: drop numbers with some symbols
python|regex
0
28
3
71,884,139
71,884,139
1
true
2022-04-15T12:33:41.433Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Regex: drop numbers with some symbols<p>I try to clean my text. So I need to remove some numbers and also some combinations of numbers and symbols.</p> <p>I ...
71,838,087
How to disable a specific analysis option rule in a folder<p>I have a project which can be simplified to:</p> <pre><code>lib/ |- main.dart test/ test_environment/ |- test_test.dart </code></pre> <p>Where <code>test_environment</code> contains a set of <em>&quot;special&quot;</em> tests that cannot simply be run with<...
<p>The solution I found was to create a custom <code>analysis_options.yaml</code> for the folder <code>test_environment/</code> that extends the root <code>analysis_options.yaml</code>:</p> <pre><code>lib/ |- main.dart test/ test_environment/ |- test_test.dart |- analysis_options.yaml analysis_options.yaml </code></...
How to disable a specific analysis option rule in a folder
flutter|dart|flutter-test
0
277
1
71,838,110
71,838,110
1
true
2022-04-12T06:34:25.053Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to disable a specific analysis option rule in a folder<p>I have a project which can be simplified to:</p> <pre><code>lib/ |- main.dart test/ test_enviro...
71,805,233
Invalid hook call. Hooks can only be called inside of the body of a function component (react-native)<p>Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:</p> <ol> <li>You might have mismatching versions of React and the ren...
<p>You can't have <code>useState()</code> inside of an <code>React.useEffect()</code>. Move these statements to the top and outside of the useEffect</p> <pre><code>function OfferScreen({ navigation }: { navigation: any }) { //STATE VARIABLES FOR FETCHING DATA const [loading, setLoading] = useState(true); const [d...
Invalid hook call. Hooks can only be called inside of the body of a function component (react-native)
javascript|react-native|npm|react-redux|expo
0
521
1
71,805,265
71,805,265
1
true
2022-04-09T04:24:26.797Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Invalid hook call. Hooks can only be called inside of the body of a function component (react-native)<p>Error: Invalid hook call. Hooks can only be called in...
71,940,035
Adding date labels to barplot<p>I'm trying to add date labels to each individual bar that i've plotted. The data looks like this:</p> <pre><code> structure(list(lakeID = c(&quot;WE1&quot;, &quot;WE1&quot;, &quot;WE1&quot;, &quot;WE1&quot;, &quot;WE1&quot;, &quot;WE1&quot;, &quot;WE1&quot;, &quot;WE1&quot;, &quot;WE...
<p>How about this:</p> <pre class="lang-r prettyprint-override"><code>bar_mids &lt;- cumsum(c(.7, rep(1.2,9))) par(mar=c(8,4,2,1)+.1) xxx &lt;- barplot(ChiSum$meanlength, axisnames=TRUE, beside = TRUE, names.arg=c(ChiSum$date), col=ifelse(ChiSum$BACI==&quot;Control&quot;,'white','gray'), ylim = c(-0.01,8), ylab = &quot...
Adding date labels to barplot
r|dataframe|bar-chart
0
32
1
71,940,630
71,940,630
1
true
2022-04-20T12:53:55.430Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Adding date labels to barplot<p>I'm trying to add date labels to each individual bar that i've plotted. The data looks like this:</p> <pre><code> structur...
71,992,290
Getting a list of companies with dual share classes using cusip<p>I am a beginner in R, and I have a table that consists of two columns. The first column is the ID. The second column is the label (actually CUSIP in CRSP data). The label is the eight-digit number where the first six digits identify the ID, and the last ...
<p>If you've only got these two columns or you have other variables, but not <code>ID</code>-<code>label</code> pair is repeated you could use this</p> <pre class="lang-r prettyprint-override"><code>library(dplyr) #&gt; #&gt; Attaching package: 'dplyr' #&gt; The following objects are masked from 'package:stats': #&gt;...
Getting a list of companies with dual share classes using cusip
r|list|sorting
0
23
1
71,993,166
71,993,166
1
true
2022-04-24T20:59:18.087Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Getting a list of companies with dual share classes using cusip<p>I am a beginner in R, and I have a table that consists of two columns. The first column is ...
71,795,178
Populate MUI Select menu items from JSON<p>I am trying to populate an MUI select with choices from an API's JSON response. Currently, all <code>Choices</code> are being pushed into one <code>MenuItem</code> within the Select. <a href="https://i.stack.imgur.com/w5BIW.png" rel="nofollow noreferrer"><img src="https://i....
<p>You should change your <code>SelectQuestion </code> component by mapping through your <code>&quot;Choices&quot;</code> options and render <code>MenuItem</code>-s accordingly.</p> <pre><code>const SelectQuestion = ({ question }) =&gt; { return ( &lt;Box&gt; &lt;TextField value={question?.Question || &quot...
Populate MUI Select menu items from JSON
javascript|reactjs|json|material-ui
0
265
1
71,796,226
71,796,226
1
true
2022-04-08T10:06:47.913Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Populate MUI Select menu items from JSON<p>I am trying to populate an MUI select with choices from an API's JSON response. Currently, all <code>Choices</cod...