question_id int64 37.6M 73.2M | input_text stringlengths 88 52.4k | output_text stringlengths 37 35.6k | title stringlengths 15 150 | tags stringlengths 1 107 | q_score int64 -19 397 | view_count int64 3 879k | answer_count int64 1 21 | accepted_answer_id int64 37.6M 73.8M | answer_id int64 37.6M 73.8M | a_score int64 -5 1.29k | is_accepted bool 1
class | creation_date stringlengths 20 24 | input_text_instruct stringlengths 251 52.6k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
71,429,276 | useContext returns values multiple times when called only 1 time<p>I'd like to get the data from my API and store it in a <strong>context</strong> in order to use that data on multiple component. There are multiple endpoints from this API, and I need the user id to reach them. To do that, I get the id from <strong>useP... | <p>Everytime your child component APIChecker invokes setID, that is going to trigger the useEffect in the parent since in the dependancy array you have passed id.
This in turn is calling the APIs multiple times.</p>
<pre><code>useEffect(()=>{
/*your implementation*/
},[id]);
</code></pre>
<p>if you want this inv... | useContext returns values multiple times when called only 1 time | reactjs|use-effect|use-context | 0 | 534 | 1 | 71,429,761 | 71,429,761 | 2 | true | 2022-03-10T18:47:35.713Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
useContext returns values multiple times when called only 1 time<p>I'd like to get the data from my API and store it in a <strong>context</strong> in order t... |
71,431,153 | React array is populated with items, however, upon trying to do the .map function, it says .map is not a function<p>Im trying to render out the items of an array to the screen and display the items. So I did the .map function. However, when I do the map function, it says that cars.map is not a function. I console logge... | <p><em>I console logged the items in the car array and it was indeed populated</em> - This is sort of true, but not how you're expecting.</p>
<p>It appears that <code>cars</code> from your <code>initCarsInfo</code> is returning an object that contains the <code>cars</code>, not returning the array directly.</p>
<p>Noti... | React array is populated with items, however, upon trying to do the .map function, it says .map is not a function | javascript|arrays|reactjs | 0 | 31 | 2 | 71,431,204 | 71,431,204 | 2 | true | 2022-03-10T21:43:10.213Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
React array is populated with items, however, upon trying to do the .map function, it says .map is not a function<p>Im trying to render out the items of an a... |
71,421,676 | How to Save File in storage folder with Original name?<p>I want to store an uploaded file with its original client name in the storage folder. What do I need to add or change in my code?Any help or recommendation will be greatly appreciated</p>
<p>Here my Controller</p>
<pre><code>public function store(Request $request... | <p>I managed to figure out how to store it with a custom name, for those who want to know how to do it here is the code</p>
<pre><code>$id = $input['id'];
$originalName = $request->file->getClientOriginalName();
$path = "dev/table/$id/".$originalName;
Storage::disk('local')->put($path, file_get_cont... | How to Save File in storage folder with Original name? | laravel|laravel-5 | 0 | 1,799 | 5 | 71,433,749 | 71,433,749 | 2 | true | 2022-03-10T09:24:16.600Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to Save File in storage folder with Original name?<p>I want to store an uploaded file with its original client name in the storage folder. What do I need... |
71,433,760 | python stdin: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xca in position 0: invalid continuation byte<p>I'm trying to use stdin(standard input) as input for my codes.</p>
<p>this is how I have implement for now. I was trying to see whether it give output that I am intended.</p>
<pre><code>import sys
for i in... | <p>Yes, I do. Let's look at your command line:</p>
<pre><code>(venv) Test@Test-MacBookPro pythonProject1 % /Users/Test/PycharmProjects/pythonProject1/venv/bin/python /Users/Test/PycharmProjects/pythonProject1/proto_1.py < /Users/Test/PycharmProjects/pythonProject1/venv/bin/python /Users/Test/PycharmProjects/pythonP... | python stdin: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xca in position 0: invalid continuation byte | python|python-3.x|pycharm|stdin | 0 | 1,030 | 1 | 71,434,030 | 71,434,030 | 2 | true | 2022-03-11T04:48:39.603Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
python stdin: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xca in position 0: invalid continuation byte<p>I'm trying to use stdin(standard input) as ... |
71,434,676 | How to group by then create a new subset in which the values are conditionally based on the each group's first row and a particular value<p>I have a simple data frame like this</p>
<pre><code>df <- data.frame(x=c(1,1,3,3,2,2,2,1),
y=c('a','b','a','b','e','a','d','c'))
</code></pre>
<p><a href="https... | <pre><code>df %>%
group_by(x) %>%
summarise(test = (first(y) == "a" && any(y == "c") || (first(y) == "e" && any(y == "d"))) * 1L)
</code></pre> | How to group by then create a new subset in which the values are conditionally based on the each group's first row and a particular value | r|dplyr | 0 | 34 | 2 | 71,434,916 | 71,434,916 | 2 | true | 2022-03-11T06:55:38.737Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to group by then create a new subset in which the values are conditionally based on the each group's first row and a particular value<p>I have a simple d... |
71,434,558 | Reading from memory and getting in char array.. What if a char in that contains 1 byte that suppose to be a 1 byte length and length is a number<p>So I am reading memory that suppose to be bios info in C. And with usual read I get bunch of characters that.. The idea is those characters are making fields like Anchor &qu... | <blockquote>
<p>But in C number is int or long.</p>
</blockquote>
<p><code>char</code> <em>is</em> an integral type which can be used to represent numbers, the same as <code>short</code>, <code>int</code> or <code>long</code>.</p>
<p>It has a maximum value of <a href="https://en.cppreference.com/w/c/types/limits" rel="... | Reading from memory and getting in char array.. What if a char in that contains 1 byte that suppose to be a 1 byte length and length is a number | c|byte | 0 | 261 | 1 | 71,437,354 | 71,437,354 | 2 | true | 2022-03-11T06:41:48.910Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Reading from memory and getting in char array.. What if a char in that contains 1 byte that suppose to be a 1 byte length and length is a number<p>So I am re... |
71,429,959 | How is this simple add numbers and output code doesn't work? (Whitespace language)<p>I want the code to output 5, which is got from 2+3 (inputted from stack manually)</p>
<pre><code>[space][space][space][tab][space] push 2
[space][space][space][tab][tab] push 3
[tab][space][space][space] add together
[tab][lf]
[space]... | <p>The Push commands should end with a line feed,
so it should probably be (in a one-instruction-per-line format, i.e., only the annotated characters are significant)</p>
<pre><code>[space][space][space][tab][space][lf]
[space][space][space][tab][tab][lf]
[tab][space][space][space]
[tab][lf][space][tab]
</code></pre> | How is this simple add numbers and output code doesn't work? (Whitespace language) | esoteric-languages|whitespace-language | 0 | 36 | 1 | 71,437,891 | 71,437,891 | 2 | true | 2022-03-10T19:48:14.090Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How is this simple add numbers and output code doesn't work? (Whitespace language)<p>I want the code to output 5, which is got from 2+3 (inputted from stack... |
71,438,228 | when the contents are being added to the html page at the bottom, contents from the top disappears<p>I have created following html form.</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-css lang-css prettyprint-overr... | <p>wrapper div is given as absolute. when comparing to parent element height is less that's the reason for hiding the content you can
either change .wrapper to relative instead of absolute
or you can add scroll for wrapper.</p>
<p>Try the below code</p>
<pre><code>.wrapper {
position: relative;
top: auto;
l... | when the contents are being added to the html page at the bottom, contents from the top disappears | html|css | 0 | 37 | 1 | 71,438,375 | 71,438,375 | 2 | true | 2022-03-11T12:01:25.063Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
when the contents are being added to the html page at the bottom, contents from the top disappears<p>I have created following html form.</p>
<p><div class="s... |
71,434,179 | Getting errors while trying some condition on an array<p>Trying to check if an array has some values and display it once in <code>typescript</code></p>
<pre><code>const items = products?.reduce((prev: any, current) => {
if (!current?.data()?.drinkName in prev) {
prev[current?.data()?.category] = [];
}
pre... | <p>You accidentally converted <code>current?.data()?.drinkName</code> to a boolean by adding <code>!</code> before it. Try wrapping the whole statement with parenthesis like so
<code>!(current?.data()?.drinkName in prev)</code>. This way the <code>!</code> negates the whole statement and not just the left part.</p>
<p>... | Getting errors while trying some condition on an array | typescript | 0 | 45 | 1 | 71,439,173 | 71,439,173 | 2 | true | 2022-03-11T05:54:42.863Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Getting errors while trying some condition on an array<p>Trying to check if an array has some values and display it once in <code>typescript</code></p>
<pre>... |
71,439,180 | Is there a possibility to merge several origin destination matrices into one dataframe?<p>I have created origin destination matrices for different weeks in the year, e.g. the output looks like:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th></th>
<th>Region 1</th>
<th>Region 2</th>
<th>Reg... | <p>Obviously we don't have your data. I'll create a little example data set here so you can see one approach that should work for you.</p>
<p>Suppose I have three matrices representing three weeks:</p>
<pre class="lang-r prettyprint-override"><code>mat1
#> Region 1 Region 2 Region 3
#> Region 1 0 ... | Is there a possibility to merge several origin destination matrices into one dataframe? | r|matrix|o-d-matrix | 0 | 43 | 1 | 71,439,437 | 71,439,437 | 2 | true | 2022-03-11T13:21:13.300Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is there a possibility to merge several origin destination matrices into one dataframe?<p>I have created origin destination matrices for different weeks in t... |
71,438,040 | Overwriting hydra configuration groups from CLI<p>I am trying to overwrite from the CLI a group of parameters and I am not sure how to do it. The structure of my conf is the following</p>
<pre><code>conf
├── config.yaml
├── optimizer
│ ├── adamw.yaml
│ ├── adam.yaml
│ ├── default.yaml
│ └── sgd.yaml
├── task
│ ... | <p>You can't override default list entries in this form.
See <a href="https://hydra.cc/docs/advanced/defaults_list/" rel="nofollow noreferrer">this</a>.
In particular:</p>
<pre><code>CONFIG : A config to use when creating the output config. e.g. db/mysql, db/mysql@backup.
GROUP_DEFAULT : An overridable config. e.g. db:... | Overwriting hydra configuration groups from CLI | fb-hydra | 0 | 275 | 1 | 71,439,510 | 71,439,510 | 2 | true | 2022-03-11T11:46:08.460Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Overwriting hydra configuration groups from CLI<p>I am trying to overwrite from the CLI a group of parameters and I am not sure how to do it. The structure o... |
71,440,410 | Changing dictionary keys using a separate dictionary?<p>I am using the CIFAR 10 data set and want to create a function which returns the number of images per class. I have a dictionary classes_dict which maps the class name to the value, see below:</p>
<pre><code>classes_dict= {'airplane': 0,
'automobile': 1,
'bird':... | <p>You can use a dict-comprehension.</p>
<pre><code>result = {k: img_per_class[v] for k, v in classes_dict.items()}
</code></pre>
<p>(You can pass this dict to the <code>Counter</code> constructor if you must have a <code>Counter</code>.)</p> | Changing dictionary keys using a separate dictionary? | python|dictionary|key | 0 | 27 | 1 | 71,440,429 | 71,440,429 | 2 | true | 2022-03-11T14:56:22.100Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Changing dictionary keys using a separate dictionary?<p>I am using the CIFAR 10 data set and want to create a function which returns the number of images per... |
71,437,669 | get stash restore error: pathspec with Powershell<p>As suggest here <a href="https://github.com/dahlbyk/posh-git/issues/106" rel="nofollow noreferrer">https://github.com/dahlbyk/posh-git/issues/106</a> I used</p>
<p>git restore 'stash@{0}' -- </p>
<p>but still get</p>
<pre><code>error: pathspec 'stash@{0}' did not matc... | <p>You want <code>git restore --source=stash@{0}</code> (which will require adding single quotes or whatever as usual for PowerShell). That is, your mistake here is leaving out <code>--source=</code>.</p>
<p>Worth noting: <code>stash@{0}</code> and <code>stash</code> have exactly the same meaning, so there's no need t... | get stash restore error: pathspec with Powershell | git|powershell | 0 | 28 | 1 | 71,447,215 | 71,447,215 | 2 | true | 2022-03-11T11:15:27.297Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
get stash restore error: pathspec with Powershell<p>As suggest here <a href="https://github.com/dahlbyk/posh-git/issues/106" rel="nofollow noreferrer">https:... |
71,791,818 | How to bulild a null notnull matrix in pandas dataframe<p>Here's my dataset</p>
<pre><code>Id Column_A Column_B Column_C
1 Null 7 Null
2 8 7 Null
3 Null 8 7
4 8 Null 8
</code></pre>
<p>Here's my expecte... | <p>Assuming <code>Null</code> is NaN, here's one option. Using <code>isna</code> + <code>sum</code> to count the NaNs, then find the difference between <code>df</code> length and number of NaNs for <code>Notnulls</code>. Then construct a DataFrame.</p>
<pre><code>nulls = df.drop(columns='Id').isna().sum()
notnulls = nu... | How to bulild a null notnull matrix in pandas dataframe | python-3.x|pandas|dataframe | 0 | 34 | 2 | 71,791,892 | 71,791,892 | 2 | true | 2022-04-08T04:52:00.063Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to bulild a null notnull matrix in pandas dataframe<p>Here's my dataset</p>
<pre><code>Id Column_A Column_B Column_C
1 Null 7 ... |
71,800,502 | Using ggplot with lapply does not show y labels<p>I have the following data:</p>
<pre><code>library(dplyr)
countries <- c('Austria', 'Belgium', 'Bulgaria', 'Croatia', 'Republic of Cyprus')
year <- rep(2009:2022, length(countries))
country <- as.data.frame(rep(countries, length(2009:2022)))
country <- c... | <p>You can use the following code:</p>
<pre><code>lapply(names(df)[4:5], function(var)
ggplot(data = df, aes(x = year, y = .data[[var]], color = country))
+ geom_line() + ylab(var))
</code></pre>
<p>Output <code>gdp</code>:</p>
<p><a href="https://i.stack.imgur.com/gQanG.png" rel="nofollow noreferrer"><img src="htt... | Using ggplot with lapply does not show y labels | r|ggplot2|dplyr|lapply | 0 | 24 | 1 | 71,800,842 | 71,800,842 | 2 | true | 2022-04-08T16:36:07.943Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Using ggplot with lapply does not show y labels<p>I have the following data:</p>
<pre><code>library(dplyr)
countries <- c('Austria', 'Belgium', 'Bulga... |
71,808,458 | How can i change the code so mListener can be nullable?<p>So, my problem is i need to initialize <code>mListener</code> with my current code, how can i make it nullable?</p>
<pre><code>class TaskRecycleAdapter: RecyclerView.Adapter<TaskRecycleAdapter.MyViewHolder>() {
private var list = emptyList<Data>... | <p>Instead of <code>lateinit</code> you need to use <code>OnItemClickListener?</code></p>
<pre><code>private var mListener: OnItemClickListener? = null
</code></pre>
<p>Then make changes to recieve the nullable listener:</p>
<pre><code>fun setOnItemClickListener(listener: OnItemClickListener?) {
mListener = lis... | How can i change the code so mListener can be nullable? | android|kotlin|android-recyclerview | 0 | 23 | 1 | 71,808,507 | 71,808,507 | 2 | true | 2022-04-09T13:23:20.537Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can i change the code so mListener can be nullable?<p>So, my problem is i need to initialize <code>mListener</code> with my current code, how can i make ... |
71,808,640 | Filling `null` values of a column with another column<p>I want to fill the <code>null</code> values of a column with the content of another column of the same row in a lazy data frame in Polars.</p>
<p>Is this possible with reasonable performance?</p> | <p>There's a function for this: <a href="https://pola-rs.github.io/polars/py-polars/html/reference/api/polars.Expr.fill_null.html#polars.Expr.fill_null" rel="nofollow noreferrer"><code>fill_null</code></a>.</p>
<p>Let's say we have this data:</p>
<pre class="lang-py prettyprint-override"><code>import polars as pl
df =... | Filling `null` values of a column with another column | python|python-polars | 0 | 289 | 2 | 71,808,945 | 71,808,945 | 2 | true | 2022-04-09T13:47:59.593Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Filling `null` values of a column with another column<p>I want to fill the <code>null</code> values of a column with the content of another column of the sam... |
71,810,219 | return OR with the same value<p>Why would someone do this</p>
<p><code>function() { return(abc || abc || "") }</code></p>
<p>isn't it's enough to do just <code>return(abc || "")</code>?</p> | <p>You're right, in any remotely serious code, doing just <code>return abc || ""</code> would be enough.</p>
<p>The only situation in which <code>return(abc || abc || "")</code> could possibly result in different logic would be if you were inside a <code>with</code>, or if <code>abc</code> was a get... | return OR with the same value | javascript|typescript | 0 | 27 | 1 | 71,810,243 | 71,810,243 | 2 | true | 2022-04-09T17:10:48.240Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
return OR with the same value<p>Why would someone do this</p>
<p><code>function() { return(abc || abc || "") }</code></p>
<p>isn't it's enough to d... |
71,810,465 | Python Code wont loop through website with selenium<p>i have a Excel sheet with article numbers and want to loop through each row in the excel spreadsheat and search the product price on a website with selenium and afterwards write the product price to the same spreadsheet but somehow the loop doenst work</p>
<p>Hopefu... | <p>From this problem you have to use openpyxl module</p>
<p>Below code will help you to solve your problem</p>
<pre><code>import openpyxl
path1 = r'Excel Path'
wb1 = openpyxl.load_workbook(path1) # this will open your excel file
ws1 = wb1.worksheets[0] # this will open your excel sheet1
LastRowCount = ws1.max_row #... | Python Code wont loop through website with selenium | python|selenium|search|while-loop | 0 | 29 | 1 | 71,810,503 | 71,810,503 | 2 | true | 2022-04-09T17:42:46.657Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python Code wont loop through website with selenium<p>i have a Excel sheet with article numbers and want to loop through each row in the excel spreadsheat an... |
71,812,444 | Python : Event Based Sequence depended on Each other<p>I have a sequence of request calls dependent on each other, each one searches on a field in DB or Scrape a website, the sequence stops when a request finds the item</p>
<p>I am using a sequence of if statement pseudo code</p>
<pre><code>if found:
return
else:
... | <p>You can put the request functions inside a list and use a <code>for</code> loop:</p>
<pre><code>request_funcs = [call_request, call_second_request, ...]
for func in request_funcs:
result = func()
if result:
return
print("Not found")
</code></pre>
<p>If it's the same function, use a <code>w... | Python : Event Based Sequence depended on Each other | python|if-statement|optimization|python-requests | 0 | 26 | 1 | 71,812,472 | 71,812,472 | 2 | true | 2022-04-09T22:40:44.217Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python : Event Based Sequence depended on Each other<p>I have a sequence of request calls dependent on each other, each one searches on a field in DB or Scra... |
71,815,223 | Convert C++ Sort On Java<p>Can you please help me to write my first bubble sort on java?
I want something like this, but on Java programming language</p>
<pre><code>void swap(int *xp, int *yp)
{
int temp = *xp;
*xp = *yp;
*yp = temp;
}
// A function to implement bubble sort
void bubbleSort(int arr[], int ... | <pre><code>void bubbleSort(int arr[])
{
int n = arr.length;
for (int i = 0; i < n-1; i++)
for (int j = 0; j < n-i-1; j++)
if (arr[j] > arr[j+1])
{
// swap arr[j+1] and arr[j]
int temp = arr[j];
... | Convert C++ Sort On Java | java|sorting | 0 | 35 | 1 | 71,815,226 | 71,815,226 | 2 | true | 2022-04-10T09:13:41.323Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Convert C++ Sort On Java<p>Can you please help me to write my first bubble sort on java?
I want something like this, but on Java programming language</p>
<pr... |
71,815,737 | How can I fix the error: "error CS1656: Cannot assign to 'InvokeRepeating' because it is a 'method group'"?<p>I'm a beginner currently trying to make a game on unity. Right now I'm trying to create an enemy spawners code using the tutorial: <a href="https://youtu.be/q1gAtOWTs-o" rel="nofollow noreferrer">https://youtu.... | <p><a href="https://docs.unity3d.com/ScriptReference/MonoBehaviour.InvokeRepeating.html" rel="nofollow noreferrer"><code>InvokeRepeating</code></a> is a method. You have to <strong>call the method</strong> as below:</p>
<pre class="lang-cs prettyprint-override"><code>InvokeRepeating("SpawnAnEnemy", 0f, 1f);
<... | How can I fix the error: "error CS1656: Cannot assign to 'InvokeRepeating' because it is a 'method group'"? | c#|unity3d | 0 | 270 | 1 | 71,815,768 | 71,815,768 | 2 | true | 2022-04-10T10:32:03.687Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I fix the error: "error CS1656: Cannot assign to 'InvokeRepeating' because it is a 'method group'"?<p>I'm a beginner currently trying to make a game ... |
71,824,308 | How to increase the border thickness of a column in oracle forms<p><a href="https://i.stack.imgur.com/3KTOU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3KTOU.png" alt="enter image description here" /></a></p>
<p>in the image shown below the border thickness between withdrawal date and issue date ... | <p>It is not its <em>thickness</em>; you should just <strong>separate</strong> <code>currency</code> and <code>amount</code>, i.e. move <code>amount</code> a little bit <em>right</em> and - visually - you'll see the difference.</p> | How to increase the border thickness of a column in oracle forms | oracle|oracleforms | 0 | 28 | 1 | 71,824,427 | 71,824,427 | 2 | true | 2022-04-11T07:48:58.277Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to increase the border thickness of a column in oracle forms<p><a href="https://i.stack.imgur.com/3KTOU.png" rel="nofollow noreferrer"><img src="https://... |
71,830,689 | How can I substitute a function in an expression in sympy<p>Assuming I have an expression in sympy that I can differentiate with variable (e.g. <a href="https://i.stack.imgur.com/cASHR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cASHR.png" alt="enter image description here" /></a>). This is a pos... | <pre class="lang-py prettyprint-override"><code># substitution dictionary. Note that the keys are symbols/functions
d = {r:1, theta:3.14 * t}
vB.subs(d).doit()
# -3.14*sin(3.14*t)
</code></pre>
<p>The <code>doit()</code> method is going to evaluate the derivative.</p> | How can I substitute a function in an expression in sympy | python|sympy|substitution | 0 | 36 | 1 | 71,830,788 | 71,830,788 | 2 | true | 2022-04-11T15:46:06.697Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I substitute a function in an expression in sympy<p>Assuming I have an expression in sympy that I can differentiate with variable (e.g. <a href="http... |
71,816,701 | CEF Browser and multiple threads<p>Please explain me:</p>
<p>Suppose I created three browsers at the same time and started loading the URL in them CefBrowserHost::CreateBrowser(...).</p>
<p>Next, the loading goes to the example on void OnLoadEnd().</p>
<p>In OnLoadEnd() I will check the thread id:</p>
<pre><code>void O... | <p>CEF inherits the <a href="https://www.chromium.org/developers/design-documents/multi-process-architecture/" rel="nofollow noreferrer">Chromium Multi-Process architecture</a> and threading model. I suppose the <code>OnLoadEnd</code> function is invoked on the UI thread. If you block it, you will block the main Chromi... | CEF Browser and multiple threads | chromium|chromium-embedded | 0 | 281 | 1 | 71,830,798 | 71,830,798 | 2 | true | 2022-04-10T12:41:53.860Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
CEF Browser and multiple threads<p>Please explain me:</p>
<p>Suppose I created three browsers at the same time and started loading the URL in them CefBrowser... |
71,830,957 | MySQL select row only if multiple rows exist in group<p>I am working with a database where multiple rows of data exist for the same related entity, in this case a user_id.</p>
<p><a href="https://i.stack.imgur.com/UIEu2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UIEu2.png" alt="Example database"... | <p>Aggregate and assert both key-value requirements:</p>
<pre class="lang-sql prettyprint-override"><code>SELECT user_id
FROM yourTable
GROUP BY user_id
HAVING SUM(meta_key = 'utm_campaign' AND meta_value = 'Summer20222') > 0 AND
SUM(meta_key = 'utm_medium' AND meta_value = 'qr_code') > 0;
</code></pre> | MySQL select row only if multiple rows exist in group | mysql|sql | 0 | 26 | 2 | 71,831,036 | 71,831,036 | 2 | true | 2022-04-11T16:04:42.183Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
MySQL select row only if multiple rows exist in group<p>I am working with a database where multiple rows of data exist for the same related entity, in this c... |
71,833,606 | How do i set a button to disable with jQuery<p>More precisely, what is wrong with the following code, which makes it so that fields will disable int the Faculty button only if I've double-clicked the Department button first?</p>
<p>I've attached as a <a href="https://codepen.io/jake-len/pen/dyJjzYY?editors=1010" rel="n... | <p>There is NEVER a need for an if when you have something that takes a boolean.</p>
<p>In your case just negate the boolean</p>
<pre class="lang-js prettyprint-override"><code>$("#fac-button").on('click', function(e) {
["fname", "lName", "empId", "headC", "start... | How do i set a button to disable with jQuery | javascript|html|jquery | 0 | 16 | 1 | 71,833,683 | 71,833,683 | 2 | true | 2022-04-11T19:56:55.263Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do i set a button to disable with jQuery<p>More precisely, what is wrong with the following code, which makes it so that fields will disable int the Facu... |
71,835,294 | Easy Problem: Android Kotlin LiveData observe function causes null pointer exception after I delete the item its trying to observe<p>I'm using room to manage my local database for a dictionary. I select a word then delete it and it should navigate back to the homepage. Sometimes, however, after deleting the word it cau... | <p>You are observing the result of the query to the database where you get the value of the item with the ID with which you start the fragment. I guess you use that "word" to display the data. But when deleting the object from the DB, the observer remains and then the query to the DB with that ID returns null... | Easy Problem: Android Kotlin LiveData observe function causes null pointer exception after I delete the item its trying to observe | android|kotlin|nullpointerexception|android-livedata | 0 | 33 | 1 | 71,835,674 | 71,835,674 | 2 | true | 2022-04-11T23:12:02.493Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Easy Problem: Android Kotlin LiveData observe function causes null pointer exception after I delete the item its trying to observe<p>I'm using room to manage... |
71,841,798 | How to manually change line size and alpha values for ggplot2 lines (separated by factor)?<p>I want to create a graph where I can change the line size for each line <code>c(1,2,3)</code> and the alpha values for each line <code>c(0.5,0.6,0.7)</code>. I tried to use scale_size_manual but it didn't make any difference. A... | <p>To set the <code>size</code> and <code>alpha</code> values for your lines you have to map on aesthetics. Otherwise <code>scale_size_manual</code> will have no effect:</p>
<pre class="lang-r prettyprint-override"><code>library(ggplot2)
ggplot(aes(x = x, y = val, color = var, group = var), data = df) +
scale_color_... | How to manually change line size and alpha values for ggplot2 lines (separated by factor)? | r|ggplot2 | 0 | 32 | 1 | 71,841,869 | 71,841,869 | 2 | true | 2022-04-12T11:26:06.557Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to manually change line size and alpha values for ggplot2 lines (separated by factor)?<p>I want to create a graph where I can change the line size for ea... |
71,842,210 | Can an external function works in derived contract in solidity?<p>I made a function with visibility <strong>external</strong> in a contract A but When I tried to access through a derived contract B, it's giving an error.</p>
<p><strong><code>Code:</code></strong></p>
<pre><code>contract A{
function f1() pure pub... | <p>The solidity documentation gives a spot on answer for your question, leaving me not much to explain. See <a href="https://docs.soliditylang.org/en/v0.8.13/contracts.html#function-visibility" rel="nofollow noreferrer">docs</a> for other visibilities</p>
<p>Solidity knows two kinds of function calls: external ones tha... | Can an external function works in derived contract in solidity? | blockchain|solidity|smartcontracts|remix | 0 | 286 | 1 | 71,842,419 | 71,842,419 | 2 | true | 2022-04-12T11:54:28.507Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Can an external function works in derived contract in solidity?<p>I made a function with visibility <strong>external</strong> in a contract A but When I trie... |
71,841,934 | Performance of match vs term query in elasticsearch?<p>I've been using a lot of <code>match</code> queries in my project. Now, I have just faced with <code>term</code> query in Elasticsearch. It seems the term query is more faster in case that keyword of your query is specified.
Now I have a question there..
Should I r... | <p>Elastic discourages to use <code>term</code> queries for <code>text</code> fields for <a href="https://www.elastic.co/guide/en/elasticsearch/reference/8.1/query-dsl-term-query.html#avoid-term-query-text-fields" rel="nofollow noreferrer">obvious reasons</a> (analysis!!), but if you know you need to query a <code>keyw... | Performance of match vs term query in elasticsearch? | elasticsearch|elasticsearch-dsl | 0 | 527 | 2 | 71,842,585 | 71,842,585 | 2 | true | 2022-04-12T11:36:03.367Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Performance of match vs term query in elasticsearch?<p>I've been using a lot of <code>match</code> queries in my project. Now, I have just faced with <code>t... |
71,842,561 | How to change multi filter operators with a brief solution, in Rx Js observables?<p>I want to write this code with a relatively short code, can you advise some solution?
Thanks!</p>
<pre><code>fromEvent(document, 'click').pipe(
filter(e => e.target !== this.one.nativeElement),
filter(e => e.target !== this.two.na... | <pre><code>fromEvent(document, 'click').pipe(
filter(e => ![
this.one.nativeElement,
this.two.nativeElement,
this.three.nativeElement
].some(elem => e.target === elem)),
map(() => console.log('target'))
).subscribe();
</code></pre> | How to change multi filter operators with a brief solution, in Rx Js observables? | angular|rxjs|rxjs-pipeable-operators | 0 | 33 | 1 | 71,842,652 | 71,842,652 | 2 | true | 2022-04-12T12:16:58.283Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to change multi filter operators with a brief solution, in Rx Js observables?<p>I want to write this code with a relatively short code, can you advise so... |
71,842,740 | Linearize a BOM, issue when using setValues(result) instead of appendRow<p>Input is as follows (this is a simplified example)</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>LEVEL</th>
<th>NAME</th>
<th>JOB</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>A</td>
<td>Alpha</td>
</tr>
<tr>
<td... | <p>I believe your goal is as follows.</p>
<ul>
<li>By modifying your script, you want to achieve the situation of <code>I have to linearize to obtain that output</code> using <code>bd2.getRange(1, 1, result.length, result[0].length).setValues(result)</code>.</li>
</ul>
<p>In this case, how about the following modificat... | Linearize a BOM, issue when using setValues(result) instead of appendRow | google-apps-script | 0 | 27 | 1 | 71,843,495 | 71,843,495 | 2 | true | 2022-04-12T12:28:45.787Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Linearize a BOM, issue when using setValues(result) instead of appendRow<p>Input is as follows (this is a simplified example)</p>
<div class="s-table-contain... |
71,847,029 | Spring @Valid annotation not working as validating dto fields?<p>I have checked many other questions about it but I cannot find the solution, where am I missing ?</p>
<p>Here is the controller method:</p>
<pre><code>package com.nishberkay.nishcustomer.controller;
import com.nishberkay.nishcustomer.dto.request.Customer... | <p>The issue here is that you defined your <code>id</code> as a primitive type, which can never be null.</p>
<p>If you chose a boxed type (<code>Integer</code> in this case) this should work.</p>
<p>So in your DTO:</p>
<pre><code>import javax.validation.constraints.NotNull;
@Data
public class CustomerUpdateRequestDto ... | Spring @Valid annotation not working as validating dto fields? | java|spring|spring-boot|validation|spring-restcontroller | 0 | 520 | 1 | 71,847,178 | 71,847,178 | 2 | true | 2022-04-12T17:39:33.997Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Spring @Valid annotation not working as validating dto fields?<p>I have checked many other questions about it but I cannot find the solution, where am I miss... |
71,848,838 | How to make an efficient UPDATE like my SELECT in MariaDB<p><strong>Background</strong></p>
<p>I made a small table of 10 rows from a previous SELECT already ran (SavedAnimals).</p>
<p>I have a massive table (animals) which I would like to UPDATE using the rows with the same id as each row in my new table.</p>
<p><stro... | <p>Use <code>JOIN</code> rather than <code>WHERE...IN</code>. MySQL tends to optimize them better.</p>
<pre><code>UPDATE animals AS a
JOIN SavedAnimals AS sa ON a.id = sa.animal_id
SET a.ignored=1, a.ignored_when=CURRENT_TIMESTAMP
WHERE a.ignored = 0
</code></pre> | How to make an efficient UPDATE like my SELECT in MariaDB | mysql|sql|mariadb | 0 | 31 | 2 | 71,848,978 | 71,848,978 | 2 | true | 2022-04-12T20:35:30.877Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to make an efficient UPDATE like my SELECT in MariaDB<p><strong>Background</strong></p>
<p>I made a small table of 10 rows from a previous SELECT already... |
71,847,476 | elasticsearch attachment plugin performance improvement<p>I am new to elasticsearch attempting to parse pdf files via ingestion pipeline using the elasticsearch <a href="https://www.elastic.co/guide/en/elasticsearch/plugins/current/using-ingest-attachment.html" rel="nofollow noreferrer">atachment plugin</a> , but it se... | <p>Its an expensive operation and will cost resources, I would explore using FSCrawler ( <a href="https://fscrawler.readthedocs.io/en/fscrawler-2.9/" rel="nofollow noreferrer">https://fscrawler.readthedocs.io/en/fscrawler-2.9/</a>) or other Tika library to off-load the whole operation from ES; You might be able to get ... | elasticsearch attachment plugin performance improvement | elasticsearch | 0 | 29 | 1 | 71,849,024 | 71,849,024 | 2 | true | 2022-04-12T18:24:41.307Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
elasticsearch attachment plugin performance improvement<p>I am new to elasticsearch attempting to parse pdf files via ingestion pipeline using the elasticsea... |
71,841,365 | Can we set Strong Consistent Read on DynamoDB after creation<p>I recently came to know about the two read modes on DDB, and I wanted to implement Strong Consistent Read while that I came across the article <a href="https://dynobase.dev/dynamodb-read-consistency/" rel="nofollow noreferrer">https://dynobase.dev/dynamodb-... | <p>The document that you found is misleading. DynamoDB definitely does <strong>not</strong> require you to define when creating a table whether or not reads will be "eventually consistent" or "strongly consistent". Rather, on <strong>every read operation</strong> (<code>GetItem</code>, <code>Query</... | Can we set Strong Consistent Read on DynamoDB after creation | amazon-web-services|amazon-dynamodb | 0 | 263 | 1 | 71,849,431 | 71,849,431 | 2 | true | 2022-04-12T10:52:32.127Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Can we set Strong Consistent Read on DynamoDB after creation<p>I recently came to know about the two read modes on DDB, and I wanted to implement Strong Cons... |
71,845,353 | Copy smaller Mat to larger Mat OpenCv For Unity<p>I'm trying to take a smaller image mat and copy it into larger mat so I can resize it while keeping the aspect ratio of the image. So, basically this:</p>
<p><a href="https://i.stack.imgur.com/2FEDe.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2FED... | <p>sorry for my english,but ur code has a bug.</p>
<pre><code>Mat roi = new Mat(resized, new Rect(0, 0, col, row));
</code></pre>
<p>image copied to roi,but this mat not related with resized Mat.so u have to do like this:</p>
<pre><code>Rect roi=new Rect(0,0,width,height);
source.copyto(resized.submat(roi));
</code></p... | Copy smaller Mat to larger Mat OpenCv For Unity | c#|opencv|unity3d | 0 | 286 | 1 | 71,852,595 | 71,852,595 | 2 | true | 2022-04-12T15:27:10.423Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Copy smaller Mat to larger Mat OpenCv For Unity<p>I'm trying to take a smaller image mat and copy it into larger mat so I can resize it while keeping the asp... |
71,855,759 | Airflow fernet key does not mask credentials<p>I am using Apache Airflow 2.2.3 with Python 3.9 and run everything in docker containers.
When I add connections to airflow I do it via the GUI because this way the passwords were supposed to be encrypted. In order for the encryption to work I installed the python package &... | <p>I think you make wrong assumptions about "encryption" and "security". The assumptions that you can prevent user who have access to running software (which airflow CLI gives you) are unrealistic and is not really "physically achievable".</p>
<ol>
<li><p>Fernet key is used to encrypt data... | Airflow fernet key does not mask credentials | docker|airflow|fernet | 0 | 520 | 1 | 71,856,193 | 71,856,193 | 2 | true | 2022-04-13T10:15:02.073Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Airflow fernet key does not mask credentials<p>I am using Apache Airflow 2.2.3 with Python 3.9 and run everything in docker containers.
When I add connection... |
71,860,844 | python cant check for more than one matching string<p>I want to check for a string match with an if statement. My code looks like this:</p>
<pre><code>labels = {"Channel 1": "", "Channel 2": "", "Channel 3": "", "Channel 4": ""}
for label i... | <p><code>"Channel 1" or "Channel 2" == label</code> will evaluate to True because <code>"Channel 1"</code> as a string with content will always evaluate to True.</p>
<p>The order of operations here looks like this: <code>("Channel 1") or ("Channel 2" == label)</code></p... | python cant check for more than one matching string | python|if-statement | 0 | 19 | 2 | 71,860,878 | 71,860,878 | 2 | true | 2022-04-13T16:27:49.780Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
python cant check for more than one matching string<p>I want to check for a string match with an if statement. My code looks like this:</p>
<pre><code>labels... |
71,861,737 | Use historycalRecords as default model in view class<p>I am using <code>HistorycalRecords</code> as table member</p>
<pre><code>from simple_history.models import HistoricalRecords
class Delivery(BaseModel):
history = HistoricalRecords(
excluded_fields=['created_by', 'updated_by', 'updated_at'])
</code></pre... | <p>Use <code>Model.history.model</code> to access the history model for use in the generic views</p>
<pre><code>class ActionLogListView(LoginRequiredMixin, ListSearchView):
template_name = "message_logs/action_log.html"
form_class = ActionLogSearchForm
model = Delivery.history.model
</code></pre> | Use historycalRecords as default model in view class | python|django | 0 | 25 | 1 | 71,861,776 | 71,861,776 | 2 | true | 2022-04-13T17:40:41.140Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Use historycalRecords as default model in view class<p>I am using <code>HistorycalRecords</code> as table member</p>
<pre><code>from simple_history.models im... |
71,866,300 | Pandas selecting rows with multiple conditions<p>Let's make a dataframe:</p>
<pre><code>>>> np.random.seed(0)
>>> df = pd.DataFrame(np.random.randn(5,3), columns=list('ABC'))
>>>
A B C
0 1.764052 0.400157 0.978738
1 2.240893 1.867558 -0.977278
2 0.950088 -0.151... | <p>You can use <code>between</code>. By default, it's both sides inclusive.</p>
<pre><code>out = df[df['C'].between(0,1)]
</code></pre>
<p>If you want only one side inclusive, you can select that as well. For example, the following is only right-side inclusive:</p>
<pre><code>out = df[df['C'].between(0,1, inclusive='ri... | Pandas selecting rows with multiple conditions | python|pandas|dataframe | 0 | 263 | 1 | 71,866,312 | 71,866,312 | 2 | true | 2022-04-14T03:49:47.107Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pandas selecting rows with multiple conditions<p>Let's make a dataframe:</p>
<pre><code>>>> np.random.seed(0)
>>> df = pd.DataFrame(np.rand... |
71,866,048 | Understanding the "Median" in this Graph<p>I tried running the TSP in R using the following code (<a href="https://rstudio-pubs-static.s3.amazonaws.com/132872_620c10f340f348b88453d75ec99960ff.html" rel="nofollow noreferrer">https://rstudio-pubs-static.s3.amazonaws.com/132872_620c10f340f348b88453d75ec99960ff.html</a>):<... | <p>I agree in that this is a somewhat misleading visualisation choice.</p>
<p>The explanation seems to be in the examples at the bottom of <code>?plot.ga-method</code>:</p>
<p>The relevant code for the shaded area (ribbon) is</p>
<pre class="lang-r prettyprint-override"><code>geom_ribbon(aes(x = iter, ymin = median, ym... | Understanding the "Median" in this Graph | r|data-visualization | 0 | 34 | 1 | 71,866,331 | 71,866,331 | 2 | true | 2022-04-14T03:07:38.953Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Understanding the "Median" in this Graph<p>I tried running the TSP in R using the following code (<a href="https://rstudio-pubs-static.s3.amazonaws.com/13287... |
71,867,323 | making a small tick mark across y-axis and annotating it with a text in matplotlib<p>I am trying to plot a figure with a small tick mark across a particular point in y - axis and label that point. Here is a sample plot:</p>
<pre><code>df = pd.DataFrame({'x': np.arange(10),
'y': np.arange(100, 200, 10... | <p>Since the artist outside of the Axes is clipped, you can set <code>clip_on</code> to False, and set <code>xmin</code> to a negative value, such as:</p>
<pre class="lang-py prettyprint-override"><code>ax.axhline(y=150, xmin=-0.02, xmax=0.02, clip_on=False)
</code></pre> | making a small tick mark across y-axis and annotating it with a text in matplotlib | python|pandas|matplotlib | 0 | 31 | 1 | 71,867,476 | 71,867,476 | 2 | true | 2022-04-14T06:27:58.557Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
making a small tick mark across y-axis and annotating it with a text in matplotlib<p>I am trying to plot a figure with a small tick mark across a particular ... |
71,867,497 | How do I make my links in the navigation bar work properly?<p>Looked up hover effects on navigation bars on YouTube and copied the code but when I try to click the elements on the navigation bar, it won't work. The cursor also doesn't change. It looks and operates just like another text.</p>
<p>This is the video I used... | <p>It's because <code>section</code> tag fills the whole page and the <code>header</code> stucks under it. So your mouse always hovers on <code>section</code>. You can see that by adding <code>z-index: 9999;</code> to <code>header</code>.</p> | How do I make my links in the navigation bar work properly? | html|css | 0 | 25 | 2 | 71,867,531 | 71,867,531 | 2 | true | 2022-04-14T06:47:31.693Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I make my links in the navigation bar work properly?<p>Looked up hover effects on navigation bars on YouTube and copied the code but when I try to cli... |
71,868,732 | chain embedded relation between 3 collation in mongodb<p>I'm trying to fetch data from 3 collection by embedded relation in mongodb.</p>
<p>user_collection :</p>
<pre><code>{
_id:1,
name:"Noah",
city_id:2,
job_id:3
},
{
_id:2,
name:"Oliver",
city_id:2,
job_id:1
},
{
... | <p>Use double <code>$lookup</code></p>
<pre><code>db.city.aggregate([
{
$lookup: {
from: "user",
localField: "_id",
foreignField: "city_id",
as: "users",
pipeline: [
{
$lookup: {
from: "job",
... | chain embedded relation between 3 collation in mongodb | node.js|mongodb|mongoose|mongodb-query | 0 | 30 | 1 | 71,868,904 | 71,868,904 | 2 | true | 2022-04-14T08:35:06.113Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
chain embedded relation between 3 collation in mongodb<p>I'm trying to fetch data from 3 collection by embedded relation in mongodb.</p>
<p>user_collection :... |
71,870,844 | Single line calculated property throws ParserError. Bug or not?<p>Have replicated this on two machines in both Windows PowerShell 5.1 and PowerShell Core 7.2.2, but seen no mention of it online. Is this a known bug, or should calculated properties simply not be written on a single line?</p>
<p>This fails with <code>Une... | <blockquote>
<p>Is this a known bug</p>
</blockquote>
<p>No</p>
<blockquote>
<p>should calculated properties simply not be written on a single line?</p>
</blockquote>
<p>Sure, you just need an explicit <em>statement terminator</em> to separate the two key-value entries.</p>
<p>When you organize a hashtable literal (the... | Single line calculated property throws ParserError. Bug or not? | powershell | 0 | 25 | 1 | 71,870,916 | 71,870,916 | 2 | true | 2022-04-14T11:23:31.467Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Single line calculated property throws ParserError. Bug or not?<p>Have replicated this on two machines in both Windows PowerShell 5.1 and PowerShell Core 7.2... |
71,876,831 | PhpStorm cursor doesnt move on return in strings<p>When I press the <code>Enter</code> key while using PhpStorm when my cursor is in a string, the cursor doesn't move to the next line. It creates a new line, but the cursor remains in place. How can I change this?</p>
<p><a href="https://i.stack.imgur.com/CNR1f.png" rel... | <p><strong>It's a bug.</strong> It affects strings with injected SQL language.</p>
<p><a href="https://youtrack.jetbrains.com/issue/WI-56153" rel="nofollow noreferrer">https://youtrack.jetbrains.com/issue/WI-56153</a> -- watch this ticket (star/vote/comment) to get notified with any progress.</p> | PhpStorm cursor doesnt move on return in strings | phpstorm | 0 | 18 | 1 | 71,876,914 | 71,876,914 | 2 | true | 2022-04-14T19:37:35.480Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
PhpStorm cursor doesnt move on return in strings<p>When I press the <code>Enter</code> key while using PhpStorm when my cursor is in a string, the cursor doe... |
71,877,158 | How to properly close express servers making sure port are released<p>I have this issue that especially on a Mac when I close a Node server "CTRL + Z" the server gets killed but the ports don't get released.</p>
<p>What is the proper way to close a server to make sure that the ports get closed so I can restar... | <p>They key combination to kill a server (or any process in bash) is <kbd>CTRL</kbd>+<kbd>C</kbd>. <kbd>CTRL</kbd>+<kbd>Z</kbd> merely stops (pauses) the process and returns you to the current shell and can be resumed using <code>fg</code>.</p> | How to properly close express servers making sure port are released | javascript|node.js|express | 0 | 23 | 1 | 71,877,174 | 71,877,174 | 2 | true | 2022-04-14T20:12:25.203Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to properly close express servers making sure port are released<p>I have this issue that especially on a Mac when I close a Node server "CTRL + Z&qu... |
71,880,951 | When Header is added the Protected Route is not getting rendered<p>I am doing a simple application which has a protected route.</p>
<p>The code goes like:</p>
<pre><code>function App() {
return (
<>
<Router>
<Header />
<Routes>
<Route path="/" e... | <p>Actually, it might be rendering it. It maybe invisible for us because of CSS styling.</p>
<pre class="lang-jsx prettyprint-override"><code><Navbar bg="light" variant="light" fixed="top">
</code></pre>
<p>In the above line, you have given the <em>NavBar</em> to be <code>fixed</code... | When Header is added the Protected Route is not getting rendered | javascript|reactjs|react-bootstrap | 0 | 30 | 1 | 71,880,983 | 71,880,983 | 2 | true | 2022-04-15T06:51:31.650Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
When Header is added the Protected Route is not getting rendered<p>I am doing a simple application which has a protected route.</p>
<p>The code goes like:</p... |
71,882,323 | Determine how many key values have changed in an object<p>I have two of the same objects to compare, with different data types as object props (array and object).</p>
<p>I want to know how many properties are different than the first one. See example below:</p>
<pre><code>OriginalObject = {
names : [],
numbers : [],
... | <p>If you want a solution using lodash, you could apply <a href="https://lodash.com/docs/4.17.15#toPairs" rel="nofollow noreferrer"><code>_.toPairs()</code></a> on both of your objects. Then use <a href="https://lodash.com/docs/4.17.15#differenceWith" rel="nofollow noreferrer"><code>_.differenceWith()</code></a> to com... | Determine how many key values have changed in an object | javascript|lodash|javascript-objects | 0 | 25 | 2 | 71,882,467 | 71,882,467 | 2 | true | 2022-04-15T09:28:39.747Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Determine how many key values have changed in an object<p>I have two of the same objects to compare, with different data types as object props (array and obj... |
71,874,714 | Patch through Kuberentes rest API<p>I am trying to patch horizontal pod autoscaler by setting minimum replica through kubernetes api</p>
<p>Here is the curl which I am using</p>
<pre><code>curl -k \
--request PATCH \
--header "Authorization: Bearer $KUBE_TOKEN" \
--header "Co... | <p>The URL path must contain the name:</p>
<pre><code>/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}
</code></pre>
<p>Its documented on this page <a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#horizontalpodautoscaler-v1-autoscaling" rel="nofollow noreferrer">h... | Patch through Kuberentes rest API | kubernetes|kubectl|kube-apiserver | 0 | 264 | 1 | 71,883,737 | 71,883,737 | 2 | true | 2022-04-14T16:17:34.320Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Patch through Kuberentes rest API<p>I am trying to patch horizontal pod autoscaler by setting minimum replica through kubernetes api</p>
<p>Here is the curl ... |
71,884,935 | Why is my parent not waiting for each child?<p>Why is this program not waiting for all children? There are always 2 that are not finished when the parent's <code>wait(NULL)</code> recognizes that all children finished.</p>
<pre><code>#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include ... | <p>In a comment in the code, you ask:</p>
<pre><code>// do I need exit(0) here to terminate all children or just return?
</code></pre>
<p>Given that the code is in <code>main()</code>, <code>return(0);</code> and <code>exit(0);</code> are equivalent. In any other function, it is almost certain that you'd need <code>exi... | Why is my parent not waiting for each child? | c|fork|parent-child | 0 | 34 | 2 | 71,885,062 | 71,885,062 | 2 | true | 2022-04-15T13:56:42.290Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why is my parent not waiting for each child?<p>Why is this program not waiting for all children? There are always 2 that are not finished when the parent's <... |
71,884,836 | TypeError: Cannot read property 'Provider' of undefined React Native Context<p>I'm getting error <code>TypeError: Cannot read property 'Provider' of undefined</code> in App.js. In the line <code><AuthContext.Provider value={{ authorized, setAuthorized }}></code>.</p>
<pre><code>App.js
....
import React, { useStat... | <p>Seems that you just need to import with {}:</p>
<pre><code>import { AuthContext } from './components/authContext.js';
</code></pre>
<p>Since you didn't export default your AuthContext. More info <a href="https://developer.mozilla.org/en-US/docs/web/javascript/reference/statements/export#using_the_default_export" rel... | TypeError: Cannot read property 'Provider' of undefined React Native Context | react-native|react-context | 0 | 535 | 1 | 71,885,311 | 71,885,311 | 2 | true | 2022-04-15T13:47:23.560Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
TypeError: Cannot read property 'Provider' of undefined React Native Context<p>I'm getting error <code>TypeError: Cannot read property 'Provider' of undefine... |
71,887,769 | Calculating percentages within category using geom_col<p>This has been asked in various forms before, but I'm attempting it in a slightly different way and can't seem to get it exactly right. When I use this code:</p>
<pre><code>d %>%
drop_na(attend) %>%
count(race, attend) %>%
group_by(race) %>%
... | <p>To achieve your desired result filter your data for <code>attend == 1</code> values after computing the percentages.</p>
<p>Note: The blacks lines appear because of overplotting, i.e. as you set <code>position = "dodge"</code> the bars for <code>attend=0</code> and <code>attend=1</code> are plotted on top ... | Calculating percentages within category using geom_col | r|ggplot2|geom-col | 0 | 32 | 1 | 71,887,940 | 71,887,940 | 2 | true | 2022-04-15T18:45:34.660Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Calculating percentages within category using geom_col<p>This has been asked in various forms before, but I'm attempting it in a slightly different way and c... |
71,878,197 | What are ARG and LABEL in a Dockerfile<p>I have a Dockerfile that starts out...</p>
<pre><code>FROM some.artifactory.example.com/openjdk:8-jre-alpine
ARG version
LABEL version=$version
...
</code></pre>
<p>I'd like to know what 'version' and '$version' are and what their utility is as the values to ARG and LABEL respe... | <p>A <code>LABEL</code> is a piece of metadata on an image. You can add any <code>key=val</code> as a LABEL.</p>
<p>An <code>ARG</code> is something you can pass at build time, to the builder. You can then use the value in your Dockerfile during the build (but it is no longer available at runtime; so unless you somehow... | What are ARG and LABEL in a Dockerfile | dockerfile | 0 | 290 | 1 | 71,888,596 | 71,888,596 | 2 | true | 2022-04-14T22:23:12.173Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What are ARG and LABEL in a Dockerfile<p>I have a Dockerfile that starts out...</p>
<pre><code>FROM some.artifactory.example.com/openjdk:8-jre-alpine
ARG ve... |
71,890,230 | Handling aysnc data in a page NetxJS file<p>I have a webpage that pulls launch data from the SpaceX graphQL API, and then renders that data as a list. Users can click on a specific launch in that list that takes them to a 'details' page about that particular launch. <br>
On the details page, I'm trying to extract a par... | <p>This is caused by how <a href="https://nextjs.org/docs/routing/dynamic-routes#caveats" rel="nofollow noreferrer">Automatic Static Optimization</a> works:</p>
<blockquote>
<p>Pages that are statically optimized by Automatic Static Optimization
will be hydrated without their route parameters provided, i.e query
will b... | Handling aysnc data in a page NetxJS file | reactjs|next.js | 0 | 22 | 1 | 71,890,292 | 71,890,292 | 2 | true | 2022-04-16T00:57:07.517Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Handling aysnc data in a page NetxJS file<p>I have a webpage that pulls launch data from the SpaceX graphQL API, and then renders that data as a list. Users ... |
71,886,269 | Vue 3 and Vue Router 4 How to pass prop when using router-view only for specific component<p>I have basic routing and props working but the way I have it, the msg prop will be sent to every component loaded by the router? Is there a way around this?</p>
<p>App.vue is my base component</p>
<pre class="lang-html prettypr... | <p>You could configure a <a href="https://router.vuejs.org/guide/advanced/meta.html#route-meta-fields" rel="nofollow noreferrer">route meta field</a> just for specific routes:</p>
<pre class="lang-js prettyprint-override"><code>// router.js
import { createRouter } from 'vue-router'
import HomePage from '@/views/HomePag... | Vue 3 and Vue Router 4 How to pass prop when using router-view only for specific component | vue.js|vue-component|vue-router|vuejs3 | 0 | 2,077 | 3 | 71,891,098 | 71,891,098 | 2 | true | 2022-04-15T16:02:16.843Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Vue 3 and Vue Router 4 How to pass prop when using router-view only for specific component<p>I have basic routing and props working but the way I have it, th... |
71,898,698 | How to fix: "error: resource color not found" in android studio<p>I am getting the following errors in android studios:</p>
<pre><code>/Users/amaan/AndroidStudioProjects/UTATrivia2/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values-night-v8/values-night-v8.xml:37: error: resource color/purple_700... | <p>add these below color codes in your <code>colors.xml</code></p>
<pre><code><color name="purple_700">#FF3700B3</color>
<color name="black">#FF000000</color>
</code></pre>
<p>you can add your custom color in your hashcode <code>#FF3700B3</code> but do not change the name of ... | How to fix: "error: resource color not found" in android studio | android|android-studio | 0 | 1,293 | 2 | 71,900,093 | 71,900,093 | 2 | true | 2022-04-17T01:38:07.907Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to fix: "error: resource color not found" in android studio<p>I am getting the following errors in android studios:</p>
<pre><code>/Users/amaan/AndroidSt... |
71,904,962 | What is the difference between print(var,var) and print(var),(var)?<pre><code>**>>>a=2
>>>b=5
>>>print(a,b)
2 5
>>>print(a),(b)
2
(None, 5)**
</code></pre>
<p>Can someone help me understand why the 2nd print statement returns (None,5)?
I'm new to this, so sorry if this is a silly que... | <p>There are three pertinent facts here.</p>
<ol>
<li><p>The <code>print</code> function returns nothing. Well, technically it returns "None". Its usefulness is entirely in its side effects -- printing to the console.</p>
</li>
<li><p>The command line interpreter (what you get with ">>>")... | What is the difference between print(var,var) and print(var),(var)? | python | 0 | 34 | 1 | 71,904,995 | 71,904,995 | 2 | true | 2022-04-17T19:50:05.257Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What is the difference between print(var,var) and print(var),(var)?<pre><code>**>>>a=2
>>>b=5
>>>print(a,b)
2 5
>>>print(... |
71,905,456 | Use a variable from one component in another (between .ts files) on Angular<p>So basically I have a todo list being added dynamically and I want to exclude the items, however the list itself is outside the task component:</p>
<p>In the task.component.html, the list is being iterated to be displayed:</p>
<pre><code><... | <p>You can use a <a href="https://angular.io/guide/architecture-services" rel="nofollow noreferrer">service</a> to centralise the data. The service can then be injected into both components and this way you can access the array defined inside of the service.</p> | Use a variable from one component in another (between .ts files) on Angular | angular|typescript | 0 | 34 | 1 | 71,905,520 | 71,905,520 | 2 | true | 2022-04-17T21:05:36.183Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Use a variable from one component in another (between .ts files) on Angular<p>So basically I have a todo list being added dynamically and I want to exclude t... |
71,905,376 | Yelp API Request returning as "undefined"<p>I am making an API call to the <code>yelp-fusion</code>. However, when I try to log this result, the log shows as undefined. I assume this is due to something regarding promises or async functions. Note: I need to keep this in a function as I intend to export this function to... | <p>I think you are handling the promise correctly here. However, you are not returning anything from the function, then when you console log its output you should get undefined.</p>
<p>Try this:</p>
<pre><code>function businessSearch(search){
return client.search(search).then(response => {
return response
})... | Yelp API Request returning as "undefined" | javascript|typescript|http|fetch|yelp | 0 | 35 | 1 | 71,905,566 | 71,905,566 | 2 | true | 2022-04-17T20:51:14.840Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Yelp API Request returning as "undefined"<p>I am making an API call to the <code>yelp-fusion</code>. However, when I try to log this result, the log shows as... |
71,908,741 | The argument type 'RxString' can't be assigned to the parameter type 'String'<p>I try to use the GetX framework in flutter for my project. but it shows the Error regarding RxString. whenever I try to use the Obx method to call the controller object inside a text widget or a other String parameter widget it shows the er... | <p>You are passing directly the <em><strong>Rx</strong></em> to the <em>data</em> property of <em>QrImage</em>. You need to pass the value of the <em><strong>Rx</strong></em>:</p>
<pre><code>data: _controller.qrValue.value,
</code></pre> | The argument type 'RxString' can't be assigned to the parameter type 'String' | flutter|flutter-getx | 0 | 525 | 2 | 71,908,773 | 71,908,773 | 2 | true | 2022-04-18T07:18:19.353Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
The argument type 'RxString' can't be assigned to the parameter type 'String'<p>I try to use the GetX framework in flutter for my project. but it shows the E... |
71,908,842 | Encountered NoMethodError when binding two table data in Rails console<p>I have established an association between three models, where User can <code>has_many</code> Recipe, and Recipe <code>belongs_to</code> User. This is what the model sets:</p>
<p>model User</p>
<pre><code>has_many :reviews
has_many :recipes, throug... | <p>It doesn't work since you're attempting to assign a single record to a <code>has_many</code> assocation. The reason you're getting <code>undefined method 'each'</code> is that the generated setter expects an array or a an assocation that can be iterated upon. For example:</p>
<pre><code>user = User.find(2)
user.reci... | Encountered NoMethodError when binding two table data in Rails console | ruby-on-rails | 0 | 18 | 1 | 71,908,948 | 71,908,948 | 2 | true | 2022-04-18T07:29:42.327Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Encountered NoMethodError when binding two table data in Rails console<p>I have established an association between three models, where User can <code>has_man... |
71,911,236 | How to do multiple arithmetic operations in R by group<p>have several datasets. The first one</p>
<pre><code>lid=structure(list(x1 = 619490L, x2 = 10L, x3 = 0L, x4 = 6089230L,
x5 = 0L, x6 = -10L), class = "data.frame", row.names = c(NA,
-1L))
</code></pre>
<p>second dataset</p>
<pre><code>lidar=structur... | <pre class="lang-r prettyprint-override"><code>library(dplyr)
lidar %>%
group_by(group) %>%
mutate(
row = (A-lid$x1)/lid$x3,
col = (B-lid$x4)/lid$x6,
cdif = max(C)-min(C)
) %>%
ungroup()
# # A tibble: 20 x 14
# A B C gpstime Intensity ReturnNumber NumberOfReturns Scan... | How to do multiple arithmetic operations in R by group | r|dplyr | 0 | 35 | 1 | 71,911,347 | 71,911,347 | 2 | true | 2022-04-18T11:33:31.957Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to do multiple arithmetic operations in R by group<p>have several datasets. The first one</p>
<pre><code>lid=structure(list(x1 = 619490L, x2 = 10L, x3 = ... |
71,911,876 | Clicked 'do not show again' on a prompt in PhpStorm, how to undo?<p>I had a notification in PhpStorm:</p>
<blockquote>
<p>Debug session was finished without being paused. It may be caused by
path mappings misconfiguration or not synchronized local and remote
projects. To figure out the problem check path mappings confi... | <p><code>Settings/Preferences | PHP | Debug | Advanced settings | Notify if debug session was finished without being paused</code>.</p> | Clicked 'do not show again' on a prompt in PhpStorm, how to undo? | phpstorm | 0 | 30 | 1 | 71,912,043 | 71,912,043 | 2 | true | 2022-04-18T12:33:34.743Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Clicked 'do not show again' on a prompt in PhpStorm, how to undo?<p>I had a notification in PhpStorm:</p>
<blockquote>
<p>Debug session was finished without ... |
71,911,258 | ytick descriptions in seaborn<p>I'm trying to make a heatmap a heatmap with extensive y axis descriptions.
<a href="https://i.stack.imgur.com/oZIwB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oZIwB.png" alt="" /></a></p>
<p>I would like to know if there is anyways to have a second and a third lay... | <p>The labels for the rows can be set up in the graph settings, but other than that, I think the annotation function is the only way to handle this. the second level group names are set using the annotation function, and the coordinate criteria are set using the axis criteria. Axis labels are added using the text funct... | ytick descriptions in seaborn | python|seaborn | 0 | 31 | 1 | 71,912,075 | 71,912,075 | 2 | true | 2022-04-18T11:35:11.723Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
ytick descriptions in seaborn<p>I'm trying to make a heatmap a heatmap with extensive y axis descriptions.
<a href="https://i.stack.imgur.com/oZIwB.png" rel=... |
71,914,425 | How to get minute difference for every 2 datetime objects<p>I have a pandas DF</p>
<pre><code>time #
2021-11-04 04:34:55 PM 1
2021-11-04 04:36:55 PM 2
2021-11-04 04:39:55 PM 3
2021-11-04 04:45:55 PM 4
2021-11-04 04:46:55 PM 5
2021-11-04 04:47:55 PM 6
2021-11-04 04:49:55 PM 7
2021-11-04... | <p>Perhaps simply:</p>
<pre class="lang-py prettyprint-override"><code>df['time'].diff()
</code></pre>
<p>Or, if <code>time</code> is the index():</p>
<pre class="lang-py prettyprint-override"><code>pd.Series(df.index).diff()
</code></pre> | How to get minute difference for every 2 datetime objects | python|pandas|dataframe|datetime | 0 | 29 | 1 | 71,914,493 | 71,914,493 | 2 | true | 2022-04-18T16:26:48.363Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to get minute difference for every 2 datetime objects<p>I have a pandas DF</p>
<pre><code>time #
2021-11-04 04:34:55 PM 1
2021-11-0... |
71,839,501 | firebase.init() keeps crashing on new NativeScript 8.2.3 App<p>I recently created a new NativeScript 8.2.3 project to do a redesign of an older existing project which was running on NativeScript 8.2.2.</p>
<p>I have installed <a href="https://github.com/eddyverbruggen/nativescript-plugin-firebase" rel="nofollow norefer... | <p>There is a rewritten version of that plugin maintained by the Nativescript TSC. Take a look at it <a href="https://github.com/NativeScript/firebase" rel="nofollow noreferrer">https://github.com/NativeScript/firebase</a></p>
<h3>Implementation:</h3>
<h4>Install</h4>
<pre><code>npm install @nativescript/firebase-core
... | firebase.init() keeps crashing on new NativeScript 8.2.3 App | android|angular|firebase|npm|nativescript | 0 | 260 | 1 | 71,914,585 | 71,914,585 | 2 | true | 2022-04-12T08:37:06.163Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
firebase.init() keeps crashing on new NativeScript 8.2.3 App<p>I recently created a new NativeScript 8.2.3 project to do a redesign of an older existing proj... |
71,912,085 | hybrid_expressions in SQLAlchemy with arguments<p>I currently have the following <code>hybrid_property</code> and <code>hybrid_property.expression()</code> on a model I have outlined:</p>
<pre class="lang-py prettyprint-override"><code>class Body():
@hybrid_property
def altitude(self, LST: float, latitude: flo... | <p>You are looking for a <a href="https://docs.sqlalchemy.org/en/14/orm/extensions/hybrid.html#sqlalchemy.ext.hybrid.hybrid_method.__init__" rel="nofollow noreferrer"><code>hybrid_method</code></a>, the <code>hybrid_property</code> doesn't support arguments.</p>
<pre class="lang-py prettyprint-override"><code>class Bod... | hybrid_expressions in SQLAlchemy with arguments | python|sqlalchemy | 0 | 35 | 1 | 71,915,506 | 71,915,506 | 2 | true | 2022-04-18T12:54:20.750Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
hybrid_expressions in SQLAlchemy with arguments<p>I currently have the following <code>hybrid_property</code> and <code>hybrid_property.expression()</code> o... |
71,917,415 | Shifting and negating sBytes producing different type promotions<p>I have my sbyte (41) which is 101001 in binary then I shift It twice to the left and It becomes -92 which is 1111111110100100 in binary meaning that It becomes a short.</p>
<p>But I know that whenever a positive sbyte is negated, It is promoted to Int w... | <p>If you only shifted it to the left, it would have become an int. That's written <code>ehfveriuvhie1 << 2</code>.</p>
<p>But you have used <code><<=</code> which means "shift and then store it back into the original variable", and that variable is type <code>sbyte</code>, which is why the final... | Shifting and negating sBytes producing different type promotions | c#|bit-shift | 0 | 22 | 1 | 71,917,446 | 71,917,446 | 2 | true | 2022-04-18T21:45:51.537Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Shifting and negating sBytes producing different type promotions<p>I have my sbyte (41) which is 101001 in binary then I shift It twice to the left and It be... |
71,917,920 | Is there a bitscan forward/reverse in CUDA<p>Slight odd situation I had but I wish to use the BSF/BSR instruction inside CUDA. Just wondering if there's any way to run this instruction in CUDA without a lot of overhead.</p> | <p>The list of integer intrinsics is available in the <a href="https://docs.nvidia.com/cuda/cuda-math-api/group__CUDA__MATH__INTRINSIC__INT.html" rel="nofollow noreferrer">documentation</a>. You can use the <code>__clz</code> intrinsic for example to mimic BSR. For BSF, I think <code>__ffs</code> should do most of the ... | Is there a bitscan forward/reverse in CUDA | cuda | 0 | 31 | 1 | 71,918,010 | 71,918,010 | 2 | true | 2022-04-18T23:05:04.063Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is there a bitscan forward/reverse in CUDA<p>Slight odd situation I had but I wish to use the BSF/BSR instruction inside CUDA. Just wondering if there's any ... |
71,918,602 | ActiveRecord WHERE IN with a separate query—combine to a single INNER JOIN query<p>I currently have a very complicated query which (simplified) looks like:</p>
<p>User.where(party_id: [Party.cool_parties.pluck(:id)])</p>
<p>It works great, but hits the db with 2 separate queries. I'm just wondering how to combine it in... | <pre class="lang-ruby prettyprint-override"><code>User.where(party_id: Party.cool_parties)
</code></pre>
<p>Just pass the assocation/relation and ActiveRecord will construct a subquery.</p>
<p><code>pluck</code> should only be used in the cases where you actually want to force a query to load the data as an array - whi... | ActiveRecord WHERE IN with a separate query—combine to a single INNER JOIN query | ruby-on-rails|activerecord | 0 | 19 | 1 | 71,918,782 | 71,918,782 | 2 | true | 2022-04-19T01:09:20.997Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
ActiveRecord WHERE IN with a separate query—combine to a single INNER JOIN query<p>I currently have a very complicated query which (simplified) looks like:</... |
71,920,559 | Take list of values and find biggest combination between certain amount of items in the list<p>I have a list of values that has a size of 24.</p>
<p>What I want to do is find the biggest combination using three values from the list. I only want to use three of the values, the highest ones possible.</p>
<p>So if I had a... | <p>IIUC sorting values and extract last 3 values for top3, last sum them:</p>
<pre><code>print (sum(sorted(vals_list)[-3:]))
15
</code></pre> | Take list of values and find biggest combination between certain amount of items in the list | python|pandas|numpy | 0 | 24 | 1 | 71,920,579 | 71,920,579 | 2 | true | 2022-04-19T06:32:08.180Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Take list of values and find biggest combination between certain amount of items in the list<p>I have a list of values that has a size of 24.</p>
<p>What I w... |
71,918,234 | Pass custom object to authenticated routes<p>I was wondering if there was a way to configure the Authentication plugin so that I can pass some params (e.g. a user object) to my route handlers (similar to how UserIdPrincipal is passed in).</p>
<p>As an example, it might look something like this</p>
<pre class="lang-kotl... | <p>You can implement the <code>Principal</code> interface for your <code>User</code> class to receive it in a route. Here is an example:</p>
<pre><code>fun main() {
embeddedServer(Netty, port = 8080, host = "0.0.0.0") {
install(Authentication) {
basic("auth-basic") {
... | Pass custom object to authenticated routes | kotlin|ktor | 0 | 32 | 1 | 71,921,965 | 71,921,965 | 2 | true | 2022-04-18T23:58:06.270Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pass custom object to authenticated routes<p>I was wondering if there was a way to configure the Authentication plugin so that I can pass some params (e.g. a... |
71,913,955 | What will project reactor do in this scenario?<p>In a very low transaction volume environment, such as some of our test environments, what will the project reactor classes do if the subscriber requests N new items to work on, but the publisher currently has less than N new items to send. Will the publisher (1) send le... | <p>If the publisher can partially answer the request, it must send these <code>x < N</code> items. It must also remember that the remaining demand is currently at <code>y = N-x</code>, and send these elements as they become available <em>even if the subscriber has made no further request</em>.</p>
<p>If the publishe... | What will project reactor do in this scenario? | project-reactor | 0 | 25 | 1 | 71,922,925 | 71,922,925 | 2 | true | 2022-04-18T15:41:54.833Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What will project reactor do in this scenario?<p>In a very low transaction volume environment, such as some of our test environments, what will the project r... |
71,853,347 | Interfacing oled to esp32 cam<p>Can someone provide source code for interfacing oled display with esp32-cam either using gpio13-14 or tx/rx pins or even using any available pins on the esp32 cam. I am not using the sd card reader. Moreover, i want to display texts over wifi to the oled.</p> | <p>Well after searching i found the following solution which worked for me. For SDA and SCL i used pin 15 and pin 13 respectively ('SSD1306 display(0x3c, 15, 13);' this is the code which i changed) . I used <a href="https://techtutorialsx.com/2017/12/03/esp32-arduino-ssd1306-oled-redrawing-a-string/" rel="nofollow nore... | Interfacing oled to esp32 cam | esp32|i2c|arduino-esp32 | 0 | 536 | 2 | 71,923,325 | 71,923,325 | 2 | true | 2022-04-13T07:12:25.960Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Interfacing oled to esp32 cam<p>Can someone provide source code for interfacing oled display with esp32-cam either using gpio13-14 or tx/rx pins or even usin... |
71,924,521 | How to delete multiple words separated by symbols such as class="hello" in vim?<p>Let's say I want to delete <code>class="hello"</code> in the example below:</p>
<pre><code><div class="hello" id="test">
</code></pre>
<p>I know there's <code>diw</code> to delete the word the cursor is... | <p>Vim allows you to operate on a "word" (colloquially: "small word") or a "WORD" (colloquially: "big word"). The two are described under <code>:help word</code>.</p>
<p>In your example:</p>
<ul>
<li><code>class</code>, <code>=</code>, <code>"</code>, <code>hello</code>, and... | How to delete multiple words separated by symbols such as class="hello" in vim? | vim | 0 | 18 | 1 | 71,925,752 | 71,925,752 | 2 | true | 2022-04-19T11:53:27.620Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to delete multiple words separated by symbols such as class="hello" in vim?<p>Let's say I want to delete <code>class="hello"</code> in the exam... |
71,924,333 | Allow-Origin does not work when folder exists<p>Consider a page served by apache2 on http://localhost/htaccess-test for example.</p>
<p>The folder might look like this:</p>
<pre><code>htaccess-test
|- .htaccess
|- index.php
</code></pre>
<p>And this is the .htaccess:</p>
<pre><code>Header add Access-Control-Allow-Ori... | <blockquote>
<pre><code>xhttp.open("PUT", "http://localhost/htaccess-test/foo");
</code></pre>
</blockquote>
<p>If <code>/foo</code> is a physical directory then mod_dir will issue a 301 redirect to append the trailing slash. The redirect response won't have the CORS headers set since you are not us... | Allow-Origin does not work when folder exists | .htaccess|apache2 | 0 | 30 | 1 | 71,926,735 | 71,926,735 | 2 | true | 2022-04-19T11:38:25.043Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Allow-Origin does not work when folder exists<p>Consider a page served by apache2 on http://localhost/htaccess-test for example.</p>
<p>The folder might look... |
71,931,113 | Mysql 8 connect only with ssl-ca (server-ca.pem)<p>I found an old <a href="https://serverfault.com/questions/890358/connect-mysql-using-ssl-only-with-the-ssl-ca-option">question</a> in ServerFault on the same topic but I am not sure what has changed with MySQL 8. Do I need all 3, the server-ca, client-cert and client-k... | <p>The bit that's really important is the client key.</p>
<p>In my experience with GCP, depending on the exact setup, you can often just use the client key and client cert, rather than needing to supply the server certificate (which GCP stores on their end anyway).</p>
<p>Cloud SQL allows you to simply download the ser... | Mysql 8 connect only with ssl-ca (server-ca.pem) | mysql|ssl|google-cloud-sql | 0 | 264 | 1 | 71,931,224 | 71,931,224 | 2 | true | 2022-04-19T20:44:34.290Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Mysql 8 connect only with ssl-ca (server-ca.pem)<p>I found an old <a href="https://serverfault.com/questions/890358/connect-mysql-using-ssl-only-with-the-ssl... |
71,932,208 | Getting null Model from PostAsync Request<p>I am making a communication between two microservices. I am trying to obtain the content from the model "UserBookPreference". I already debugged and the content that is being sent in the <code>PostAsync()</code> request is correct (let's say, data from microservice ... | <p>You need to either add <code>[FromBody]</code> attribute before <code>UserBookPreference</code> in your endpoint or add a <code>[ApiController]</code> attribute to your controller to bind <code>UserBookPreference</code> to incoming body. <a href="https://docs.microsoft.com/en-us/aspnet/core/web-api/#apicontroller-at... | Getting null Model from PostAsync Request | c#|.net|rest|microservices | 0 | 25 | 1 | 71,932,318 | 71,932,318 | 2 | true | 2022-04-19T22:55:51.720Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Getting null Model from PostAsync Request<p>I am making a communication between two microservices. I am trying to obtain the content from the model "Use... |
71,936,372 | In vscode, font size of code completion is too small<p>I reinstall my vscode, and delete all settings in <code>setting.json</code>, but don't work.</p>
<p><a href="https://i.stack.imgur.com/lb8Dt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lb8Dt.png" alt="enter image description here" /></a></p> | <p>In <code>settings.json</code> play around with below value to change the fontsize.</p>
<pre><code>"editor.suggestFontSize": 16
</code></pre> | In vscode, font size of code completion is too small | visual-studio-code | 0 | 34 | 1 | 71,936,519 | 71,936,519 | 2 | true | 2022-04-20T08:23:49.883Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
In vscode, font size of code completion is too small<p>I reinstall my vscode, and delete all settings in <code>setting.json</code>, but don't work.</p>
<p><a... |
71,936,332 | (React-Native) FlatList if one item take all width<p>I have a component that may have many items or only one item, and I want when I have one item to take the full width and when more than one item take a specific width number ?</p>
<p>Is that possible ?
If yes How ?</p> | <p>To render FlatList items you need to pass an array to it, check if the length of that array equals to one item only or has more items and add the width based on it like this example :</p>
<pre><code>const [arrayOfItems,setArrayOfItems] = useState(['Lonely Item']);
const widthCondition = arrayOfItems.length === 1 ? '... | (React-Native) FlatList if one item take all width | react-native|react-native-flatlist | 0 | 260 | 1 | 71,936,664 | 71,936,664 | 2 | true | 2022-04-20T08:20:43.263Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
(React-Native) FlatList if one item take all width<p>I have a component that may have many items or only one item, and I want when I have one item to take th... |
71,937,681 | The data of my figure is not shown in python. Only shows the axis<p>The data of my figure is not shown in python. Only shows the axis
This is my code:</p>
<pre><code>import matplotlib.pyplot as plt
lambdaarray = [[0. ,0.1 ,0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1., ]]
validationSetAccurary = [[70.16666667 ,70.1764705... | <p>Replace:</p>
<pre><code>plt.plot(lambdaarray, validationSetAccurary)
</code></pre>
<p>with:</p>
<pre><code>plt.plot(lambdaarray[0], validationSetAccurary[0])
</code></pre> | The data of my figure is not shown in python. Only shows the axis | python|arrays|matplotlib|plot|show | 0 | 35 | 2 | 71,937,732 | 71,937,732 | 2 | true | 2022-04-20T09:59:25.803Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
The data of my figure is not shown in python. Only shows the axis<p>The data of my figure is not shown in python. Only shows the axis
This is my code:</p>
<p... |
71,939,392 | how do i construct a sas do loop to get the amount of what's left to be paid?<p>hope you can help me.</p>
<p>The below table wants to show the result I want to get by using a sas code.
Basically, it's about calculating the amount of an installment, starting from par_value of 10.000€, with 6% interest rate for 10 years,... | <p>What did you tried?</p>
<p>I can propose something like this:</p>
<pre><code>data test;
attrib year par_value fixed_installment interest_rate interest capital_paid loan_paid to_be_paid format=best.;
*-- Initial values --*;
par_value = 10000;
fixed_installment = 1358.68;
interest_rate = 0.0... | how do i construct a sas do loop to get the amount of what's left to be paid? | sas|finance|retain|do-loops|datastep | 0 | 25 | 1 | 71,939,641 | 71,939,641 | 2 | true | 2022-04-20T12:09:18.643Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how do i construct a sas do loop to get the amount of what's left to be paid?<p>hope you can help me.</p>
<p>The below table wants to show the result I want ... |
71,930,685 | NextJS localStorage and Context of Shopping Cart<p>I'm developing a cart system and the problem is that, when I add a product to the cart, it works in context and localStorage; but, when I refresh, the data is gone.</p>
<pre><code>export const DataContext = createContext();
export const DataProvider = ({ children }) =... | <p>Your localstorage has been writen when you reload the page. Try the following way to prevent set item in localstorage when init.</p>
<pre class="lang-js prettyprint-override"><code> const initialState = [];
const [cart, setCart] = useState(initialState);
useEffect(() => {
const cartData = JSON.parse(loc... | NextJS localStorage and Context of Shopping Cart | next.js|local-storage|react-context | 0 | 1,310 | 1 | 71,941,802 | 71,941,802 | 2 | true | 2022-04-19T20:01:54.617Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
NextJS localStorage and Context of Shopping Cart<p>I'm developing a cart system and the problem is that, when I add a product to the cart, it works in contex... |
71,941,755 | numpy multiplication based on combinations of a list<p>I have list of n numpy arrays and a list of corresonding names. An example:</p>
<pre><code>import numpy as np
np.random.seed(0)
i = 3
x = [np.array(np.random.randint(-1,high=1, size=100)).T for k in range(i)]
names = ['n1', 'n2', 'n3']
</code></pre>
<p>Where <code>... | <p>What about simply using <code>combinations</code> as you did for the names?</p>
<pre><code>from itertools import combinations
out = [a*b for a,b in combinations(x, 2)]
</code></pre>
<p>output:</p>
<pre><code>[array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, ... | numpy multiplication based on combinations of a list | python|numpy | 0 | 35 | 1 | 71,941,807 | 71,941,807 | 2 | true | 2022-04-20T14:49:08.700Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
numpy multiplication based on combinations of a list<p>I have list of n numpy arrays and a list of corresonding names. An example:</p>
<pre><code>import nump... |
71,945,637 | How to handle not matching keys when joining two lists in scala<p>I am newbie in scala and I have a problem when merging or joining (dont know the exact term in scala) two lists by key values. In a case, key values didn't match and I took java.util.NoSuchElementException: key not found error. But I want to have just ma... | <p>Use <a href="https://docs.scala-lang.org/overviews/collections-2.13/maps.html" rel="nofollow noreferrer">get</a> method instead of "()". get method returning <a href="https://alvinalexander.com/scala/best-practice-option-some-none-pattern-scala-idioms/" rel="nofollow noreferrer">Option</a>:</p>
<pre><code>... | How to handle not matching keys when joining two lists in scala | scala|collections|functional-programming | 0 | 29 | 1 | 71,945,712 | 71,945,712 | 2 | true | 2022-04-20T20:09:46.567Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to handle not matching keys when joining two lists in scala<p>I am newbie in scala and I have a problem when merging or joining (dont know the exact term... |
71,952,340 | Update values conditionally in for loop<p>I wondered why I can't replicate the first example with a for loop. More specifically you can see that if we try to execute the logic with a for loop the second and third row are not populated with a new value. Why is this?</p>
<p>example to copy:</p>
<pre><code>df <- data.t... | <p>This is a scope problem, the first step in the loop defines <code>x</code>, and subsequent steps use this definition (which is equal to <code>NA</code> for rows 2 and 3).</p>
<p>If you use <code>i</code> instead of <code>x</code>, it works :</p>
<pre><code>for (i in 1:3) {
df[name==values[i], x:=i]
}
df
Index: &l... | Update values conditionally in for loop | r|for-loop|data.table|conditional-statements|na | 0 | 28 | 1 | 71,952,571 | 71,952,571 | 2 | true | 2022-04-21T09:47:52.437Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Update values conditionally in for loop<p>I wondered why I can't replicate the first example with a for loop. More specifically you can see that if we try to... |
71,957,413 | How can I populate a Django ChoiceField with attributes of an object?<p>I have a <code>Election</code> and <code>Candidate</code> object model like so:</p>
<pre><code>class Election(models.Model):
id = models.IntegerField(primary_key=True, unique=True)
name = models.CharField(max_length=80)
region = models.CharField(ma... | <p>Update your candidate_election variable to this</p>
<pre><code>candidate_election = forms.ChoiceField(
label="The election that this candidate is participating in",
required=True,
widget=forms.Select()
choices=[(e.id,e.name) for e in Election.objects.all()]
)
</code></pre> | How can I populate a Django ChoiceField with attributes of an object? | python|django | 0 | 16 | 1 | 71,957,619 | 71,957,619 | 2 | true | 2022-04-21T15:54:38.690Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I populate a Django ChoiceField with attributes of an object?<p>I have a <code>Election</code> and <code>Candidate</code> object model like so:</p>
<... |
71,952,522 | How to remove an image from Artifact Registry automatically<p>Using gcloud I can list and remove the images I want through those commands:</p>
<pre><code>gcloud artifacts docker images list LOCATION/PROJECT-ID/RESPOSITORY-ID/IMAGE \
--include-tags --filter="tags:IPLA*" --filter="create_time>2022-04-... | <p>You use Cloud Functions, a serverless product where you deploy your code that run somewhere, on something that you don't manage.</p>
<p>Here, in your code, you assume that gcloud is installed in the runtime. It's a mistake, you can't perform that assumption (that is wrong!)</p>
<hr />
<p>However, you can use another... | How to remove an image from Artifact Registry automatically | google-cloud-platform|google-cloud-functions|google-cloud-build|google-artifact-registry | 0 | 778 | 3 | 71,959,621 | 71,959,621 | 2 | true | 2022-04-21T09:59:01.547Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to remove an image from Artifact Registry automatically<p>Using gcloud I can list and remove the images I want through those commands:</p>
<pre><code>gcl... |
71,947,620 | What happens without a binary semaphore<p>Assume the code below demonstrating a binary semaphore example.</p>
<p>In this example, we have a pthread that reads the source.txt and attempts to copy the content to destination.txt while locking it using a binary semaphore.</p>
<p>What happens in the comment section below wi... | <blockquote>
<p>What happens in the comment section below without the semaphore?</p>
</blockquote>
<p>Without the semaphore, function <code>startFileAccessThread()</code> may return before the new thread finishes (or starts) copying its parameters from the argument object. That object is local to <code>startFileAccess... | What happens without a binary semaphore | multithreading|pthreads|semaphore|binary-semaphore | 0 | 27 | 1 | 71,960,154 | 71,960,154 | 2 | true | 2022-04-21T00:30:51.097Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What happens without a binary semaphore<p>Assume the code below demonstrating a binary semaphore example.</p>
<p>In this example, we have a pthread that read... |
71,960,126 | Does 'submit()' method impede 'submit' event listener to be executed?<p>I feel like I'm asking "what's 2+2 ?" but I'm facing an issue I don't understand... Here is the code, easy to understand:</p>
<pre class="lang-html prettyprint-override"><code><button type="button" onclick="send()"&... | <p>This is the (somewhat unintuitive) expected behavior. See <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/submit" rel="nofollow noreferrer">the docs</a> for <code>HTMLFormElement.submit()</code>:</p>
<blockquote>
<p>This method is similar, but not identical to, activating a form's submit . ... | Does 'submit()' method impede 'submit' event listener to be executed? | javascript|html|forms | 0 | 26 | 2 | 71,960,177 | 71,960,177 | 2 | true | 2022-04-21T19:46:00.120Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Does 'submit()' method impede 'submit' event listener to be executed?<p>I feel like I'm asking "what's 2+2 ?" but I'm facing an issue I don't under... |
71,960,524 | Getting value from JSONSerialization key Swift<p>I have the following JSON...</p>
<pre><code>{
"id": "1000035148",
"petId": "3",
"ownerId": "1000",
"locationId": null,
"status": "Active",
“services”: [
{
"id":... | <p>Forget <code>JSONSerialization</code> and use <code>Decodable</code> with <code>JSONDecoder</code>:</p>
<pre><code>struct DataModel: Decodable {
let id: String
let pedId: String?
let ownerId: String?
let locationId: String?
let status: String
}
</code></pre>
<pre><code>do {
let dataModel = try JSO... | Getting value from JSONSerialization key Swift | json|swift | 0 | 31 | 1 | 71,960,603 | 71,960,603 | 2 | true | 2022-04-21T20:27:52.383Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Getting value from JSONSerialization key Swift<p>I have the following JSON...</p>
<pre><code>{
"id": "1000035148",
"petId": &qu... |
71,961,105 | how to obtain a subset of a dataframe based on column values?<p>I have a dataframe with the current values in columns:</p>
<pre><code>pop_b
</code></pre>
<pre><code>CT (mm) A B C D adultos_perc min max class_center Y
0 100- 110 40 0 0 0 0.000000 100 110 105 inf
1 110-120 72 0 0 0 0... | <p>You could use <code>between</code>:</p>
<pre><code>out = df[df['Y'].between(-float('inf'), float('inf'), inclusive='neither')]
</code></pre>
<p>or <code>gt</code> and <code>lt</code> wrappers chained together with <code>&</code>:</p>
<pre><code>out = df[df['Y'].gt(-float('inf')) & df['Y'].lt(float('inf'))]
<... | how to obtain a subset of a dataframe based on column values? | python|pandas|dataframe | 0 | 272 | 1 | 71,961,134 | 71,961,134 | 2 | true | 2022-04-21T21:33:37.700Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to obtain a subset of a dataframe based on column values?<p>I have a dataframe with the current values in columns:</p>
<pre><code>pop_b
</code></pre>
<pr... |
71,962,776 | OpenLDAP invalid credentials immediately after setting credentials<p>I am having trouble binding users that are not the root dn in OpenLDAP, even if I immediately set the password, I still get <code>ldap_bind: Invalid credentials (49)</code></p>
<p>For example, if I use <code>ldappasswd</code> to set the password (auth... | <p>OpenLDAP requires during authentication binds that access be explicitly granted for the necessary attributes (particularly <code>userPassword</code>) to be used during authentication by the state of the bind before authentication (i.e. anonymous). Try changing the line</p>
<pre><code> olcAccess = [ "{0... | OpenLDAP invalid credentials immediately after setting credentials | ldap|openldap|slapd | 0 | 283 | 1 | 71,962,971 | 71,962,971 | 2 | true | 2022-04-22T02:19:31.267Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
OpenLDAP invalid credentials immediately after setting credentials<p>I am having trouble binding users that are not the root dn in OpenLDAP, even if I immedi... |
71,965,133 | RangeError (index) : invalid calue : not in incusive range 0..2:3<p>hey guys I'm trying to make an app that will track bitcoin prices in a sample way ... but it give me that error in the android-emulator but nothing in the code itself and I don't know what went wrong,</p>
<p>I think that the problem is in the DropdownM... | <p><code>for</code> loop should check for the length of the array you are accessing.</p>
<p>Hence, it should be either this</p>
<pre><code> for (int i = 0; i < currenciesList.length; i++) {
String currency = (currenciesList[i]);
}
</code></pre>
<p>or</p>
<pre><code>for (int i = 0; i < cryptoList.length; i+... | RangeError (index) : invalid calue : not in incusive range 0..2:3 | flutter|dart|flutter-layout|flutter-dependencies|dart-null-safety | 0 | 12 | 1 | 71,965,158 | 71,965,158 | 2 | true | 2022-04-22T07:42:51.687Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
RangeError (index) : invalid calue : not in incusive range 0..2:3<p>hey guys I'm trying to make an app that will track bitcoin prices in a sample way ... but... |
71,965,326 | How to create a type (named or anonymous) which is another type with some of its properties set to non-optional?<p>Suppose I have the following type:</p>
<pre><code>interface Person {
name: string,
// ... a whole lot of other properties...
bio?: string
}
</code></pre>
<p>What is the best way of creating another ... | <p>You can use <a href="https://www.typescriptlang.org/docs/handbook/2/mapped-types.html#mapping-modifiers" rel="nofollow noreferrer">mapped types with modifiers</a>:</p>
<pre class="lang-js prettyprint-override"><code>interface Person {
name: string,
age: number,
bio?: string,
bio2?: string;
bio3?: string;
}... | How to create a type (named or anonymous) which is another type with some of its properties set to non-optional? | typescript | 0 | 17 | 1 | 71,965,440 | 71,965,440 | 2 | true | 2022-04-22T07:59:10.327Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to create a type (named or anonymous) which is another type with some of its properties set to non-optional?<p>Suppose I have the following type:</p>
<pr... |
71,966,520 | AADWebSecurityConfigurerAdapter not found<p>I´m trying azure/spring things out - guided from this tutorial: <a href="https://docs.microsoft.com/de-de/azure/developer/java/spring-framework/spring-boot-starter-for-azure-active-directory-developer-guide" rel="nofollow noreferrer">https://docs.microsoft.com/de-de/azure/dev... | <p>The name is a little bit different, lowercase Aad: AadWebSecurityConfigurerAdapter</p> | AADWebSecurityConfigurerAdapter not found | spring-boot|azure-active-directory|spring-oauth2 | 0 | 272 | 1 | 71,966,651 | 71,966,651 | 2 | true | 2022-04-22T09:32:01.093Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
AADWebSecurityConfigurerAdapter not found<p>I´m trying azure/spring things out - guided from this tutorial: <a href="https://docs.microsoft.com/de-de/azure/d... |
71,969,184 | Material UI Element css not working, why?<p><a href="https://i.stack.imgur.com/E4pEH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/E4pEH.png" alt="enter image description here" /></a></p>
<p>What could be going wrong for the css to not be working(The top bar - heading overlap)?</p>
<p>here is the c... | <p>You need to add label attribute to the Select element</p>
<pre><code><Select labelId="simple-select-label" id="demo-simple-select-label" onChange={handleChange} value={gtTemplate} label="GT Template">
</code></pre>
<p>And this may be usefull too <a href="https://mui.com/material-u... | Material UI Element css not working, why? | reactjs|material-ui|frontend | 0 | 34 | 1 | 71,969,338 | 71,969,338 | 2 | true | 2022-04-22T13:01:19.070Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Material UI Element css not working, why?<p><a href="https://i.stack.imgur.com/E4pEH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/E4pEH... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.