question_id
int64
37.6M
73.2M
input_text
stringlengths
88
52.4k
output_text
stringlengths
37
35.6k
title
stringlengths
15
150
tags
stringlengths
1
107
q_score
int64
-19
397
view_count
int64
3
879k
answer_count
int64
1
21
accepted_answer_id
int64
37.6M
73.8M
answer_id
int64
37.6M
73.8M
a_score
int64
-5
1.29k
is_accepted
bool
1 class
creation_date
stringlengths
20
24
input_text_instruct
stringlengths
251
52.6k
72,919,871
How can you split a string down into smaller sub sections of given length in rust?<p>Is there any way that I am able to break a string down into smaller substrings of a given length in rust. for e.g. the string is &quot;AAABBBCCC&quot; and we want to break the string down into a vector or array of substrings, for examp...
<p>There are a couple ways this problem can be approached. I assume that since you refer to substrings you want to split it by characters and not bytes. We do not know how many bytes each character occupies in memory so we need to iterate through and check. This makes the process a little more complicated but not by mu...
How can you split a string down into smaller sub sections of given length in rust?
arrays|string|vector|rust
0
40
1
72,920,105
72,920,105
0
true
2022-07-09T08:00:33.627Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can you split a string down into smaller sub sections of given length in rust?<p>Is there any way that I am able to break a string down into smaller subs...
72,921,249
Bash: Access associateive array using for loop variables does not work<p>I am currently trying to create a whiptail menu to get a key for the associative array and then using a for loop to access the data in the associative array.</p> <p>This is the bash code I am using:</p> <pre><code>#!/bin/bash declare -A backup_so...
<p>Thanks to <a href="https://stackoverflow.com/users/3216427/joanis">joanis</a>, the problems were the double quotes as a result of the whiptail return. this code works now:</p> <pre><code>#!/bin/bash declare -A backup_source=( [HDD]=&quot;Samsung/WD&quot; [Monitor]=&quot;/LG/DELL&quot; ) set -x myArray=() for ke...
Bash: Access associateive array using for loop variables does not work
bash|associative-array
0
40
1
72,922,191
72,922,191
0
true
2022-07-09T12:09:21.267Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Bash: Access associateive array using for loop variables does not work<p>I am currently trying to create a whiptail menu to get a key for the associative arr...
72,916,258
Opening xlsx file with Openpyxl gives KeyError '$A$' - Python<p>I am trying to open an Excel file (xlsx) using openpyxl:</p> <pre><code>data = pd.read_excel('C:/Users/jsm_24_02/item-report (1).xlsx', engine = 'openpyxl') </code></pre> <p>However I keep getting this error:</p> <pre><code>... C:\ProgramData\Anaconda3\lib...
<p>Sadly, it looks like this is <a href="https://foss.heptapod.net/openpyxl/openpyxl/-/issues/1550" rel="nofollow noreferrer">an issue with the openpyxl library</a>, which was reported to the repository over a year ago.</p> <p>Probably the most you can do is add a comment to the issue saying you're affected by it too s...
Opening xlsx file with Openpyxl gives KeyError '$A$' - Python
python|excel|openpyxl
1
40
1
72,922,444
72,922,444
0
true
2022-07-08T19:40:26.973Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Opening xlsx file with Openpyxl gives KeyError '$A$' - Python<p>I am trying to open an Excel file (xlsx) using openpyxl:</p> <pre><code>data = pd.read_excel(...
72,924,108
Is this the rightway to redirect HTTP request to HTTPS in express server?<p>I'm currently working on my API and need that work in HTTPS Protocol/SSL so I did this.</p> <pre><code>https.createServer({ key: fs.readFileSync(certKeySSLPath), cert: fs.readFileSync(certSSLPath) }, app).listen(serverPORTHTTPS); conso...
<p>my 5 cents here that you would not handle ssl in backend, you do that in reverse proxy like nginx.</p> <p>When you run server you start it on port then you reverse proxing that server so your api would be let say localhost:3000 and you would have nginx that would define what server should do when domain is called wi...
Is this the rightway to redirect HTTP request to HTTPS in express server?
javascript|node.js|express|ssl|https
0
40
1
72,924,283
72,924,283
0
true
2022-07-09T19:35:00.520Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is this the rightway to redirect HTTP request to HTTPS in express server?<p>I'm currently working on my API and need that work in HTTPS Protocol/SSL so I did...
72,885,784
The link address '$management' did not match any of the expected formats<p>I'm trying to build a function that will listen to the incoming MQTT messages in my Azure IoT hub.</p> <p>I'm clueless why I keep getting errors and I'm not sure what I'm missing, I just have the base code as I just wanted to test if it would re...
<p>I think the problem here is not with the Function App code.</p> <p>Please check whether you have routed the data to built-in endpoint of the IoT Hub Consumer Group. This becomes necessary when you have multiple routes created on your IoT Hub.</p> <p>To create this route - Add another route on IoT Hub with Endpoint a...
The link address '$management' did not match any of the expected formats
c#|azure|mqtt
0
40
1
72,924,495
72,924,495
0
true
2022-07-06T14:58:10.943Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: The link address '$management' did not match any of the expected formats<p>I'm trying to build a function that will listen to the incoming MQTT messages in m...
72,912,189
Get the previous columns of certain columns names<p>I do have a csv file like this</p> <p><a href="https://i.stack.imgur.com/9LJUs.png" rel="nofollow noreferrer">enter image description here</a></p> <p>Which include duplicated names. The point is that i am only interested on speed and status.</p> <p>so i defiend the fo...
<p>I think you can use <a href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_csv.html#pandas-read-csv" rel="nofollow noreferrer"><code>nrows=</code></a> parameter when reading the <code>.csv</code> file. That way you can read only few rows (and not whole file), save the column names and read o...
Get the previous columns of certain columns names
python|csv
1
40
1
72,925,420
72,925,420
0
true
2022-07-08T13:32:59.473Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Get the previous columns of certain columns names<p>I do have a csv file like this</p> <p><a href="https://i.stack.imgur.com/9LJUs.png" rel="nofollow norefer...
72,908,881
I am simply not able to bring the PAHO / Eclipse MQTT Android Service into an Android Studio project<p>I am simply not able to bring the PAHO / Eclipse MQTT Android Service into an Android Studio project. It says &quot;A problem occurred evaluating project ':app'.&quot; I have added the required dependencies in the ...
<p>GOTO settings.gradle and <strong>replace</strong></p> <pre><code>repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) </code></pre> <p><strong>with</strong></p> <pre><code>repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS) </code></pre> <p>That installed MQTT lib into my project.</p>
I am simply not able to bring the PAHO / Eclipse MQTT Android Service into an Android Studio project
java|android-studio|android-gradle-plugin
0
40
1
72,928,146
72,928,146
0
true
2022-07-08T08:46:11.593Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: I am simply not able to bring the PAHO / Eclipse MQTT Android Service into an Android Studio project<p>I am simply not able to bring the PAHO / Eclipse MQTT ...
72,927,463
Binary Tree reverse level traversal<p><a href="https://i.stack.imgur.com/oIljM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oIljM.png" alt="enter image description here" /></a></p> <p>my code:</p> <pre class="lang-c prettyprint-override"><code>void reversrorder(Btree B) { if(!B) return; s...
<p>I suppose you defined <code>s1</code> as a stack (a typo?), but in essence you can solve this by first enqueuing the <em>right</em> child and then the <em>left</em> child. This way you generate a level order with all levels reversed. When at the end you iterate this in reversed order, the already reversed levels wil...
Binary Tree reverse level traversal
c|data-structures|tree|binary-tree
0
40
1
72,928,464
72,928,464
0
true
2022-07-10T09:29:16.307Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Binary Tree reverse level traversal<p><a href="https://i.stack.imgur.com/oIljM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oIljM.png" ...
72,922,418
Create rows from part of column names<h2>Source data</h2> <p>I am working on an ELT project to load data from CSV files into PostgreSQL where I will transform it. The CSV files have many columns that are consistent across files, but also contain activity columns that are inconsistent with names like <code>Date (05/19/2...
<p>I followed your link to the <code>create_jsonb_flat_view</code> article yesterday and then forgot this question. While I thank you for pointing me there, I think that mentioning it worked against you.</p> <p>A more conventional approach using <code>regexp_replace()</code> works here. I left the date values as stri...
Create rows from part of column names
postgresql|dbt
0
40
2
72,928,908
72,928,908
0
true
2022-07-09T14:59:48.783Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Create rows from part of column names<h2>Source data</h2> <p>I am working on an ELT project to load data from CSV files into PostgreSQL where I will transfor...
72,929,604
Check if native element exist or not in Angular<p>I have this checkbox</p> <pre><code> &lt;input #optionA class=&quot;form-check-input&quot; type=&quot;checkbox&quot; name=&quot;answer&quot; value=&quot;opt_a&quot; /&gt; &lt;input #optionB class=&quot;form-check-input&quot; *ngIf=&quot;some condition&quot; type=&qu...
<p><code>optionA</code> / <code>optionB</code> are probably undefined. Check for them.</p>
Check if native element exist or not in Angular
angular|typescript
-1
40
1
72,929,822
72,929,822
0
true
2022-07-10T15:21:23.993Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Check if native element exist or not in Angular<p>I have this checkbox</p> <pre><code> &lt;input #optionA class=&quot;form-check-input&quot; type=&quot;chec...
72,901,844
Deployed Azure Serverless Function does not see classes besides Function<p>I have developed an Azure Serverless Function in Eclipse. The function works locally (Run As/Maven/Set Goals=test) but does not work once deployed. It fails with the following error</p> <pre><code>[Error] Executed 'Functions.HttpExample' (Failed...
<p>I assumed that because the <em>first</em> call to classes outside of <code>function.java</code> failed, all others would fail as well. However the problem was peculiar to <code>RecaptchaVerification.java</code>.</p> <p>The class that I tried to call looked like this.</p> <pre><code>public class RecaptchaVerification...
Deployed Azure Serverless Function does not see classes besides Function
java|azure|azure-functions|serverless
2
40
1
72,930,137
72,930,137
0
true
2022-07-07T17:10:37.077Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Deployed Azure Serverless Function does not see classes besides Function<p>I have developed an Azure Serverless Function in Eclipse. The function works local...
72,931,198
how to make downloading info vb.net<p>how can i make downloading info like what now is downloading</p> <pre><code>label1.text = &quot;Downloading - VisualStudio.exe&quot; ProgressBar1.Value = 50 My.Computer.Network.DownloadFile(&quot;https://URL.com/VisualStudio.exe&quot;, &quot;VisualStudio.exe&quot;) label1.text = &...
<p>May be you can achieve simply like this.</p> <p>Add a dialog to your project. (Add-&gt;New Item-&gt;Dialog(winforms).</p> <p>Remove every default created control on dialog.</p> <p>Add a <code>Label</code> and add a <code>ProgressBar</code> to the dialog at appropriate places and size.</p> <p>Initially hide the dialo...
how to make downloading info vb.net
vb.net
1
40
1
72,931,347
72,931,347
0
true
2022-07-10T19:12:26.897Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to make downloading info vb.net<p>how can i make downloading info like what now is downloading</p> <pre><code>label1.text = &quot;Downloading - VisualStu...
72,930,117
How to properly use prefabs from AsssetBundles?<p>I've recently encountered AssetBundles and tried to implement it in my project. I have a pretty simple game where controlling a character you should collect coins. I created the AssetBundle where I made prefabs and put everything from the game scene (background, player,...
<p>Try setting your prefab root (the most outer gameObject) scale to 1, them rescale your sprites inside it.</p> <p>If you have a CanvasScaler on your canvas, the canvas scale will probably be lower than 1, something small like: 0.02321f, your object seems to have a high scale like 107.f or something, this may be the c...
How to properly use prefabs from AsssetBundles?
unity3d|assetbundle
0
40
1
72,931,683
72,931,683
0
true
2022-07-10T16:31:12.673Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to properly use prefabs from AsssetBundles?<p>I've recently encountered AssetBundles and tried to implement it in my project. I have a pretty simple game...
72,927,272
Greedy resolution to constructing Huffman codes: question on greedy-choice property proof<p>I am reading The Introduction of Algorithm by Thomas and Charles, 3rd Edition.</p> <p>when coming to the greedy algo section for Huffman codes - Correctness - greedy-choice property - Lemma 16.2:</p> <blockquote> <p>Let C be an ...
<p>Nope, there’s nothing lost here. The lemma just requires that there’s an optimal coding tree where</p> <ol> <li>the codes for x and y have the same length, and</li> <li>that they differ only in the last bit.</li> </ol> <p>The proof shows that there’s an optimal coding tree where</p> <ol> <li>the codes for x and y ha...
Greedy resolution to constructing Huffman codes: question on greedy-choice property proof
algorithm|theory|huffman-code|greedy|proof-of-correctness
0
40
1
72,932,105
72,932,105
0
true
2022-07-10T08:52:58.750Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Greedy resolution to constructing Huffman codes: question on greedy-choice property proof<p>I am reading The Introduction of Algorithm by Thomas and Charles,...
72,932,419
Masking the columns of pytorch matrix<p>I have a matrix of shape <code>(batch_size, N, N)</code> and a masking tensor of shape <code>(batch_size, N)</code>.</p> <p>I want to put -infinity values only for the columns (and not rows) of the matrix, according to the given mask.</p>
<p>The solution is via repeating the mask in the correct dimension:</p> <pre><code>repeated_mask[mask.unsqueeze(-1).repeat(1,1,mask.shape[-1])!=1] = 0 </code></pre>
Masking the columns of pytorch matrix
matrix|pytorch|mask|tensor|binary-matrix
0
40
2
72,932,508
72,932,508
0
true
2022-07-10T23:02:22.627Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Masking the columns of pytorch matrix<p>I have a matrix of shape <code>(batch_size, N, N)</code> and a masking tensor of shape <code>(batch_size, N)</code>.<...
72,934,775
What is the problem in code that alerts pop-up if I don't enter my ID or password?<p>I want to make a program that If I don't enter my ID or password, an alert pops up, and if my password is less than 6 characters, an alert pops up.</p> <p>When I ran this code, the 'Fill in the blank' and 'Enter the password with at le...
<p>always declare variables inside the function, and don't forget to add a return statement inside the IF statement to stop the function if certain validation is met. Hope this is what you expect.</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-co...
What is the problem in code that alerts pop-up if I don't enter my ID or password?
javascript|html|jquery|if-statement|alert
0
40
1
72,934,904
72,934,904
0
true
2022-07-11T06:57:48.860Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What is the problem in code that alerts pop-up if I don't enter my ID or password?<p>I want to make a program that If I don't enter my ID or password, an ale...
72,923,143
Why my LINK component does not render the component that match the URL? , it only changes the url on the browser<p>Imports and PageNotFound component: <img src="https://i.stack.imgur.com/9T1hC.png" alt="Imports and PageNotFound component" /></p> <p>App main component:</p> <p><img src="https://i.stack.imgur.com/CXkTZ.pn...
<p>There is currently an incompatibility between react-router-dom@5 and React 18</p>
Why my LINK component does not render the component that match the URL? , it only changes the url on the browser
reactjs
2
40
2
72,935,873
72,935,873
0
true
2022-07-09T16:45:50.203Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why my LINK component does not render the component that match the URL? , it only changes the url on the browser<p>Imports and PageNotFound component: <img s...
72,936,237
Delete picked images one by one from gallery - flutter<p>I can able to pick the images from gallery and show it up in the UI. I have to delete the one by image after selecting. I done the UI, by showing the red cancel button for each image <a href="https://i.stack.imgur.com/25z9u.png" rel="nofollow noreferrer"><img src...
<p>I Done by myself. The issue is i am using bottom sheet to add the images. To delete the images i called removeAtIndex. it works fine. The problem is the bottom sheet does not know the state of the context, so added statefull builder for the bottom sheet. Now it works fine.</p>
Delete picked images one by one from gallery - flutter
flutter|image|dart
0
40
2
72,937,467
72,937,467
0
true
2022-07-11T09:20:01.590Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Delete picked images one by one from gallery - flutter<p>I can able to pick the images from gallery and show it up in the UI. I have to delete the one by ima...
72,942,831
Python/Pandas - If last X instances = 0 then Y<p>I have a dataframe that has user IDs, which week they've logged on and how many sessions they had during that week. It looks similar to this:</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>ID</th> <th>Week</th> <th>Sessions</th> </tr> </thea...
<p>This sounds like a case for <em>.groupby(['ID'])['Sessions'].rolling(3).sum()</em> as described in <a href="https://stackoverflow.com/q/63539146/149076">How to perform rolling sum on pandas dataframe with group by for last 365 days only</a></p>
Python/Pandas - If last X instances = 0 then Y
python|pandas|if-statement
0
40
2
72,943,626
72,943,626
0
true
2022-07-11T18:01:28.333Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python/Pandas - If last X instances = 0 then Y<p>I have a dataframe that has user IDs, which week they've logged on and how many sessions they had during tha...
72,909,056
Unexpected results when comparing dataframes' row-wise values in a column<p>I am trying to compare the data in two data frames for finding rows that are either missing or having different values under the header &quot;A-Score&quot;. However, my script gives results that is a bit unexpected. How to fix this?</p> <pre><c...
<p>This is solved by:</p> <pre><code>df1['compare_Scores'] = df1['R-Score'].isin(df2['A-Score']) #print(df1) if False in df1['compare_Sites']: print(df1[df1['compare_Sites'] == False]) Ensembl_ID length score identity p_value R-Site \ 0 ENSG00000000457 208 42.98 92.857 4.390000e-3...
Unexpected results when comparing dataframes' row-wise values in a column
python|pandas|dataframe|compare
0
40
3
72,944,207
72,944,207
0
true
2022-07-08T09:01:07.870Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Unexpected results when comparing dataframes' row-wise values in a column<p>I am trying to compare the data in two data frames for finding rows that are eith...
72,944,844
Issues with Selenium and a Single Page Application (Ember.js)<p>I just started trying to learn to write python code today. I am trying to make a web scraper to do some stuff, but i am having trouble getting selenium to click on the specific boxes/places to get to the correct page. Because it uses Ember.js, it is a Sing...
<p>You are getting <code>&quot;NoSuchElementException&quot;</code> error because the desired element is inside the <code>iframe</code> .So you have to switch to iframe at first.See the below image screenshot</p> <p><a href="https://i.stack.imgur.com/qJIoD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.c...
Issues with Selenium and a Single Page Application (Ember.js)
python|selenium|selenium-webdriver|ember.js|selenium-chromedriver
0
40
1
72,945,035
72,945,035
0
true
2022-07-11T21:27:21.220Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Issues with Selenium and a Single Page Application (Ember.js)<p>I just started trying to learn to write python code today. I am trying to make a web scraper ...
72,934,226
Concurrency in kotlin also block after synchronized block<p>I have a block of code like this in kotlin.</p> <pre><code>synchronized(this) { // do some work and produces a String }.also { /*it: String*/ logger.log(it) } </code></pre> <p>can some thread come and with unlucky timing the <em><strong>it</strong></em> ...
<p>To expand on comments:</p> <ol start="2"> <li><p>The <code>synchronized</code> block returns a reference that's passed into the <code>also</code> block as <code>it</code>; <strong>that reference is local to the thread</strong>, and so there's no possibility of it being affected by other threads.</p> </li> <li><p>In ...
Concurrency in kotlin also block after synchronized block
kotlin|concurrency
1
40
1
72,945,338
72,945,338
0
true
2022-07-11T05:51:32.300Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Concurrency in kotlin also block after synchronized block<p>I have a block of code like this in kotlin.</p> <pre><code>synchronized(this) { // do some wor...
72,946,257
how do i set data based on the response data in RTK Query?<p>i'm new to RTK Query. in the docs, i found <code>transformResponse</code>, but no idea how to use it to solve this.</p> <p>so my endpoint looks like this.</p> <pre><code> getTransactions: build.query&lt;TransactionResponse, void&gt;({ query: () =&gt;...
<p>solved it with transformResponse:</p> <p>this is the response type:</p> <pre><code>type TransactionResponse = { transactions: Transaction[]; is_error_count: number; }; </code></pre> <p>And this is the <code>transformResponse</code>:</p> <pre><code> transformResponse: (response: Transaction[]) =&gt; { ...
how do i set data based on the response data in RTK Query?
reactjs|react-redux|next.js|redux-toolkit
0
40
1
72,946,493
72,946,493
0
true
2022-07-12T01:50:43.187Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how do i set data based on the response data in RTK Query?<p>i'm new to RTK Query. in the docs, i found <code>transformResponse</code>, but no idea how to us...
72,946,875
Getting Lint No Nested Ternary Error when using ternary operator<p>What is the best way to avoid receiving the error no nested ternary on typescript.</p> <pre><code> disablePortal options={ // eslint-disable-next-line no-nested-ternary units=== ...
<p>I could easily see this as a place one could decide to ignore the rule and nest it - but if you don't want the nesting, another option is to put the logic into <a href="https://stackoverflow.com/questions/8228281/what-is-the-function-construct-in-javascript">an IIFE</a> and <code>return</code> the values conditional...
Getting Lint No Nested Ternary Error when using ternary operator
typescript|material-ui|nested|conditional-operator
0
40
1
72,946,899
72,946,899
0
true
2022-07-12T03:59:59.610Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Getting Lint No Nested Ternary Error when using ternary operator<p>What is the best way to avoid receiving the error no nested ternary on typescript.</p> <pr...
72,943,068
Log search for multiple occurrences of full_message<p>Application logs are written about the launch of methods and the parameters being passed. Example: <code>Call Method(1, &quot;1,2,3,4,5&quot;). Client IP 8.8.8.8. Waiting time in queue: 00:00:000. Execution time: 00:00:109. Total call time: 00:00:109</code></p> <p>Q...
<p>done with <code>full_message:&quot;Method call&quot; AND full_message:/.*2.*/</code></p>
Log search for multiple occurrences of full_message
graylog
0
40
1
72,947,375
72,947,375
0
true
2022-07-11T18:27:47.783Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Log search for multiple occurrences of full_message<p>Application logs are written about the launch of methods and the parameters being passed. Example: <cod...
72,948,680
Select many columns and a column with condition from another column<p>I have this table for example:</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>ID</th> <th>name</th> <th>city</th> <th>cat</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>alpha</td> <td>dola</td> <td>du</td> </tr> <tr> <t...
<p>If you are using SQL Server 2012 and above version, You can use <a href="https://docs.microsoft.com/en-us/sql/t-sql/functions/logical-functions-iif-transact-sql?view=sql-server-ver16" rel="nofollow noreferrer"><strong><code>IIF()</code></strong></a></p> <pre><code>SELECT Id, Name, IIF(City = 'dola', Cat, '') AS Cat ...
Select many columns and a column with condition from another column
sql-server|select
0
40
3
72,949,087
72,949,087
0
true
2022-07-12T07:41:35.457Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Select many columns and a column with condition from another column<p>I have this table for example:</p> <div class="s-table-container"> <table class="s-tabl...
72,960,370
How to find numbers and remove them from a multidimensional array?<p>I'm trying to create a Bingo game to play with my family and I would like to know what is the best way to remove numbers that have been called and then create another array with the tickets that is empty - so I know they have already win.</p> <p>So fa...
<p>Do you have an array of numbers that have been already called?<br /> If so:</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 called = [1,2,8,10,23,18,44]; var tickets = [...
How to find numbers and remove them from a multidimensional array?
javascript
-2
40
1
72,960,616
72,960,616
0
true
2022-07-13T02:47:25.707Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to find numbers and remove them from a multidimensional array?<p>I'm trying to create a Bingo game to play with my family and I would like to know what i...
72,962,061
How to sum date with minute with javascipt<p>I have a date:</p> <pre><code>start : 2022-07-13 08:22:22 process : 50 minute </code></pre> <p>And I want to output sum total</p> <pre><code>total = 2022-07-13 09:12:22 // total = start + process minute </code></pre> <p>I'm using javascript for sum</p> <p><div class="snippet...
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override"><code>const dateStr = '2022-07-13 08:22:22'; const date = new Date(dateStr); const addMinutes = (d, minutes) =&gt; { const _date = new ...
How to sum date with minute with javascipt
javascript|jquery
-1
40
1
72,962,209
72,962,209
0
true
2022-07-13T06:55:42.583Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to sum date with minute with javascipt<p>I have a date:</p> <pre><code>start : 2022-07-13 08:22:22 process : 50 minute </code></pre> <p>And I want to out...
72,964,439
apply condition on json file and fetch the value on that key value exists in linux<p>I have the <code>packages.json</code> file which contains the docker image details, looks like:</p> <pre><code> &quot;dependencies&quot;: [ { &quot;name&quot;: &quot;powershell-core&quot;, &quot;type&quot;: &quot;zip&quot;, &quo...
<p>Use <code>select</code> to filter an array:</p> <pre><code>jq -r '.dependencies[] | select(.type == &quot;docker-image&quot;).path' packages.json </code></pre> <p>The <code>-r</code> removes the double quotes around the paths.</p> <p>Use redirection to save the output to a file:</p> <pre><code>... &gt; output </code...
apply condition on json file and fetch the value on that key value exists in linux
arrays|json|shell|jq
0
40
1
72,964,497
72,964,497
0
true
2022-07-13T10:04:34.887Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: apply condition on json file and fetch the value on that key value exists in linux<p>I have the <code>packages.json</code> file which contains the docker ima...
72,948,218
how can i use the same page as an edit and an add and cache them offline with simple url change as in description<p>hi there so i have a link lets say it is <a href="https://example.com/exp" rel="nofollow noreferrer">https://example.com/exp</a> the exp page is my add page and it is cached in my service worker and works...
<p>okay so cache and serviceworkers website can only work offline with the exact link. Change it a bit and it brakes you have to cache the id if you want to cache a edit view you have to also use something like Dexie/indexedDB for an offline data/storage handler and then based on your data you fetch you have to for loo...
how can i use the same page as an edit and an add and cache them offline with simple url change as in description
caching|service-worker|offline-caching|offlineapps|dexie
0
40
1
72,966,845
72,966,845
0
true
2022-07-12T06:58:45.383Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how can i use the same page as an edit and an add and cache them offline with simple url change as in description<p>hi there so i have a link lets say it is ...
72,970,989
Angular form validation fails after removing `is-invalid` class from input field<p>I have prepared on StackBlitz (<a href="https://stackblitz.com/edit/angular-ivy-iuif7k?file=src/app/app.component.ts" rel="nofollow noreferrer">https://stackblitz.com/edit/angular-ivy-iuif7k?file=src/app/app.component.ts</a>) a very simp...
<p>The error element is there even when you remove <code>ngClass</code>, It just doesn't display because the default class you have <code>.invalid-feedback</code> has <code>display: none</code></p> <p>Remove <code>.invalid-feedback</code> class and you will see it working with or without <code>ngClass</code></p> <p>It ...
Angular form validation fails after removing `is-invalid` class from input field
javascript|html|angular
-1
40
2
72,971,361
72,971,361
0
true
2022-07-13T18:26:29.023Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Angular form validation fails after removing `is-invalid` class from input field<p>I have prepared on StackBlitz (<a href="https://stackblitz.com/edit/angula...
72,954,290
Algorithm development and optimization<p>I have this problem: You need to develop a meal regime based on the data entered by the user. We have a database with the meals and their prices (meals also have a mark whether they are breakfast, cause on breakfast we eat smth different from lunch and dinner most often). The in...
<p>Dynamic programming won't work because a necessary part of your state is the meals from the last 5 days. And the number of possibilities for that are astronomical.</p> <p>However it is likely that there are many solutions, not just a few. And that it is easy to find a working solution by being greedy. Also that a...
Algorithm development and optimization
algorithm
0
40
1
72,972,030
72,972,030
0
true
2022-07-12T14:50:54.580Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Algorithm development and optimization<p>I have this problem: You need to develop a meal regime based on the data entered by the user. We have a database wit...
72,971,503
removal of lines script however struggling with out of range<p>I am trying to make a python script which first creates a file if it doesnt exist then it creates file with 3 lines and then I am writing a script that if delete line by line however I was getting range error out of index however then I tried to make if sta...
<p>The for-loop does nothing because it loops the empty list <code>lines</code> that you define at the beginning of the script. Rather than looping this empty list, you'd want to read the lines from the file first before processing them.</p> <pre><code>with open(SHA256_HASHES_pack1, &quot;r&quot;) as viruslist1: li...
removal of lines script however struggling with out of range
python
-1
40
1
72,972,357
72,972,357
0
true
2022-07-13T19:13:58.177Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: removal of lines script however struggling with out of range<p>I am trying to make a python script which first creates a file if it doesnt exist then it crea...
72,959,286
Error Handling: Error and string manipulation even after error handling<p>I'm a little stumped here. I'm obviously missing some key aspect of error handling. I have a bit of script that <em>usually</em> works, and tends to handle it's own error nicely. I have it set up to retry several times which it does <em>sometimes...
<p>I edited the code to move the error handling from &quot;inline&quot; to a separate error handling section at the end. The addition of <code>Resume (label)</code> is what's causing the fix according to the article @TimWilliams shared.</p> <pre><code>On Error GoTo ERHAND Chance_Counter = 0 ASecondChance: Chance_Counte...
Error Handling: Error and string manipulation even after error handling
excel|vba|error-handling
1
40
1
72,973,235
72,973,235
0
true
2022-07-12T23:16:27.680Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Error Handling: Error and string manipulation even after error handling<p>I'm a little stumped here. I'm obviously missing some key aspect of error handling....
72,974,486
How To Capture Positive Lookahead<p>I am trying to figure out how to capture the positive lookahead group in the following regex:</p> <pre><code>(((Initial commit)|(Merge [^\r\n]+)|(((build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test|BREAKING CHANGE)(\(\w+\))?!?: ([\w ]+))(\r|\n|\r\n){0,2}((?:\w|\s|\r|\n|\r\...
<p>Your regex string is very long, but your problem is essentially that your positive lookahead is not being captured, because positive lookaheads do not capture itself. A simpler example is <code>bad (?=tea)</code> which will not capture <code>bad tea</code> and only <code>bad </code>. However if you do <code>bad (?=(...
How To Capture Positive Lookahead
regex|regex-lookarounds|regex-group
0
40
1
72,975,475
72,975,475
0
true
2022-07-14T02:18:13.530Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How To Capture Positive Lookahead<p>I am trying to figure out how to capture the positive lookahead group in the following regex:</p> <pre><code>(((Initial c...
72,974,666
Invalid regular expression npm start<ol> <li><p>i download react wearable from <a href="https://github.com/yldio/react-native-wearables-demo#using-android-studios-adb" rel="nofollow noreferrer">https://github.com/yldio/react-native-wearables-demo#using-android-studios-adb</a></p> </li> <li><p>npm install(no error)</p> ...
<p>Use <strong>npx</strong> and try</p> <pre><code>npx react-native start --reset-cache </code></pre>
Invalid regular expression npm start
node.js|reactjs|npm|npm-start
0
40
1
72,975,838
72,975,838
0
true
2022-07-14T02:51:46.853Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Invalid regular expression npm start<ol> <li><p>i download react wearable from <a href="https://github.com/yldio/react-native-wearables-demo#using-android-st...
72,948,468
Chemistry: TypeError: can only concatenate str (not "float") to str - I do not find any helpful answers here<p>Unfortunately, I'm stuck at this problem albeit it surely seems utterly ridiculous to you guys. I hope you can help me.</p> <p>This would be the code: (I have no idea how to show it correctly)</p> <pre><code>g...
<p>I forgot to convert the pH to a float. Now it's clear.</p>
Chemistry: TypeError: can only concatenate str (not "float") to str - I do not find any helpful answers here
python|chemistry
0
40
1
72,977,270
72,977,270
0
true
2022-07-12T07:22:37.590Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Chemistry: TypeError: can only concatenate str (not "float") to str - I do not find any helpful answers here<p>Unfortunately, I'm stuck at this problem albei...
72,978,234
How to store item with one-to-many relations into sql-table?<p>I have any form created on vuetify.js</p> <p>In this for I have field:</p> <ol> <li>Normal input field &quot;Name&quot;, will this be stored in the table &quot;person&quot; (model Person, structure: id, name, ...).</li> <li>Multiple select &quot;Languages&q...
<p>One of the way to save one to many relation data is using foreach loop. let you create a person which have 2 languages.</p> <pre><code>$person= Person::create([ 'name' =&gt; 'SOmthing', ]); </code></pre> <p>Person select 02 languages. <strong>$languauges</strong> variable have multiple data like:</p> <pre><code>...
How to store item with one-to-many relations into sql-table?
laravel|vue.js|axios|laravel-api
0
40
2
72,979,109
72,979,109
0
true
2022-07-14T09:27:14.390Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to store item with one-to-many relations into sql-table?<p>I have any form created on vuetify.js</p> <p>In this for I have field:</p> <ol> <li>Normal inp...
72,980,800
Point in Polygon method in R for merge regions of a shapefile with over 15'000 observations of a dataset<p>I am struggling since days with a problem.</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>region</th> <th>geometry</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>MULTIPOLYGON(68308...
<p>Here's a somewhat contrived example. The key function is <code>st_intersection()</code>. There may be faster solutions using other methods in <code>sf</code>.</p> <pre><code>library(sf) library(tmap) library(tidyverse) data(&quot;World&quot;) world.centroids &lt;- st_centroid(World)[,1] world.centroids.expanded &lt;...
Point in Polygon method in R for merge regions of a shapefile with over 15'000 observations of a dataset
r
0
40
1
72,981,812
72,981,812
0
true
2022-07-14T12:49:22.763Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Point in Polygon method in R for merge regions of a shapefile with over 15'000 observations of a dataset<p>I am struggling since days with a problem.</p> <...
72,971,861
Arduino Can't run After Unplug and Replug or Reset<p>I am using Arduino nano 33 IoT and currently my Arduino stops running even the loop function after unplug&amp;Replug into the computer without reprogramming or pressing the reset button. Any suggestions for resolving this issue?</p> <p>Sample Code: The follow code st...
<p>I found the solution:</p> <ol> <li>Remove line <code>while (!Serial);</code></li> <li>Reopen a new serial monitor whenever you reset/re-plugin in order to see the serial output!</li> </ol>
Arduino Can't run After Unplug and Replug or Reset
arduino|arduino-nano
0
40
1
72,982,987
72,982,987
0
true
2022-07-13T19:49:00.073Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Arduino Can't run After Unplug and Replug or Reset<p>I am using Arduino nano 33 IoT and currently my Arduino stops running even the loop function after unplu...
72,983,273
Moving a field of pixels inside a picture in Python with PIL<p>I'm trying to write a code, which will swap two selected rectangles inside a picture. The rectangles start at a given Y-coordinate, are 100 pixels &quot;thick&quot; and have the width of the whole picture.</p> <p>I have two separate for loops in two separat...
<p>I am afraid to say that I understand your question properly, but here's my attempt that answers your question:</p> <blockquote> <p>I'm trying to write a code, which will swap two selected rectangles inside a picture. The rectangles start at a given Y-coordinate, are 100 pixels &quot;thick&quot; and have the width of...
Moving a field of pixels inside a picture in Python with PIL
python|python-imaging-library
-1
40
2
72,984,261
72,984,261
0
true
2022-07-14T15:45:08.747Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Moving a field of pixels inside a picture in Python with PIL<p>I'm trying to write a code, which will swap two selected rectangles inside a picture. The rect...
72,983,684
How to add a new column with COUNTIFS using Pandas<p>Can you please help me understand how I can do a create a separate column in a dataframe and store the value based on a COUNTIFS result.</p> <p>I am having three columns currently in the dataframe Column 1 - Name of the Employee Column 2 - Name of the Manager (Can ge...
<p>Does this produces the desired result?</p> <pre><code>import pandas as pd d = { 'emp_name': ['foo', 'bar', 'abc'], 'man_name': ['spam', 'spam', 'eggs'], 'gender': ['F', 'M', 'F'] } df = pd.DataFrame(d) print(df) &quot;&quot;&quot; emp_name man_name gender 0 foo spam F 1 bar sp...
How to add a new column with COUNTIFS using Pandas
python|pandas|dataframe
0
40
1
72,984,478
72,984,478
0
true
2022-07-14T16:17:09.840Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to add a new column with COUNTIFS using Pandas<p>Can you please help me understand how I can do a create a separate column in a dataframe and store the v...
72,984,237
DDD, Is domain model a domain or a sub-domain<p>These terms make me confuse, please help me understand it a little bit more. So what exactly is a <strong>Domain</strong> in DDD. So my understanding is, <strong>Domain</strong> is an entity or a class in my code and I start asking myself what is the sub-domain then? I wa...
<blockquote> <p>Every software program relates to some activity or interest of its user. That subject area to which the user applies the program is the <em>domain</em> of the software. Some domains involve the physical world: The domain of an airline-booking program involves real people getting on real aircraft. So...
DDD, Is domain model a domain or a sub-domain
java|domain-driven-design
0
40
1
72,986,597
72,986,597
0
true
2022-07-14T17:04:31.783Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: DDD, Is domain model a domain or a sub-domain<p>These terms make me confuse, please help me understand it a little bit more. So what exactly is a <strong>Dom...
72,986,600
What are the use cases for AtomicFile?<p>I'm having trouble understanding the use cases for <a href="https://developer.android.com/reference/android/util/AtomicFile" rel="nofollow noreferrer">AtomicFile</a>. Since it does not confer any thread safety, is it just for ensuring no partial/invalid files are written if the ...
<blockquote> <p>is it just for ensuring no partial/invalid files are written if the app crashes or device loses power during a file write?</p> </blockquote> <p>Yes.</p> <p>Adding on to the cases, the OS can kill the process at anytime. <code>AtomicFile</code> should provide atomic guarantees in that case too.</p>
What are the use cases for AtomicFile?
android|kotlin|atomic|android-file
0
40
1
72,987,244
72,987,244
0
true
2022-07-14T21:00:01.630Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What are the use cases for AtomicFile?<p>I'm having trouble understanding the use cases for <a href="https://developer.android.com/reference/android/util/Ato...
72,992,024
JQuery UI Rotatable, problems with radians option<p><a href="https://i.stack.imgur.com/YonKI.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YonKI.gif" alt="enter image description here" /></a></p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div c...
<p>I found out that is indeed a problem with &quot;radians&quot; option, because with &quot;degrees&quot; it gives no problems and works as it should do. If you incur in this problem, just use degrees option</p>
JQuery UI Rotatable, problems with radians option
javascript|php|jquery
2
40
1
72,993,897
72,993,897
0
true
2022-07-15T09:40:21.507Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: JQuery UI Rotatable, problems with radians option<p><a href="https://i.stack.imgur.com/YonKI.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.c...
72,993,537
Jsonb array elements<p>How to extract data from a jsonb column</p> <p>Data Table</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>Id</th> <th>Result</th> </tr> </thead> <tbody> <tr> <td>1001</td> <td>{&quot;Green&quot;: {&quot;value&quot;: &quot;250.3&quot;, &quot;reading&quot;: &quot;250.3&...
<pre><code>select result -&gt; 'green' as key_value from table </code></pre> <p><a href="https://www.postgresqltutorial.com/postgresql-tutorial/postgresql-json/" rel="nofollow noreferrer">https://www.postgresqltutorial.com/postgresql-tutorial/postgresql-json/</a></p>
Jsonb array elements
postgresql|jsonb-array-elements
0
40
1
72,993,982
72,993,982
0
true
2022-07-15T11:50:30.093Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Jsonb array elements<p>How to extract data from a jsonb column</p> <p>Data Table</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th...
72,844,255
how to have a fixed "anchor" to the main function environment?<p>In a package, I have a main function that calls a lot of other, unexported functions, with a lot of condition checks everywhere.</p> <p>When using tidyverse error handling, for instance using the awesome <a href="https://cli.r-lib.org/reference/index.html...
<p>I finally managed to get it done.</p> <p>I declare a global environment in my package, but it was not enough as attributing the <code>my_caller </code> variable again caused a lot of bugs.</p> <p>At the beginning of the main function, I save the current environment in the global environment as a variable, which I ca...
how to have a fixed "anchor" to the main function environment?
r|error-handling|callstack
2
40
2
72,994,075
72,994,075
0
true
2022-07-03T06:04:49.080Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to have a fixed "anchor" to the main function environment?<p>In a package, I have a main function that calls a lot of other, unexported functions, with a...
72,993,384
'app.use() requires a middleware function'<p>I was making a registration and Login page for user in Node using express. When i try to run my app.js file it gives this &quot;<strong>app.use()</strong>&quot; error. Below is my app.js code</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" da...
<p>The problem is you have to pass a function as a parameter to <code>app.use()</code>, but you are giving a string into it <code>&quot;cookieParser()&quot;</code>.</p> <h2>Change</h2> <pre><code>app.use(&quot;cookieParser()&quot;); </code></pre> <h2>To</h2> <pre><code>app.use(cookieParser()); </code></pre>
'app.use() requires a middleware function'
javascript|node.js|express|router
0
40
1
72,994,095
72,994,095
0
true
2022-07-15T11:36:58.083Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: 'app.use() requires a middleware function'<p>I was making a registration and Login page for user in Node using express. When i try to run my app.js file it g...
72,995,900
How to import a file present in a different folder inside a folder<p>I'm confused with file imports and exports in react.</p> <p>I have a <code>components</code> folder. Inside that, I have an <code>Authentication</code> folder in which there is <code>Login.css</code>. Outside the components folder, I have a <code>page...
<pre><code>---pages -Login.js ---components ---Authentication -Login.css </code></pre> <p>I am guessing this is your folder structure. To import Login.css to your Login.js file, you need to add,</p> <pre><code>import &quot;../components/Authentication/Login.css&quot; </code></pre> <p>at the top of your Login....
How to import a file present in a different folder inside a folder
reactjs|react-native|import|react-redux|export
-2
40
3
72,996,430
72,996,430
0
true
2022-07-15T14:56:59.133Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to import a file present in a different folder inside a folder<p>I'm confused with file imports and exports in react.</p> <p>I have a <code>components</c...
72,983,295
translating a linux vimrc function to one that will work in cygwin<p>I use screen and vim a lot. Therefore, when I go to open a file that I already have open in another vim session, in another screen window, I hate playing &quot;where's waldo&quot; and trying to figure out just which of my 22 screen windows that file ...
<p>Okay, for CYGWIN, you do NEED to install &quot;busybox&quot;</p> <p>Then, in my .vimrc file, change:</p> <pre><code>let my_command = &quot;lsof | grep '&quot; . fname . &quot;.swp' | grep &quot; . $USER . &quot; | sed -n 's/^vim\\? \\+\\([0-9]\\+\\).*$/\\1/p' &quot; </code></pre> <p>to:</p> <pre><code>let my_command...
translating a linux vimrc function to one that will work in cygwin
vim|cygwin
1
40
1
72,998,872
72,998,872
0
true
2022-07-14T15:46:29.380Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: translating a linux vimrc function to one that will work in cygwin<p>I use screen and vim a lot. Therefore, when I go to open a file that I already have ope...
72,998,507
Why does only one value gets return in NodeRED function node?<p>I have a NodeRED flow which has a function node and my code is following</p> <pre><code>var left = { payload : msg.payload.readResults[0].v }; var right = { payload : msg.payload.readResults[1].v }; node.warn(left); node.warn(right); if(left || right) { ...
<p>Finally figured it out, posting if incase anyone interested!</p> <pre><code>var left = {payload : msg.payload.readResults[0].v }; var right = {payload : msg.payload.readResults[1].v }; return [[left,right]]; </code></pre>
Why does only one value gets return in NodeRED function node?
node-red|kepserverex
0
40
1
72,999,570
72,999,570
0
true
2022-07-15T18:53:12.317Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why does only one value gets return in NodeRED function node?<p>I have a NodeRED flow which has a function node and my code is following</p> <pre><code>var l...
73,001,193
Cannot find classification schema reference in JSON Schema<p>I have a product schema which tries to reference an id in my document. It is a common reference to multiple objects. Unfortunately, my ide claims classification reference cannot be found. I am very new to json schemas and find only snippets which don't quit...
<p>Your reference is <code>&quot;$ref&quot;: &quot;/products/classification&quot;</code>. Where is this supposed to point?</p> <p>Odds are the validator you're using is looking for a schema with the <code>$id</code> of <code>&quot;https://digital.com/products/classification&quot;</code>. If the validator doesn't know...
Cannot find classification schema reference in JSON Schema
jsonschema|json-schema-validator
0
40
1
73,001,650
73,001,650
0
true
2022-07-16T02:50:32.773Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Cannot find classification schema reference in JSON Schema<p>I have a product schema which tries to reference an id in my document. It is a common reference...
73,002,908
How to use the value in a variable as name to create a panda data frame?<p>In [182]: colname</p> <p>Out[182]: 'col1'</p> <p>In [183]: x= 'df_' + colname</p> <p>In [184]: x</p> <p>Out[184]: 'df_col1'</p> <p>May I know how to create a new pandas data frame with <code>x</code>, such that the new data frame's name would be...
<p>You can use the <a href="https://docs.python.org/3/library/functions.html#locals" rel="nofollow noreferrer">locals()</a> function as given below,</p> <pre><code>&gt;&gt;&gt; mydf col_A col_B 0 1 4 1 2 5 2 3 6 &gt;&gt;&gt; colname = 'col1' &gt;&gt;&gt; locals()[f'df_{colname}'] = mydf...
How to use the value in a variable as name to create a panda data frame?
python|pandas|dataframe
0
40
3
73,003,287
73,003,287
0
true
2022-07-16T09:05:06.043Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to use the value in a variable as name to create a panda data frame?<p>In [182]: colname</p> <p>Out[182]: 'col1'</p> <p>In [183]: x= 'df_' + colname</p> ...
73,002,228
How to plot a graph over map of a country?<p>The code I tried is,</p> <pre><code>df = pd.DataFrame({'x':phi_pp, 'y':lambda_pp}) df.plot('x', 'y', kind='line',legend=None) plt.xlabel('IPP Longitude') ax=plt.ylabel('IPP Latitude') im = plt.imread(&quot;Map_of_India.jpg&quot;) fig, ax = plt.subplots() plt.show() </code><...
<p>You can first plot the image using <code>imshow</code>. Then make a second axes at the same position as the image axes and set its background transparent. Now you can plot your dataframe on this new axes and it will overlay the image.</p> <pre><code>import pandas as pd import matplotlib.pyplot as plt im = plt.imrea...
How to plot a graph over map of a country?
python|pandas|matplotlib|jupyter-notebook
0
40
1
73,003,294
73,003,294
0
true
2022-07-16T07:05:20.633Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to plot a graph over map of a country?<p>The code I tried is,</p> <pre><code>df = pd.DataFrame({'x':phi_pp, 'y':lambda_pp}) df.plot('x', 'y', kind='line'...
73,002,021
Returning of right type in a nested arrow function depending on parameters<p>I have an arrow function that return other nested arrow function depending on the parameters</p> <pre><code>type Exist_Options = &quot;true&quot; | &quot;ignore&quot; const string_parser = (o:Exist_Options) =&gt;{ switch (o) { case &quo...
<p>If you <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#type-assertions" rel="nofollow noreferrer">assert</a> an <a href="https://www.typescriptlang.org/docs/handbook/declaration-files/by-example.html#overloaded-functions" rel="nofollow noreferrer">overloaded function</a> type, you can get...
Returning of right type in a nested arrow function depending on parameters
typescript|functional-programming|deno
0
40
2
73,003,302
73,003,302
0
true
2022-07-16T06:29:49.787Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Returning of right type in a nested arrow function depending on parameters<p>I have an arrow function that return other nested arrow function depending on th...
72,875,974
boto3 api not returning new files in list if uploaded to s3 via GUI<p>I have a set of boto3 powered commands in python. they seem to be working great to download files from S3.</p> <pre><code>bucket = s3_client.Bucket(bucket_name) for obj in bucket.objects.filter(Prefix=key_dir): # Iterate over all files to downlo...
<p>The behavior seems isolated to a bucket made in 2018.. so I plan to just ignore this and create a new bucket.. once I had a new bucket this behavior stopped altogether.. strange, but hope it helps others who might see this</p>
boto3 api not returning new files in list if uploaded to s3 via GUI
amazon-web-services|amazon-s3|boto3
0
40
1
73,003,471
73,003,471
0
true
2022-07-05T21:56:37.190Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: boto3 api not returning new files in list if uploaded to s3 via GUI<p>I have a set of boto3 powered commands in python. they seem to be working great to dow...
72,780,576
Unable to start Java Gateway Server on Centos 7<p>I'm using a library called <a href="https://github.com/lessthanoptimal/PyBoof" rel="nofollow noreferrer">PyBoof</a> that makes use of py4j.</p> <p>I'm trying to install it on a Centos 7 server but I'm getting an error when starting the Gateway Server. I know there're a ...
<p>This problem was happening because the Java 17 version is incompatible with the implementation of Py4j in the project PyBoof.<br /> See this <a href="https://github.com/lessthanoptimal/PyBoof/issues/14" rel="nofollow noreferrer">issue</a> for more information.</p> <p>Installing Java 15 fixed the issue.</p>
Unable to start Java Gateway Server on Centos 7
python|java|centos7|py4j
0
40
1
73,004,375
73,004,375
0
true
2022-06-28T03:54:17.797Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Unable to start Java Gateway Server on Centos 7<p>I'm using a library called <a href="https://github.com/lessthanoptimal/PyBoof" rel="nofollow noreferrer">Py...
72,814,038
Execute a script when alarm is triggered in McAfee ESM 11.5.X<p>I want to execute a Python script when creating an alarm (McAfee ESM Virtual machine - ESM 11.5.4 20220106). When creating an alarm, I configured &quot;Execute remote command&quot;. Alarm is being triggered but script isn't getting executed. I tried as sho...
<p>I found a way to this. You can't execute a script situated in the ESM (In the image above, the IP is of ESM machine itself). You have to spin another VM with the required ports open. Refer image in the question.. So, the IP address, credentials and script path has to be of the VM.</p> <p>Basically you should have a ...
Execute a script when alarm is triggered in McAfee ESM 11.5.X
python|alarm|mcafee
0
40
1
73,004,907
73,004,907
0
true
2022-06-30T10:14:05.270Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Execute a script when alarm is triggered in McAfee ESM 11.5.X<p>I want to execute a Python script when creating an alarm (McAfee ESM Virtual machine - ESM 11...
73,005,862
How to fix "missing catch or finally after try" if i already put catch?<p>Heres my code</p> <pre><code>const {getAudioUrl} = require(&quot;google-tts-api&quot;) const langlist = [&quot;en&quot;, &quot;id&quot;] let language = args[0] if(langlist.find(c =&gt; c === language)) { if(!language) return message.reply(&quot...
<p>Your <code>catch</code> statement is outside the <code>if</code> block that has the <code>try</code> block. This is what I did to fix the error:</p> <ol> <li>Move the <code>catch</code> block closer to the <code>try</code>.</li> <li>Remove extra <code>}</code> that were causing errors.</li> <li>Fix the indentation.<...
How to fix "missing catch or finally after try" if i already put catch?
javascript|discord|discord.js|bots|text-to-speech
-1
40
1
73,005,933
73,005,933
0
true
2022-07-16T16:24:24.723Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to fix "missing catch or finally after try" if i already put catch?<p>Heres my code</p> <pre><code>const {getAudioUrl} = require(&quot;google-tts-api&quo...
73,009,475
getting a warning on php website Warning: A non-numeric value encountered in C:\xampp\htdocs\InventoryMS\dashboard.php on line 15<p>I downloaded a website from github and it's working fine except that it is showing warning in dashboard like this: <a href="https://i.stack.imgur.com/mJfGN.png" rel="nofollow noreferrer">d...
<p>Try starting with <code>$totalRevenue = 0;</code> instead, then you're not trying to add a number to a string in the subsequent loop.</p> <p>I'd guess this code was written for an older version of php which was more forgiving about mismatches between data types.</p>
getting a warning on php website Warning: A non-numeric value encountered in C:\xampp\htdocs\InventoryMS\dashboard.php on line 15
php|mysql
0
40
1
73,009,606
73,009,606
0
true
2022-07-17T05:33:47.920Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: getting a warning on php website Warning: A non-numeric value encountered in C:\xampp\htdocs\InventoryMS\dashboard.php on line 15<p>I downloaded a website fr...
73,010,277
update global variable with click event in js<p>I am beginner with JS.</p> <p>I want to update global variable with click event, But I don't know how;</p> <p>for example:</p> <pre><code>let a = 0; example.addEventListener('click', () =&gt; { a = 1; console.log(a); }) </code></pre> <p>this prints</p> <blockquote> <p>a ...
<p>when you run your code <code>console.log(a)</code> will not wait for the click event and hence it will log the current value of <em>a</em> which is 0, and it will not run again after firing the click event. You did not update it only in function but you just don't have anything to show you the updated value, instead...
update global variable with click event in js
javascript|variables|scope|state
0
40
2
73,010,342
73,010,342
0
true
2022-07-17T08:28:09.947Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: update global variable with click event in js<p>I am beginner with JS.</p> <p>I want to update global variable with click event, But I don't know how;</p> <p...
73,016,162
Lower case all words inside square brackets in a string PHP<p>I have a string in PHP like 'Hello [FIRSTNAME] [LASTNAME]' I want to convert all characters inside brackets into lower case</p>
<p>You can use <a href="https://www.php.net/manual/en/function.preg-replace-callback.php" rel="nofollow noreferrer">preg_replace_callback</a>:</p> <pre><code>&lt;?php $text=&quot;Hello [FIRSTNAME]&quot;; echo preg_replace_callback('/\b([^]]+)\b/', function ($word) { return strtolower($word[1]); }, $text); </code...
Lower case all words inside square brackets in a string PHP
php|regex|string|preg-replace
-2
40
1
73,016,237
73,016,237
0
true
2022-07-17T23:59:39.903Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Lower case all words inside square brackets in a string PHP<p>I have a string in PHP like 'Hello [FIRSTNAME] [LASTNAME]' I want to convert all characters ins...
73,013,838
Need only some columns to be sent in mail with one more column sorting criteria<p>I got a code with updated, need a table with few columns and some more criteria for sorting date. First Need to sort column X with TAT&gt;2, column B with banks, and only B,C,D,E,G,H,J,K,X columns need to be mailed. Kindly help me with it...
<p>Try</p> <pre><code>function createTable() { var sheet1 = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(&quot;Sheet1&quot;); const dataRange = sheet1.getRange(&quot;A2:AH&quot; + sheet1.getLastRow()); dataRange.sort([{ column: 24, ascending: true }]); var criterias = [&quot;Report Pending&quot;, &quot...
Need only some columns to be sent in mail with one more column sorting criteria
google-apps-script|google-sheets
0
40
1
73,016,497
73,016,497
0
true
2022-07-17T17:15:07.093Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Need only some columns to be sent in mail with one more column sorting criteria<p>I got a code with updated, need a table with few columns and some more crit...
73,016,991
Starting new session on every curl request<p>My question is about SESSIONS in PHP.</p> <p>I am using the following code to start a new session when user opens my website:</p> <pre><code>&lt;?php session_start(); ?&gt; </code></pre> <p>What I want to know is, suppose a script sends &quot;two&quot; CURL request to my web...
<p>PHP uses cookies to manage sessions. In order to use cookies with <code>curl</code> you need to enable a <code>cookie jar</code></p> <p>For example:</p> <pre><code>curl --cookie-jar cookies.txt http://www.example.com </code></pre> <p>Note: <code>cookies.txt</code> must be placed somewhere your instance of <code>cur...
Starting new session on every curl request
php
-2
40
1
73,017,162
73,017,162
0
true
2022-07-18T03:21:51.257Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Starting new session on every curl request<p>My question is about SESSIONS in PHP.</p> <p>I am using the following code to start a new session when user open...
73,016,156
Select html input triggers after second click in chrome for android but in desktop web browsers works ok, the app is developed in react js<p>I am just posting a little example because the code is big</p> <p>This is in the function</p> <pre><code>const[Municipios, setMunicipios] = useState(&quot;&quot;); const cargarMu...
<p>It was the onClick, the correct event was onChange and then worked in desktop and android browsers.</p>
Select html input triggers after second click in chrome for android but in desktop web browsers works ok, the app is developed in react js
android|html|select|react-hooks|onclick
0
40
1
73,017,841
73,017,841
0
true
2022-07-17T23:58:27.340Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Select html input triggers after second click in chrome for android but in desktop web browsers works ok, the app is developed in react js<p>I am just postin...
73,017,624
Select rows from last few minutes<p>I want to achieve this function to select rows from the last few minutes. (Assuming the latest time is 09:34:00)</p> <pre><code>SELECT CONVERT(VARCHAR(10),cur_time,108) as CUR_TIME, AVG(CAST(now_price AS FLOAT)) AS now_price FROM dbo.ticktest GROUP BY CUR_TIME HAVING CUR_TIME &gt;= ...
<p>use sub query where you always pick the max time which is actually latest time</p> <pre><code>HAVING CUR_TIME &gt;= (select max(CUR_TIME) from dbo.ticktest) </code></pre>
Select rows from last few minutes
sql|sql-server|dateadd
0
40
1
73,017,910
73,017,910
0
true
2022-07-18T05:21:11.477Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Select rows from last few minutes<p>I want to achieve this function to select rows from the last few minutes. (Assuming the latest time is 09:34:00)</p> <pre...
73,002,688
RecyclerView's last item is cut off when TextView Error Banner is visible. I'm using Constraint Layout with Barrier<p>I'm not sure how to ask this question. It seems easy to do but I'm not sure why it's not working. Anyways, here goes. I have this Error Banner that should be visible only if the total &quot;Weight&quot;...
<p>This worked for me, I added getViewTreeObserver().addOnGlobalLayoutListener for layoutGradeCategoryList and trigger the request layout there.</p> <pre><code>layoutGradeCategoryList.getViewTreeObserver().addOnGlobalLayoutListener(OnGlobalLayoutListener { layoutGradeCategoryList.requestLayout(); }) </code></pre> <...
RecyclerView's last item is cut off when TextView Error Banner is visible. I'm using Constraint Layout with Barrier
android|android-recyclerview|android-constraintlayout|barrier
0
40
1
73,018,616
73,018,616
0
true
2022-07-16T08:24:24.443Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: RecyclerView's last item is cut off when TextView Error Banner is visible. I'm using Constraint Layout with Barrier<p>I'm not sure how to ask this question. ...
73,016,597
How to select a div within a div class with beautiful soup?<p>I'm really new to this and am confused on how I can select information with a particular div class <a href="https://i.stack.imgur.com/hW8mn.png" rel="nofollow noreferrer">image of html</a> but it is &lt;div class=&quot;row&quot; data-start=&quot;1..&quot;). ...
<p>The problem is that this table is not in the source code, it is formed from static data using a JS. All three tables exist immediately on the page. You can access tax values in the <strong>cart</strong> class</p> <pre><code>url = 'https://filterbuy.com/brand/trion-air-bear-air-filters/20x20x5-air-bear-20x20/?selecte...
How to select a div within a div class with beautiful soup?
python|web-scraping|beautifulsoup
1
40
1
73,018,655
73,018,655
0
true
2022-07-18T01:50:45.593Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to select a div within a div class with beautiful soup?<p>I'm really new to this and am confused on how I can select information with a particular div cl...
72,991,063
Different than expected items in MemoryCache<p>When starting my application, I'm loading many configuration parameters into the MemoryCache and I can confirm that after doing that (in the Startup.cs), that there are about 280 entries inside of the cache.</p> <p>When I inject a IMemoryCache into a controller and return ...
<p>The problem was indeed with the <code>services.BuildServiceProvider().GetRequiredService&lt;ISysParamProvider&lt;IDbContext&gt;&gt;();</code> as it seemed to have created another instance of the IMemoryCache (which is injected in the ISysParamProvider).</p> <p>The solution to this was to inject the <code>ISysParamPr...
Different than expected items in MemoryCache
c#|.net|asp.net-core|caching
0
40
1
73,018,761
73,018,761
0
true
2022-07-15T08:20:34.383Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Different than expected items in MemoryCache<p>When starting my application, I'm loading many configuration parameters into the MemoryCache and I can confirm...
73,018,563
Can we get INSERT UPDATE Count from Slowly Changing Dimension Type-2 stored procedure?<p>How to get</p> <pre><code>Insert Count = ? Update Count = ? </code></pre> <p>in slowly changing dimension type 2 ?</p> <p>Here is my procedure</p> <pre><code>CREATE PROCEDURE dbo.MergeDimCustomer AS BEGIN DECLARE @CurrentDateTi...
<p>You can do it this way:</p> <pre><code>..... THEN UPDATE SET [target].[Name] = [source].[Name], [target].[ScdVersion] = [target].[ScdVersion] + 1, [target].[Telephone] = [source].[Telephone] OUTPUT inserted.*, deleted.*; </code><...
Can we get INSERT UPDATE Count from Slowly Changing Dimension Type-2 stored procedure?
sql-server|stored-procedures|data-warehouse|scd|scd2
-2
40
1
73,019,367
73,019,367
0
true
2022-07-18T07:20:27.620Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can we get INSERT UPDATE Count from Slowly Changing Dimension Type-2 stored procedure?<p>How to get</p> <pre><code>Insert Count = ? Update Count = ? </code><...
72,990,597
Using Abstract class as type in spring database<p>So I have a class which I'm trying to store database, moreover there are mapper built for Spec class to store in database.</p> <pre><code>data class Spec( payload: SpecPayload? type: SpecType ) abstract class SpecPayload { ... } data class LinkPayload( ) : SpecPaylo...
<p>Answering my own questions, the reason it failed cause I wasn't using <code>@Component</code> over class.</p>
Using Abstract class as type in spring database
spring|kotlin
0
40
1
73,019,590
73,019,590
0
true
2022-07-15T07:41:02.180Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Using Abstract class as type in spring database<p>So I have a class which I'm trying to store database, moreover there are mapper built for Spec class to sto...
72,871,037
TeamCity CI integration between local projects<p>I have two projects A,B with their own build chains defined in their local <code>.teamcity</code> folders. In addition, A contains a dependency on B which I want to test. How do I set up a build chain that incorporates both of these individual builds such that, when B ch...
<p>The best answer I have found is to define a finish build trigger that starts when the previous build completes and send a reverse dependency back through the build chain to allowing builds to be customized.</p>
TeamCity CI integration between local projects
teamcity|gradle-kotlin-dsl
0
40
2
73,020,197
73,020,197
0
true
2022-07-05T14:22:16.117Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: TeamCity CI integration between local projects<p>I have two projects A,B with their own build chains defined in their local <code>.teamcity</code> folders. I...
73,016,244
SQL Exception while saving to database - Spring MySQL Auto Generated Id<p>I have created a table. I want its id to increment automatically with every record. So, i selected id as Auto Incremental while creating table in MySQL.</p> <p>Here my table is:</p> <p><a href="https://i.stack.imgur.com/5DT9b.png" rel="nofollow n...
<p>I have solved the problem.</p> <p>There was a warning in logs: &quot;SQL Error: 1064, SQLState: 42000&quot;. That means column names or table name may be reserved words in MySQL.</p> <p>My table's name was &quot;groups&quot; which is a reserved word in MySQL too. When i changed the name as &quot;groups_table&quot;,...
SQL Exception while saving to database - Spring MySQL Auto Generated Id
mysql|spring|spring-boot|sqlexception|auto-generate
0
40
2
73,020,426
73,020,426
0
true
2022-07-18T00:21:08.467Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: SQL Exception while saving to database - Spring MySQL Auto Generated Id<p>I have created a table. I want its id to increment automatically with every record....
72,971,581
How to disable past dates with Strapi (Backend)<p>Do you have any tips how can I disable the past dates on input date for forms with Strapi (only backend, not frontend). I don't have any exact idea and I'm looking for an answer. Thanks in advance.</p>
<p>Compare the <code>data.createdAt</code> object field with the current time, which you can get by constructing a new <code>Date</code> object.</p> <pre class="lang-js prettyprint-override"><code>const createdDate = new Date(data.createdAt); const currentDate = new Date(): if(createdDate.getTime() &lt; currentDate.ge...
How to disable past dates with Strapi (Backend)
backend|strapi
0
40
2
73,020,771
73,020,771
0
true
2022-07-13T19:22:53.997Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to disable past dates with Strapi (Backend)<p>Do you have any tips how can I disable the past dates on input date for forms with Strapi (only backend, no...
73,021,849
Fetch only selected rows based on the given condition in SQL Query #sql<p>I've a table with 2 columns as mentioned below, and I need to fetch only the rows based on the given conditions</p> <p><strong>Table</strong></p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>Id</th> <th>Status</th> </t...
<p>'Success' &gt; 'Pending' &gt; 'Failed'.</p> <pre><code>SELECT t1.id, t1.Status from table1 t1 join (select min(id) minid, max(status) maxstatus from table1) t2 on (t2.maxstatus = 'Failed' and t1.id = t2.minid) or (t2.maxstatus &lt;&gt; 'Failed' and t1.status = t2.maxstatus) </code></pre> <p>Return the first r...
Fetch only selected rows based on the given condition in SQL Query #sql
sql
0
40
2
73,022,316
73,022,316
0
true
2022-07-18T11:48:24.887Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Fetch only selected rows based on the given condition in SQL Query #sql<p>I've a table with 2 columns as mentioned below, and I need to fetch only the rows b...
73,025,295
Golang: Package function not found when import submodule<p>I'm new to Golang and I'm currently learning how to package modules. I did setup my package as follows:</p> <p><a href="https://i.stack.imgur.com/sA30f.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sA30f.png" alt="enter image description he...
<p>It's solved, function with lower-case first letter are considered private and cannot be accessed outside of their packages. Had to turn <code>getHomePage</code> to <code>GetHomePage</code>.</p>
Golang: Package function not found when import submodule
go|backend|packaging
-1
40
1
73,025,358
73,025,358
0
true
2022-07-18T16:00:09.493Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Golang: Package function not found when import submodule<p>I'm new to Golang and I'm currently learning how to package modules. I did setup my package as fol...
73,027,337
In Angular is there a way to get text from the URL and set it as a variable?<p>I have dropdown filters that filter some data, I'd like to be able to set one of these dropdowns with a value from the URL. Is this possible?</p>
<p>Try to check this: <a href="https://stackoverflow.com/a/45185477/8013381">How to retrieve the url in Angular</a></p> <p>Than you can for sure use the url to compose the options in the dropdown based on your custom logics.</p>
In Angular is there a way to get text from the URL and set it as a variable?
node.js|angular
1
40
1
73,030,225
73,030,225
0
true
2022-07-18T19:01:09.903Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: In Angular is there a way to get text from the URL and set it as a variable?<p>I have dropdown filters that filter some data, I'd like to be able to set one ...
73,031,143
Why does changing a value in a sublist changes all sublists<p>I'm trying to make lists within a list that has a special character to represent a player's position, in this case '@':</p> <pre><code>def __init__(self, x, y, plrX, plrY): # simplified for question self.board = [] boardX = [] self.x ...
<p>Lists in Python do not copy, they alias. This means that if you have a list <code>A</code>, and do <code>B = A</code>, any change you make to <code>A</code> is also made to <code>B</code> (we can say that B references A). Instead of appending the same <code>boardX</code> multiple times, make a copy of it each time a...
Why does changing a value in a sublist changes all sublists
python|python-3.x|list
-1
40
1
73,031,170
73,031,170
0
true
2022-07-19T04:31:13.007Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why does changing a value in a sublist changes all sublists<p>I'm trying to make lists within a list that has a special character to represent a player's pos...
73,027,591
Call webservice from batch file calling in scheduled task<p>It's several days I search for a problem. I've create an Intranet (Authenticate mode windows allow member of domain) and I a webservice can be called by asmx file I create a bat file to be use in scheduled task</p> <pre><code>@echo off start /MIN iexplore.ex...
<p>Finally, I found a way... In Internet option u have a checkbox &quot;activate the protected mode&quot; uncheck it And I add my Intranet to Intranet Site Like this server isn't use directly (only resquest by Excel) and like it's inside protected struture. The risk are very limited. I hope that can help</p>
Call webservice from batch file calling in scheduled task
batch-file|scheduled-tasks|asmx|credentials
0
40
1
73,061,721
73,061,721
0
true
2022-07-18T19:23:33.860Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Call webservice from batch file calling in scheduled task<p>It's several days I search for a problem. I've create an Intranet (Authenticate mode windows allo...
73,005,457
Implement a colored frame around graph tiles (panel bokeh) (holoViz bokeh)<p>How can I let bokeh draw a colored border (frame) around the graph tile? Some graph tiles have to be graphically highlighted against the other graphs and the customer therefore wants to have a colored border / colored frame around some graph t...
<p>You can add a border around a title by updating the <code>Title</code> annotation manually, or creating a new one and adding it to your <code>Figure</code>.</p> <pre class="lang-py prettyprint-override"><code>from bokeh.io import show from bokeh.models.annotations import Title from bokeh.plotting import figure from ...
Implement a colored frame around graph tiles (panel bokeh) (holoViz bokeh)
python|bokeh|panel|pandas-bokeh|holoviz-panel
0
40
1
73,086,080
73,086,080
0
true
2022-07-16T15:31:54.677Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Implement a colored frame around graph tiles (panel bokeh) (holoViz bokeh)<p>How can I let bokeh draw a colored border (frame) around the graph tile? Some gr...
72,925,449
My function will loop through an older state just after the state is updated<p>In this project I'm attempting to make a simple Online Shop using React JS. The issue I'm having involves setState and lifecycle. Whenever an item in added to a cart its put into an array of objects. The user can also add more then one of th...
<p>I left inline comments in the refactored code below. If something is unclear, feel free to ask for clarification in a comment to this answer.</p> <blockquote> <p>Reference documentation for the hooks used:</p> <ul> <li><a href="https://reactjs.org/docs/hooks-reference.html#usecallback" rel="nofollow noreferrer"><cod...
My function will loop through an older state just after the state is updated
javascript|reactjs|lifecycle
0
40
1
72,925,545
72,925,545
0
true
2022-07-10T00:22:57.717Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: My function will loop through an older state just after the state is updated<p>In this project I'm attempting to make a simple Online Shop using React JS. Th...
73,018,108
how to use navigation controller programaticaly?<p>i have a button in viewcontroller which navigates to editPage viewcontrooler</p> <p>i want to use pushNavigation</p> <p>i did below code in button action method</p> <pre><code> @IBAction func editBtn(_ sender: Any) { let storyBoard: UIStoryboard = UIStoryboard(...
<p>Looks like you are setting your viewController as initail View Controller from storyboard but do not embed this in navigation controller , either embed your viewController in navigationController and set this navigation controller as initialViewController or follow this approach as you don't want to do it from story...
how to use navigation controller programaticaly?
ios|swift|pushviewcontroller
1
40
1
73,018,309
73,018,309
0
true
2022-07-18T06:29:54.373Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to use navigation controller programaticaly?<p>i have a button in viewcontroller which navigates to editPage viewcontrooler</p> <p>i want to use pushNavi...
72,982,465
Why are my Components not showing when using redux?<p>My problem is related to redux. I was making a simple counter application. I copied each step exactly from the redux-toolkit site. I just changed it for myself. But when I run it, no component appeared.</p> <p><em>This project is written in javascript. <code>@Reduxj...
<p>Check the console (Ctrl + Shift + I ) The error message should give you a hint. In your redcer - you are setting initial state incorrect.</p> <pre><code> name: 'counter', initialState, reducers: { ... </code></pre> <p>Read more: <a href="https://redux-toolkit.js.org/tutorials/quick-start#create-a-redux-state-sl...
Why are my Components not showing when using redux?
javascript|reactjs|react-hooks|react-redux|single-page-application
0
40
1
72,985,286
72,985,286
0
true
2022-07-14T14:48:16.003Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why are my Components not showing when using redux?<p>My problem is related to redux. I was making a simple counter application. I copied each step exactly f...
72,820,098
How to parse json string array with not knowing how many strings there are in Swift<p>I want to parse one json than have an array with multiple strings, but i don't know how to do. I know how to parse json but in static method but i don't know if I've multiple string</p> <p>My json is:</p> <pre><code>{ &quot;index&...
<p>If the number of strings is unknown or can change you can decode this to a dictionary. The struct for this would be:</p> <pre><code>struct Response: Codable{ var index: [[String:String]] } </code></pre> <p>In your example the index var contains an array of <code>[String:String]</code>.</p> <hr /> <h2>Edit:</h2> ...
How to parse json string array with not knowing how many strings there are in Swift
arrays|json|swift|parsing
0
40
1
72,820,333
72,820,333
0
true
2022-06-30T17:53:38.940Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to parse json string array with not knowing how many strings there are in Swift<p>I want to parse one json than have an array with multiple strings, but ...
72,824,112
Getting connection timeout to URL, which I'm otherwise able to connect via browser in the same system<p>Due to company policies, I cannot share the complete code here, but here is where the code fails:</p> <pre><code>try(InputStream in = new URL(&quot;URL with image file&quot;).openStream()){ Files.copy(in,...
<p>Sorry, it was my mistake. If anyone is seeing this:</p> <p>The problem came from how I used proxy. If you are NOT able to connect to a website which is otherwise accessible via browser <strong>in same system</strong>, then you need a proxy in your java code.</p> <p>For example:</p> <pre><code>Proxy proxy = new Proxy...
Getting connection timeout to URL, which I'm otherwise able to connect via browser in the same system
java|networking|java-8|connection|httpurlconnection
0
40
1
72,824,271
72,824,271
0
true
2022-07-01T03:32:49.307Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Getting connection timeout to URL, which I'm otherwise able to connect via browser in the same system<p>Due to company policies, I cannot share the complete ...
72,813,145
Python script to convert RBG image dataset into Grayscale images using pillow<p>I want to <code>convert an image RGB dataset to Grayscale dataset using pillow</code>. I want to write a script that takes in the dataset path and converts all images one by one into grayscale. At the end I want to save this script, and wan...
<p>Probably this code would work for you?</p> <p>Code:</p> <pre><code>import os from PIL import Image dir = '/content/pizza_steak/test/pizza' for i in range(len(os.listdir(dir))): # directory where images are stored dir = '/content/pizza_steak/test/steak' # get the file name file_name = os.listdir(dir)...
Python script to convert RBG image dataset into Grayscale images using pillow
python|python-imaging-library|rgb|file-handling|grayscale
-1
40
1
72,813,297
72,813,297
0
true
2022-06-30T09:09:35.083Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python script to convert RBG image dataset into Grayscale images using pillow<p>I want to <code>convert an image RGB dataset to Grayscale dataset using pillo...
72,772,830
Change cell text and other checkbox based on another checkbox<p>I am trying to figure out following conditions via excel checkbox click (Refer the images attached) <a href="https://i.stack.imgur.com/nckre.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nckre.png" alt="enter image description here" />...
<p>you could add this to your code</p> <p><em>Edit: after comment from @Pᴇʜ, thanks</em></p> <pre><code>If lValue &lt;&gt; 1 Then Range(&quot;b2&quot;).Value = CVErr(xlErrNA) Range(&quot;b3&quot;).Value = False Range(&quot;b5&quot;).Value = False Range(&quot;b6&quot;).Value = False End If </code></...
Change cell text and other checkbox based on another checkbox
excel|vba
0
40
1
72,773,530
72,773,530
0
true
2022-06-27T13:20:59.633Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Change cell text and other checkbox based on another checkbox<p>I am trying to figure out following conditions via excel checkbox click (Refer the images att...
72,795,406
Question of difference between append_row and append_rows<p>What is the difference between append_row and append_rows?</p> <p>In append_row, <code>worksheet.append_row (['test', 'test2'])</code> works</p> <p>At append_rows, <code>Worksheet.append_rows(['test', 'test2'])</code> is not working.</p> <p>But</p> <pre><code>...
<p>When I saw the document of gspread, <code>append_row</code> appends a row to the sheet. <a href="https://docs.gspread.org/en/v3.7.0/api.html?highlight=append_row#gspread.models.Worksheet.append_row" rel="nofollow noreferrer">Ref</a> On the other hand, <code>append_rows</code> appends multiple rows to the sheet. <a h...
Question of difference between append_row and append_rows
python|gspread
0
40
1
72,795,456
72,795,456
0
true
2022-06-29T03:15:34.907Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Question of difference between append_row and append_rows<p>What is the difference between append_row and append_rows?</p> <p>In append_row, <code>worksheet....
72,996,984
what is this syntax mean is c++ "class_name: class_ptr_1(nullptr), class_ptr_2(nullptr) {}"<p>I am not able to understand the syntax of</p> <pre><code>class_name: class_ptr_1(nullptr), class_ptr_2(nullptr) {} </code></pre>
<p>It seems you mean</p> <pre><code>class_name() : class_ptr_1(nullptr), class_ptr_2(nullptr) {} ^^^ </code></pre> <p>It is a constructor definition with a mem-initializer list. That is the class data members <code>class_ptr_1</code> and <code>class_ptr_2</code> are initialized in the mem-initializer list.</p...
what is this syntax mean is c++ "class_name: class_ptr_1(nullptr), class_ptr_2(nullptr) {}"
c++|class|syntax|initialization|construct
-1
40
1
72,997,030
72,997,030
0
true
2022-07-15T16:22:12.053Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: what is this syntax mean is c++ "class_name: class_ptr_1(nullptr), class_ptr_2(nullptr) {}"<p>I am not able to understand the syntax of</p> <pre><code>class_...
72,974,225
Evenly distribute arrays data between processes in MPI<p>I want to solve a load balancing problem using MPI with the C language. Each MPI task has an array of different size (consisting of integers).</p> <p>Initial situation : data is distributed unequally between MPI processes. And we want to get arrays with same len...
<p>Here is my solution :</p> <pre class="lang-c prettyprint-override"><code> #include &lt;stdlib.h&gt; #include &lt;stdio.h&gt; #include &lt;time.h&gt; #include &lt;mpi.h&gt; int main(int argc, char* argv[]) { int nbTask; int myRank; MPI_Init(&amp;argc, &amp;argv); MPI_Comm_size(MPI_COMM_WORLD, &amp;nbTas...
Evenly distribute arrays data between processes in MPI
arrays|load|mpi|evenly
0
40
1
72,988,143
72,988,143
0
true
2022-07-14T01:23:03.533Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Evenly distribute arrays data between processes in MPI<p>I want to solve a load balancing problem using MPI with the C language. Each MPI task has an array o...
73,028,107
trying to count files in a dir and subdirectories without the use of walk<p>I need to count the files in both the dir path I give and subdir within that path without the use of walk. This is as far as I've gotten:</p> <pre><code>import os subfolder = True path = (&quot;C:\\Users\\user\\Documents\\Electronic Arts\\The...
<pre><code>import os subfolder = True num = 0 def countFiles(path, subfolder=True): global num for entry in os.listdir(path): temp_path = os.path.join(path, entry) if os.path.isfile(temp_path): num += 1 if os.path.isdir(temp_path) and subfolder: countFiles(temp_...
trying to count files in a dir and subdirectories without the use of walk
python
0
40
2
73,028,254
73,028,254
0
true
2022-07-18T20:13:49.617Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: trying to count files in a dir and subdirectories without the use of walk<p>I need to count the files in both the dir path I give and subdir within that path...
72,999,439
Two "=" characters in a string<p>How to check in javascript if in the string there are two &quot;=&quot; symbols and to throw a mistake (beacuse for example 1+=2=3 is wrong but 1+2=3 is right)</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override"><code>function validateText() { const text = document.getElementById('text').value; if ((text.match(/=/g)?.length || 0) &lt; 2) { ...
Two "=" characters in a string
javascript|string|character
-2
40
3
72,999,483
72,999,483
0
true
2022-07-15T20:46:13.020Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Two "=" characters in a string<p>How to check in javascript if in the string there are two &quot;=&quot; symbols and to throw a mistake (beacuse for example ...
72,928,387
Realm Swift: any way to move Object from one List to other?<p>I've been doing my checklist app with local Realm database and stuck with code where I need to change category of item in the list.</p> <p>There are several checklists and I would like to move my Objects (checklist items) between checklists. To give you an i...
<p>This is a great question.</p> <p>Lists do not <em>contain</em> objects, only references <em>to</em> objects. So you can add and remove objects freely from Lists without affecting the actual object.</p> <p>If you want to 'move' an object from one list to another, here's an example of moving a dog object from one pers...
Realm Swift: any way to move Object from one List to other?
swift|uikit|realm
1
40
1
72,929,276
72,929,276
0
true
2022-07-10T12:13:16.390Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Realm Swift: any way to move Object from one List to other?<p>I've been doing my checklist app with local Realm database and stuck with code where I need to ...
72,788,652
how to set this div image to full screen so that it hides the blue background color<p>i made a div and set its background image but background image is not covering full screen, theres some space around it. That blue color is body color.</p> <p>pls refer to image <a href="https://i.stack.imgur.com/e9nYt.jpg" rel="nofol...
<p>add this line to your CSS</p> <pre class="lang-css prettyprint-override"><code>body { margin: 0; } </code></pre> <blockquote> <p>this is because, browsers add a little margin. <br> so you just need to manually reset it to 0</p> </blockquote> <p><div class="snippet" data-lang="js" data-hide="false" data-console="...
how to set this div image to full screen so that it hides the blue background color
html|css
0
40
2
72,788,732
72,788,732
0
true
2022-06-28T14:48:46.583Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to set this div image to full screen so that it hides the blue background color<p>i made a div and set its background image but background image is not c...
72,972,943
Ansible: TypeError: 'timeout' object does not support indexing<p>I am running Ansible for VMware, I have two vCenters and some tasks, but one task is failing in one vCenter only. I am using the same Ansible server, same permissions and same username, running Ansible version 2.9.27, python 2.7.5 and VMware SDK, both vCe...
<blockquote> <p><em>I don't know why just one task is failing in one vCenter</em></p> </blockquote> <p>You get the error mostly because of a connection problem.</p> <pre><code> File &quot;/usr/lib64/python3.6/urllib/request.py&quot;, line 223, in urlopen return opener.open(url, data, timeout) ... Fil...
Ansible: TypeError: 'timeout' object does not support indexing
ansible
0
40
1
72,973,296
72,973,296
0
true
2022-07-13T21:42:41.140Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Ansible: TypeError: 'timeout' object does not support indexing<p>I am running Ansible for VMware, I have two vCenters and some tasks, but one task is failing...
72,890,333
Trying to update an image texture in screenmanager throws index out of range error<p>Im trying to update the texture of an image on a second screen on my application. When I try to do this it throws an Index out of range error.</p> <p>I think this might be because im not updating this on the main thread as im trying to...
<p>The problem is your use of the <code>switch_to()</code> method of <code>ScreenManager</code>. Not well documented, but this method removes the old <code>Screen</code> when it switches to the new <code>Screen</code>. So the number of <code>Screens</code> in the <code>screens</code> list gets reduced causing the index...
Trying to update an image texture in screenmanager throws index out of range error
opencv|kivy|kivymd
0
40
1
72,891,641
72,891,641
0
true
2022-07-06T22:04:06.253Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Trying to update an image texture in screenmanager throws index out of range error<p>Im trying to update the texture of an image on a second screen on my app...
72,874,963
Don't select rows where column A is duplicated AND any row of column B is a specific value<p>I'm working on generating a report merging multiple tables. The report requires only showing projects that did not have any document marked 'Not Received' These document markings are listed in a table that lists each document i...
<p>You can use <code>not in</code> like:</p> <pre class="lang-sql prettyprint-override"><code>create table test( num int, description varchar(20) ); insert into test(num,description) values(565,'Received'), (565,'Not Received'), (465,'Received'), (465,'Not Applicable'); select * from test where num not in ( sele...
Don't select rows where column A is duplicated AND any row of column B is a specific value
sql|database
0
40
1
72,875,120
72,875,120
0
true
2022-07-05T20:03:52.270Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Don't select rows where column A is duplicated AND any row of column B is a specific value<p>I'm working on generating a report merging multiple tables. The ...
72,844,775
VBA in Publisher - Execute Macro on Keystroke<p>I'm working within Microsoft Publisher.</p> <p>I have a macro in module1 (that works) called &quot;Export_as_Image&quot;.</p> <p>I want to run this macro whenever I press F8.</p> <p>I have created module2 with this code:</p> <pre><code>Sub SetKey() Application.OnKey &quot...
<p>After some experimenting I found that it's needed to run <code>SetKey</code> for the first time firstly. You may call it from an event-driven sub (<code>Workbook_Open</code>, for example). Looks like running it for the first time, registers the key shortcut to the specified code.</p> <p>Also, add the full path to th...
VBA in Publisher - Execute Macro on Keystroke
vba|ms-publisher
0
40
1
72,845,003
72,845,003
0
true
2022-07-03T07:52:31.077Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: VBA in Publisher - Execute Macro on Keystroke<p>I'm working within Microsoft Publisher.</p> <p>I have a macro in module1 (that works) called &quot;Export_as_...
72,785,991
regex to capture string A if there is not string B before next occurrence of string A<p>I want to grab text A if there is no text B between it and next occurence of A. For example, those ones would match</p> <pre><code>A something A something B ^ AAAB ^^ ABAAB ^ A B A something ^ </code></pre> <p>Is it even possi...
<p>You can use look ahead:</p> <p><a href="https://regex101.com/r/tkDYhB/1" rel="nofollow noreferrer"><code>A(?=(?:(?!B).)*(?:A|$))</code></a></p> <p>Or with negative look ahead:</p> <p><a href="https://regex101.com/r/H3bJKL/1" rel="nofollow noreferrer"><code>A(?!(?:(?!A).)*B)</code></a></p> <p>This will work also when...
regex to capture string A if there is not string B before next occurrence of string A
regex
-1
40
2
72,786,062
72,786,062
0
true
2022-06-28T11:57:34.150Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: regex to capture string A if there is not string B before next occurrence of string A<p>I want to grab text A if there is no text B between it and next occur...
72,833,542
wordpress wp_ajax returning 400 bad request<p>Error returned in browser console: 400 bad request</p> <p>I traced the error to this part in the admin-ajax.php file by changing the response value from 0 to 1:</p> <pre><code>if ( is_user_logged_in() ) { // If no action is registered, return a Bad Request response. if ( ! ...
<p>This is how you use FormData:</p> <pre><code>var formData = new FormData(); formData.append(&quot;subject&quot;, &quot;value&quot;); formData.append(&quot;message&quot;, &quot;hello value&quot;); </code></pre> <p>This is the code that worked for me: (I think only difference is the url)</p> <pre><code>var url = &quot...
wordpress wp_ajax returning 400 bad request
javascript|php|wordpress
0
40
1
72,835,268
72,835,268
0
true
2022-07-01T18:51:19.093Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: wordpress wp_ajax returning 400 bad request<p>Error returned in browser console: 400 bad request</p> <p>I traced the error to this part in the admin-ajax.php...