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,295,582 | How to create a new terminal and run a command in it?<p>I have a function like this</p>
<pre><code>void smbProcess(){
string smbTargetIP;
cout<<"Target IP: ";
cin>>smbTargetIP;
string commandSmb_S = "crackmapexec smb " + smbTargetIP;
int smbLength = commandSmb_S.leng... | <p>Add "xterm -hold -e" to commandSmb_S</p>
<pre><code>void smbProcess(){
string smbTargetIP;
cout<<"Target IP: ";
cin>>smbTargetIP;
string commandSmb_S = "xterm -hold -e crackmapexec smb " + smbTargetIP;
int smbLength = commandSmb_S.length();
char comm... | How to create a new terminal and run a command in it? | c++ | -2 | 52 | 1 | 72,300,454 | 72,300,454 | 0 | true | 2022-05-18T20:28:27.607Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to create a new terminal and run a command in it?<p>I have a function like this</p>
<pre><code>void smbProcess(){
string smbTargetIP;
cout<<... |
72,340,251 | CSV File Handling in Python and calculating values<p>I am taking an introductory course in Python and am currently discovering how to handle files using Python. I have a CSV file with a few student names, their majors and GPAs<br>
I am trying to handle the file on python to calculate and print the average of the GPAs<b... | <p>Use <code>float()</code> function to convert string to float type.</p>
<p>Try:</p>
<pre class="lang-python prettyprint-override"><code>import csv
f1 = open("myText.csv")
rowlist = csv.reader(f1)
sum = 0
for row in rowlist:
sum += float(row[1])
avg = sum / 5
f1.close()
print("Average GPA is",... | CSV File Handling in Python and calculating values | python|csv|file-handling | 0 | 52 | 2 | 72,340,280 | 72,340,280 | 0 | true | 2022-05-22T18:24:06.540Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
CSV File Handling in Python and calculating values<p>I am taking an introductory course in Python and am currently discovering how to handle files using Pyth... |
72,246,217 | Export quiz result to a text file in Python<p>Is it possible to have questions and answers exported to a text file such as result.txt?</p>
<p>I answer all the questions and at the end - all the information is saved in a txt file as a list, that can be viewed later.</p>
<p><strong>Example:
Question 1
Answer 1
Question 2... | <p>As you wanted the file content as a key-value pair, initialize a dictionary and add the corresponding values, instead of using separate variables for names, descriptions, etc. use them as dictionary keys.</p>
<p>First, initialize a global dictionary</p>
<pre><code>global mydict
</code></pre>
<p>Initialize it in <cod... | Export quiz result to a text file in Python | python | 0 | 52 | 2 | 72,246,320 | 72,246,320 | 0 | true | 2022-05-15T07:09:26.690Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Export quiz result to a text file in Python<p>Is it possible to have questions and answers exported to a text file such as result.txt?</p>
<p>I answer all th... |
72,337,435 | error on do while loop condition in C++ with condition to continue the loop<p>I am making c++ program using do while loop but after inserting the condition <code>while ( x =='y'|| x == 'Y');</code> I got an error where the loop is continued without letting me to insert the input again.</p>
<p>I can't insert the input ... | <p>The problem you are seeing is that there is are leftover characters in the cin buffer, so the next time through the loop it reads those and doesn't ask the user for input. If you clear the buffer out at the end of the loop then the subsequent runs work.</p>
<pre class="lang-cpp prettyprint-override"><code>
do {
... | error on do while loop condition in C++ with condition to continue the loop | c++|loops|do-while | 0 | 52 | 1 | 72,337,995 | 72,337,995 | 0 | true | 2022-05-22T12:07:27.747Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
error on do while loop condition in C++ with condition to continue the loop<p>I am making c++ program using do while loop but after inserting the condition ... |
72,244,562 | How can I combine these 2 functions to add a network profile using a 3rd parameter?<p>[After playing around with it for a few hours I did find a solution]</p>
<p>I have 2 different functions I have written to add a network profile.
The first is to add a network profile with a password using 2 parameters $SSID, $PW</p>
... | <p>After a little playing around I managed to make it work.
Still willing to take criticism or advice on how to do this better please and thank you</p>
<pre><code>function Add-NetWork {
[CmdletBinding()]
param (
[Parameter (Mandatory = $True)]
[string]$SSID,
[Parameter (Mandatory = $True)]
[string]$s,
[Parameter (M... | How can I combine these 2 functions to add a network profile using a 3rd parameter? | powershell|network-programming | 0 | 52 | 2 | 72,244,745 | 72,244,745 | 1 | true | 2022-05-14T23:40:34.167Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I combine these 2 functions to add a network profile using a 3rd parameter?<p>[After playing around with it for a few hours I did find a solution]</p... |
72,245,844 | How to see running output from a Rust function on console?<p>I have a function in Rust which returns a vector of vectors of the number of combinations possible from a set given a number of digits for which the combinations are needed(nCk).</p>
<p>If the set is <code>[1,2,3]</code> and the number of digits(k) is 2, the ... | <p>I solved the problem.</p>
<p>There was no running output because there was no print statement in the function itself, although it was there in the main function.
Adding a print statement in the function itself solved the problem:]</p>
<pre><code>let mut result = comb(&slice[1..], k - 1)
.into_iter()
... | How to see running output from a Rust function on console? | rust|console|output | 1 | 52 | 1 | 72,245,930 | 72,245,930 | 1 | true | 2022-05-15T05:54:46.113Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to see running output from a Rust function on console?<p>I have a function in Rust which returns a vector of vectors of the number of combinations possib... |
72,247,819 | laravel @if or @isset show nothing or gives an exeption<p>I have made in laravel v.8. a database query (eloquent) that returns several columns.</p>
<pre><code>$wgName = Auth::user()
->join('wg_groups', 'users.wg_group_id', '=', 'wg_groups.id')
->get();
</code></pre>
<p><a href="https://i.s... | <p>Calling <code>->get()</code> on Query builder will give you a Collection instance containing multiple users. And there is definitely no <code>wg_name</code> on Collection instance so the result is always false.</p>
<p>Try using <code>first()</code>:</p>
<pre class="lang-php prettyprint-override"><code>$wgName = A... | laravel @if or @isset show nothing or gives an exeption | php|html|laravel | 0 | 52 | 2 | 72,247,960 | 72,247,960 | 1 | true | 2022-05-15T11:26:09.133Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
laravel @if or @isset show nothing or gives an exeption<p>I have made in laravel v.8. a database query (eloquent) that returns several columns.</p>
<pre><cod... |
72,252,950 | how to get event listener not to ignore if the first element in the select menu is clicked<p>i have tried the traditional method of addEventListener <strong>change</strong> but if i click on the first element on the list it wont respond, it only works if i click on australia then india...</p>
<p><strong>HTML</strong></... | <p>You can add a default <code><option></code> like the the following:</p>
<pre><code><option selected disabled>DEFAULT</option>
</code></pre>
<p>Or you can use a more direct event like "click"</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false... | how to get event listener not to ignore if the first element in the select menu is clicked | javascript | 1 | 52 | 2 | 72,253,299 | 72,253,299 | 1 | true | 2022-05-15T23:43:56.230Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to get event listener not to ignore if the first element in the select menu is clicked<p>i have tried the traditional method of addEventListener <strong>... |
72,264,197 | How do I pseudo-color a grayscale image in Matlab using custom RGB values from .csv file<p>I have an 8-bit image ('Example_image.tif') that I would like to pseudo-color using custom RGB values from a .csv file ('Pseudocolor_sheet.csv'). In the .csv file, the rows represent pixel values (0-255), whereas columns 1, 2, 3 ... | <p>Try to do:</p>
<pre><code>cmap=csvread('pseudocolor_sheet.csv');
imshow(ExampleImage ,cmap);
</code></pre> | How do I pseudo-color a grayscale image in Matlab using custom RGB values from .csv file | matlab | 1 | 52 | 1 | 72,264,417 | 72,264,417 | 1 | true | 2022-05-16T18:49:54.750Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I pseudo-color a grayscale image in Matlab using custom RGB values from .csv file<p>I have an 8-bit image ('Example_image.tif') that I would like to p... |
72,262,286 | PHP preg_match not working as Input pattern<p>So I have this input pattern in HTML:</p>
<p><code><input name="firstnamereg" type="text" pattern="[/\p{L}+/u ]+"></code></p>
<p>But When I use the preg_match it does not work:</p>
<p><code>$regexFirstANDLastname = "/[/\p{L}+/u ]+/&q... | <p>You need to use</p>
<pre class="lang-none prettyprint-override"><code>pattern="[\p{L}\s]+"
</code></pre>
<p>This pattern, in Chrome and Firefox, will be compiles as a <code>new RegExp("^(?:[\\p{L}\\s]+)$", "u")</code> regex object. The <code>u</code> flag is used by default, you do not ... | PHP preg_match not working as Input pattern | php|html|regex|input|preg-match | 1 | 52 | 1 | 72,265,045 | 72,265,045 | 1 | true | 2022-05-16T16:09:31.933Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
PHP preg_match not working as Input pattern<p>So I have this input pattern in HTML:</p>
<p><code><input name="firstnamereg" type="text"... |
72,247,038 | Handling events in interactive Vega legends - race condtion<p>The <a href="https://vega.github.io/editor/#/url/vega/N4IgJAzgxgFgpgWwIYgFwhgF0wBwqgegIDc4BzJAOjIEtMYBXAI0poHsDp5kTykSArJQBWENgDsQAGhAATONABONHJnaT0AQQAE0JNjiLtOADZtM2uAA8kCU3G0B3OjG01xmQ0ihrS2k+Rw4rLaSMHaVgC0SFY0EJTSIM6y9GgATAAMGTLwNGRY6VkyOEiysu5kaAIySAyYb... | <p>Try this instead. It is the same as your code but also checks the length of the array which your single line doesn't currently do.</p>
<p>You can now shift click melon and then click it normally and the filter mode will switch.</p>
<p><a href="https://vega.github.io/editor/#/url/vega/N4IgJAzgxgFgpgWwIYgFwhgF0wBwqgeg... | Handling events in interactive Vega legends - race condtion | events|legend|race-condition|interactive|vega | 0 | 52 | 2 | 72,265,127 | 72,265,127 | 1 | true | 2022-05-15T09:27:32.343Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Handling events in interactive Vega legends - race condtion<p>The <a href="https://vega.github.io/editor/#/url/vega/N4IgJAzgxgFgpgWwIYgFwhgF0wBwqgegIDc4BzJAO... |
72,262,006 | How to create a unity project using a custom piece of code<p>What I want to do is basically press a button in my application(C# WPF) and create a unity project in a predefined version, import some packages and then launch it.</p>
<p>I have no Idea if that's possible or not. I haven't found anything yet.</p>
<p>Would be... | <p>You can use the Unity command line to create a project and import a package in c# like this:</p>
<pre class="lang-cs prettyprint-override"><code>using System.Diagnostics;
...
var arguments = $" -createProject {path} -importPackage {packagePath}";
var process = Process.Start(@"C:\Program Files\Unity\... | How to create a unity project using a custom piece of code | unity3d | 0 | 52 | 1 | 72,265,872 | 72,265,872 | 1 | true | 2022-05-16T15:49:40.723Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to create a unity project using a custom piece of code<p>What I want to do is basically press a button in my application(C# WPF) and create a unity proje... |
72,269,953 | Align flex item horizontally with other <span> outside container<p>I am designing a website. Inside an 'email post simulator' where each post is a new email with name and title. I have to align the title so that it matches the beginning of the line of the others.</p>
<p>I have tried encapsulating the name and title wit... | <p>You may use a <code>display: grid;</code> container that will set those column with fixed width so that they'll be consistently aligned along rows.</p>
<p>The grid template used in this demo is: <code>auto auto 35% 35% 10em auto;</code></p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true"... | Align flex item horizontally with other <span> outside container | html|css | 1 | 52 | 2 | 72,270,163 | 72,270,163 | 1 | true | 2022-05-17T07:39:40.630Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Align flex item horizontally with other <span> outside container<p>I am designing a website. Inside an 'email post simulator' where each post is a new email ... |
72,274,446 | Result class to pass between project layers<p><strong>Problem Statement</strong></p>
<p>I've seen something similar with <a href="https://github.com/Nihlus/Remora.Results" rel="nofollow noreferrer">Remora Results</a>, but I can't use it because of the license. My goal is to instantiate a <code>FooBarResult</code> eithe... | <p>For the "avoid wrong usage" part, you <em>could</em> do something like this (I personally wouldn't, but hey... )</p>
<pre><code>public class FooBarResult
{
public bool IsSuccessful {get; set;}
// just doing one to demonstrate
private string _payload;
public string Payload
{
... | Result class to pass between project layers | c# | 0 | 52 | 1 | 72,274,989 | 72,274,989 | 1 | true | 2022-05-17T12:54:27.057Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Result class to pass between project layers<p><strong>Problem Statement</strong></p>
<p>I've seen something similar with <a href="https://github.com/Nihlus/R... |
72,280,650 | Running into "error: [...] is a c++ extension"<p>After running:
<code>g++ --std=c++11 -ansi -pedantic-errors -Wall -o test_database test_database.cpp</code></p>
<p>I am receiving the following errors:</p>
<pre><code>./database.h:40:10: error: 'auto' type specifier is a C++11 extension [-Werror,-Wc++11-extensions]
f... | <p>From <a href="https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html" rel="nofollow noreferrer">GCC manual</a>:</p>
<blockquote>
<p><strong><code>-ansi</code></strong></p>
<p>In C mode, this is equivalent to <code>-std=c90</code>. In C++ mode, it is equivalent to <code>-std=c++98</code>.</p>
</blockquote>
<p>Remo... | Running into "error: [...] is a c++ extension" | c++|c++11 | 0 | 52 | 1 | 72,280,697 | 72,280,697 | 1 | true | 2022-05-17T21:01:48.457Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Running into "error: [...] is a c++ extension"<p>After running:
<code>g++ --std=c++11 -ansi -pedantic-errors -Wall -o test_database test_database.cpp</code><... |
72,281,903 | Rails 6 get error message from Failure monad results<p>Is it possible to get error message which was passed as a Failure monad result? as far as I can see the <code>value!</code> method is provided for <code>Success</code> but is it possible to get message from Failure as well?</p>
<pre><code>response[0]
=> Failure(... | <p>To access the Failure message <code>Failure monad</code> provides <a href="https://dry-rb.org/gems/dry-monads/1.0/result/#code-failure-code" rel="nofollow noreferrer">failure</a> method.</p>
<pre><code>response[0].failure
=> "12345 - Product code is not valid"
</code></pre> | Rails 6 get error message from Failure monad results | ruby-on-rails|ruby|monads | 0 | 52 | 1 | 72,284,100 | 72,284,100 | 1 | true | 2022-05-18T00:03:13.367Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Rails 6 get error message from Failure monad results<p>Is it possible to get error message which was passed as a Failure monad result? as far as I can see th... |
72,287,945 | Warning which says that repository has not been configured for replication<p>I'm checking the replication configuration of a repository which was configured to be replicated but I'm getting the warning that you can see in the image below:
<a href="https://i.stack.imgur.com/R3rmI.png" rel="nofollow noreferrer"><img src=... | <p>The described behavior appears to be related to a known issue which is documented in JFrog JIRA project as "UI doesn't reflect actual status of Enable Event Replication Checkbox"(<a href="https://www.jfrog.com/jira/browse/RTFACT-26807" rel="nofollow noreferrer">RTFACT-26807</a>)</p>
<p>The above has been f... | Warning which says that repository has not been configured for replication | warnings|artifactory|replication | 0 | 52 | 1 | 72,289,742 | 72,289,742 | 1 | true | 2022-05-18T10:59:36.757Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Warning which says that repository has not been configured for replication<p>I'm checking the replication configuration of a repository which was configured ... |
72,290,768 | How to add 'checked' to a select item in React?<p>I have two nested <code>map</code> in a <code>select</code>, in the bottom I add the <code>option</code> elements.</p>
<pre class="lang-js prettyprint-override"><code>return (
<Modal completion={completion}>
<InputGroup title="Program" num... | <p>First of all, it should be <code>selected</code> and not <code>checked</code>
Then you condition to have <code>selected</code> as props must be</p>
<pre class="lang-js prettyprint-override"><code><option value="textField" selected={key == ticket.eventName && key2 == ticket.startTime}>
</code>... | How to add 'checked' to a select item in React? | javascript|reactjs|ecmascript-6 | 1 | 52 | 2 | 72,290,904 | 72,290,904 | 1 | true | 2022-05-18T14:10:49.130Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to add 'checked' to a select item in React?<p>I have two nested <code>map</code> in a <code>select</code>, in the bottom I add the <code>option</code> el... |
72,290,167 | Translating logic into Kotlin (or Java) code<p>I have a use-case where I want to enable users to write simple logic, and behind the scenes, convert this logic into a condition in the code.</p>
<p>For example, the user might write:</p>
<pre class="lang-none prettyprint-override"><code>someFieldName > 10 AND otherFiel... | <p>Your use case can be adequately addressed by <a href="http://mvel.documentnode.com/" rel="nofollow noreferrer">MVEL2</a>.</p>
<p>There is no need for you to write a parser and AST with ANTLR or convert to Java code, just evaluate the expression with appropriate parameters.</p>
<p>In fact any Java expression language... | Translating logic into Kotlin (or Java) code | java|kotlin|parsing | 1 | 52 | 1 | 72,292,243 | 72,292,243 | 1 | true | 2022-05-18T13:31:23.657Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Translating logic into Kotlin (or Java) code<p>I have a use-case where I want to enable users to write simple logic, and behind the scenes, convert this logi... |
72,290,520 | Cant get correct indexPath of collectionView cell<p><strong>EDIT:</strong>
I try to get a correct indexPath of a current cell in a collectionView.</p>
<p>The project is simple: an album of photos and a label with a text. Text in label should be the current indexPath.</p>
<p>Concerning photos - everything is ok. Problem... | <p>You can override <strong>scrollViewDidScroll</strong> method and get the visible cell's indexPath when swiped:</p>
<pre><code>func scrollViewDidScroll(_ scrollView: UIScrollView) {
let visibleRect = CGRect(origin: collectionView.contentOffset, size: collectionView.bounds.size)
let visiblePoint = CGPoint(x: v... | Cant get correct indexPath of collectionView cell | ios|swift|xcode|uikit|indexpath | 0 | 52 | 2 | 72,292,761 | 72,292,761 | 1 | true | 2022-05-18T13:54:01.717Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Cant get correct indexPath of collectionView cell<p><strong>EDIT:</strong>
I try to get a correct indexPath of a current cell in a collectionView.</p>
<p>The... |
72,280,934 | SQL grouping together so data does not repeat<p>Have data in a table, and trying to query it out so the data reads for example like Motrin | mg | 25 | 4 | day | Pain, in one row. from the image...i have them all under the Answer column. My query that i have brings them all out...but it repeats the data. Can anyone h... | <p>So it looks like you're after straight-forward pivot, something like the following:</p>
<pre><code>select
max(case when DrilldownQuestionID = 2091 then Answer end) [Name],
max(case when DrilldownQuestionID = 2092 then Answer end) [Dosage Unit],
max(case when DrilldownQuestionID = 2093 then Answer end) Dosage,... | SQL grouping together so data does not repeat | sql|report|grouping|cross-join|ssms-2017 | -2 | 52 | 1 | 72,294,127 | 72,294,127 | 1 | true | 2022-05-17T21:36:02.717Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SQL grouping together so data does not repeat<p>Have data in a table, and trying to query it out so the data reads for example like Motrin | mg | 25 | 4 | da... |
72,306,623 | GROUP BY multiple row and want to show more than 1 record<p>I have a <code>store</code> table, and the sql is</p>
<pre class="lang-sql prettyprint-override"><code>SELECT * FROM `store` GROUP BY `store_name`, `country`, `branch`
</code></pre>
<p>The output is</p>
<div class="s-table-container">
<table class="s-table">
<... | <p>Here's a solution using <a href="https://dev.mysql.com/doc/refman/8.0/en/window-functions.html" rel="nofollow noreferrer">window functions</a> (you must use MySQL 8.0 for this feature):</p>
<pre><code>select store_name, country, branch from (
select store_name, country, branch,
count(*) over (partition by sto... | GROUP BY multiple row and want to show more than 1 record | mysql|sql | 1 | 52 | 3 | 72,306,792 | 72,306,792 | 1 | true | 2022-05-19T14:43:18.127Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
GROUP BY multiple row and want to show more than 1 record<p>I have a <code>store</code> table, and the sql is</p>
<pre class="lang-sql prettyprint-override">... |
72,305,452 | How to mean center variables based on binary condition in r<p>I have a dataframe ("md") containing several variables, of which one is binary ("adopter"). I would like to mean center three of the other (continous) variables, let's say X, Y, and Z, but only for the ones where adopter = 1. The others, ... | <p>The basic way to accomplish what you're trying to do is to use the split-apply-combine workflow. That is:</p>
<ol>
<li>Split your data frame up into coherent and useful sub-parts.</li>
<li>Do the thing you want to each sub-part.</li>
<li>Reconstitute the parts into the whole.</li>
</ol>
<p>First, here's a toy datase... | How to mean center variables based on binary condition in r | r|binary-data | 1 | 52 | 1 | 72,309,445 | 72,309,445 | 1 | true | 2022-05-19T12:28:34.927Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to mean center variables based on binary condition in r<p>I have a dataframe ("md") containing several variables, of which one is binary ("... |
72,313,365 | What is the appropriate method to create this icon layout in CSS?<p>See the photo icons below:</p>
<p><a href="https://i.stack.imgur.com/Xj3tB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Xj3tB.png" alt="enter image description here" /></a></p>
<p>If I'm just using vanilla HTML/CSS (no frameworks ... | <p>Both methods seem to work correctly, there is no rule to it. I personally prefer to use flex.</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-css lang-css prettyprint-override"><code>.user-overlap {
display: fl... | What is the appropriate method to create this icon layout in CSS? | html|css | -3 | 52 | 2 | 72,313,617 | 72,313,617 | 1 | true | 2022-05-20T03:46:48.523Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What is the appropriate method to create this icon layout in CSS?<p>See the photo icons below:</p>
<p><a href="https://i.stack.imgur.com/Xj3tB.png" rel="nofo... |
72,314,431 | Image won't show up in html extension in VS Code<p>I have this code:</p>
<pre><code><!DOCTYPE html>
<html>
<head>
<h1 title="First Heading">Heading 1</h1>
<h6 title="Second Heading">Heading 2</h6>
</head>
<body>
... | <p>You have to put the image in the same location of your index.html file.</p>
<p>then modify your img src to</p>
<pre><code><img src="Canyon.jpeg" />
</code></pre> | Image won't show up in html extension in VS Code | html|visual-studio-code|vscode-extensions | 0 | 52 | 1 | 72,314,526 | 72,314,526 | 1 | true | 2022-05-20T06:27:34.157Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Image won't show up in html extension in VS Code<p>I have this code:</p>
<pre><code><!DOCTYPE html>
<html>
<head>
<h1 title=... |
72,315,200 | react native protect authenticated screens during initial loading<p>I have made an app using <code>firebase</code> email/pass authentication and managing the state using <code>redux-toolkit</code>, everything is working fine, except, a bad UX, that is, when the app is opened, it takes a second to determine whether the ... | <p>I think this is happening because you set <code>loading = false</code> before you set <code>user</code> and this is quite clear because <code>user</code> will be setted after <code>getDoc</code> call (that creates that 1 seconds or 2 of "bad UX").</p>
<p>Redux <code>dispatch</code> returns a Promise, so yo... | react native protect authenticated screens during initial loading | react-native|redux|redux-toolkit | 0 | 52 | 1 | 72,315,967 | 72,315,967 | 1 | true | 2022-05-20T07:39:13.893Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
react native protect authenticated screens during initial loading<p>I have made an app using <code>firebase</code> email/pass authentication and managing the... |
72,317,046 | POST base64 png in XMLHTTP Request<p>For some reason this information is impossible to find a straight forward answer for, I have been trying to solve this for over a week. So please give a useful answer to it only!</p>
<p>I am saving <code>canvas.toDataUrl</code> image into the server with the following steps:</p>
<p>... | <p>You have to do some changes in Javscript as well as in PHP</p>
<p>Encode your data in JS so that request sent proper</p>
<pre><code>function captureCanvas(){
html2canvas(displayScreen).then(canvas =>{
postPicture(canvas.toDataURL());
})
}
function postPicture(data){
let xhr = new XMLHttpReque... | POST base64 png in XMLHTTP Request | javascript|php|post|base64 | 1 | 52 | 1 | 72,318,035 | 72,318,035 | 1 | true | 2022-05-20T10:02:17.960Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
POST base64 png in XMLHTTP Request<p>For some reason this information is impossible to find a straight forward answer for, I have been trying to solve this f... |
72,318,340 | Mysterious name resolution differences between legacy and SDK-style C# projects<p>I encountered this confusing names-resolution problem while trying to convert legacy solution with .NET 4.6.1 projects to the new SDK-style project formats. I was able to create a minimal repro solution <code>LegacyVsSdkStyleProjectNameRe... | <p>In SDK-style projects, a project will automatically inherit all of the things that its dependencies depend on. In legacy projects this had to be done manually, with the tooling inserting explicit references to all of the things that a new dependency depended on.</p>
<p>So in your SDK-style project, Sdk.Common.Config... | Mysterious name resolution differences between legacy and SDK-style C# projects | c#|.net|roslyn | 2 | 52 | 1 | 72,318,963 | 72,318,963 | 1 | true | 2022-05-20T11:39:17.720Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Mysterious name resolution differences between legacy and SDK-style C# projects<p>I encountered this confusing names-resolution problem while trying to conve... |
72,299,461 | JSF 2.3.14: Syntax error after (re-) rendering a JavaScript code block with constants<p>The following code fragment generates a javascript syntax error when I push the <code>h:commandButton</code>:</p>
<pre class="lang-html prettyprint-override"><code><h:outputScript>
'use strict';
const label = '*';
</h:o... | <p>You can make the <code>h:outputScript</code> conditional, based on <code>facesContext.postback</code>. If you use <code>rendered="#{not facesContext.postback}"</code> it will only be rendered in the initial request and not with Ajax requests:</p>
<pre class="lang-html prettyprint-override"><code><h:outp... | JSF 2.3.14: Syntax error after (re-) rendering a JavaScript code block with constants | javascript|ajax|jsf|mojarra|jsf-2.3 | 1 | 52 | 1 | 72,322,356 | 72,322,356 | 1 | true | 2022-05-19T06:15:22.040Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
JSF 2.3.14: Syntax error after (re-) rendering a JavaScript code block with constants<p>The following code fragment generates a javascript syntax error when ... |
72,321,006 | How do I select the last non-empty value for a given ID and date<p>I'm trying to select the last value in a column that isn't blank (not non-null technically) and select it for every date after, until that value changes, then select that value and so on.</p>
<p><em>What I have:</em></p>
<div class="s-table-container">
... | <p>You can use a subquery or an OUTER APPLY, like this:</p>
<pre><code>SELECT t1.company_id, t1.date, t1.sales_stage, x.previous_sales_stage
FROM #blah t1
OUTER APPLY (
SELECT TOP 1 t2.sales_stage AS previous_sales_stage
FROM #blah t2
WHERE t2.company_id=t1.company_id
AND t2.date<t1.date
... | How do I select the last non-empty value for a given ID and date | sql|sql-server|tsql|sql-server-2019 | -1 | 52 | 1 | 72,322,639 | 72,322,639 | 1 | true | 2022-05-20T14:55:52.943Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I select the last non-empty value for a given ID and date<p>I'm trying to select the last value in a column that isn't blank (not non-null technically... |
72,322,680 | replacing character in python<p>I have a dataset with many columns. The values in columns start with "[" and end with "]". Like "[Sinopharm]". I want to replace "[" and "]" with nothing. I did the following code but not both can be changed.</p>
<pre><code>data['q3'] = d... | <pre><code>new_data = data.replace({r'[\[\]]': ''}, regex=True)
</code></pre> | replacing character in python | python|pandas | 0 | 52 | 4 | 72,322,781 | 72,322,781 | 1 | true | 2022-05-20T17:25:04.010Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
replacing character in python<p>I have a dataset with many columns. The values in columns start with "[" and end with "]". Like "[Si... |
72,325,694 | How to add xml-stylesheet declaration to parsed XML?<p>I have XML document that was parsed to DOM object like this:</p>
<pre><code>const contentDoc = new DOMParser().parseFromString(data, "text/xml");
</code></pre>
<p>How can I add/prepend following xml-stylesheet directive to it?</p>
<pre><code><?xml-styl... | <p>You will need to use <strong>XSLTProcessor()</strong> method to import the Stylesheet.
After you import the XSL, transform the xml to fragment with <strong>"transformToFragment()"</strong> or <strong>"transformToFragment()"</strong> to transform the document with your XSL.</p>
<p>After all, you j... | How to add xml-stylesheet declaration to parsed XML? | javascript|xml | 1 | 52 | 1 | 72,325,911 | 72,325,911 | 1 | true | 2022-05-20T23:51:06.453Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to add xml-stylesheet declaration to parsed XML?<p>I have XML document that was parsed to DOM object like this:</p>
<pre><code>const contentDoc = new DOM... |
72,327,436 | How can I Improve my logic by using forEach, not for loop in Javascript<p>Please check my code first</p>
<p>I used axios.all (GET method).</p>
<pre class="lang-js prettyprint-override"><code>.then((res) => {
let everyDataArray = [];
console.log(res); // output = [ {response}, {response} ]
for(let i=0; ... | <p>Really what you want is to use <code>map</code> (<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map" rel="nofollow noreferrer">https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map</a>) because you want to transform one array into ... | How can I Improve my logic by using forEach, not for loop in Javascript | javascript|for-loop|foreach | 0 | 52 | 3 | 72,327,456 | 72,327,456 | 1 | true | 2022-05-21T07:12:40.330Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I Improve my logic by using forEach, not for loop in Javascript<p>Please check my code first</p>
<p>I used axios.all (GET method).</p>
<pre class="la... |
72,328,598 | If date is leap day (29-Feb) change to 28-Feb<p>In a Pandas dataframe i need to change all leap days cells in a specific column (they should be changed to 28 Feb). So, for example, 2020/02/29 should become 2020/02/28.</p>
<p>I tried the following, but didn't work:</p>
<pre><code>df.loc[((df['Date'].dt.month == 2) &... | <p>You can use <code>np.where</code>:</p>
<pre><code>df["Date"] = np.where((df["Date"].dt.month == 2) & \
(df["Date"].dt.day == 29),
df["Date"] - pd.DateOffset(days=1),
df["Date"])
</code></pre>
<p>If... | If date is leap day (29-Feb) change to 28-Feb | python|pandas | -2 | 52 | 1 | 72,328,751 | 72,328,751 | 1 | true | 2022-05-21T10:11:18.003Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
If date is leap day (29-Feb) change to 28-Feb<p>In a Pandas dataframe i need to change all leap days cells in a specific column (they should be changed to 28... |
72,335,997 | How does the inline assembly in this compare-exchange function work? (%H modifier on ARM)<pre><code>static inline unsigned long long __cmpxchg64(unsigned long long *ptr,unsigned long long old,unsigned long long new)
{
unsigned long long oldval;
unsigned long res;
prefetchw(ptr);
__asm__ __volatile__(
&q... | <blockquote>
<p>I find in gnu manual(extend extended-asm) that 'H' in '%H1' means 'Add 8 bytes to an offsettable memory reference'.</p>
</blockquote>
<p><a href="https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html#x86-Operand-Modifiers" rel="nofollow noreferrer">That table of template modifiers</a> is for x86 only. I... | How does the inline assembly in this compare-exchange function work? (%H modifier on ARM) | gcc|arm|inline-assembly|compare-and-swap | 2 | 52 | 1 | 72,340,566 | 72,340,566 | 1 | true | 2022-05-22T08:39:46.110Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How does the inline assembly in this compare-exchange function work? (%H modifier on ARM)<pre><code>static inline unsigned long long __cmpxchg64(unsigned lon... |
72,344,094 | SIP protocol analysis with Wireshark<p>I'm trying to learn SIP protocols with Wireshark.
here are two problems that I have met.</p>
<p>1.when having a complete calling, the called one had caught 2 ACK packs, among which the second appears to be replying the first, as is shown in the picture bellow.
<a href="https://i.s... | <p>1/ The second ACK is not a reply to the first one: it's an exact duplicate of the first one. This is happening because there is some delay and the other side is sending twice the 200 OK for INVITE. Each 200 OK needs an ACK. (See retransmission timers in rfc3261)</p>
<p>2/ The 488 is most probably an error in the c... | SIP protocol analysis with Wireshark | wireshark|sip | 0 | 52 | 1 | 72,346,589 | 72,346,589 | 1 | true | 2022-05-23T06:29:27.397Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SIP protocol analysis with Wireshark<p>I'm trying to learn SIP protocols with Wireshark.
here are two problems that I have met.</p>
<p>1.when having a comple... |
72,350,101 | python-pptx: adding slide hyperlinks to table cells<p>the library's click_action feature is only supported for <code>BaseShape</code> class members (which a table cell, its text frame, paragraphs and runs are not). Meanwhile a text run's <code>hyperlink</code> attribute only supports setting of external (web-)links. Ho... | <p>the following code solves the question above:</p>
<pre><code>from lxml import etree # type: ignore
from pptx.opc.constants import RELATIONSHIP_TYPE # type: ignore
def link_table_cell_to_slide(table_shape, cell, slide):
# pylint: disable=protected-access
rel_id = table_shape._parent.part.relate_to(slide.pa... | python-pptx: adding slide hyperlinks to table cells | python|python-pptx | 0 | 52 | 1 | 72,350,102 | 72,350,102 | 1 | true | 2022-05-23T14:17:02.693Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
python-pptx: adding slide hyperlinks to table cells<p>the library's click_action feature is only supported for <code>BaseShape</code> class members (which a ... |
72,351,062 | Output membership of certain Window local groups<p>Working on a simple script to loop through a bunch of machines through a 3rd party system and output the machine, group, and the user to a PS object.</p>
<p>Have the script outputting the correct groups/users. However when a group has more than one user, then it render... | <p>Seems like you're missing an inner loop in case the membership is greater than one:</p>
<pre><code>Invoke-Command -ComputerName $Target -Credential $cred -HideComputerName -ScriptBlock {
foreach($group in $using:Groups) {
foreach($member in Get-LocalGroupMember -Name $group) {
[pscustomobject... | Output membership of certain Window local groups | powershell | 1 | 52 | 1 | 72,351,275 | 72,351,275 | 1 | true | 2022-05-23T15:24:59.143Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Output membership of certain Window local groups<p>Working on a simple script to loop through a bunch of machines through a 3rd party system and output the m... |
72,351,710 | Kotlin, android, get id from getvalue<p>I have the following code:</p>
<pre><code> for (snapshot in snapshot.children){
var viagem = snapshot.getValue()
Log.d("teste", viagem.toString())
// BuleiaId = viagem
... | <p>If you want to get the key of the snapshot, that'd be:</p>
<pre><code>var viagem = snapshot.getKey()
</code></pre>
<p>If you want to get the value of a specific child property of the snapshot, that'd be:</p>
<pre><code>var viagem = snapshot.child("id").getValue()
</code></pre> | Kotlin, android, get id from getvalue | android|firebase|kotlin|firebase-realtime-database | 0 | 52 | 1 | 72,353,044 | 72,353,044 | 1 | true | 2022-05-23T16:12:45.710Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Kotlin, android, get id from getvalue<p>I have the following code:</p>
<pre><code> for (snapshot in snapshot.children){
... |
72,351,484 | How to add transaction in jsr233 sampler in jmeter while using Groovy?<p>I am working with JSR233 for sFTP PE testing. following is a rough flow diagram.
Now I want to capture transaction time for file drop only. how can we achieve this in jmeter ?</p>
<p><a href="https://i.stack.imgur.com/8p4SX.png" rel="nofollow nore... | <p>There are 2 options:</p>
<ol>
<li><p>Add a <a href="https://jmeter.apache.org/api/org/apache/jmeter/samplers/SampleResult.html#addSubResult-org.apache.jmeter.samplers.SampleResult-" rel="nofollow noreferrer">SubResult</a> for each step i.e.</p>
<pre><code>def establishConnection = new org.apache.jmeter.samplers.Samp... | How to add transaction in jsr233 sampler in jmeter while using Groovy? | groovy|jmeter | 0 | 52 | 1 | 72,359,301 | 72,359,301 | 1 | true | 2022-05-23T15:54:43.647Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to add transaction in jsr233 sampler in jmeter while using Groovy?<p>I am working with JSR233 for sFTP PE testing. following is a rough flow diagram.
Now... |
72,361,450 | Convert categorical variable into binary columns in R<p>I made the stupid mistake of enabling people to select multiple categories in a survey question.</p>
<p>Now the data column for this question looks something along the lines of this.</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>resp... | <p>Try this:</p>
<pre><code>library(dplyr)
library(tidyr)
df %>%
separate_rows(answer_openq, sep = ',') %>%
pivot_wider(names_from = answer_openq, values_from = answer_openq,
values_fn = function(x) 1, values_fill = 0)
# A tibble: 4 × 5
respondent a c b d
<int> &l... | Convert categorical variable into binary columns in R | r|data-cleaning|categorical | 1 | 52 | 1 | 72,361,552 | 72,361,552 | 1 | true | 2022-05-24T10:39:29.433Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Convert categorical variable into binary columns in R<p>I made the stupid mistake of enabling people to select multiple categories in a survey question.</p>
... |
72,363,056 | How do I fix an empty dropdownlist when binding ASP.NET MVC using Dapper?<p>I am attempting to bind a dropdownlist to values in an SQL table using dapper, but the dropdown is empty. Is shows the correct number of rows, but they are all empty. In the debug values from the dapper call I see that it is returning the corre... | <p>Dapper: cares about names.</p>
<p>You have the SQL:</p>
<pre class="lang-cs prettyprint-override"><code>SELECT [Id], [Programs] FROM tbl_ProgOverview
</code></pre>
<p>but your c# property is <code>Program</code> (or at least, I presume that's what you intend to map it to). Dapper is going to ignore the <code>Program... | How do I fix an empty dropdownlist when binding ASP.NET MVC using Dapper? | c#|asp.net|asp.net-mvc | 1 | 52 | 1 | 72,363,467 | 72,363,467 | 1 | true | 2022-05-24T12:39:44.540Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I fix an empty dropdownlist when binding ASP.NET MVC using Dapper?<p>I am attempting to bind a dropdownlist to values in an SQL table using dapper, bu... |
72,377,454 | VBA - How to Clear Cell Contents across Multiple Columns if Value not Contained<p>I have a macro that creates data in a range of columns starting from column D onwards with n=iCount, e.g. if iCount=4, then the columns are D,E,F,G. Throughout all these columns I would now like to clear cell contents if the cell does not... | <p>Seems like you are creating more work continuing to use <code>TextToColumns</code>, and would be better off using <code>Split()</code>.<br />
Try something like this:</p>
<pre class="lang-vb prettyprint-override"><code>Sub Tester()
Dim Treffer As Worksheet
Dim iCount As Long, i As Long, arr, c As Range, os ... | VBA - How to Clear Cell Contents across Multiple Columns if Value not Contained | excel|vba|if-statement|range|multiple-columns | 0 | 52 | 1 | 72,381,186 | 72,381,186 | 1 | true | 2022-05-25T12:14:32.323Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
VBA - How to Clear Cell Contents across Multiple Columns if Value not Contained<p>I have a macro that creates data in a range of columns starting from column... |
72,377,443 | How can I write a function that expect a class as parameter with a private constructor<p>(playground <a href="https://www.typescriptlang.org/play?#code/C4TwDgpgBAwg9gOwM7AE4FcDGw6qgXigQgHcoAKAOmoENUBzJALigEFVUaQAeGhEAHwBKAgKgBvAL4BuAFCyAZugTYAloigBbEADFlaxNwAqAIRpJoEAB7AICACZJYiFBmy4B5MxZanzEEXFZKBCoVAhgdFQEKEwAG3MnGAA... | <p>It's not possible. You can't extend classes with private constructors by design.</p>
<pre class="lang-js prettyprint-override"><code>class E {
private constructor(): {}
}
class F extends E { } // Cannot extend a class 'E'. Class constructor is marked as private.
</code></pre>
<p>If your goal is to make it imposs... | How can I write a function that expect a class as parameter with a private constructor | typescript | 1 | 52 | 1 | 72,384,249 | 72,384,249 | 1 | true | 2022-05-25T12:13:46.360Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I write a function that expect a class as parameter with a private constructor<p>(playground <a href="https://www.typescriptlang.org/play?#code/C4TwD... |
72,387,596 | should i can change the placeholder of datepicker of powermail form in typo3?<p>I am new to typo3 and I created a simple contact form using powermail and I took a date picker of powermail.
In that, the default placeholder is dd/mm/yyyy. But I want a different placeholder. So how I can do that?</p> | <p>A placeholder can not be shown in a HTML field of type date. The browser (depending on your OS and country settings) will show a placeholder with a format to help you to fill out the date field.
If you really need a different placeholder, you could take some JavaScript to switch the type of the field from text to da... | should i can change the placeholder of datepicker of powermail form in typo3? | php|datepicker|typo3|powermail | 0 | 52 | 1 | 72,387,867 | 72,387,867 | 1 | true | 2022-05-26T06:25:32.240Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
should i can change the placeholder of datepicker of powermail form in typo3?<p>I am new to typo3 and I created a simple contact form using powermail and I ... |
72,796,471 | Why is onTap not working because of padding?<p>I made an Onboarding Page that uses ValueNotifier to change ThemeMode.
But OnTap didn't work, so I tried to fix the problem.
I found the padding was the problem.
But why is it a problem?
Why is onTap not working because of padding?
Please tell me how I can solve this and g... | <p>You can't tap on your button due to the order of your <code>Stack</code> children. You are rendering Widgets above your button, which makes it unclickable. To fix your issue, you should move your button to the end.</p>
<pre><code>Stack(
children: [
BackgroundWaveImage(),
...,
Button(),
]
)
</code></p... | Why is onTap not working because of padding? | flutter|dart | -1 | 52 | 2 | 72,796,589 | 72,796,589 | 1 | true | 2022-06-29T06:01:24.423Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why is onTap not working because of padding?<p>I made an Onboarding Page that uses ValueNotifier to change ThemeMode.
But OnTap didn't work, so I tried to fi... |
72,773,369 | CSS Grid items not aligned as one row in Django template with tailwind-css<p>I am new to Django and ran into this issue.
so basically I am making an app where I have to <strong>display rooms</strong> on the main home page.
The rooms are generated dynamically and are stored in the database that are fetched for the home ... | <p>I think you made a mistake while calling a loop. I don't know how Django works but you should call the loop after the first <code>div</code>. So some pseudo-code can be like this</p>
<pre><code><div class="grid grid-cols-1 md:grid-cols-3 border-4 lg:grid-cols-4 sm:grid-cols-2 gap-10">
<!-- call... | CSS Grid items not aligned as one row in Django template with tailwind-css | css|django|django-templates|tailwind-css | 0 | 52 | 2 | 72,796,733 | 72,796,733 | 1 | true | 2022-06-27T14:00:12.187Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
CSS Grid items not aligned as one row in Django template with tailwind-css<p>I am new to Django and ran into this issue.
so basically I am making an app wher... |
72,794,542 | C++ Vulkan swapchain image_index vs current_frame<p>I am new to vulkan and following the <a href="https://vulkan-tutorial.com/" rel="nofollow noreferrer">vulkan-tutorial</a>. In the chapter about swapchain and multiple frames in flight (<a href="https://vulkan-tutorial.com/Drawing_a_triangle/Drawing/Frames_in_flight" r... | <p>The difference is:</p>
<p><code>vkAcquireNextImageKHR::imageIndex</code> is "random". It can return any number in any order.</p>
<p>The <code>currentFrame</code> changes strictly in round-robin fashion. Additionally the max-count may differ from swapchain image count.</p>
<p>You would use <code>vkAcquireNe... | C++ Vulkan swapchain image_index vs current_frame | c++|vulkan | 0 | 52 | 1 | 72,799,450 | 72,799,450 | 1 | true | 2022-06-29T00:34:20.057Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
C++ Vulkan swapchain image_index vs current_frame<p>I am new to vulkan and following the <a href="https://vulkan-tutorial.com/" rel="nofollow noreferrer">vul... |
72,799,086 | Dynamically change query params Angular unit test<p>I have a component that has 2 different states dependent on the query params provided.
Here's the 2 query param states:</p>
<pre><code> const mockLocalQueryParams = {
Id: Guid.create(),
customerId: Guid.create(),
};
const mockOrganicQueryParams = {
i... | <p>The best way in my opinion is to do it through a <code>BehaviorSubject</code> that you can have a handle on. Something like this:</p>
<pre><code>// !! create a behavior subject here so you can have a handle on it
const mockQueryParams = new BehaviorSubject<any>(mockLocalQueryParams);
beforeEach(
waitForAsync... | Dynamically change query params Angular unit test | angular|jasmine|angular-activatedroute | 0 | 52 | 1 | 72,802,042 | 72,802,042 | 1 | true | 2022-06-29T09:34:17.003Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Dynamically change query params Angular unit test<p>I have a component that has 2 different states dependent on the query params provided.
Here's the 2 query... |
72,801,187 | How to only consider the first N cipher of an int number?<p>I have an integer number, which can be codified on <code>3</code> or <code>4</code> ciphers (for example, <code>123</code>, <code>1234</code> and so on...) or can be codified on 7 or 8 cipher (for example, <code>1234567</code>, <code>12345678</code> and so on.... | <p>you can make use do while loop. I believe cipher codified only on 7 and 8. If you still continue you can keep adding the code. As far as I understood, i tried to put into code here,</p>
<pre class="lang-c prettyprint-override"><code>#include <stdio.h>
int main() {
long long n;
int num=3;
int count=0;
p... | How to only consider the first N cipher of an int number? | c|types|integer|numbers | -3 | 52 | 1 | 72,802,063 | 72,802,063 | 1 | true | 2022-06-29T12:09:03.067Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to only consider the first N cipher of an int number?<p>I have an integer number, which can be codified on <code>3</code> or <code>4</code> ciphers (for ... |
72,800,853 | Subplots of bar chart for each row in pandas dataframe- Invalid color error<p>I'm creating multiple subplots (bar charts) from pandas dataframe. I would like the two bars in each plot to have different colours (so that one is always eg. orange, and the other always blue).</p>
<p><em>my bar charts</em><br />
<a href="ht... | <p>I took the data you posted and updated it a little so that there are some rows that have both columns with values > 95. My plotted data looks like this.</p>
<pre><code>df2 = df.set_index('Triplet sequence').T
df2
>>
Triplet sequence AAA AAC AAG AAT ACA TGT TTA TTC TTG TTT
3 98.415603 85.606777 85.2... | Subplots of bar chart for each row in pandas dataframe- Invalid color error | python|pandas|dataframe|error-handling|colorbar | 2 | 52 | 1 | 72,802,158 | 72,802,158 | 1 | true | 2022-06-29T11:43:33.647Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Subplots of bar chart for each row in pandas dataframe- Invalid color error<p>I'm creating multiple subplots (bar charts) from pandas dataframe. I would like... |
72,787,666 | Which certificate store do I place an Azure App Registration certificate in on an on-prem server<p>I've set up Azure KeyVault for a .NET 6 application we have in development.</p>
<p>I followed the instructions here - <a href="https://docs.microsoft.com/en-us/aspnet/core/security/key-vault-configuration?view=aspnetcore-... | <p>Setting the store to LocalMachine is fine as long as the cert is non-exportable.</p> | Which certificate store do I place an Azure App Registration certificate in on an on-prem server | azure|asp.net-core|iis|.net-6.0|azure-keyvault | 0 | 52 | 1 | 72,805,054 | 72,805,054 | 1 | true | 2022-06-28T13:50:23.970Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Which certificate store do I place an Azure App Registration certificate in on an on-prem server<p>I've set up Azure KeyVault for a .NET 6 application we hav... |
72,808,009 | Connection timeout in JMeter does not work<p><a href="https://i.stack.imgur.com/6R4D1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6R4D1.png" alt="enter image description here" /></a></p>
<p>As shown in the above image, I have set a connection timeout of 20ms for the requests. However, I'm still g... | <ol>
<li>Ensure that your <code>add obvervation15</code> is a <a href="https://jmeter.apache.org/usermanual/component_reference.html#HTTP_Request" rel="nofollow noreferrer">HTTP Request</a> sampler, HTTP Request Defaults will work only for the HTTP Request samplers, any other sampler types won't respect the timeout set... | Connection timeout in JMeter does not work | jmeter | 0 | 52 | 1 | 72,811,188 | 72,811,188 | 1 | true | 2022-06-29T21:22:10.907Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Connection timeout in JMeter does not work<p><a href="https://i.stack.imgur.com/6R4D1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6R4D... |
72,809,914 | prebid js remove 'House Ad' banner<p>I have integrated prebid into our website with multiple adaptors, and it's working fine, but when non-of the adaptors respond or get win I am seeing 'House Ad' banner instead, can I configure the prebid to show nothing in placeholder div (display: none) ?</p>
<p><a href="https://i.s... | <p>In your case, here is what happens :</p>
<ol>
<li>page loads</li>
<li>adserver & prebid are launched</li>
<li>if no prebid line item selected, then adserver will select any "house ad" priority line item to fill the slot in.</li>
</ol>
<p>Rather than hidding the house ads (you will still count impressio... | prebid js remove 'House Ad' banner | javascript|ads|prebid.js|prebid|header-bidding | 0 | 52 | 1 | 72,813,379 | 72,813,379 | 1 | true | 2022-06-30T03:11:30.520Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
prebid js remove 'House Ad' banner<p>I have integrated prebid into our website with multiple adaptors, and it's working fine, but when non-of the adaptors re... |
72,796,698 | Insert existing database file in project using C#<p>I am working on an application, which gets the public IP address of the user, looks up in a database for the location of that IP address, gets the Latitude an Longitude and finally displays the time of sunrise and sunset at that place.</p>
<p>To make step two work, I ... | <p>You can use the IP2Location NuGet package <a href="https://www.nuget.org/packages/IP2Location.IPGeolocation/" rel="nofollow noreferrer">https://www.nuget.org/packages/IP2Location.IPGeolocation/</a> and call it like below:</p>
<pre><code>Dim oIPResult As New IP2Location.IPResult
Dim oIP2Location As New IP2Location.Co... | Insert existing database file in project using C# | c#|database | -1 | 52 | 1 | 72,814,269 | 72,814,269 | 1 | true | 2022-06-29T06:29:05.847Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Insert existing database file in project using C#<p>I am working on an application, which gets the public IP address of the user, looks up in a database for ... |
72,814,314 | How to programatically set peekHeight for Android Compose BackdropScaffold<p>How can i programmatically set the <code>peekHeight</code> of <code>androidx.compose.material.BackdropScaffold</code>, so that the <code>frontlayer</code> is exactly underneath the <code>appBar</code>?</p>
<p>I have this code to build the app ... | <p>Your code works when you get size from Modifier.onSizeChanged and pass it via a callback to your BackdropScaffold</p>
<pre><code>@Composable
private fun MyComposable() {
val backdropScaffoldState =
rememberBackdropScaffoldState(initialValue = BackdropValue.Revealed)
var peekHeight by remember { mut... | How to programatically set peekHeight for Android Compose BackdropScaffold | android|android-jetpack-compose | 1 | 52 | 1 | 72,814,911 | 72,814,911 | 1 | true | 2022-06-30T10:35:14.730Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to programatically set peekHeight for Android Compose BackdropScaffold<p>How can i programmatically set the <code>peekHeight</code> of <code>androidx.com... |
72,813,597 | Typescript strongly type a function with dynamic parameters passed to another function (React - debounce hook)<p>I'm trying to strongly type a function (F1) that is passed to another function (F2). F1 has a dynamic amount of parameters so I cannot define any specific type.</p>
<p>The function/hook I'm working on:</p>
<... | <p>Your function needs to be <a href="https://www.typescriptlang.org/docs/handbook/2/generics.html" rel="nofollow noreferrer">generic</a> in the <a href="https://www.typescriptlang.org/docs/handbook/2/objects.html#tuple-types" rel="nofollow noreferrer">tuple type</a> corresponding to the function's parameter list. You... | Typescript strongly type a function with dynamic parameters passed to another function (React - debounce hook) | reactjs|typescript|debounce | 1 | 52 | 1 | 72,816,868 | 72,816,868 | 1 | true | 2022-06-30T09:44:07.330Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Typescript strongly type a function with dynamic parameters passed to another function (React - debounce hook)<p>I'm trying to strongly type a function (F1) ... |
72,826,442 | How to merge values of a specific key with repeating objects into one object in an array of JSON object in Angular Typescript<p>I'm working with an array of JSON objects in Angular, which contains JSON objects with are repeated but differ in only one key-value pair, I want to merge the same value objects into one but a... | <p>This is one way to implement the reduce function. The principle is the following:</p>
<ol>
<li>search if the song already exists in the accumulator array.</li>
<li>if so, concat the artist to the list</li>
<li>if not, simply copy the song record in the accumulator array</li>
</ol>
<p><div class="snippet" data-lang="... | How to merge values of a specific key with repeating objects into one object in an array of JSON object in Angular Typescript | angular|typescript | 0 | 52 | 2 | 72,826,646 | 72,826,646 | 1 | true | 2022-07-01T08:26:51.793Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to merge values of a specific key with repeating objects into one object in an array of JSON object in Angular Typescript<p>I'm working with an array of ... |
72,827,656 | Adding each element from a linked list<p>I am trying to sum 2 linked lists, element by element, the result will be put into a new list.</p>
<p>Example :</p>
<pre><code>Input : list1 : 5->3->4
list2 : 6->1->2
Output : list3 : 11->4->6
</code></pre>
<p>Here's what i've done so far :</p>
<pre><... | <p>There are multiple issues with your code:</p>
<ol>
<li>You are not changing the <code>current</code> node when iterating for sum</li>
<li>You are adding extra empty node</li>
</ol>
<p>You can try next approach - create temporary current node which will be changed and updated in the loop:</p>
<pre class="lang-cs pret... | Adding each element from a linked list | c#|linked-list | 1 | 52 | 3 | 72,827,996 | 72,827,996 | 1 | true | 2022-07-01T10:07:16.563Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Adding each element from a linked list<p>I am trying to sum 2 linked lists, element by element, the result will be put into a new list.</p>
<p>Example :</p>
... |
72,824,102 | How to make Highcharts Heatmap colors not gradient/percentage based, make the color value range based<p>I want the colors to be like the Gitlab's Contribution Heatmap (bottom left is the color range):</p>
<p><a href="https://i.stack.imgur.com/HzG0y.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HzG0... | <p>You need to use data-classes for color-axis. For example:</p>
<pre><code> colorAxis: {
...,
dataClasses: [{
color: '#ededed',
to: 1
}, {
color: '#acd5f2',
from: 1,
to: 9
}, {
color: '#7fa8c9',
from: 10,
to: 19
}, {
color: '#527ba0',
fro... | How to make Highcharts Heatmap colors not gradient/percentage based, make the color value range based | highcharts|heatmap | 0 | 52 | 1 | 72,830,932 | 72,830,932 | 1 | true | 2022-07-01T03:29:59.017Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to make Highcharts Heatmap colors not gradient/percentage based, make the color value range based<p>I want the colors to be like the Gitlab's Contributio... |
72,831,620 | -join "," only grabbing the first item and not combining items with comma<p>I am running the following script but the -join "," for the owners is only returning the first result and not combining them with commas:</p>
<pre><code>Connect-MgGraph -Scopes 'Application.Read.All'
$results = @()
#Get-AzureADApplica... | <p>Here is you code <code> $owner = Get-MgApplicationOwner -ApplicationId $_.ID -Top 1</code></p>
<p>A join is useless because you are limiting the amount of owner returned to 1 in all cases. Remove the <code>-Top1</code> from your code and everything will work as expected.</p>
<pre><code> $owner = Get-MgApplicationOwn... | -join "," only grabbing the first item and not combining items with comma | powershell | 0 | 52 | 1 | 72,833,023 | 72,833,023 | 1 | true | 2022-07-01T15:37:58.603Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
-join "," only grabbing the first item and not combining items with comma<p>I am running the following script but the -join "," for the owners is o... |
72,835,559 | Delete image file from directory in PHP on remote server and localhost<p>I'm trying to figure out, how to delete correctly image file with <a href="https://summernote.org/" rel="nofollow noreferrer">summernote</a> from directory folder on remote server and localhost.</p>
<p>So, image successfully uploaded from summerno... | <p>I cannot completely test this but I think you could change the <code>editor-delete.php</code> script like this. Judging by the paths cited in the question you need to construct the absolute path by leaving the admin directory traversing the file structure into <code>uploads/img-uploads</code> so <code>chdir</code> a... | Delete image file from directory in PHP on remote server and localhost | php|localhost|delete-file|remote-server | 0 | 52 | 1 | 72,836,909 | 72,836,909 | 1 | true | 2022-07-02T00:00:14.090Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Delete image file from directory in PHP on remote server and localhost<p>I'm trying to figure out, how to delete correctly image file with <a href="https://s... |
72,842,922 | Keyboard inputs in c without using a library that does everything for you<p>I'm working on a 3D Engine for C, and I have (what I believe) to be everything. Except keyboard input, I could use the scanf() function but I imagine that has its problems (like multi-key inputs). I dont want to use a library like SDL2, I just ... | <p>You will probably want to process the following two window messages in your <a href="https://docs.microsoft.com/en-us/windows/win32/winmsg/using-messages-and-message-queues" rel="nofollow noreferrer">message loop</a>:</p>
<ul>
<li><a href="https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-keydown" rel="nofo... | Keyboard inputs in c without using a library that does everything for you | c|windows|input|io|keyboard | -1 | 52 | 1 | 72,842,996 | 72,842,996 | 1 | true | 2022-07-02T22:56:16.177Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Keyboard inputs in c without using a library that does everything for you<p>I'm working on a 3D Engine for C, and I have (what I believe) to be everything. E... |
72,842,012 | Rust lifetimes in async wrapper for sync code<p>I am trying to create a <code>Stream</code> using a camera with a blocking capture method. The blocking call is wrapped with <a href="https://docs.rs/blocking/1.2.0/blocking/fn.unblock.html" rel="nofollow noreferrer"><code>blocking::unblock</code></a>.</p>
<pre class="lan... | <p>You could move the camera into the inner closure, then return it once the frame capture is complete:</p>
<pre class="lang-rust prettyprint-override"><code> stream::unfold(camera, |c| async move {
Some(blocking::unblock(|| move {
let frame = c.capture().unwrap()).await;
(frame,c)
... | Rust lifetimes in async wrapper for sync code | asynchronous|rust|lifetime|rust-futures | 0 | 52 | 2 | 72,843,012 | 72,843,012 | 1 | true | 2022-07-02T19:46:52.643Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Rust lifetimes in async wrapper for sync code<p>I am trying to create a <code>Stream</code> using a camera with a blocking capture method. The blocking call ... |
72,842,971 | VBA SUMIF formula isn't populating anything<p>I'm trying to populate multiple cells within a summary sheet by using the SUMIF formula in VBA and I can't figure out why it isn't working.</p>
<p>I have 2 sheets - Summary and CPTView
I want cell C7 to populate the result of the sumif formula. I want it to look in CPTView ... | <h2>Write a SUMIF Formula With VBA</h2>
<pre class="lang-vb prettyprint-override"><code>Sub SumIfFormula()
' Source
Const sName As String = "CPTView"
Const slAddr As String = "A1:A1000" ' Lookup
Const ssAddr As String = "C1:C1000" ' Sum
' Destination
Const dName As... | VBA SUMIF formula isn't populating anything | excel|vba | 2 | 52 | 2 | 72,844,141 | 72,844,141 | 1 | true | 2022-07-02T23:08:26.513Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
VBA SUMIF formula isn't populating anything<p>I'm trying to populate multiple cells within a summary sheet by using the SUMIF formula in VBA and I can't figu... |
72,842,436 | Pattern matching against union type can't remove cases from consideration<p>Suppose I have a type which is either a string or a tuple of strings.</p>
<pre><code>type OneOrTwo = String | (String, String)
</code></pre>
<p>Now I want to discriminate between these two types. The runtime representations are distinct (<code>... | <p>I have to disagree on this, implying that the compiler should do yet another invisible type cast (as if whole type erasure process is not enough), could quickly lead to more unintuitive type-checking issues later and an even lesser transparency from the compiler's side.</p>
<p>Union types being implemented with gene... | Pattern matching against union type can't remove cases from consideration | scala|pattern-matching|union-types|scala-3|dotty | 1 | 52 | 1 | 72,844,310 | 72,844,310 | 1 | true | 2022-07-02T21:09:34.447Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pattern matching against union type can't remove cases from consideration<p>Suppose I have a type which is either a string or a tuple of strings.</p>
<pre><c... |
72,845,244 | How do I scrape the title of a page in Racket?<p>I got to the point of obtaining the html of the page with the following code:</p>
<pre><code>#!/usr/bin/env racket
#lang racket/base
(require net/url racket/port)
(require (planet neil/html-parsing:3:0))
(define p (get-pure-port (string->url "https://www.rosett... | <p>I prefer working with XML tooling over HTML, or in Racket (And scheme in general), <a href="https://docs.racket-lang.org/sxml-intro/index.html" rel="nofollow noreferrer">sxml</a>. That lets you use <a href="https://docs.racket-lang.org/sxml/sxpath.html" rel="nofollow noreferrer">XPath-like queries</a> to easily extr... | How do I scrape the title of a page in Racket? | web-scraping|scheme|html-parsing|racket | 0 | 52 | 1 | 72,845,596 | 72,845,596 | 1 | true | 2022-07-03T09:06:29.520Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I scrape the title of a page in Racket?<p>I got to the point of obtaining the html of the page with the following code:</p>
<pre><code>#!/usr/bin/env ... |
72,847,719 | Do while loops store intermediate results?<p>I have the following loop that keeps generating 3 random numbers until these 3 random numbers sum to exactly 10. Then, it will repeat this process 100 times. Here is the code for this:</p>
<pre><code>for (i in 1:100){
num_1_i = num_2_i = num_3_i = 0
while(num_1_... | <p>Just define your <code>list_results</code> before the <code>for</code> loop as empty list
if you try the following code</p>
<pre><code>list_results <- list()
for (i in 1:1000){
num_1_i = num_2_i = num_3_i = 0
while(num_1_i + num_2_i + num_3_i != 150){
num_1_i = sample(1:100 , 1)
num_2... | Do while loops store intermediate results? | r|loops|while-loop|iteration | 0 | 52 | 1 | 72,848,418 | 72,848,418 | 1 | true | 2022-07-03T15:25:22.283Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Do while loops store intermediate results?<p>I have the following loop that keeps generating 3 random numbers until these 3 random numbers sum to exactly 10.... |
72,831,838 | Run ocp commands inside an Openshift Cronjob to update a Secret<p>I want to create an Openshift Cronjob to monthly update the password field of an Openshift Secret.
I tried to update the password field from a Secret using the ocp cli on my local machine with the patch command with success:</p>
<pre><code>oc patch secre... | <p>Based on the below error, it evident that logged in user doesn't have access to modify the secret.</p>
<p><code>Error from server (Forbidden): secrets "pg-creditcard-pguser-creditcard" is forbidden: User "system:serviceaccount:my-ns:default" cannot get resource "secrets" in API group &q... | Run ocp commands inside an Openshift Cronjob to update a Secret | openshift | 1 | 52 | 1 | 72,852,020 | 72,852,020 | 1 | true | 2022-07-01T15:55:55.527Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Run ocp commands inside an Openshift Cronjob to update a Secret<p>I want to create an Openshift Cronjob to monthly update the password field of an Openshift ... |
72,852,819 | Using plain-draggable library with React<p>I want to use the <a href="https://www.npmjs.com/package/plain-draggable" rel="nofollow noreferrer">plain-draggable</a> library with my React app. To <code>package.json</code> I added: <code>"plain-draggable": "^2.5.14",</code></p>
<p>Then I ran <code>npm i... | <p>You can install the missing dependencies in your main project rather than going to the <code>node_modules</code> folder and reinstalling it each time.</p>
<p>Try it in the root directory of your application;</p>
<pre><code>npm install --save anim-event cssprefix m-class-list pointer-event
</code></pre> | Using plain-draggable library with React | javascript|reactjs | 1 | 52 | 2 | 72,852,927 | 72,852,927 | 1 | true | 2022-07-04T06:58:48.953Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Using plain-draggable library with React<p>I want to use the <a href="https://www.npmjs.com/package/plain-draggable" rel="nofollow noreferrer">plain-draggabl... |
72,851,870 | Kivy Label is not showing up<p>So I am a beginner in kivy. I have written a programm that reads sentences from a list and displays them in a Boxlayout as buttons. The Boxlayout is in a Floatlayout, so I can control where the sentences are located. If I click one of the sentences, it splits into buttons for each word. S... | <p>The problem is that you are actually adding a label into another label in your function <code>show</code> but you never accessed the label you've already added to the app's subclass.</p>
<p>The fixes are as follows,</p>
<ol>
<li>First create a reference for that label,</li>
</ol>
<pre class="lang-py prettyprint-over... | Kivy Label is not showing up | python|kivy|label | 0 | 52 | 1 | 72,853,131 | 72,853,131 | 1 | true | 2022-07-04T04:46:28.813Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Kivy Label is not showing up<p>So I am a beginner in kivy. I have written a programm that reads sentences from a list and displays them in a Boxlayout as but... |
72,854,263 | Pandas: Optimal subtract every nth row<p>I'm writing a function for a special case of row-wise subtraction in pandas.</p>
<ul>
<li>First the user should be able to specify rows either by regex (i.e. "_BL[0-9]+") or by regular index i.e every 6th row</li>
<li>Then we must subtract every matching row from rows ... | <h2>Code</h2>
<pre><code># Create boolean mask for matching rows
# m = np.arange(len(df)) % 6 == 5 # for index match
m = df['Samples'].str.contains(r'_BL\d+') # for regex match
# mask the values and backfill to propagate the row
# values corresponding to match in backward direction
df['var1'] = df['var1'] - df['var1']... | Pandas: Optimal subtract every nth row | python|pandas|vectorization | 1 | 52 | 1 | 72,855,166 | 72,855,166 | 1 | true | 2022-07-04T09:07:23.963Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pandas: Optimal subtract every nth row<p>I'm writing a function for a special case of row-wise subtraction in pandas.</p>
<ul>
<li>First the user should be a... |
72,860,000 | How To Find a Value and Use it in PHP?<p>My goal is to do this :</p>
<ol>
<li>Get the value from variable</li>
<li>Check the value</li>
<li>Change to thousands depending on the value</li>
<li>Use the new value.</li>
</ol>
<p>Example :</p>
<pre><code>$input = 12345
//Code to detect input is in thousands or hundreds
$i... | <p>Use the <em>floor()</em> function and divide by 1000 to get the number of thousands in your input :</p>
<pre><code>$change = floor($input/1000) //12
</code></pre>
<p>The same way, you get the number of hundreds :</p>
<pre><code>$change = floor($input/100) //123
</code></pre>
<p>If the result is 0 (with an input of 1... | How To Find a Value and Use it in PHP? | php|numbers | 0 | 52 | 1 | 72,860,491 | 72,860,491 | 1 | true | 2022-07-04T16:59:51.613Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How To Find a Value and Use it in PHP?<p>My goal is to do this :</p>
<ol>
<li>Get the value from variable</li>
<li>Check the value</li>
<li>Change to thousan... |
72,865,948 | How to skip to next character in Java<p>I am working on a program that converts a prefix to a postfix expression. However, when there is an unexpected blank space in an expression such as "$+-ABC+D-E F" instead of "$+-ABC+D-EF" the program doesn't work correctly. How do I write skip to the next char... | <p>One way would be to write a <code>continue;</code> in this else if():</p>
<pre><code> else if(isBlank(prefix_exp.charAt(i))){
// Skip to next character
continue;
}
</code></pre>
<p><strong>continue</strong> will simply move to the next iteration of the loop</p>
<p>However, if y... | How to skip to next character in Java | java|arrays|character | 0 | 52 | 2 | 72,866,142 | 72,866,142 | 1 | true | 2022-07-05T08:01:39.537Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to skip to next character in Java<p>I am working on a program that converts a prefix to a postfix expression. However, when there is an unexpected blank ... |
72,866,367 | Pattern to match everything except a string of 5 digits<p>I only have access to a function that can match a pattern and replace it with some text:</p>
<pre><code>Syntax
regexReplace('text', 'pattern', 'new text'
</code></pre>
<p>And I need to return only the 5 digit string from text in the following format:</p>
<pre><c... | <p>You can match the whole string but capture the 5-digit number into a capturing group and replace with the backreference to the captured group:</p>
<pre class="lang-none prettyprint-override"><code>regexReplace("{{ticket.description}}", "^(?:[\w\W]*\s)?(\d{5})(?:\s[\w\W]*)?$", "$1")
</co... | Pattern to match everything except a string of 5 digits | regex | 1 | 52 | 2 | 72,866,525 | 72,866,525 | 1 | true | 2022-07-05T08:36:14.580Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pattern to match everything except a string of 5 digits<p>I only have access to a function that can match a pattern and replace it with some text:</p>
<pre><... |
72,867,571 | Which way is better to concatenate strings in python?<pre><code>def email_list(domains):
emails = []
for domain, users in domains.items():
for user in users:
emails.append(user + "@" + domain) # emails.append("{}@{}".format(user, domain))
return(emails)
</code></pre>
<p>Which way is better in ... | <p>In my honest opinion, f-strings are the best. They are flexible and readable. Unlike other concats, you don't have to make sure you insert all strings. Infact, you can do something like that:</p>
<pre><code>number = 9
text = "hello"
print(f"{text} {number}")
</code></pre>
<p>Also, it will automat... | Which way is better to concatenate strings in python? | python|string|concatenation | -1 | 52 | 1 | 72,867,683 | 72,867,683 | 1 | true | 2022-07-05T10:06:36.020Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Which way is better to concatenate strings in python?<pre><code>def email_list(domains):
emails = []
for domain, users in domains.items():
for user in user... |
72,867,650 | AttributeError: 'Pandas' object has no attribute 'to_dict'<p>I am trying to convert a tuple of a Pandas DataFrame into a dictionary because I need the dict to call an API later. I have an entire Dataframe, from which I iterate a for loop to get all data inside it. Here is the code</p>
<pre><code>df = ....Dataframe defi... | <pre><code>df.to_dict()
</code></pre>
<p>is a method that you call and by different arguments you can get:</p>
<p>‘list’ : dict like {column -> [values]}</p>
<p>‘series’ : dict like {column -> Series(values)}</p>
<p>‘split’ : dict like {‘index’ -> [index], ‘columns’ -> [columns], ‘data’ -> [values]}</p>
... | AttributeError: 'Pandas' object has no attribute 'to_dict' | python|pandas | 0 | 52 | 1 | 72,867,816 | 72,867,816 | 1 | true | 2022-07-05T10:11:49.580Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
AttributeError: 'Pandas' object has no attribute 'to_dict'<p>I am trying to convert a tuple of a Pandas DataFrame into a dictionary because I need the dict t... |
72,868,425 | How to check how many member are in a voice channel?<p>Is there a way to check how many members are in a voice channel or if it's empty in discord.js (V. 13.8.1)?</p>
<p>I have already tried this</p>
<pre class="lang-js prettyprint-override"><code>async function usercount(voiceState){
let users = await(voiceState.c... | <p><a href="https://discord.js.org/#/docs/discord.js/stable/class/VoiceChannel?scrollTo=members" rel="nofollow noreferrer"><code>VoiceChannel#members</code></a> is a collection of the members in a voice-based channel. Collection's have a <code>size</code> property, so something like this should work:</p>
<pre class="la... | How to check how many member are in a voice channel? | javascript|node.js|discord.js | 0 | 52 | 2 | 72,868,727 | 72,868,727 | 1 | true | 2022-07-05T11:09:53.240Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to check how many member are in a voice channel?<p>Is there a way to check how many members are in a voice channel or if it's empty in discord.js (V. 13.... |
72,873,408 | Parsing web-page with search bar<p>I need to parse store names (<code><div class="LocationName"></code>) from <a href="https://www.comicshoplocator.com/StoreLocator" rel="nofollow noreferrer">https://www.comicshoplocator.com/StoreLocator</a>.
The thing is -- when you entering zip code (for instance 7353... | <p>The problem is in here: <code>browser.find_element(By.NAME, 'query').send_keys('73533' + Keys.RETURN)</code></p>
<p>The correct one would be:</p>
<pre><code>search = browser.find_element(By.NAME, 'query')
search.send_keys('73533')
search.send_keys(Keys.RETURN)
</code></pre>
<p><strong>Full working code:</strong></p>... | Parsing web-page with search bar | python|selenium|parsing|url|beautifulsoup | 0 | 52 | 3 | 72,874,066 | 72,874,066 | 1 | true | 2022-07-05T17:28:11.043Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Parsing web-page with search bar<p>I need to parse store names (<code><div class="LocationName"></code>) from <a href="https://www.comicshopl... |
72,873,895 | Why does typescript break in components with spread?<p>Why does typescript break if you send props to a component with a spread statement?</p>
<p>Example code</p>
<pre><code>type SomeComponentProps = Readonly<{
someTitle: string
}>
const SomeComponent = ({ someTitle }: SomeComponentProps) => {
return <... | <p>This is a behaviour present with TS without React too.</p>
<p>Take the below example:</p>
<pre><code>const split = { a : 1 , b : 2};
const func = ({a } :{ a : number}) => {
console.log(a);
};
func(split)
</code></pre>
<p>TS will not complain about the above. You might be passing extra keys into the object, b... | Why does typescript break in components with spread? | reactjs|typescript|jsx|linter | 2 | 52 | 1 | 72,874,094 | 72,874,094 | 1 | true | 2022-07-05T18:18:40.987Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why does typescript break in components with spread?<p>Why does typescript break if you send props to a component with a spread statement?</p>
<p>Example cod... |
72,874,228 | useEffect called multiple times<p>I have the following reactjs code:</p>
<pre class="lang-js prettyprint-override"><code>import React, { useState, useEffect } from 'react'
const Test = () => {
const [counter, setCounter] = useState(0)
useEffect(() => {
const data = localStorage.getItem('counter'... | <p>You can use this boilerplate to avoid repeated renders while in <code><StrictMode></code></p>
<pre><code>function App() {
const [success, setSuccess] = useState(false);
const isMounted = useRef(false);
useEffect(() => {
console.log('started');
if (isMounted.current) {
... | useEffect called multiple times | reactjs|react-hooks | 0 | 52 | 1 | 72,874,351 | 72,874,351 | 1 | true | 2022-07-05T18:49:52.083Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
useEffect called multiple times<p>I have the following reactjs code:</p>
<pre class="lang-js prettyprint-override"><code>import React, { useState, useEffect ... |
72,875,616 | google.script.run function won't write to JavaScript global variable using await<p>I have been having trouble lately with global variables as well as using async functions like "await" (which I am new to) in Javascript with Apps Script.</p>
<p>Here's my JavaScript code:</p>
<pre><code>let patientData = {};
$... | <p>The calling function also needs to be <code>async</code>:</p>
<pre><code>$(document).ready(async function() {
await /*I want to wait for this to complete => so wait*/loadPatientData();
google.script.run.logThis(patientData.names); //Returns good
})
</code></pre> | google.script.run function won't write to JavaScript global variable using await | javascript|jquery|google-apps-script|async-await|global-variables | 1 | 52 | 1 | 72,876,018 | 72,876,018 | 1 | true | 2022-07-05T21:16:19.380Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
google.script.run function won't write to JavaScript global variable using await<p>I have been having trouble lately with global variables as well as using a... |
72,876,039 | PDF Not Working After Uploading To Node Server<p>I am trying to upload a pdf from the frontend to my node server. The PDF successfully uploads on the node server but when I go to open it, I am unable to. Instead, I see a message that says "File cant be opened. Something went wrong." Why is this happening?</p>... | <p>You are working with base64-URL in vain. It is much more effective to use <code>ArrayBuffer</code>. The main advantage of <code>ArrayBuffer</code> is the 1-byte unit, while <code>base64</code> breaks the byte representation three out of four times.</p>
<p>Instead of sending the file in chunks, I would suggest tracki... | PDF Not Working After Uploading To Node Server | javascript|node.js | 1 | 52 | 1 | 72,876,833 | 72,876,833 | 1 | true | 2022-07-05T22:07:59.607Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
PDF Not Working After Uploading To Node Server<p>I am trying to upload a pdf from the frontend to my node server. The PDF successfully uploads on the node se... |
72,850,932 | What is the cost of initializing an IEnumerable into a List/Queue/Stack?<p>I have a collection that could potentially have millions of elements within it. However, during certain operations, this collection may be culled and then overwritten.</p>
<p>I would like to know the cost of creating a new data-structure using I... | <p>The constructor for <code>List<T></code> in particular has <a href="https://github.com/dotnet/runtime/blob/a33b9d82d45edd2ca47db710ff06a87aa0eb9cbd/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/List.cs#L61" rel="nofollow noreferrer">specific handling</a> for <code>ICollection<T></co... | What is the cost of initializing an IEnumerable into a List/Queue/Stack? | c#|list|performance|optimization|ienumerable | 0 | 52 | 1 | 72,876,969 | 72,876,969 | 1 | true | 2022-07-04T01:15:52.050Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What is the cost of initializing an IEnumerable into a List/Queue/Stack?<p>I have a collection that could potentially have millions of elements within it. Ho... |
72,879,686 | What is the most elegant way to accept and handle different options in JavaScript constructor?<p>I'm trying to write a JavaScript class constructor that can accept multiple options (just like some command-line tools, e.g. OpenSSL). For example:</p>
<pre><code>class myClass {
constructor(pathOrSize, isPublic) {
//... | <p>A typical way to differentiate between parameters, is to provide an alternative, static function to create an instance. This is how it is done for some native classes. For instance, <code>Array</code> has <code>Array.of</code>, <code>Array.from</code>, and <code>Object</code> has <code>Object.fromEntries</code>, <co... | What is the most elegant way to accept and handle different options in JavaScript constructor? | javascript|constructor|overloading | 0 | 52 | 1 | 72,880,521 | 72,880,521 | 1 | true | 2022-07-06T07:47:12.457Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What is the most elegant way to accept and handle different options in JavaScript constructor?<p>I'm trying to write a JavaScript class constructor that can ... |
72,879,191 | How to use the value of another column as a parameter of df.shift<p>I want to get the value of the ‘shift’ column as an argument to the function shift</p>
<p>I try to</p>
<pre><code>df['gg_shift']=df['gg'].shift(df['shift'])
</code></pre>
<p>but it doesn't work</p>
<p>expected result table</p>
<pre><code>gg bool ... | <p>I might be misinterpreting your logic, but it looks like you want to get the <code>gg</code> values of the previous True for all False.</p>
<p>If this is the case you do not need to use the <code>shift</code> column, simply <a href="http://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.ffill.html" ... | How to use the value of another column as a parameter of df.shift | python|pandas|dataframe | 1 | 52 | 2 | 72,880,652 | 72,880,652 | 1 | true | 2022-07-06T07:04:03.923Z | 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 of another column as a parameter of df.shift<p>I want to get the value of the ‘shift’ column as an argument to the function shift</p>
<p... |
72,884,242 | For loop only shows last value in array<p>I'm trying to list out a set of values, that only show the new updated values in an array, but unfortunately it is only printing out the last value in the array. How do I show all the values and not only the last one?</p>
<p>When I console.log out the longLat[itemIndex] this is... | <p>You are passing a single-element array several times instead of passing a single collection of coordinates.</p>
<p>Try creating a method of</p>
<pre class="lang-js prettyprint-override"><code>indexToFeature(index) {
const {longitude, latitude, userName, dateTimeCaptured} = index;
return {
"type": &... | For loop only shows last value in array | javascript|vue.js|loops|mapbox | 0 | 52 | 2 | 72,884,670 | 72,884,670 | 1 | true | 2022-07-06T13:16:22.993Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
For loop only shows last value in array<p>I'm trying to list out a set of values, that only show the new updated values in an array, but unfortunately it is ... |
72,881,808 | What does CPIM stand for in the context of AAD B2C?<p>While documenting some custom B2C policies I implemented, I noticed I have no idea if "CPIM" actually means. Despite searching, I could not find the answer. Is CPIM an acronym? What does it stand for?</p> | <p>Customer and Partner Identity Management. We use this name on the inside to refer to AAD B2C.</p> | What does CPIM stand for in the context of AAD B2C? | azure-ad-b2c|azure-ad-b2c-custom-policy | -1 | 52 | 1 | 72,884,671 | 72,884,671 | 1 | true | 2022-07-06T10:20:48.810Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What does CPIM stand for in the context of AAD B2C?<p>While documenting some custom B2C policies I implemented, I noticed I have no idea if "CPIM" ... |
72,885,995 | Is this the correct way to assign memory to heap and deallocate it in C? Did I do this right?<p>I've stumbled upon an interesting problem while preparing for my exam, and I'm unsure as to whether I've solved it or not. I will provide the text of the problem, as well as my code:</p>
<p><a href="https://i.stack.imgur.com... | <p>Question has been answered in the comments. Firstly, instead of going through the loop for <code>101</code> times, it should iterate <code>100</code> times: <code>for(i=0; i<100; i++)</code>.</p>
<p>The next mistake was in the <code>if</code> branches within the loop. What <code>*(arrPtr+i)</code> does is it sele... | Is this the correct way to assign memory to heap and deallocate it in C? Did I do this right? | c|function|pointers|memory|iteration | 1 | 52 | 1 | 72,886,587 | 72,886,587 | 1 | true | 2022-07-06T15:12:38.087Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is this the correct way to assign memory to heap and deallocate it in C? Did I do this right?<p>I've stumbled upon an interesting problem while preparing for... |
72,889,368 | Dynamically create options from a dropdown select menu in react<p>So, I'm trying to dynamically create the options of a select dropdown, I make the fetch of an api with the states of my country, but I don't know how to access the content inside each object..</p>
<p>As you can see below, the data is being pulled from th... | <p>I see your problem, your logic is correct, but it is poorly implemented, once you have filtered the data, it is only rendering a new component:</p>
<pre><code>import { EmailIcon, LocationIcon } from "./assets/FormSvgIcons";
import React, { useEffect, useState } from "react";
export default funct... | Dynamically create options from a dropdown select menu in react | javascript|html|reactjs | 1 | 52 | 3 | 72,889,531 | 72,889,531 | 1 | true | 2022-07-06T20:14:16.160Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Dynamically create options from a dropdown select menu in react<p>So, I'm trying to dynamically create the options of a select dropdown, I make the fetch of ... |
72,890,600 | unable to add json content to an existing json file using Node.js<p>I have a json prepared file with key-value pairs as arrays. I am writing a program to add new static json (in the same format) to the existing file using "fs" module. I am aware that we cannot just straight-up append json data to json file. H... | <p>You're getting an error because you're using the JSON.parse/stringify in a wrong way. When you read a file with fs.readFile you receive a string with the whole content. So, what you need to do is to use a JSON.parse on what you received, manipulate the object and then write back to file the result.</p>
<p>You can al... | unable to add json content to an existing json file using Node.js | node.js|json|fs | 2 | 52 | 1 | 72,891,047 | 72,891,047 | 1 | true | 2022-07-06T22:48:02.967Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
unable to add json content to an existing json file using Node.js<p>I have a json prepared file with key-value pairs as arrays. I am writing a program to add... |
72,889,649 | Is it good practice to create a Wix installer that brings along multiple third-party DLLs?<p>Relatively new developer here working on a C#/.NET Windows app. When executing a particular script, the application requires several third-party DLLs:</p>
<ul>
<li>Autofac.dll (the next two are dependencies of this one)</li>
<l... | <p>Depends. You should not ship assemblies that ship in the .NET Framework. However, with .NET Core the philosophy changed and now you can depend on the runtime or ship everything yourself.</p>
<p>And yes, shipping all the files yourself means keeping up with the servicing. It's a tradeoff where the .NET team gets more... | Is it good practice to create a Wix installer that brings along multiple third-party DLLs? | c#|.net|windows|wix | -1 | 52 | 1 | 72,891,315 | 72,891,315 | 1 | true | 2022-07-06T20:43:37.593Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is it good practice to create a Wix installer that brings along multiple third-party DLLs?<p>Relatively new developer here working on a C#/.NET Windows app. ... |
72,885,992 | Java - custom dialogs with background threads<p>I am trying to raise a custom loading dialog in java and then execute some synchronous function which takes a few seconds.</p>
<p>I would like the dialog to be present as long as the function executes and once it finishes I would close the dialog.</p>
<p>My Dialog looks a... | <p>This can be done, but as pointed out in the comments, it is probably better to use some type of progress node. I used <code>Alert</code> in this example but <code>Dialog</code> should be very similar.</p>
<p>The key is closing the Alert/Dialog after the task is complete using the task's <code>setOnSucceeded</code>.<... | Java - custom dialogs with background threads | java|multithreading|user-interface|javafx | 0 | 52 | 1 | 72,892,664 | 72,892,664 | 1 | true | 2022-07-06T15:12:19.627Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Java - custom dialogs with background threads<p>I am trying to raise a custom loading dialog in java and then execute some synchronous function which takes a... |
72,894,648 | Disable the virtualization of Ag Grid during Cypress tests for a Vue.js application<p>How could I disable the virtualization of Ag Grid during Cypress tests for a Vue.js application?</p>
<p>Since the Ag Grid does not draw everything at once I have to simulate scrolling to verify the data in grid, the grid behavior, etc... | <p>It should be possible to switch virtualization off when Cypress is running the browser (i.e the window).</p>
<pre class="lang-js prettyprint-override"><code><template>
<div style="height: 100%">
<div style="height: 100%; box-sizing: border-box;">
<ag-grid-vue
... | Disable the virtualization of Ag Grid during Cypress tests for a Vue.js application | vue.js|mocha.js|cypress|ag-grid|virtualization | 1 | 52 | 1 | 72,895,182 | 72,895,182 | 1 | true | 2022-07-07T08:33:19.533Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Disable the virtualization of Ag Grid during Cypress tests for a Vue.js application<p>How could I disable the virtualization of Ag Grid during Cypress tests ... |
72,896,434 | Keep the selected options in the Sidebar when resizing the screen<p>My site has a sidebar (FiltersSideBar in my code) that contains filters. When the browser is expanded to full screen, the sidebar is in open mode on the left. If the screen width becomes less than 600, the sidebar is hidden and a button (ArrowBackIosNe... | <p>I don't see how you pass the filters to the sidebar.</p>
<p>But this issue happens because you completely destroy the sidebar to hide which resets its state to default, it would be better to just manipulate the style with <code>display</code> and <code>transition</code> without destroying the sidebar.</p>
<p>like he... | Keep the selected options in the Sidebar when resizing the screen | javascript|reactjs|sidebar | 0 | 52 | 1 | 72,896,629 | 72,896,629 | 1 | true | 2022-07-07T10:45:58.383Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Keep the selected options in the Sidebar when resizing the screen<p>My site has a sidebar (FiltersSideBar in my code) that contains filters. When the browser... |
72,885,012 | Programming Access Control Cards<p>My question is regarding PAC (personal access control), more specifically programming a card. I am not trying to create any applications or interfaces, rather just putting the basic required data into a "blank" DESFire card using the wiegand format.</p>
<p>For example, I wan... | <p>for DESFire EV1 you probably can use APDU´s to Create Applications and write Files into. You may need a NDA with NXP to get the full docu.</p>
<p>So far I can tell you the common process, for more details see the documentation of your reader or used sdk.</p>
<p>The following process for Create-Application:</p>
<pre>... | Programming Access Control Cards | smartcard|access-control|mifare|contactless-smartcard|wiegand | 0 | 52 | 1 | 72,899,193 | 72,899,193 | 1 | true | 2022-07-06T14:07:40.207Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Programming Access Control Cards<p>My question is regarding PAC (personal access control), more specifically programming a card. I am not trying to create an... |
72,902,678 | How to reduce the regression output in markdown<p>I want to show a regression output in markdown but it contains a lot of character variables which result in a lot of independent variables. Is there any way to only show in the summary the first 5 variables? The summary function in combination with the options(max.print... | <p>You can use <code>tidy()</code> function from broom package</p>
<pre class="lang-r prettyprint-override"><code>library(broom)
library(magrittr)
lm(mpg ~ ., data = mtcars) %>% tidy() %>% head(n = 5)
#> # A tibble: 5 × 5
#> term estimate std.error statistic p.value
#> <chr> &... | How to reduce the regression output in markdown | r|output|regression|markdown | 0 | 52 | 2 | 72,902,851 | 72,902,851 | 1 | true | 2022-07-07T18:31:56.507Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to reduce the regression output in markdown<p>I want to show a regression output in markdown but it contains a lot of character variables which result in... |
72,901,840 | Use different prefixes in spring boot @Configuration/@ConfigurationProperties<p>I have spring boot app, and <code>.yaml</code> file with such configuration:</p>
<pre><code>storage:
path: C:\\path\\example
cache:
durtion: 60
</code></pre>
<p>I need ONE class, that will contain both cache and storage. I thought that ... | <p>You can have a 'global' config with no prefix, SpringBoot will try to fulfil it from the 'root' of all the properties</p>
<pre class="lang-java prettyprint-override"><code>
public class StorageConfig(){
@Getter
@Setter
private String path;
}
public class CacheConfig(){
@Getter
@Setter
... | Use different prefixes in spring boot @Configuration/@ConfigurationProperties | java|spring-boot | 0 | 52 | 1 | 72,903,559 | 72,903,559 | 1 | true | 2022-07-07T17:10:11.980Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Use different prefixes in spring boot @Configuration/@ConfigurationProperties<p>I have spring boot app, and <code>.yaml</code> file with such configuration:<... |
72,899,453 | R Shiny DT render text and input without linebreaks<p>I am trying to render any kind of R Shiny input in a Shiny DT, however I would like to avoid the linebreaking. If I concatenate some text and the html tags with the shinyInput function both the text and the inputs are rendered, but a linebreak happens before and aft... | <p>You are right, you need to change the divs that wrap the checkbox element to <code>display:inline</code>. You say that this doesn't solve it as it breaks the width definition. Perhaps I'm missing something? I do not see a change in the widths column.</p>
<pre><code>tags$style("
#mytable tr td div.f... | R Shiny DT render text and input without linebreaks | html|css|r|shiny|dt | 0 | 52 | 1 | 72,904,590 | 72,904,590 | 1 | true | 2022-07-07T14:17:32.023Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
R Shiny DT render text and input without linebreaks<p>I am trying to render any kind of R Shiny input in a Shiny DT, however I would like to avoid the linebr... |
72,877,037 | How to tell a Python Exception where the function that raised it came from?<p>Suppose I write a simple Python class, <code>Delay</code>, whose point is to encapsulate a delayed (lazy) computation:</p>
<pre class="lang-py prettyprint-override"><code>class Delay:
def __init__(self, fn, *args, **kwargs):
self.... | <p>An arguably friendlier approach would be to produce a forced exception and save it into the object during initialization, and then raise the saved exception when handling an exception that actually occurs during the execution of the delayed call:</p>
<pre><code>class Delay:
def __init__(self, fn, *args, **kwargs... | How to tell a Python Exception where the function that raised it came from? | python|python-3.x|exception|traceback | 1 | 52 | 2 | 72,907,071 | 72,907,071 | 1 | true | 2022-07-06T01:27:59.437Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to tell a Python Exception where the function that raised it came from?<p>Suppose I write a simple Python class, <code>Delay</code>, whose point is to en... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.