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,392,470 | output is getting printed two times in the file generated in rmarkdown<p><a href="https://i.stack.imgur.com/WKupM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WKupM.png" alt="enter image description here" /></a></p>
<p>I am trying to print the confusion matrix for each two column of my dataset as ... | <p>In general foreach returns its values, which will be printed. To suppress that you can wrap the <code>foreach</code> loop in a call to the <code>invisible</code> function. e.g.</p>
<pre><code>---
title: ''
output: html_document
---
```{r echo=TRUE}
library(foreach)
foreach (i=1) %do% print(i) #prints twice
invis... | output is getting printed two times in the file generated in rmarkdown | r|r-markdown | 0 | 59 | 1 | 72,393,387 | 72,393,387 | 1 | true | 2022-05-26T13:16:45.563Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
output is getting printed two times in the file generated in rmarkdown<p><a href="https://i.stack.imgur.com/WKupM.png" rel="nofollow noreferrer"><img src="ht... |
72,359,863 | LEFT OUTER JOIN and WHERE EXISTS. Are they equivalent?<p>I would like to create equivalent MySQL query using LEFT OUTER JOIN to WHERE EXISTS. I am following this question:</p>
<p><a href="https://stackoverflow.com/questions/9775693/are-the-sql-concepts-left-outer-join-and-where-not-exists-basically-the-same">Are the SQ... | <p>The <code>not exists</code> and <code>left join ... rgt.col is null</code> approaches are identical. The <code>left join</code> however will contain columns from the unwanted table so just be specific with the <code>select</code> clause:</p>
<pre><code>SELECT table_a.*, table_b.*, table_c.*
FROM table_a
JOIN table_b... | LEFT OUTER JOIN and WHERE EXISTS. Are they equivalent? | mysql|sql|join|exists | -1 | 59 | 1 | 72,360,349 | 72,360,349 | 1 | true | 2022-05-24T08:49:00.293Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
LEFT OUTER JOIN and WHERE EXISTS. Are they equivalent?<p>I would like to create equivalent MySQL query using LEFT OUTER JOIN to WHERE EXISTS. I am following ... |
72,259,007 | How to use right to left languages in fmx grids<p>What is the best way in FMX to create a grid that supports bidimode and righttoleft languages
I have tried fmxrtl but it has many errors
Thanks</p> | <p>Is your app only for Windows ? <strong>If yes,</strong> I use a function to detect if it's a Bidi string and then use TTextLayout <a href="https://www.developpez.net/forums/d1871954/environnements-developpement/delphi/composants-fmx/colonne-grille-arabe-rtl/" rel="nofollow noreferrer">my test here</a>
Else, try to u... | How to use right to left languages in fmx grids | grid|firemonkey|register-transfer-level | 0 | 59 | 1 | 72,283,553 | 72,283,553 | 1 | true | 2022-05-16T12:11:22.450Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to use right to left languages in fmx grids<p>What is the best way in FMX to create a grid that supports bidimode and righttoleft languages
I have tried ... |
72,260,796 | Case sensitive for a specific column<p>I am using Microsoft SQL Management Studio V18. I have a column where I need to find if it contain any lower case alphabets. See below for desired output:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>Material#</th>
<th>Material_Desc</th>
<th>Contain... | <p>You are on the right way, but you just forced the column to UPPER CASE. You also need to compare:</p>
<pre><code>SELECT
material_desc,
CASE WHEN material_Desc = UPPER(material_desc) COLLATE SQL_Latin1_General_CP1_CS_AS
THEN 'No' ELSE 'Yes' END AS contain_lower
FROM table;
</code></pre> | Case sensitive for a specific column | sql|sql-server | 2 | 59 | 1 | 72,261,023 | 72,261,023 | 2 | true | 2022-05-16T14:24:55.240Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Case sensitive for a specific column<p>I am using Microsoft SQL Management Studio V18. I have a column where I need to find if it contain any lower case alph... |
72,267,579 | How to replace the character string after the third comma<p>I want to replace / with "/" after the third comma.</p>
<p>[expedted]</p>
<pre><code>AAA,BB/B,CCC,D/D,EEE
</code></pre>
<p>↓</p>
<pre><code>AAA,BB/B,CCC,D”/”D,EEE
</code></pre>
<p>[what I tried]</p>
<pre><code>cat sample.txt | awk '
{
... | <p>With your shown samples, please try following <code>awk</code> code. Simple explanation would be, setting <code>FS</code> and <code>OFS</code> as <code>,</code> and in main block substituting <code>/</code> with <code>"/"</code> in 4th field and mentioning <code>1</code> will print edited/non-edited line.<... | How to replace the character string after the third comma | awk|gsub | 0 | 59 | 3 | 72,267,628 | 72,267,628 | 2 | true | 2022-05-17T02:36:37.640Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to replace the character string after the third comma<p>I want to replace / with "/" after the third comma.</p>
<p>[expedted]</p>
<pre><code>AA... |
72,285,569 | Material 3 Navigation Drawer not highlighting item for current fragment<p>So, I'm migrating to Material 3 right now for building my app. For the first time, navigation drawer not selecting / highlighting the item I selected (It was working in material 2).</p>
<p>Screenshot:</p>
<p><a href="https://i.stack.imgur.com/jHb... | <p>Wrap menu items into <code>group</code> and set attribute <code>checkableBehavior</code> to <code>single</code>.</p>
<p>Example:</p>
<pre><code><?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://s... | Material 3 Navigation Drawer not highlighting item for current fragment | java|android|xml|kotlin|material-design | 0 | 59 | 1 | 72,286,506 | 72,286,506 | 2 | true | 2022-05-18T08:21:13.473Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Material 3 Navigation Drawer not highlighting item for current fragment<p>So, I'm migrating to Material 3 right now for building my app. For the first time, ... |
72,295,214 | How to include json file?<p>I have been trying to connect a json file for a long time but he does not want to see it
please tell me how to do it right</p>
<pre><code> InputStream inputStream = ContentDisplay.class.getResourceAsStream("scr/main/java/resources/embed/embed.json");
JsonObject embed = (JsonOb... | <p>Your path contains scr instead of src which I think should be the correct one</p> | How to include json file? | java|discord-jda | -1 | 59 | 1 | 72,295,349 | 72,295,349 | 2 | true | 2022-05-18T19:53:15.150Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to include json file?<p>I have been trying to connect a json file for a long time but he does not want to see it
please tell me how to do it right</p>
<p... |
72,296,210 | error while send import request on kibana console<p>I send following request on Kibana console to try to import a local dashboard to kibana version 7.2.0</p>
<pre><code>POST https://dcwidavcca0085.epg.nam.gm.com:5601/api/saved_objects/_import
{
"file"="C:\Users\Documents\dashboard-prod.ndjson"
}
<... | <h1>Tldr;</h1>
<p>Kibana's console in <code>7.2</code> only allow to target elasticsearch API.</p>
<p>You need to run the command in a terminal, using the <code>curl</code> command.</p> | error while send import request on kibana console | elasticsearch|elastic-stack|elasticsearch-5 | 0 | 59 | 1 | 72,296,280 | 72,296,280 | 2 | true | 2022-05-18T21:28:52.937Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
error while send import request on kibana console<p>I send following request on Kibana console to try to import a local dashboard to kibana version 7.2.0</p>... |
72,298,371 | Selenium screenshots are chopped off<p>I'm trying to take screenshots of different elements (on different sections) of a long page. The first screenshot I take is near the top of the page and comes out not chopped off:</p>
<p><a href="https://i.stack.imgur.com/9MsC0.png" rel="nofollow noreferrer"><img src="https://i.st... | <p>Add this line in the try block after the definition of <code>comment</code>. What it does is simply to scroll down in such a way that the webelement <code>comment</code> is at the center of the page. This way it takes a full screenshot</p>
<pre><code>try:
comment = driver.find_element(By.XPATH, '...')
driver... | Selenium screenshots are chopped off | python|html|selenium|selenium-webdriver|selenium-chromedriver | 1 | 59 | 1 | 72,300,194 | 72,300,194 | 2 | true | 2022-05-19T03:40:08.663Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Selenium screenshots are chopped off<p>I'm trying to take screenshots of different elements (on different sections) of a long page. The first screenshot I ta... |
72,301,698 | How to apply list comprehension for two variables<p>I am trying to understand list comprehention so that I can make the code on a project I'm working on more efficient. I found a simple example which is easy to understand:</p>
<pre><code>L = []
for i in range (1, 10):
if i%3 == 0:
L.append (i)
print(L)
</co... | <p>The syntax of the list comprehension that you are looking for is far simpler than you imagine:</p>
<pre class="lang-py prettyprint-override"><code>x = [(i, i*2) for i in range (1, 1000) if i%3 == 0]
print(x)
</code></pre>
<p>Now for the last bit where you are after two lists: <code>L,M</code>.</p>
<p>What you need a... | How to apply list comprehension for two variables | python|list-comprehension | 0 | 59 | 3 | 72,301,848 | 72,301,848 | 2 | true | 2022-05-19T09:07:46.297Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to apply list comprehension for two variables<p>I am trying to understand list comprehention so that I can make the code on a project I'm working on more... |
72,305,225 | How do I hide an Agular component on all routes that correspond to a certain pattern?<p>I am working on an e-commerce app who's front-end is made in Angular 13.</p>
<p>The UI has a sidebar which I do <em>not</em> want to display on the <em>product details</em> page.</p>
<p>For this purpose, in <code>app\app.component.t... | <pre><code><div *ngIf="notProductDetails()" class="col-sm-6 col-md-4 col-lg-3">
<app-sidebar class="app-sidebar"></app-sidebar>
</div>
</code></pre>
<p>HTML ^^^</p>
<pre><code>constructor() {}
public notProductDetails(): void {
return !window.location.pathna... | How do I hide an Agular component on all routes that correspond to a certain pattern? | javascript|angular|angular13 | 1 | 59 | 3 | 72,305,656 | 72,305,656 | 2 | true | 2022-05-19T13:13:32.913Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I hide an Agular component on all routes that correspond to a certain pattern?<p>I am working on an e-commerce app who's front-end is made in Angular ... |
72,314,644 | How to count how many times something occures in a loop, java<p>I am trying to find out how many times the 6 occurs in this loop.
I tried array, <code>ArrayList</code>, sapply and others but I still can't make it work.</p>
<p>Here is the code</p>
<pre><code>public class Numbersinhere {
public static void main(Strin... | <p>Try this method</p>
<pre><code>public static void main (String[] args) throws java.lang.Exception {
// your code goes here
int min = 1;
int max = 6;
int reps = 10, x, count = 0;
for (int y = 0;
y < reps;
y++) {
x = min + (int) (Math.ra... | How to count how many times something occures in a loop, java | java | -2 | 59 | 1 | 72,314,729 | 72,314,729 | 2 | true | 2022-05-20T06:44:23.090Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to count how many times something occures in a loop, java<p>I am trying to find out how many times the 6 occurs in this loop.
I tried array, <code>ArrayL... |
72,322,025 | Conditional update to a date column in pandas dataframe<p>For a given table:</p>
<pre><code>df = pd.DataFrame( {
'datetime': ['2015-01-01', '2015-04-01', '2015-07-01', '2015-12-01', '2015-01-01', '2015-04-01', '2015-07-01', '2015-12-01'],
})
df['datetime'] = pd.to_datetime(df['datetime'])
</code></pre>
<p>I would like... | <p>You can sub <a href="https://pandas.pydata.org/docs/reference/api/pandas.tseries.offsets.Week.html" rel="nofollow noreferrer"><code>pd.offsets.Week</code></a> to adjust to nearest Friday(weekday 4)</p>
<pre class="lang-py prettyprint-override"><code>m = df['datetime'].dt.weekday.isin([5,6])
df['adjust'] = df['datet... | Conditional update to a date column in pandas dataframe | python|pandas|datetime | 1 | 59 | 2 | 72,322,228 | 72,322,228 | 2 | true | 2022-05-20T16:23:41.200Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Conditional update to a date column in pandas dataframe<p>For a given table:</p>
<pre><code>df = pd.DataFrame( {
'datetime': ['2015-01-01', '2015-04-01', '2... |
72,326,845 | unshorten ow.ly URL in Google Apps Script<p>I use the following code (posted on <a href="https://stackoverflow.com/questions/69882962/unshorten-url-in-google-sheets">stackoverflow.com</a>) to unshorten URLs in Google App Script:</p>
<pre><code>function ExpandURL(url) {
url = url.indexOf("https://") == 0 ? u... | <p>In your question, <code>https:// ow . ly /d9AV30jRJWJ</code> is used (Spaces are included because of avoiding the error of Stackoverflow.). But, I thought that in this case, it might be <code>http:// ow . ly /d9AV30jRJWJ</code>. Because when I accessed <code>https:// ow . ly /d9AV30jRJWJ</code>, no response is retur... | unshorten ow.ly URL in Google Apps Script | google-apps-script|url|expand | 0 | 59 | 1 | 72,326,938 | 72,326,938 | 2 | true | 2022-05-21T05:12:21.917Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
unshorten ow.ly URL in Google Apps Script<p>I use the following code (posted on <a href="https://stackoverflow.com/questions/69882962/unshorten-url-in-google... |
72,343,750 | SQL Server : LAG multiple Nulls<p>I am trying to "fill in the blanks" with my table below.</p>
<p>I have created a PDF reader that spits out a JSON file that I have manipulated into the below format.</p>
<p>There is very little scope in changing source data, or using a secondary table as a helper, due to the ... | <p>This gives you the output you want with the data you give. In your sample data there is only one "group" in each "class", but it looks like there could maybe be multiple groups per class? If that is the case, it will be a bit more complicated, but the principal will be the same.</p>
<pre><code>CR... | SQL Server : LAG multiple Nulls | sql-server|common-table-expression|repeat|lag | -1 | 59 | 2 | 72,346,909 | 72,346,909 | 2 | true | 2022-05-23T05:47:41.937Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SQL Server : LAG multiple Nulls<p>I am trying to "fill in the blanks" with my table below.</p>
<p>I have created a PDF reader that spits out a JSON... |
72,356,303 | Why I don't see the ID Token or Auth Token?<p>I followed the article, <a href="https://docs.microsoft.com/en-us/azure/developer/java/spring-framework/configure-spring-boot-starter-java-app-with-azure-active-directory" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/azure/developer/java/spring-framework/confi... | <blockquote>
<p>What is this code?</p>
</blockquote>
<p>This is the <code>authorization code</code>. Typically you would use this code to get access token and id token. If you are using Azure AD SDK like MSAL, the SDK will take care of getting tokens using the authorization code.</p>
<p>To learn more about authorizatio... | Why I don't see the ID Token or Auth Token? | java|spring|spring-boot|azure|azure-active-directory | 0 | 59 | 1 | 72,356,627 | 72,356,627 | 2 | true | 2022-05-24T01:24:02.773Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why I don't see the ID Token or Auth Token?<p>I followed the article, <a href="https://docs.microsoft.com/en-us/azure/developer/java/spring-framework/configu... |
72,385,397 | Multiple tickers in Go's select statement's cases<p>When I run the following Go 1.18 code, I expect to see both messages being printed repeatedly to standard output, one after another. However, I only see "ping" being printed repeatedly. Why? The <code>select</code> statement must be executing both cases, sin... | <p>You are creating a new ticker in the case. The select statement evaluates the cases first, which means, it creates two timers, and after the shorter one ticks, it creates another pair of timers. Next time around, the shorter one will be picked again.</p>
<p>Create the two tickers outside the for loop.</p> | Multiple tickers in Go's select statement's cases | go|concurrency | -1 | 59 | 1 | 72,385,420 | 72,385,420 | 2 | true | 2022-05-26T00:15:19.213Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Multiple tickers in Go's select statement's cases<p>When I run the following Go 1.18 code, I expect to see both messages being printed repeatedly to standard... |
72,243,182 | How to do a race between multiprocessors in python<p>I have a function that factor a number. It depends on some random condition.</p>
<p>So what I am trying to do it's to run multiple processors in this function and the processor that finds the factor first returns the value and all processors terminate.</p>
<p>What I ... | <p>You can use <a href="https://docs.python.org/3/library/multiprocessing.html#multiprocessing.pool.Pool" rel="nofollow noreferrer"><code>multiprocessing.Pool</code></a> and it's methods <code>map()</code>, <code>imap_unordered()</code> etc. These will return also values from worker functions.</p>
<p>Example (I used <c... | How to do a race between multiprocessors in python | python|multiprocessing | 2 | 59 | 1 | 72,243,417 | 72,243,417 | 2 | true | 2022-05-14T19:07:52.117Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to do a race between multiprocessors in python<p>I have a function that factor a number. It depends on some random condition.</p>
<p>So what I am trying ... |
72,394,659 | how to apply a function(x,y) with two variables across set of variables ending with .x and .y using dplyr<p>Sample data:</p>
<pre><code>sampdat <- data.frame(grp=rep(c("a","b","c"),c(2,3,5)), x1=seq(0,.9,0.1),x2=seq(.3,.75,0.05), y1=c(1:10), y2=c(11:20))
</code></pre>
<p>I would like to... | <p>Easier would be to use two <code>across</code></p>
<pre><code>library(dplyr)
library(stringr)
sampdat %>%
mutate(across(starts_with('x'),
.names = "{str_replace(.col, 'x', 'z')}") *
across(starts_with('y')))
</code></pre>
<p>-output</p>
<pre><code> grp x1 x2 y1 y2 z1 z2
1 a 0.... | how to apply a function(x,y) with two variables across set of variables ending with .x and .y using dplyr | r|dplyr|multiple-columns|summarize|across | 2 | 59 | 1 | 72,394,719 | 72,394,719 | 2 | true | 2022-05-26T15:55:56.367Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to apply a function(x,y) with two variables across set of variables ending with .x and .y using dplyr<p>Sample data:</p>
<pre><code>sampdat <- data.fr... |
72,304,856 | In R, replace values across time series based on another column<p>Actually this is linked to my previous question: <a href="https://stackoverflow.com/questions/72303553/replace-values-across-time-series-columns-based-on-another-column/72303636#72303636">Replace values across time series columns based on another column<... | <p>If I understand you correctly, I think you might benefit from pivoting longer, replacing the values in a single <code>if_else</code>, and swinging back to wide.</p>
<pre><code>df %>%
pivot_longer(cols = -c(product,mixed.rate), names_to=c(".value", "year"), names_pattern = "(.*)(\\d)&qu... | In R, replace values across time series based on another column | r|dplyr | 1 | 59 | 3 | 72,305,123 | 72,305,123 | 2 | true | 2022-05-19T12:48:23.760Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
In R, replace values across time series based on another column<p>Actually this is linked to my previous question: <a href="https://stackoverflow.com/questio... |
72,351,251 | Extract data from json using powershell<p>I executing below command using strem from powershell and I am getting response in form of json using the below code</p>
<pre><code>$session = New-SSHSession -ComputerName $S_1 -Credential $cred
$Strem = New-SSHShellStream -SSHSession $Session
$cmd_4 = $Strem.WriteLin... | <p>It looks like you simply need to remove the <code>cluster.status()</code> line that precedes the JSON text in the multi-line string that <a href="https://csharpdoc.hotexamples.com/class/Renci.SshNet/ShellStream" rel="nofollow noreferrer"><code>$Strem.Read()</code></a> returns, as well as the extra line that follows ... | Extract data from json using powershell | powershell | 1 | 59 | 1 | 72,351,432 | 72,351,432 | 2 | true | 2022-05-23T15:38:02.997Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Extract data from json using powershell<p>I executing below command using strem from powershell and I am getting response in form of json using the below cod... |
72,365,920 | Keep indentation after directive in list<p>In RST for a sphinx documentation and using the <code>sphinx.ext.imgmath</code> extension for maths equations, I would like to add an equation in the middle of a bullet point list but have a second paragraph after the said equation and keep the indentation level of the bullet ... | <p>Indent the <code>math</code> block and the paragraph after it.</p>
<pre class="lang-text prettyprint-override"><code>Introducing the bullet list on zero-th level indentation:
- First bullet point on first level indentation.
.. math::
centered math equation
I would like this to be at the first level inde... | Keep indentation after directive in list | python-sphinx|restructuredtext | 1 | 59 | 1 | 72,372,779 | 72,372,779 | 2 | true | 2022-05-24T15:53:12.380Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Keep indentation after directive in list<p>In RST for a sphinx documentation and using the <code>sphinx.ext.imgmath</code> extension for maths equations, I w... |
72,271,450 | R: Get ranking of factor levels by group<p>For now I have only the df with the columns <code>Number</code> and <code>Days</code>.</p>
<p>I want to get a ranking of the factor levels of <code>df$Days</code> in a separate column which is called <code>Ranking</code>.</p>
<pre><code> df <- data.frame(Number = c(1,1,1... | <p>Use <code>dplyr::dense_rank</code>, or <code>as.numeric(factor(Days, ordered = T))</code> in <code>base R</code>:</p>
<pre class="lang-r prettyprint-override"><code>df %>%
group_by(Number) %>%
mutate(Ranking = dense_rank(Days),
Ranking2 = as.numeric(factor(Days, ordered = T)))
</code></pre>
<p>o... | R: Get ranking of factor levels by group | r|dplyr|group-by|levels | 1 | 59 | 1 | 72,271,472 | 72,271,472 | 2 | true | 2022-05-17T09:26:45.737Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
R: Get ranking of factor levels by group<p>For now I have only the df with the columns <code>Number</code> and <code>Days</code>.</p>
<p>I want to get a rank... |
72,240,676 | How to speed up search for abundant numbers?<p>Is there a way which this code could be improved so that it would run faster? Currently, this task takes between 11 and 12 seconds to run on my virtual environment</p>
<pre><code>def divisors(n):
return sum([x for x in range(1, (round(n/2))) if n % x == 0])
def abunda... | <p>Whenever you look for speeding up, you should first check whether the algorithm itself should change. And in this case it should.</p>
<p>Instead of looking for divisors given a number, look for numbers that divide by a divisor. For the latter you can use a sieve-like approach. That leads to this algorithm:</p>
<pre>... | How to speed up search for abundant numbers? | python | 1 | 59 | 1 | 72,241,018 | 72,241,018 | 2 | true | 2022-05-14T13:30:38.203Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to speed up search for abundant numbers?<p>Is there a way which this code could be improved so that it would run faster? Currently, this task takes betwe... |
72,251,219 | How to add constant value to axis 1 (only) of 2d numpy array?<p>Suppose I have a 2D array, such as</p>
<pre><code>a = array([[0,1],[10,12]])
</code></pre>
<p>Is there a simple and fast (for huge arrays) way to create a new 2D array <code>aplus1</code> which adds a constant only to the 2nd axis, while keeping the 1st ax... | <p>IIUC, you can do this by indexing as:</p>
<pre><code>a[row_index, :] += constant_value
</code></pre>
<p>So, for modifying <code>a</code>:</p>
<pre><code>a[1, :] += 1 # [[ 0 1] [11 13]]
</code></pre>
<p>or if you need a new array, you can copy <code>a</code> at first. So, e.g., if <code>row_index = 1</co... | How to add constant value to axis 1 (only) of 2d numpy array? | python|numpy | -1 | 59 | 1 | 72,251,511 | 72,251,511 | 2 | true | 2022-05-15T18:42:18.747Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to add constant value to axis 1 (only) of 2d numpy array?<p>Suppose I have a 2D array, such as</p>
<pre><code>a = array([[0,1],[10,12]])
</code></pre>
<p... |
72,353,686 | How to filter data in Pandas by custom date?<p>There are some columns in Pandas dataframe:</p>
<pre><code>name age mm yy
01 23
</code></pre>
<p>How to filter rows where mmyy < current date using custom function (apply)?</p>
<p>mm and yy is as <code>8 non-null object</code></p>
<p>I tried this way:</p>
... | <p>Here's a way to do what your question asks, assuming the <code>mm</code> and <code>yy</code> columns contain strings:</p>
<pre class="lang-py prettyprint-override"><code>import pandas as pd
df = pd.DataFrame({'name':['Alice', 'Bob'], 'age':[20, 30], 'mm':['01', '04'], 'yy':['23', '22']})
print(df)
from datetime imp... | How to filter data in Pandas by custom date? | python|pandas | 1 | 59 | 1 | 72,353,833 | 72,353,833 | 2 | true | 2022-05-23T19:07:40.513Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to filter data in Pandas by custom date?<p>There are some columns in Pandas dataframe:</p>
<pre><code>name age mm yy
01 23
</code></pre>
<p>How ... |
72,266,746 | How to Identify Paragraph that has a Duplicate?<p>I'm trying to identify paragraphs (first instance) in a Word document that have a duplicate (second instance).</p>
<p>This code identifies the second instance.</p>
<p>I'm trying to highlight the first instance in a different color.</p>
<pre class="lang-vb prettyprint-ov... | <p>In a single loop:</p>
<pre class="lang-vb prettyprint-override"><code>Sub highdupParagraphs()
Dim p As Paragraph
Dim d As New Scripting.Dictionary
Dim t As Variant, StartTime As Single
StartTime = Timer
For Each p In ActiveDocument.Paragraphs
t = p.Range.Text
If t <&g... | How to Identify Paragraph that has a Duplicate? | vba|ms-word|duplicates|paragraph | 0 | 59 | 1 | 72,266,913 | 72,266,913 | 2 | true | 2022-05-16T23:48:51.280Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to Identify Paragraph that has a Duplicate?<p>I'm trying to identify paragraphs (first instance) in a Word document that have a duplicate (second instanc... |
72,258,758 | Anyone can tell me why it is giving runtime error<p>Question Link: <a href="https://leetcode.com/problems/coloring-a-border/" rel="nofollow noreferrer">LeetCode</a>, I am getting runtime error but not found where it is causing. why it is giving runtime error any one can explain me. Thanks in advance.</p>
<pre><code>cla... | <p>I've wrote test for your code: <a href="https://godbolt.org/z/TazozK8xe" rel="nofollow noreferrer">https://godbolt.org/z/TazozK8xe</a> and enabled address sanitizer.</p>
<p>Without reading your code and just by reading sanitizer logs you can see you have infinitive recursion (note number of stack frames is more then... | Anyone can tell me why it is giving runtime error | c++|recursion|graph|depth-first-search | 0 | 59 | 1 | 72,258,912 | 72,258,912 | 2 | true | 2022-05-16T11:50:52.623Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Anyone can tell me why it is giving runtime error<p>Question Link: <a href="https://leetcode.com/problems/coloring-a-border/" rel="nofollow noreferrer">LeetC... |
72,306,600 | How can I use different variables to calculate a new variable, depending on which variable has missing values?<p>I would like to create a variable <code>x</code> that is the product of variable <code>e</code> and one of the variables <code>a, b, c</code>, or <code>d</code>. The resulting variable should take the value ... | <p>You can use <code>coalesce()</code> from <code>dplyr</code> to find the first non-missing element.</p>
<pre class="lang-r prettyprint-override"><code>library(dplyr)
df %>%
mutate(x = e * coalesce(a, b, c, d))
# a b c d e x
# 1 1 NA NA 1 1 1
# 2 2 1 3 1 2 4
# 3 NA NA 3 1 3 9
# 4 NA 4 3 1 4... | How can I use different variables to calculate a new variable, depending on which variable has missing values? | r|dataframe|conditional-statements|na | 4 | 59 | 3 | 72,306,913 | 72,306,913 | 2 | true | 2022-05-19T14:41:57.333Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I use different variables to calculate a new variable, depending on which variable has missing values?<p>I would like to create a variable <code>x</c... |
72,251,592 | Use Stunnel to connect wss to wsServer<p>I am trying to use stunnel to turn a wss connection into a ws connection because <a href="https://github.com/Theldus/wsServer" rel="nofollow noreferrer">wsServer</a> doesn't support wss. The server is running Ubuntu, and the client I'm using is Chrome, if it matters.</p>
<p>Thi... | <p>Not a solution, but a next troubleshooting step. Get yourself openssl and attempt to connect to 8443. This should spit back the certificate information and at least confirm stunnel is presenting the certificate.</p>
<pre><code>openssl s_client -connect myurl.com:8443
</code></pre>
<p>It's been awhile since I configu... | Use Stunnel to connect wss to wsServer | ssl|websocket|stunnel | 2 | 59 | 1 | 72,251,726 | 72,251,726 | 3 | true | 2022-05-15T19:32:38.113Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Use Stunnel to connect wss to wsServer<p>I am trying to use stunnel to turn a wss connection into a ws connection because <a href="https://github.com/Theldus... |
72,285,308 | Sum up how many fields are empty or do not exist in a dict<p>I have a problem. I have a list <code>myList</code> inside these list, there a dictionaries. I want to count if the field <code>dataOriginSystem</code> is empty or does not exist. Unfortunately I got the wrong result. <code>if(key_nested == 'dataOriginSystem'... | <p>You don't have to loop through the keys. Access the item you want directly and increment the counter if the item is not found, or found but None.</p>
<pre><code>count = 0
for element in myList:
if element["metaData"].get("dataOriginSystem", None) is None:
count += 1
print(count)
</cod... | Sum up how many fields are empty or do not exist in a dict | python|list|dictionary | 3 | 59 | 3 | 72,285,381 | 72,285,381 | 3 | true | 2022-05-18T08:01:14.747Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Sum up how many fields are empty or do not exist in a dict<p>I have a problem. I have a list <code>myList</code> inside these list, there a dictionaries. I w... |
72,300,914 | What is the best way to write functions that does not use its parameter in JS?<p>Specifically, I am using react-semantic-ui's Select Form, which takes an onChange function. So I have defined my function as such:</p>
<pre><code>const handleInputChange = function handleInputChange(event, data){// does something with data... | <p>You must declare a parameter for every argument before the one you want to use.</p>
<p>The idiomatic approach to marking a parameter as unused is to prefix its name with an underscore.</p>
<pre><code>function handleInputChange(_event, data){
</code></pre>
<p>Some linters will recognise this and not emit a "unus... | What is the best way to write functions that does not use its parameter in JS? | javascript|reactjs | 0 | 59 | 2 | 72,300,980 | 72,300,980 | 3 | true | 2022-05-19T08:12:16.257Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What is the best way to write functions that does not use its parameter in JS?<p>Specifically, I am using react-semantic-ui's Select Form, which takes an onC... |
72,358,193 | Cant clear memory from using statement<p>I have tried to dispose and use the 'using' statement to prevent high memory usage. However, it perplexes me when my memory doesn't clear everything.</p>
<p>Below is the method where I save the bitmap pictures into an Excel worksheet.</p>
<p><strong>I ran 2 simulations</strong><... | <p>From the documentation of <a href="https://docs.microsoft.com/en-us/dotnet/api/system.drawing.bitmap.gethbitmap?view=dotnet-plat-ext-6.0#system-drawing-bitmap-gethbitmap" rel="nofollow noreferrer">GetHBitmap</a></p>
<blockquote>
<p>You are responsible for calling the GDI DeleteObject method to free the memory used b... | Cant clear memory from using statement | c#|memory-management|bitmap|dispose | 1 | 59 | 1 | 72,358,467 | 72,358,467 | 3 | true | 2022-05-24T06:35:29.027Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Cant clear memory from using statement<p>I have tried to dispose and use the 'using' statement to prevent high memory usage. However, it perplexes me when my... |
72,361,752 | Dispaly an array of objects from an API in React<p>I'm trying to display an array of information on my page but I'm stuck on how I should do it.</p>
<p>I believe that the problem is in how I'm trying to render it but I have already done so many tries that I run out of ideas.</p>
<p>In the console, I´m having success on... | <p>This might work if the the locations array has this structure</p>
<pre><code>import React, { useState } from 'react';
import { useNavigate } from "react-router-dom";
import axios from "axios";
const MyLocations = () => {
const [startDate, setStartDate] = useState("");
const [end... | Dispaly an array of objects from an API in React | javascript|reactjs | 0 | 59 | 2 | 72,362,050 | 72,362,050 | 3 | true | 2022-05-24T11:04:05.990Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Dispaly an array of objects from an API in React<p>I'm trying to display an array of information on my page but I'm stuck on how I should do it.</p>
<p>I bel... |
72,364,792 | In Kubernetes, how can i have an access mode to allow one pod at a time to write and many pods to read only?<p>I tried to define a PVC:</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: master-pvc
spec:
accessModes:
- ReadWriteOnce
- ReadOnlyMan... | <p>It is not a node that requests a <code>volumeMount</code>, but a container inside a Pod (many Pods may run in same node).</p>
<p>A PVC is 1-1 bound to a PV using a single access mode (even it supports many) at a time (see also <a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes" rel... | In Kubernetes, how can i have an access mode to allow one pod at a time to write and many pods to read only? | java|docker|kubernetes|microservices | 2 | 59 | 1 | 72,370,444 | 72,370,444 | 3 | true | 2022-05-24T14:34:21.830Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
In Kubernetes, how can i have an access mode to allow one pod at a time to write and many pods to read only?<p>I tried to define a PVC:</p>
<pre class="lang-... |
72,262,700 | How do I define a member function of a specialized template class?<p>I have a template class <code>ProcessPromise<T></code> and its specialization <code>ProcessPromise<void></code> that depends on <code>ProcessTask<T></code>:</p>
<pre><code>template<typename T>
struct ProcessTask;
template<t... | <p>Just remove the <code>template<></code> prefix as shown below:</p>
<pre><code>//no prefix template<> needed here
inline ProcessTask<void> ProcessPromise<void>::get_return_object()
{
return { };
}
</code></pre>
<p><a href="https://godbolt.org/z/jd3zerE5W" rel="nofollow noreferrer">Working... | How do I define a member function of a specialized template class? | c++|templates | 0 | 59 | 1 | 72,262,748 | 72,262,748 | 3 | true | 2022-05-16T16:40:54.077Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I define a member function of a specialized template class?<p>I have a template class <code>ProcessPromise<T></code> and its specialization <cod... |
72,400,859 | How to calculate Total working hours of employee by each session<p>I need to display employee login and logout hours for each session of the day and calculate Total Working hours. If the employee login and logout many times, each session and total should be displayed.</p>
<p>My table will be look like this</p>
<div cla... | <p>You can do this with an outer apply.<br />
I don't know what the OutType is used for, what the difference is with AccessType. You did not explain that or any other logic so I just assumed it should work on AccessType.<br />
If that is not the case you can easy adapt the logic in the subquery below.</p>
<pre><code>se... | How to calculate Total working hours of employee by each session | sql|sql-server | 0 | 59 | 1 | 72,401,397 | 72,401,397 | 3 | true | 2022-05-27T05:31:12.447Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to calculate Total working hours of employee by each session<p>I need to display employee login and logout hours for each session of the day and calculat... |
72,267,599 | How do I remove a specific string from some strings in a list?<p>I've been trying to figure out a more universal fix for my code and having a hard time with it. This is what I have:</p>
<pre><code>lst = ['Thursday, June ##', 'some string', 'another string', 'etc', 'Friday, June ##', 'more strings', 'etc']
</code></pre>... | <p>We can use a list comprehension along with <code>split()</code> here:</p>
<pre class="lang-py prettyprint-override"><code>lst = ['Thursday, June ##', 'some string', 'another string', 'etc', 'Friday, June ##', 'more strings', 'etc']
output = [x.split(',', 1)[0] for x in lst]
print(output)
# ['Thursday', 'some string'... | How do I remove a specific string from some strings in a list? | python | 0 | 59 | 3 | 72,267,619 | 72,267,619 | 3 | true | 2022-05-17T02:40:09.550Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I remove a specific string from some strings in a list?<p>I've been trying to figure out a more universal fix for my code and having a hard time with ... |
72,263,877 | List comprehension when there are repeated elements in both lists<p>I want to find all words that have a particular set of target letters. My code works when none of the letters in the target is repeated, but not if there are repeats.</p>
<p>Here is my code:</p>
<pre class="lang-py prettyprint-override"><code>target = ... | <p>This is a good use case for <code>collections.Counter()</code>. It gives us a clean way to check whether the desired overlap exists between a word in <code>target_words</code> and the <code>target</code>, accounting for duplicate letters (with a suggested improvement by <a href="https://stackoverflow.com/users/72126... | List comprehension when there are repeated elements in both lists | python|list-comprehension | 1 | 59 | 2 | 72,263,907 | 72,263,907 | 3 | true | 2022-05-16T18:21:14.507Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
List comprehension when there are repeated elements in both lists<p>I want to find all words that have a particular set of target letters. My code works when... |
72,391,002 | SQL - FILTER condition in JOIN clause<p>I am inserting data to an already existing <code>TableA</code> and the following query is a part of a stored procedure. This part of the query inserts values into some columns of <code>TableA</code>. The stored procedure is very lengthy which has several insert statements to fill... | <p>It's the same as this...</p>
<pre><code>SELECT DISTINCT
ID, Event, Date, Amount, c.Status, b.Country
FROM
(
TableA1 a
INNER JOIN
TableB1 b
ON b.employeeID = a.ID
)
CROSS JOIN
(
SELECT * FROM TableC1 WHERE Status = 'Active'
)
c
</code></pre>
<p>In effect, the <code>INNER JOIN</code> is resolved... | SQL - FILTER condition in JOIN clause | sql | -1 | 59 | 1 | 72,391,080 | 72,391,080 | 3 | true | 2022-05-26T11:21:20.467Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SQL - FILTER condition in JOIN clause<p>I am inserting data to an already existing <code>TableA</code> and the following query is a part of a stored procedur... |
72,371,571 | keeping track of injected variables when using string interpolation in kotlin<p>I'm looking for a way to keep track of variables used when doing a string interpolation without parsing the string. For example, if I have a string:</p>
<pre class="lang-kotlin prettyprint-override"><code>val expStr = "${var1} some oth... | <p>I have implemented a "ContainerClass" to achieve your goal. I uses <code>String.format</code> instead of string templates so that I don't need prior information of the input.</p>
<pre><code>class StringNode(private val format: String, vararg args : Any) {
private val argv = args
override fun toStr... | keeping track of injected variables when using string interpolation in kotlin | kotlin|string-interpolation | 0 | 59 | 2 | 72,371,985 | 72,371,985 | 3 | true | 2022-05-25T03:10:02.797Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
keeping track of injected variables when using string interpolation in kotlin<p>I'm looking for a way to keep track of variables used when doing a string int... |
72,374,852 | Testing an infinite sequence with NUnit, but only a finite sequence must be checked<p>I have an Extension Method that extract the numbers in a list of strings (bbb1, da21ds, dsa231djsla90 ==> 1, 21, 23190):</p>
<pre><code> public static int[] GetContainedNumbers(this string[] source)
{
if (source == n... | <p>I believe the purpose of this exercise is to investigate <em>lazy evaluation</em>.</p>
<p>Currently your method accepts a <code>string[]</code> and returns an <code>int[]</code> - but there's nothing in the question that says it <em>has</em> to do that.</p>
<p>If instead you were to write an extension method accepti... | Testing an infinite sequence with NUnit, but only a finite sequence must be checked | c#|.net-core|nunit | 1 | 59 | 1 | 72,375,225 | 72,375,225 | 3 | true | 2022-05-25T09:13:08.843Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Testing an infinite sequence with NUnit, but only a finite sequence must be checked<p>I have an Extension Method that extract the numbers in a list of string... |
72,251,418 | Get the key of an hashmap when the values are list<p>I have a list of orders(order id) <code>List<Integer>order</code> with Integer values in it.
I also have a Hashmap of the form <code><String, List<Integer>></code> which contains the customer names as keys and for each one a list of orders as values... | <p>Stream over your map entries, filter entries having values having any match with elements of your order list, map to key and collect to list:</p>
<pre><code>List<String> res = hashmap.entrySet().stream()
.filter(e -> e.getValue().stream().anyMatch(order::contains))
... | Get the key of an hashmap when the values are list | java|arraylist | 1 | 59 | 3 | 72,251,617 | 72,251,617 | 3 | true | 2022-05-15T19:07:47.377Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Get the key of an hashmap when the values are list<p>I have a list of orders(order id) <code>List<Integer>order</code> with Integer values in it.
I als... |
72,399,641 | Why does this function return True for this variable?<p>Taking an online course on python and the assignment was to break the loop and make the function work properly. While I was able to solve the problem, I did not understand why the function returns (and is supposed to) "True" for number 8.</p>
<p>Could yo... | <p>"If" and "while" don't mean quite the same thing, either in English or in Python (in English the difference is similar to <a href="https://www.englishcurrent.com/grammar/difference-while-when-conjunctions/" rel="nofollow noreferrer">"when" vs "while"</a>).</p>
<p>The <code>whi... | Why does this function return True for this variable? | python|python-3.x|while-loop | 0 | 59 | 1 | 72,399,658 | 72,399,658 | 3 | true | 2022-05-27T01:44:54.057Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why does this function return True for this variable?<p>Taking an online course on python and the assignment was to break the loop and make the function work... |
72,281,715 | Replace integers in a data frame column with other integers in R?<p>I want to replace a vector in a dataframe that contains only 4 numbers to specific numbers as shown below</p>
<pre><code>tt <- rep(c(1,2,3,4), each = 10)
df <- data.frame(tt)
</code></pre>
<p>I want to replace <code>1 = 10; 2 = 200, 3 = 458, 4 =... | <p>You could use <code>recode</code> from <code>dplyr</code>. Note that the old values are written as character. And the new values are integers since the original column was integer:</p>
<pre><code>library(tidyverse):
df %>%
mutate(tt = recode(tt, '1'= 10, '2' = 200, '3' = 458, '4' = -0.1))
tt
1 10.0
2 ... | Replace integers in a data frame column with other integers in R? | r|vector | 0 | 59 | 2 | 72,281,964 | 72,281,964 | 4 | true | 2022-05-17T23:27:48.193Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Replace integers in a data frame column with other integers in R?<p>I want to replace a vector in a dataframe that contains only 4 numbers to specific number... |
72,324,137 | Why would we ever want to use git add -u?<p>If I understand difference options for git add correctly, git add -u only adds modified and deleted files to the staging area, whereas git add . adds not only modified and deleted files but also untracked files. So I was wondering why we would ever wanna use git add -u when t... | <p>I use it a lot:</p>
<ul>
<li><p>If <code>git status</code> tells me that there are various modified files that are not staged for commit, and I want to add exactly those files, <code>git add -u</code> adds exactly those files without me having to think about it.</p>
</li>
<li><p>If <code>git status</code> tells me t... | Why would we ever want to use git add -u? | git | 0 | 59 | 2 | 72,324,558 | 72,324,558 | 4 | true | 2022-05-20T19:48:23.607Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why would we ever want to use git add -u?<p>If I understand difference options for git add correctly, git add -u only adds modified and deleted files to the ... |
72,388,213 | Oracle apex - disable notification on modal page from page 0<p>On global page (page 0) I have content for global notification. But when open modal page over standard page I have double notification top of page in background and top of modal page.</p>
<p>Is it possible disable notification on modal page only appear on s... | <p>I don't know how to do it for <em>modal pages</em> (as "page type"), but - see if the following suggestion helps.</p>
<p>As objects on page 0 affect all pages, set notification's <strong>Server side condition</strong> not to display on certain page numbers. For example, if you don't want to see it on pages... | Oracle apex - disable notification on modal page from page 0 | oracle|oracle-apex | 1 | 59 | 1 | 72,388,278 | 72,388,278 | 4 | true | 2022-05-26T07:22:35.023Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Oracle apex - disable notification on modal page from page 0<p>On global page (page 0) I have content for global notification. But when open modal page over ... |
72,335,271 | accessing the first value of the vector in dataframe R<p>I have a dataframe which consists of various variables and one particular column that has a vector in it. Is there some code to replace the value to the first vector that is found within the column?</p>
<div class="s-table-container">
<table class="s-table">
<the... | <p>You could loop through the vector using <code>sapply</code> and extracting the first value:</p>
<pre><code>df$Fees <- sapply(df$Fees, "[[", 1)
</code></pre> | accessing the first value of the vector in dataframe R | r|dataframe | 1 | 59 | 4 | 72,335,295 | 72,335,295 | 5 | true | 2022-05-22T06:25:28.150Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
accessing the first value of the vector in dataframe R<p>I have a dataframe which consists of various variables and one particular column that has a vector i... |
72,362,744 | GridView only create Images when they would be visible<p>Hei there</p>
<p>So I have the following problem. I have around 1500 images of playing cards. I want to display them in a "Gallery" where you could scroll through them. I was able to create a GridView with the ImageCell object and I was also able to add... | <p>You might not need to use the strategy you describe. You're displaying the images in cells of size 340x512, which is 174,080 pixels. Image storage is 4 bytes per pixel, so this is 696,320 bytes per image; 1500 of them will consume about 1GB. You just need to make sure you load the image at the size you are displayin... | GridView only create Images when they would be visible | java|javafx|gridview|controlsfx | 4 | 59 | 1 | 72,365,177 | 72,365,177 | 5 | true | 2022-05-24T12:17:05.223Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
GridView only create Images when they would be visible<p>Hei there</p>
<p>So I have the following problem. I have around 1500 images of playing cards. I want... |
72,292,752 | Extract all numbers from 1 cell to many cells<p>I have a field with numbers separated by two different characters. I am attempting to split these numbers in to their own field.</p>
<p>Current Data Example:</p>
<pre><code>A
----
25-29
18-20,22,2
3,6
5,16-19
2-5,9-12
1,2,3,4
</code></pre>
<p>Expected Results</p>
<p>B-E w... | <p>With the newest ms365's BETA-functions, you could try:</p>
<p><a href="https://i.stack.imgur.com/94b7V.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/94b7V.gif" alt="enter image description here" /></a></p>
<p>Formula in <code>B1</code>:</p>
<pre><code>=LET(X,TEXTSPLIT(SUBSTITUTE(A1,"-"... | Extract all numbers from 1 cell to many cells | excel|excel-formula | 1 | 59 | 1 | 72,293,199 | 72,293,199 | 5 | true | 2022-05-18T16:21:19.807Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Extract all numbers from 1 cell to many cells<p>I have a field with numbers separated by two different characters. I am attempting to split these numbers in ... |
72,284,196 | How to know how much memory our object uses?<p>I know that int uses 32 bits. Long uses 64 bits and etc... But, how can we know how much memory our object uses? I have a class like this:</p>
<pre><code>class Utils{
public String getName(Context context){
return "Sambhav"
}
}
</code></pre>
<p>Now, h... | <p>You can't. You can only do some very rough estimates. It depends on the version of your JRE.</p>
<ul>
<li>Every instance has a minimum memory footprint for management information like a reference to the defining class, maybe 16 bytes.</li>
<li>For every instance field, add the "size" of that field, plus so... | How to know how much memory our object uses? | java|memory|memory-management | -2 | 59 | 1 | 72,284,559 | 72,284,559 | -1 | true | 2022-05-18T06:33:26.817Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to know how much memory our object uses?<p>I know that int uses 32 bits. Long uses 64 bits and etc... But, how can we know how much memory our object use... |
72,316,547 | How can I use the google maps API with a currently-valid version?<p>I've got an app that incorporates google maps. I call in the library with:</p>
<p>src="https://maps.googleapis.com/maps/api/js?v=[VERSION]&key=[MYKEY]&sensor=false"</p>
<p>It ran OK for a year or so then one day raised a script error.... | <p>I would suggest updating the other parameters you're sending. Google Maps API currently <strong>requires</strong> 2 URL Params:</p>
<p><code>key</code>: Your API key. The Maps JavaScript API will not load unless a valid API key is specified.</p>
<p><code>callback</code>: The name of a global function to be called on... | How can I use the google maps API with a currently-valid version? | javascript|google-maps | -2 | 59 | 1 | 72,316,736 | 72,316,736 | -1 | true | 2022-05-20T09:23:47.853Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I use the google maps API with a currently-valid version?<p>I've got an app that incorporates google maps. I call in the library with:</p>
<p>src=&qu... |
72,913,075 | Python flaml autoML doesn't pick up the monotone and interaction constraints<p>In Python, I have trained a flaml autoML (at the moment I am only interested in training an XGBoost for a classification problem for which the binary target is called <code>y_train</code> and the set of predictive features is called <code>X_... | <p>The form of your constraints may be off. Per <a href="https://microsoft.github.io/FLAML/docs/reference/automl/" rel="nofollow noreferrer">the doc</a>, it should be of the form <code>custom_hp = {'<model name>': {'<parameter name>': {'domain'=<parameter value(s)>} } }</code>
So maybe try</p>
<pre><... | Python flaml autoML doesn't pick up the monotone and interaction constraints | python|constraints|xgboost|automl | 0 | 59 | 1 | 73,125,685 | 73,125,685 | 1 | true | 2022-07-08T14:39:36.463Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python flaml autoML doesn't pick up the monotone and interaction constraints<p>In Python, I have trained a flaml autoML (at the moment I am only interested i... |
73,028,767 | Passing function to throw Stack.Screen in react navigation<p>I'm attempting to pass a <code>useState</code> function between screens. I receive this function on the <code>App.tsx</code> and I passed it to the Navigator handler, to I can pass the set parameter into the signInScreen.
<br>This is the app.tsx:</p>
<pre><co... | <p>In the <code>AuthRoutes</code>-file you are passing the hook <code>setIsAuthenticated</code> inside the <code>options</code> of the <code>Navigator.Screen</code> instead of a prop to the <code>SingIn</code>-component itself. Try to re-factor AuthRoutes to this:</p>
<p><div class="snippet" data-lang="js" data-hide="f... | Passing function to throw Stack.Screen in react navigation | javascript|typescript|react-native|react-navigation | 0 | 59 | 1 | 73,029,895 | 73,029,895 | 1 | true | 2022-07-18T21:20:21.380Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Passing function to throw Stack.Screen in react navigation<p>I'm attempting to pass a <code>useState</code> function between screens. I receive this function... |
72,807,191 | How to find all words that "contain" or "unscramble" an input string using a Trie?<p>Here is a <a href="https://gist.github.com/tpae/72e1c54471e88b689f85ad2b3940a8f0" rel="nofollow noreferrer">trie</a> made to work on alphabets/scripts from any language.</p>
<pre><code>class TrieNode {
constructor(key) {
// the &... | <p>Here is an answer to unscrambles that ALSO handles pagination. It actually returns <code>[words, startOfNextPage]</code>. So to find the next page you call it starting at <code>startOfNextPage</code>.</p>
<p>The idea is to normalize words by sorting the letters, and then storing the word in the trie once. When se... | How to find all words that "contain" or "unscramble" an input string using a Trie? | string|algorithm|data-structures|trie | 0 | 59 | 2 | 72,811,171 | 72,811,171 | 1 | true | 2022-06-29T20:01:22.890Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to find all words that "contain" or "unscramble" an input string using a Trie?<p>Here is a <a href="https://gist.github.com/tpae/72e1c54471e88b689f85ad2b... |
72,811,622 | How can I access the value of a variable using it's JsonProperty attribute in a C# class?<p>I have this class:</p>
<pre class="lang-cs prettyprint-override"><code>public class Configuration
{
[JsonProperty("B_C.Parameter.fixtureHeight")]
public string BCParameterfixtureHeight { get; set; }
}
</code></pr... | <p>The brackets you put around <code>config</code> are the problem.</p>
<p>You should write:</p>
<pre><code>var a = config.GetType() //...
</code></pre>
<p><strong>EDIT:</strong></p>
<p>As Chris Schaller mentionned in the comments, you can fix your initial errors by giving the expeted arguments to <code>GetCustomAttrib... | How can I access the value of a variable using it's JsonProperty attribute in a C# class? | c# | -1 | 59 | 1 | 72,811,698 | 72,811,698 | 1 | true | 2022-06-30T07:09:40.643Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I access the value of a variable using it's JsonProperty attribute in a C# class?<p>I have this class:</p>
<pre class="lang-cs prettyprint-override">... |
72,781,021 | Vue promise error, I am having error with promise<p>While the same method works just fine with another api call, fetch from this api is getting me error on promise. the error reads
<code>Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'json')</code></p>
<p>My fetch code reads as below:</p>... | <p>You can put your async call in function and call it, or you can use <code>onMounted</code> hook:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>const { ref, onMounted } = V... | Vue promise error, I am having error with promise | javascript|json|vue.js|vuejs3 | 0 | 59 | 1 | 72,781,285 | 72,781,285 | 1 | true | 2022-06-28T05:12:27.707Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Vue promise error, I am having error with promise<p>While the same method works just fine with another api call, fetch from this api is getting me error on p... |
72,979,712 | Immutable struct's value is changing<p>this is an odd problem I have been having. Essentially, I am inadvertently changing the value of a field of an immutable struct and I have no idea how! I have created a reproducible problem, although it is a bit long, so please bear with.</p>
<p>Suppose we have a vector of points,... | <p>You need to make the distinction between your <code>struct</code> which is indeed immutable, and your <code>array</code> of <code>struct</code> which is mutable.</p>
<pre><code>julia> struct Point
x::Float64
y::Float64
end
julia> p = Point(1,2)
Point(1.0, 2.0)
julia> p.x = 3
E... | Immutable struct's value is changing | vector|struct|types|julia|immutability | 1 | 59 | 2 | 72,994,288 | 72,994,288 | 1 | true | 2022-07-14T11:21:47.743Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Immutable struct's value is changing<p>this is an odd problem I have been having. Essentially, I am inadvertently changing the value of a field of an immutab... |
72,950,519 | TYPO3 DDEV installation upload to server<p>I have a local ddev based TYPO3 site. If I want to upload it on my apache server there is some path issues with the resource files like JS,CSS and images.</p>
<p>This is the path for the css file on my local server... this works perfect:<br />
<code>typo3conf/ext/sitepackage/... | <p><a href="https://usetypo3.com/composer-changes-for-typo3-v11-and-v12.html" rel="nofollow noreferrer">This article</a> describes your issue probably.</p>
<p>The main issue if you want to keep the old structure is to use</p>
<pre><code>"typo3/cms-composer-installers": "^2.0 || ^3.0"
</code></pre>
<... | TYPO3 DDEV installation upload to server | typo3|typo3-9.x|typo3-extensions|ddev | 1 | 59 | 1 | 72,951,799 | 72,951,799 | 1 | true | 2022-07-12T10:04:18.880Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
TYPO3 DDEV installation upload to server<p>I have a local ddev based TYPO3 site. If I want to upload it on my apache server there is some path issues with th... |
72,979,328 | Intellij - Spring Retry @Recover method marked as unused<p>When using Spring Retry @Recover method (which works ok) IntelliJ always marking method as unused and suggest to safe delete</p>
<pre><code>@Recover
public void recover(RetryableException e, String param1) {
//recover
}
@Retryable(include = RetryableExcepti... | <p>Method declarations looks ok but as you haven't shared any further details, it is mostly because you are not throwing <code>RetryableException</code> from your <code>retryable</code> method.</p>
<p>To invoke recovery after retries, your retry must throw type of exception which you have defined as <code>recover</code... | Intellij - Spring Retry @Recover method marked as unused | java|spring|intellij-idea|spring-retry|unused-functions | 1 | 59 | 1 | 72,979,463 | 72,979,463 | 1 | true | 2022-07-14T10:53:20.443Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Intellij - Spring Retry @Recover method marked as unused<p>When using Spring Retry @Recover method (which works ok) IntelliJ always marking method as unused ... |
72,829,802 | Web Scraping returns empty in R<p>I'm trying to scrape prices from <a href="https://www.bloomberg.com/quote/WORLD:IND" rel="nofollow noreferrer">Bloomberg</a>. I can get the current price as shown below but can't get the previous price. What's the wrong?</p>
<pre><code>library(rvest)
url <- "https://www.bloomb... | <p>So, there are at least two initial options:</p>
<ol>
<li>Extract from the script tag where that info is pulled from. When browser runs JavaScript this info is used to populate the page as you see it. With rvest/httr, JavaScript is not run, so you would need to extract from the script tag, rather than where it ends u... | Web Scraping returns empty in R | r|web-scraping|rvest | -1 | 59 | 1 | 72,835,620 | 72,835,620 | 1 | true | 2022-07-01T13:09:56.397Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Web Scraping returns empty in R<p>I'm trying to scrape prices from <a href="https://www.bloomberg.com/quote/WORLD:IND" rel="nofollow noreferrer">Bloomberg</a... |
72,792,845 | Shorthand/shortcuts for IF statements excel/spreadsheet<p>I have about a hundred nested functions that defines the value of a cell.</p>
<p>I want to add another one that make that nested one return 0 under certain conditions, and itself under other.</p>
<p>Which means that in a single cell, my if statement becomes:</p>... | <p>There isn't a specific shorthand. But in numeric outputs,<code>TEXT</code> function maybe used. So,</p>
<pre><code>=If([one_hundred_nested_functions]<0,[one_hundred_nested_functions],0)
</code></pre>
<p>can be simplified to:</p>
<pre><code>=TEXT([one_hundred_nested_functions],"\0;-#.0")*1
</code></pre>... | Shorthand/shortcuts for IF statements excel/spreadsheet | excel|vba|google-apps-script|google-sheets|spreadsheet | 0 | 59 | 1 | 72,792,910 | 72,792,910 | 1 | true | 2022-06-28T20:31:23.130Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Shorthand/shortcuts for IF statements excel/spreadsheet<p>I have about a hundred nested functions that defines the value of a cell.</p>
<p>I want to add anot... |
72,998,250 | How to scrape keywords that change every time?<p>I am trying to scrape a keyword in an xml document with BeautifulSoup but am unsure how to do so.</p>
<p>The xml document contains "Central Index Key," which changes each time for each document scraped. How would I be able to log the central index key for every... | <pre><code>from bs4 import BeautifulSoup
import requests
headers = {'User-Agent': 'Sample Company Name AdminContact@<sample company domain>.com'}
r = requests.get('https://www.sec.gov/Archives/edgar/data/1773427/000110465922079974/0001104659-22-079974.txt', headers=headers)
soup = BeautifulSoup(r.text, 'lxml')
p... | How to scrape keywords that change every time? | python|xml|web-scraping|beautifulsoup|rss | 1 | 59 | 2 | 72,998,517 | 72,998,517 | 1 | true | 2022-07-15T18:24:45.387Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to scrape keywords that change every time?<p>I am trying to scrape a keyword in an xml document with BeautifulSoup but am unsure how to do so.</p>
<p>The... |
72,281,238 | Broken OTF file in p5<p>When adding a custom font to my project, it bunches up to the left. There's no way from my -albeit brief- search to change the spread of the letters within the code. I could make a new text function every time I want a letter, but that would be extremely inefficient.
Here's some test code:
let n... | <h3>1. Try converting the font to fix compatibility</h3>
<p>The font is not a standard compliant .otf (or CFF based Open Type).</p>
<p>It has a non standard 2048 units per em.<br />
Typically used for truetype (open type) fonts – whereas CFF (otf) open types use 1000 units per em.</p>
<p>A quick fix would be to convert... | Broken OTF file in p5 | javascript|fonts|p5.js | 0 | 59 | 1 | 72,850,565 | 72,850,565 | 1 | true | 2022-05-17T22:15:47.083Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Broken OTF file in p5<p>When adding a custom font to my project, it bunches up to the left. There's no way from my -albeit brief- search to change the spread... |
72,783,079 | Can someone please explain why I'm getting a seg fault error<p>This code compiles successfully but when I debug it shows a SIGSEV seg fault error. Can someone help please?</p>
<pre class="lang-c prettyprint-override"><code>char *_strdup(char *str)
{
int i, size = 0;
char *mp;
if (str == NULL)
{
ret... | <p>First, just because it compiles successfully, this does not mean that your code is correct. It just means that <em>syntactically</em> the compiler is fine. I hope you use the maximum warning level and correct your code until all warnings and errors are gone.</p>
<p>You have multiple problems:</p>
<ol>
<li><p>You see... | Can someone please explain why I'm getting a seg fault error | c|debugging | 0 | 59 | 2 | 72,783,854 | 72,783,854 | 2 | true | 2022-06-28T08:23:55.823Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Can someone please explain why I'm getting a seg fault error<p>This code compiles successfully but when I debug it shows a SIGSEV seg fault error. Can someon... |
72,785,939 | Apple Pay, Can we use one merchant id for multiple apps?<p>We are building one e-commerce project with multiple targets(apps), my question is can we use one merchant id for all of our apps?</p> | <blockquote>
<p>To enable your app to use Apple Pay, register an identifier with Apple that uniquely identifies your business as a merchant able to accept payments. <strong>This ID</strong> never expires, and <strong>can be used in multiple websites and apps.</strong></p>
</blockquote>
<p>See <a href="https://developer... | Apple Pay, Can we use one merchant id for multiple apps? | ios|swift|iphone | 0 | 59 | 1 | 72,786,151 | 72,786,151 | 2 | true | 2022-06-28T11:54:17.863Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Apple Pay, Can we use one merchant id for multiple apps?<p>We are building one e-commerce project with multiple targets(apps), my question is can we use one ... |
72,787,653 | Javascript: map Array of Objects with unknown keys<p>I have an array of objects with keys that have different names.</p>
<pre><code> let array = [{"obj1": 1, "obj2": 2}, {"obj3": 3}]
</code></pre>
<p>I want to be able to display on the front (react-native) the key and the value. I tried... | <p>Try this:</p>
<pre><code>{array.map(item => (
<div>
{Object.entries(item).map(([key, val]) => {
return (
<Text>
{key} = {val}
</Text>
)
})}
</div>
))}
</code></pre>
<p>Note: please add <a href="https://reactjs.org/docs/lists-and-keys.ht... | Javascript: map Array of Objects with unknown keys | javascript|react-native | 0 | 59 | 2 | 72,787,745 | 72,787,745 | 2 | true | 2022-06-28T13:49:23.017Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Javascript: map Array of Objects with unknown keys<p>I have an array of objects with keys that have different names.</p>
<pre><code> let array = [{"o... |
72,834,243 | Batch renaming a single file (always same file name) within a folder to the folder name (100s of folders)<p>I'm currently trying to convert a file that is contained within my Ulysses export (= a bunch of textbundle files). So, once I export all my sheets from my Ulysses (Markdown App), I'll have the following files (sl... | <p>Suppose you have a folder with content along these lines:</p>
<pre class="lang-none prettyprint-override"><code>$ tree -N
.
|-- name 1.textbundle
| `-- text.md
|-- name 2.something
| `-- text.md
|-- name 3.textbundle
| `-- text.md
|-- name4.textbundle
| `-- text.md
`-- name5.textbundle
`-- text.md
5 dir... | Batch renaming a single file (always same file name) within a folder to the folder name (100s of folders) | bash|applescript|batch-rename | 0 | 59 | 1 | 72,835,798 | 72,835,798 | 2 | true | 2022-07-01T20:14:58.820Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Batch renaming a single file (always same file name) within a folder to the folder name (100s of folders)<p>I'm currently trying to convert a file that is co... |
72,843,787 | How to close JFrame without closing another<p>I know this question has been addressed many times, but I tried everything to make it work properly. First and foremost, I create a JDialog as my loading pop-up when the user login is legitimate. Then I create a Timer to automatically dismiss the frame, and my main menu app... | <p>This...</p>
<pre><code>LoginForm exit = new LoginForm();
exit.dispatchEvent(new WindowEvent(exit, WindowEvent.WINDOW_CLOSING));
</code></pre>
<p>makes no sense at all, the instance of <code>LoginForm</code> you've created here has nothing to do with the one which was created eailier, in fact, <code>Loading</code> ha... | How to close JFrame without closing another | java|swing | 0 | 59 | 1 | 72,844,003 | 72,844,003 | 2 | true | 2022-07-03T03:42:22.040Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to close JFrame without closing another<p>I know this question has been addressed many times, but I tried everything to make it work properly. First and ... |
72,844,253 | Find Path to Files containing specific word - How can I know which file in a directory contain the specific word that I want?<p>I manage to find the word that I desire with the following command in a github repository</p>
<pre><code>git log --all -p | grep 'abc'
</code></pre>
<p><code>abc</code> is a word located in a ... | <pre><code>git grep -l 'abc'
</code></pre>
<p>Option <a href="https://git-scm.com/docs/git-grep#Documentation/git-grep.txt--l" rel="nofollow noreferrer"><code>-l</code></a> list file names where the pattern is found in the current (<code>HEAD</code>) commit.</p> | Find Path to Files containing specific word - How can I know which file in a directory contain the specific word that I want? | bash|git|shell|grep | 1 | 59 | 3 | 72,844,568 | 72,844,568 | 2 | true | 2022-07-03T06:04:43.357Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Find Path to Files containing specific word - How can I know which file in a directory contain the specific word that I want?<p>I manage to find the word tha... |
72,856,560 | How to detect classname with onclick event<p>I want to be able to click on an element and then depending on whether it has a specific class name, do something.</p>
<p>Here is what I have so far:</p>
<pre><code><div class="my-class" onclick="myFunction()"/>
</code></pre>
<pre><code>function myF... | <p>You need to pass the click event then get the target element which in this case is the clicked element.</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>function myFunction(e... | How to detect classname with onclick event | javascript|html|css | 0 | 59 | 3 | 72,856,734 | 72,856,734 | 2 | true | 2022-07-04T12:12:57.440Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to detect classname with onclick event<p>I want to be able to click on an element and then depending on whether it has a specific class name, do somethin... |
72,861,228 | How to slice every element of array in React<p>I have an array of elements: [AdsAyush, AdsFace, AdsKicks, AdsMac]
I want to slice every element of this array (<strong>remove Ads</strong>) and get the result as [Ayush, Face, Kicks, Mac].</p>
<p>How can I slice the "Ads" from every element of this array.</p>
<p... | <p>You can use the function <code>Array.prototype.map</code> as follows.</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>const array = ["AdsAyush", "AdsFace", "AdsKicks", "AdsM... | How to slice every element of array in React | javascript|arrays | 2 | 59 | 1 | 72,861,260 | 72,861,260 | 2 | true | 2022-07-04T19:25:49.417Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to slice every element of array in React<p>I have an array of elements: [AdsAyush, AdsFace, AdsKicks, AdsMac]
I want to slice every element of this array... |
72,863,199 | How to check if tuple includes a particular type inside a conditional type?<p>As of TypeScript 4.2, it's <a href="https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-2.html#leadingmiddle-rest-elements-in-tuple-types" rel="nofollow noreferrer">trivial</a> to check if a tuple type begins or ends with ... | <p>Here is one possible approach:</p>
<pre><code>type IncludesString<T extends any[]> =
{ [I in keyof T]: T[I] extends string ? unknown : never }[number] extends
never ? false : true;
</code></pre>
<p>The idea is that we want to <a href="https://www.typescriptlang.org/docs/handbook/release-notes/typescrip... | How to check if tuple includes a particular type inside a conditional type? | typescript | 1 | 59 | 1 | 72,869,133 | 72,869,133 | 2 | true | 2022-07-05T01:32:16.317Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to check if tuple includes a particular type inside a conditional type?<p>As of TypeScript 4.2, it's <a href="https://www.typescriptlang.org/docs/handboo... |
72,872,414 | Flatten Nested Array and Aggregate in Snowflake<p>My table column has nested arrays in a Snowflake database. I want to perform some aggregations using SQL (Snowflake SQL).</p>
<p>My table name is: DATA</p>
<p>The PROJ column is of VARIANT data type. The nested arrays will not always be 3, and I demonstrated that in the... | <p>First the nested array should be flattened, then Index is the first element of subarray and Value is the second element(array is 0-based):</p>
<pre><code>CREATE OR REPLACE TABLE DATA
AS
SELECT 1 AS ID, [[0, 4], [1, 30], [10, 20]] AS PROJ UNION
SELECT 2 AS ID, [[0, 2], [1, 20]] AS PROJ UNION
SELECT 3 AS... | Flatten Nested Array and Aggregate in Snowflake | sql|snowflake-cloud-data-platform | 1 | 59 | 1 | 72,872,604 | 72,872,604 | 2 | true | 2022-07-05T15:59:40.660Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Flatten Nested Array and Aggregate in Snowflake<p>My table column has nested arrays in a Snowflake database. I want to perform some aggregations using SQL (S... |
72,875,615 | adding quantity_inputs after woocommerce_loop_add_to_cart_link hook without calling it<p>I added a code in function.php to add quantity section after add to cart in all pages.</p>
<p>But I don't want to add it also in wishlist page,</p>
<p>So I make it like this:</p>
<pre><code>add_filter( 'woocommerce_loop_add_to_cart... | <p>You need to add <code>return $html;</code> at the bottom like this</p>
<pre><code>add_filter( 'woocommerce_loop_add_to_cart_link', 'quantity_inputs_for_woocommerce_loop_add_to_cart_link', 10, 2 );
function quantity_inputs_for_woocommerce_loop_add_to_cart_link( $html, $product ) {
if (!is_page('wishlist')) {
... | adding quantity_inputs after woocommerce_loop_add_to_cart_link hook without calling it | php|wordpress|woocommerce|hook-woocommerce | 2 | 59 | 1 | 72,876,038 | 72,876,038 | 2 | true | 2022-07-05T21:16:17.313Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
adding quantity_inputs after woocommerce_loop_add_to_cart_link hook without calling it<p>I added a code in function.php to add quantity section after add to ... |
72,877,509 | An action of type 'WHEN MATCHED' cannot appear more than once in a 'UPDATE' clause of a MERGE statement<p>I get this error when I try to do action type of WHEN MATCHED more than once. I have read a few answers and articles on why this happens and MSDN doesn't allow WHEN MATCHED unless its a delete or update with the st... | <p>Use <code>CASE</code> expressions in your update based on the condition you currently have as part of your 'MATCHED' branch. i.e. for the ones you only update in one branch use the case expression to either update it, or leave it the same. Here is an example of one of your columns.</p>
<pre><code>[Target].[LinkyCode... | An action of type 'WHEN MATCHED' cannot appear more than once in a 'UPDATE' clause of a MERGE statement | sql|sql-server | 2 | 59 | 2 | 72,877,540 | 72,877,540 | 2 | true | 2022-07-06T03:01:35.583Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
An action of type 'WHEN MATCHED' cannot appear more than once in a 'UPDATE' clause of a MERGE statement<p>I get this error when I try to do action type of WH... |
72,876,300 | Return subset elements of list by condition (include string) python pandas<p>Assuming I'm dealing with this dataframe:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>Element List</th>
</tr>
</thead>
<tbody>
<tr>
<td>[123, 1234, abc-123, abc-1234]</td>
</tr>
<tr>
<td>[abc-321]</td>
</tr>
<t... | <p>Try:</p>
<pre class="lang-py prettyprint-override"><code>mask = pd.notna(df["Element List"])
df[["abc", "Others"]] = df.loc[mask, "Element List"].apply(
lambda x: pd.Series(
{
"abc": [v for v in x if v.startswith("abc")] or np.nan,
... | Return subset elements of list by condition (include string) python pandas | pandas|list|if-statement | 3 | 59 | 1 | 72,878,556 | 72,878,556 | 2 | true | 2022-07-05T22:48:07.337Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Return subset elements of list by condition (include string) python pandas<p>Assuming I'm dealing with this dataframe:</p>
<div class="s-table-container">
<t... |
72,879,405 | Can an API in .NET Core 3.1 be made a client of a SignalR hub?<p>I am developing an application in Xamarin which connects to both a .Net Core 3.1 API and a SignalR server with its corresponding hub. Right now I launch the request to send a notification from the Xamarin application itself, but I would like this request ... | <p>You can send various notifications to the clients after injecting HubContext in your API. You can inject it for example in your controller class :</p>
<pre><code>public class MyController()
{
private readonly IHubContext<MyHub> hub;
public MyController(IHubContext<MyHub> hub)
{
this.... | Can an API in .NET Core 3.1 be made a client of a SignalR hub? | .net-core|signalr|signalr-hub | 1 | 59 | 1 | 72,882,474 | 72,882,474 | 2 | true | 2022-07-06T07:24:26.423Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Can an API in .NET Core 3.1 be made a client of a SignalR hub?<p>I am developing an application in Xamarin which connects to both a .Net Core 3.1 API and a S... |
72,898,019 | How to check if a string is only made-up from a list of words?<p>I have a list of words:</p>
<pre><code>words = ['ABC', 'CDE', 'EFG']
</code></pre>
<p>How to check that my string only consists words from that list? For example, <code>'EFG CDE'</code> results <code>True</code> since both <code>'CDE'</code> and <code>'EF... | <p>Here's how I would do it:</p>
<pre><code>allowed_words = set(['ABC','CDE','EFG'])
target_string = 'EFG EFG CDE'
print(all(word in allowed_words for word in target_string.split()))
</code></pre> | How to check if a string is only made-up from a list of words? | python|string | 1 | 59 | 3 | 72,898,085 | 72,898,085 | 2 | true | 2022-07-07T12:43:42.550Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to check if a string is only made-up from a list of words?<p>I have a list of words:</p>
<pre><code>words = ['ABC', 'CDE', 'EFG']
</code></pre>
<p>How to... |
72,920,862 | Why does template ordering matter when defining a method?<p>I have the following code:</p>
<pre><code>template<int n>
struct array_container{double arr[n];};
template<int n>
struct avg{
double first[n], second[n];
template <int q>
array_container<q> get_avg(double p) const;
};
</cod... | <blockquote>
<p>Why is this so?</p>
</blockquote>
<p>Because when providing an <strong>out-of-class definition</strong> the first parameter clause <code>template<int n></code> corresponds to the outermost enclosing class template while the second parameter clause <code>template<int q></code> corresponds to ... | Why does template ordering matter when defining a method? | c++|templates|template-specialization | 1 | 59 | 1 | 72,920,923 | 72,920,923 | 2 | true | 2022-07-09T11:09:30.170Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why does template ordering matter when defining a method?<p>I have the following code:</p>
<pre><code>template<int n>
struct array_container{double ar... |
72,923,727 | My Discord bot won't send embeds from within a cog. (AttributeError: 'int' object has no attribute 'send')<p>So basically I'm trying to put the commands of my Discord bot into cogs. It loads the cog just fine. But when I run the command and the bot tries to send an embed to my logging channel it doesn't work.</p>
<p>He... | <p><code>bot.debugchannel</code> just stores the id of the channel, not a <code>discord.TextChannel</code> object, and it therefore cannot be used to send messages. First, you need to get the channel itself from the id, which can be done using <code>ctx.guild.get_channel(<id>)</code></p>
<p>So replace line 4 of t... | My Discord bot won't send embeds from within a cog. (AttributeError: 'int' object has no attribute 'send') | python|discord|discord.py | -1 | 59 | 1 | 72,923,790 | 72,923,790 | 2 | true | 2022-07-09T18:24:02.130Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
My Discord bot won't send embeds from within a cog. (AttributeError: 'int' object has no attribute 'send')<p>So basically I'm trying to put the commands of m... |
72,929,601 | Templated Proxy in wrapper class issues<p>I <a href="https://stackoverflow.com/q/72928680">asked previously</a> about the following class, which is a wrapper around a member function. I now want to add "plugin" functionality to it via a proxy class. My wrapper class's <code>operator*</code> returns a proxy ... | <p>You were missing a <code>&</code> from the <code>decltype</code> expressions when trying to instantiate the <code>Wrapper</code> template:</p>
<pre class="lang-cpp prettyprint-override"><code>Wrapper<
decltype(&testclass::get),
^
decltype(&testclass::set),
^
testc... | Templated Proxy in wrapper class issues | c++|templates | 0 | 59 | 2 | 72,930,824 | 72,930,824 | 2 | true | 2022-07-10T15:21:12.940Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Templated Proxy in wrapper class issues<p>I <a href="https://stackoverflow.com/q/72928680">asked previously</a> about the following class, which is a wrapper... |
72,934,089 | React Redux is not updating component state in real time<p>I have one component <code>ImageGallery</code>, in there I want to load more images after pressing <code>Load More</code> button. And, <code>loadMore()</code> function updates a react-redux <code>globalState.js</code> initialState value <code>limit</code>. But,... | <p>Your code will not work because it runs asynchronously so when you call <code>fetchImages</code> state hasn't been updated yet.</p>
<p>What I would propose is to use <code>fetchImages</code> inside a <code>useEffect</code> function which is dependent on <code>limit</code>.</p>
<p><code>loadMore</code> on the other h... | React Redux is not updating component state in real time | reactjs|react-redux | 1 | 59 | 2 | 72,934,223 | 72,934,223 | 2 | true | 2022-07-11T05:28:43.980Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
React Redux is not updating component state in real time<p>I have one component <code>ImageGallery</code>, in there I want to load more images after pressing... |
72,938,257 | Ajax error getting called instead of success<pre><code><script>
function editComment(id) {
var content = $('#Content').val();
var modelData = { 'Id': id, 'Content': content };
$.ajax({
type: 'POST',
dataType: 'json',
ur... | <p>Moving to an answer for future readers...</p>
<p>The server is indeed returning a successful response, but an <em>empty</em> successful response:</p>
<pre><code>return new HttpStatusCodeResult(200);
</code></pre>
<p>However, the client-side code is expecting valid JSON:</p>
<pre><code>dataType: 'json',
</code></pre>... | Ajax error getting called instead of success | javascript|jquery|asp.net|ajax | 0 | 59 | 1 | 72,938,770 | 72,938,770 | 2 | true | 2022-07-11T12:00:19.847Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Ajax error getting called instead of success<pre><code><script>
function editComment(id) {
var content = $('#Content').val();
... |
72,947,826 | Sympy check whether there's constants in the expression before simplification<p>I'm trying to simplify some expressions with Sympy.
However, I wanna filter out some expressions with Add/Sub with constants "before" simplification.</p>
<p>For instance,</p>
<pre><code>parse_expr("abc_mmw * 2 * 5", eval... | <p>By constant I assume you mean number. You can check if the expression is an addition and whether any of its argument is a number. Something like this:</p>
<pre><code>def is_valid(expr):
if expr.is_Add and any(not t.is_number for t in expr.args):
return False
return True
expr1 = parse_expr("abc_... | Sympy check whether there's constants in the expression before simplification | python|sympy | 1 | 59 | 2 | 72,948,641 | 72,948,641 | 2 | true | 2022-07-12T06:18:37.220Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Sympy check whether there's constants in the expression before simplification<p>I'm trying to simplify some expressions with Sympy.
However, I wanna filter o... |
72,951,580 | kernel32 GetSystemInfo not returning info<p>All of the <code>SI</code> fields are 0 after the call to <code>GetSystemInfo</code> in the code below, that's the issue I am trying to solve here.</p>
<p>This is about the same code as several examples which can be found with a quick web search on <code>GetSystemInfo</code>,... | <p>There are a number of errors in your definitions</p>
<ul>
<li><code>DWORD</code> should be <code>Integer</code></li>
<li><code>WORD</code> should be <code>Short</code></li>
<li><code>LPVOID</code> and <code>DWORD_PTR</code> should be <code>IntPtr</code></li>
<li>You need to pass a <em>reference</em> to your structur... | kernel32 GetSystemInfo not returning info | .net|vb.net|pinvoke|kernel32 | 0 | 59 | 1 | 72,952,235 | 72,952,235 | 2 | true | 2022-07-12T11:28:30.237Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
kernel32 GetSystemInfo not returning info<p>All of the <code>SI</code> fields are 0 after the call to <code>GetSystemInfo</code> in the code below, that's th... |
72,954,344 | Is there a way to teach gtest to print user-defined types using libfmt's formatter?<p>I'm wondering if there is a way to make gtest understand a user-defined types libfmt's formatter, for the means of printing a readable error output?
I know how I can teach gtest to understand user-defined types via adding the stream i... | <p>To avoid problems caused by ambiguity of <code>PrintTo</code> or <code>operator<<</code> namespace is needed.</p>
<p>Here is <a href="https://godbolt.org/z/1zrxqz8TY" rel="nofollow noreferrer">some demo</a> when namespaces is used:</p>
<pre class="lang-cpp prettyprint-override"><code>#include <fmt/format.h&... | Is there a way to teach gtest to print user-defined types using libfmt's formatter? | c++|c++17|googletest | 1 | 59 | 1 | 72,955,355 | 72,955,355 | 2 | true | 2022-07-12T14:54:25.003Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is there a way to teach gtest to print user-defined types using libfmt's formatter?<p>I'm wondering if there is a way to make gtest understand a user-defined... |
72,960,132 | Is it possible to finalize / release a Class instance?<blockquote>
<p>It may because the wrong keywords I used, not much discussion or articles found for this problem.</p>
</blockquote>
<p>After loaded into JVM, is it possible to release a <code>Class</code> instance automatically or manually?</p>
<ul>
<li>If it can be... | <blockquote>
<p>For code above, can we consider any resource used by classTest will be released everywhen testMethod is done because its ClassLoader local variable cl is never used again?</p>
</blockquote>
<p>No, but I think you're mixing terms here. Specifically, any <strong>resource</strong>, no. Resource has a very ... | Is it possible to finalize / release a Class instance? | java|class|jvm | 0 | 59 | 1 | 72,960,691 | 72,960,691 | 2 | true | 2022-07-13T02:03:17.233Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is it possible to finalize / release a Class instance?<blockquote>
<p>It may because the wrong keywords I used, not much discussion or articles found for thi... |
72,961,056 | gcc-11 compiler optimisation levels not working on Mac m1<p>I have to complete a project for university where I need to be able to optimise using compiler optimisation levels.
I am using OpenMP and as a result I have got the gcc-11 compiler from brew.
I have watched this video <a href="https://www.youtube.com/watch?v=U... | <p>Optimization levels are specified with <code>-O1</code> etc, using capital letter O, not lower-case letter o.</p>
<p>Lower-case <code>-o1</code> specifies that the output file should be <code>1</code>, and then <code>out/jacobi2d1</code> is an input file to be linked, but it is an existing executable and you can't l... | gcc-11 compiler optimisation levels not working on Mac m1 | c|gcc|apple-m1 | 0 | 59 | 1 | 72,961,103 | 72,961,103 | 2 | true | 2022-07-13T04:45:45.763Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
gcc-11 compiler optimisation levels not working on Mac m1<p>I have to complete a project for university where I need to be able to optimise using compiler op... |
72,972,433 | Do we need a random IV when we always use a random SecretKey for each AES/CBC encryption?<p>I understand that if we use the SAME SecretKey (byte array) for each AES/CBC encryption, we need to use a random IV for each encryption for better security.</p>
<p>but what if we always use a DIFFERENT secret key (generated by a... | <blockquote>
<p>I understand that if we use the SAME SecretKey (byte array) for each AES/CBC encryption, we need to use a random IV for each encryption.</p>
</blockquote>
<p>That's not the precise definition. It should be impossible for an adversary to predict (part of) the IV value for CBC mode. That means that the IV... | Do we need a random IV when we always use a random SecretKey for each AES/CBC encryption? | java|encryption|aes|initialization-vector | 1 | 59 | 1 | 72,972,572 | 72,972,572 | 2 | true | 2022-07-13T20:43:29.763Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Do we need a random IV when we always use a random SecretKey for each AES/CBC encryption?<p>I understand that if we use the SAME SecretKey (byte array) for e... |
72,980,152 | Get the Action Value of APIKit Router Mapping in Mule 4<p>Say this is my router config</p>
<pre><code><apikit:config name="apiConfig" raml="api.raml" doc:name="Router" >
<apikit:flow-mapping resource="/resourceOne" action="get" flow-ref="flow-1"/&g... | <p>I believe you should be having separate flows, but if you need to it this way, you can use <code>#[attributes.method]</code> to get the method of the HTTP Request. The APIKIT router will forward the same event that the HTTP Listener will receive, so it will contain <a href="https://docs.mulesoft.com/http-connector/1... | Get the Action Value of APIKit Router Mapping in Mule 4 | mule|mule-esb|apikit | 0 | 59 | 1 | 72,980,258 | 72,980,258 | 2 | true | 2022-07-14T12:00:58.610Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Get the Action Value of APIKit Router Mapping in Mule 4<p>Say this is my router config</p>
<pre><code><apikit:config name="apiConfig" raml="... |
72,995,834 | How to replace certain strings with NA, na_if, if_else, regex<p>I have a character variable that has some values that I want replaced by NA (e.g. "N/A"; "NA" entered as text, not R's NA type; other text responses.) The values I don't want replaced by NA contain number strings, so I tried using a reg... | <p>Your second approach is close. You would need to specify that <code>NA</code> is a character type.</p>
<pre class="lang-r prettyprint-override"><code>df |>
mutate(var1 = if_else(str_detect(var1, "[:digit:]"), var1, NA_character_))
</code></pre>
<p>Output:</p>
<pre class="lang-r prettyprint-override"><... | How to replace certain strings with NA, na_if, if_else, regex | r|dplyr|stringr | 2 | 59 | 3 | 72,995,876 | 72,995,876 | 2 | true | 2022-07-15T14:51:13.510Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to replace certain strings with NA, na_if, if_else, regex<p>I have a character variable that has some values that I want replaced by NA (e.g. "N/A&q... |
72,996,533 | Check a function belongs to which package in Julia<p>Sometimes I wonder if a function belongs to which package. So I can use the <code>@which</code> macro for this purpose according to [<a href="https://stackoverflow.com/questions/71893007/how-to-see-what-package-a-function-comes-from">1</a>], [<a href="https://stackov... | <p>The issue is that you have <code>Not</code> introduced into your <code>Main</code> module by <code>using DataFrames</code>, and DataFrames.jl re-exports it from InvertedIndices.jl, as you can see <a href="https://github.com/JuliaData/DataFrames.jl/blob/14e682b623ccc07d34cb7399f79311e9443f9b13/src/DataFrames.jl#L5" r... | Check a function belongs to which package in Julia | package|julia | 3 | 59 | 2 | 72,996,794 | 72,996,794 | 2 | true | 2022-07-15T15:43:58.473Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Check a function belongs to which package in Julia<p>Sometimes I wonder if a function belongs to which package. So I can use the <code>@which</code> macro fo... |
72,999,386 | Git seems to automatically push to master branch<p>New to coding so I've been trying to find my way around git.</p>
<p>Every time I seem to want to push a commit from my terminal it seems to automatically push to the master branch rather than the main. Now I know that I can just change the branch in Github to make mast... | <p>If <code>git init</code> puts you on the unborn <code>master</code> branch instead of <code>main</code>, and you wish it were <code>main</code>, you have many options:</p>
<ul>
<li><p>Update your Git. Newer Git versions default to <code>main</code>.</p>
</li>
<li><p>Or else, change your <code>init.defaultBranch</cod... | Git seems to automatically push to master branch | git|github|git-branch|git-push | -2 | 59 | 1 | 72,999,522 | 72,999,522 | 2 | true | 2022-07-15T20:39:58.657Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Git seems to automatically push to master branch<p>New to coding so I've been trying to find my way around git.</p>
<p>Every time I seem to want to push a co... |
72,984,946 | ElasticsearchRepository.refresh() is deprecated. What should I use?<p>I am migrating from spring data ES 4.1.15 to 4.4.1. The old code has below</p>
<pre><code>ElasticsearchRepository.save()
ElasticsearchRepository.refresh()
</code></pre>
<p>What should I use to replace refresh?</p> | <p>Nothing. This was changed in version 4.2 (released in April 2021) and is described in <a href="https://docs.spring.io/spring-data/elasticsearch/docs/current/reference/html/#elasticsearch-migration-guide-4.1-4.2.breaking-changes" rel="nofollow noreferrer">https://docs.spring.io/spring-data/elasticsearch/docs/current/... | ElasticsearchRepository.refresh() is deprecated. What should I use? | spring-data-elasticsearch | 1 | 59 | 1 | 73,002,357 | 73,002,357 | 2 | true | 2022-07-14T18:08:42.943Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
ElasticsearchRepository.refresh() is deprecated. What should I use?<p>I am migrating from spring data ES 4.1.15 to 4.4.1. The old code has below</p>
<pre><co... |
73,007,396 | Advanced find and replace in Notepad++<p>I'm trying to use Notepad++ for the first time and wanted to see if anyone here had some solutions for me.</p>
<p>I have a document that looks like this:</p>
<pre><code>ex 1
send power g1 g2 g3 g4
ex 2
send power g1 g2
ex 3
send power g1 f5 f3
ex 4
send f5 f2 t5
</code></p... | <p>find:</p>
<pre><code>ex (\d+)\s+^.*$
</code></pre>
<p>replace:</p>
<pre><code>$0\r\nthis is number `$1`
</code></pre>
<p>searches for ex followed by a number followed by 1 or more spaces and/or line breaks followed by the entire next line</p>
<p>replaces with: $0 the entire thing it found, a newline, this is number,... | Advanced find and replace in Notepad++ | notepad++ | 1 | 59 | 3 | 73,007,442 | 73,007,442 | 2 | true | 2022-07-16T20:17:45.843Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Advanced find and replace in Notepad++<p>I'm trying to use Notepad++ for the first time and wanted to see if anyone here had some solutions for me.</p>
<p>I ... |
73,016,552 | Making a blocking call asynchronous<p>I'm using Crystal <a href="https://github.com/TamasSzekeres/x11-cr/" rel="nofollow noreferrer">bindings for X11</a> and typical usage <a href="https://github.com/TamasSzekeres/x11-cr/blob/master/examples/sample_window_hl/src/sample_window_hl.cr" rel="nofollow noreferrer">looks some... | <p>When a lib function blocks, you can't do anything about it in Crystal. You will need to run it in a separate OS thread in order to be able to run other code in parallel. That's what such methods are designed to be used for.</p>
<p>In Crystal, you don't need <code>preview_mt</code> to just run a separate OS thread. T... | Making a blocking call asynchronous | crystal-lang | 1 | 59 | 1 | 73,047,827 | 73,047,827 | 2 | true | 2022-07-18T01:41:33.723Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Making a blocking call asynchronous<p>I'm using Crystal <a href="https://github.com/TamasSzekeres/x11-cr/" rel="nofollow noreferrer">bindings for X11</a> and... |
72,836,810 | In pandas, how to reindex(fill 0) in level 2 in multiindex<p>I have a dataframe pivot table with 2 level of index: month and rating. The rating should be 1,2,3 (not to be confused with the columns 1,2,3). I found that for some months, the rating could be missing. E.g, (Population and 2021-10) only has rating 1,2. I nee... | <p>You can use <code>pd.MultiIndex.from_product</code> to create a full index:</p>
<pre><code>>>> df
1 2 3
(Population) 1 0.436954 0.897747 0.387058
2 0.464940 0.611953 0.133941
2021-08(Refreshed) 1 0.496111 0.282798 0.048384
... | In pandas, how to reindex(fill 0) in level 2 in multiindex | pandas|dataframe|missing-data|multi-index|reindex | 1 | 59 | 1 | 72,837,037 | 72,837,037 | 2 | true | 2022-07-02T05:57:43.580Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
In pandas, how to reindex(fill 0) in level 2 in multiindex<p>I have a dataframe pivot table with 2 level of index: month and rating. The rating should be 1,2... |
72,802,646 | How to 301 redirect by changing part of a dynamic url in htaccess<p>So here is the problem. I am using Elementor Pro for woocomerce and the plugin redirecting the order completion to a wrong url. There is no way at the moment to fix this.</p>
<p>Now the only way to fix it is to change the <code>?elementor_library=singl... | <blockquote>
<pre><code>RewriteRule ^?elementor_library=single-product/order-received/?$ /checkout/order-received/$1 [R=301,L]
</code></pre>
</blockquote>
<p>The <code>RewriteRule</code> <em>pattern</em> (first argument) matches against the URL-path only, not the query string, so this will never match the stated URL... | How to 301 redirect by changing part of a dynamic url in htaccess | wordpress|.htaccess | 0 | 59 | 1 | 72,803,272 | 72,803,272 | 2 | true | 2022-06-29T13:56:37.357Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to 301 redirect by changing part of a dynamic url in htaccess<p>So here is the problem. I am using Elementor Pro for woocomerce and the plugin redirectin... |
72,974,439 | Which fields do I need to look for in api, to determine a bq dataset is publicly accessible?<p>I want to generate a list of bigquery datasets that are publicly accessible. From the documentation I got to know if a role is associated with "allUsers" or "allauthenticatedUsers", we say it as publicly a... | <p>Yes it is under the <code>specialGroup</code> field since the values here are the <strong>Groups</strong> that are pre-created by <strong>GCP</strong> and <strong>BigQuery</strong>.</p>
<p>eg.</p>
<ul>
<li><code>projectOwners</code> --> All owners of the Project</li>
<li><code>projectWriters</code> --> All Edi... | Which fields do I need to look for in api, to determine a bq dataset is publicly accessible? | python|google-cloud-platform | 1 | 59 | 1 | 72,974,632 | 72,974,632 | 2 | true | 2022-07-14T02:09:20.423Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Which fields do I need to look for in api, to determine a bq dataset is publicly accessible?<p>I want to generate a list of bigquery datasets that are public... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.