question_id
int64
37.6M
73.2M
input_text
stringlengths
88
52.4k
output_text
stringlengths
37
35.6k
title
stringlengths
15
150
tags
stringlengths
1
107
q_score
int64
-19
397
view_count
int64
3
879k
answer_count
int64
1
21
accepted_answer_id
int64
37.6M
73.8M
answer_id
int64
37.6M
73.8M
a_score
int64
-5
1.29k
is_accepted
bool
1 class
creation_date
stringlengths
20
24
input_text_instruct
stringlengths
251
52.6k
72,186,150
Why do I get error "Uncaught (in promise) TypeError: firstnamef is null"?<p>Why do I get this error randomly in sveltekit? It still gets the value result.firstname from the endpoint using prisma every time.</p> <p>&quot;Uncaught (in promise) TypeError: firstnamef is null&quot;</p> <pre><code>&lt;script&gt; import { o...
<p>My guess would be that the component is destroyed (e.g. navigation away might cause that). After destruction the DOM reference will be <code>null</code>.</p> <p><a href="https://svelte.dev/repl/2b95425c5aec4389bd484cf40a3fd1e5?version=3.48.0" rel="nofollow noreferrer">REPL demonstration</a></p> <p>It this is the cas...
Why do I get error "Uncaught (in promise) TypeError: firstnamef is null"?
svelte|prisma|sveltekit
0
139
1
72,188,083
72,188,083
1
true
2022-05-10T12:15:24.017Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why do I get error "Uncaught (in promise) TypeError: firstnamef is null"?<p>Why do I get this error randomly in sveltekit? It still gets the value result.fir...
72,187,928
SQL query returning 0 rows after adding extra INNER JOIN<p>The issue is simple to explain, but seemingly not so simple to solve.</p> <p>This SQL query returns 0 rows:</p> <pre><code>SELECT app_handover.*, sys_logins.first_name, sys_logins.last_name, sys_logins.dept_id, org_depts.dept_name FROM ((app_handover INNER JOIN...
<p>Yep, LEFT JOIN was the answer. The value of <code>dept_id</code> in the matching <code>sys_logins</code> row was <code>NULL</code>, so no matching record was found in <code>org_depts</code>.</p> <p>This query works and now returns 1 row:</p> <pre><code>SELECT app_handover.*, sys_logins.first_name, sys_logins.last_na...
SQL query returning 0 rows after adding extra INNER JOIN
mysql|sql
0
53
1
72,188,097
72,188,097
1
true
2022-05-10T14:10:16.450Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: SQL query returning 0 rows after adding extra INNER JOIN<p>The issue is simple to explain, but seemingly not so simple to solve.</p> <p>This SQL query return...
72,188,077
collapse duplicate rows into a single row by "|"<p>I have a data frame which looks like:</p> <pre><code># A tibble: 19 × 5 Date Country `Implementing Institution(s)` `Policy Tool(s)` Magnitude &lt;date&gt; &lt;chr&...
<p>You can use the following code:</p> <pre><code>library(dplyr) df %&gt;% group_by(Date) %&gt;% summarise(across(everything(), ~ paste(unique(.x[!is.na(.x)]), collapse = &quot;|&quot;))) %&gt;% ungroup() </code></pre> <p>Output:</p> <pre><code># A tibble: 16 × 5 Date Country `Implementing Institution(...
collapse duplicate rows into a single row by "|"
r|dplyr
0
30
1
72,188,171
72,188,171
1
true
2022-05-10T14:21:11.330Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: collapse duplicate rows into a single row by "|"<p>I have a data frame which looks like:</p> <pre><code># A tibble: 19 × 5 Date Country `Implementin...
72,185,175
Xamarin - Binding a Picker to MVVM command<p>I'm trying to use the MVVM architecture on my Xamarin project but I can't quite understand it yet.</p> <p>I have two entities <code>CrCountry</code> and <code>CrCity</code> and I want the user to be able to pick a country and then based on that country select a city. I want ...
<p>A bit of a complex one to get started with MVVM but here is the approach I would use:</p> <p><strong>Enable/Disable Cities</strong>: I would use <a href="https://docs.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/triggers" rel="nofollow noreferrer">Xamarin triggers</a>.</p> <p>Your code will look someth...
Xamarin - Binding a Picker to MVVM command
c#|android|xamarin|mvvm|.net-5
0
157
1
72,188,247
72,188,247
1
true
2022-05-10T11:02:40.067Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Xamarin - Binding a Picker to MVVM command<p>I'm trying to use the MVVM architecture on my Xamarin project but I can't quite understand it yet.</p> <p>I have...
72,188,212
I can't transfer data to each index<p>I am trying to transfer the same API data from the first view and display the rest of the details in the second view</p> <p>The problem is that the same first data is displayed in all index</p> <pre><code>struct model: Codable, Identifiable { let id = UUID() var details : String v...
<p>You haven't posted a <a href="https://stackoverflow.com/help/minimal-reproducible-example">Minimal Reproducible Example (MRE)</a>, so this is an educated guess. Assuming that</p> <pre><code>@StateObject var modelname = Api() </code></pre> <p>Then your first view should be:</p> <pre><code>// keep you naming consisten...
I can't transfer data to each index
ios|swiftui
0
24
1
72,188,442
72,188,442
1
true
2022-05-10T14:28:45.913Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: I can't transfer data to each index<p>I am trying to transfer the same API data from the first view and display the rest of the details in the second view</p...
72,169,344
set backend url after extracting it from header azure apim<p>Hi I am trying to implement such a functionality where i need to make sure that the api is going through gateway so have created a apim and i need to extract header from the call and route to that call : so far i have done this policy:</p> <pre><code>&lt;pol...
<blockquote> <p>Error in element 'set-backend-service' on line 16, column 4: Value is not a valid absolute URL.</p> </blockquote> <p>This probably means that the value of your uri header does not include https://. A valid absolute URL contains all the information necessary to locate a resource, including the protocol (...
set backend url after extracting it from header azure apim
azure|azure-api-management|azure-application-gateway|azure-appservice
0
376
2
72,188,480
72,188,480
1
true
2022-05-09T08:57:24.530Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: set backend url after extracting it from header azure apim<p>Hi I am trying to implement such a functionality where i need to make sure that the api is going...
72,188,028
Why is my matrix multiplying code producing wrong answer?<p>i have this matrix multipication program written that sometimes writes wrong answers. It worked with matrixes of size 2x3 3x3 correctly or atleast with numbers i tried it was correct but if i put in matrixes of size 2x3 3x2 and fill them with numbers [-1 2 1]...
<p>2 errors :</p> <pre><code>for(int j=0; j &lt; col2; j++) // final matrix has col2 columns { ptr3[i][j] = 0; for(int k=0; k&lt;col1; k++)// loop on all row = loop on col1 ptr3[i][j] = ptr3[i][j] + ptr1[i][k] * ptr2[k][j]; } </code></pre>
Why is my matrix multiplying code producing wrong answer?
c|matrix|multidimensional-array
0
35
1
72,188,483
72,188,483
1
true
2022-05-10T14:17:48.023Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why is my matrix multiplying code producing wrong answer?<p>i have this matrix multipication program written that sometimes writes wrong answers. It worked w...
72,187,229
match two DFs based on first, middle, last name & date of birth (account for data flaws)<p>I have a very simple problem: I want to check which persons in DF1 are contained in DF2. I want to do so based on their</p> <ul> <li>first name,</li> <li>middle name,</li> <li>last name, and</li> <li>date of birth.</li> </ul> <p>...
<p>Avoid cleaning and calculation loops. Instead, consider cleaning up both data frames by vectorized operations to properly normalize names with each name column holding a single identifier. Then, run an <code>rbind</code> of two <code>merge</code>s first by all three names and second by first and last. Then run <code...
match two DFs based on first, middle, last name & date of birth (account for data flaws)
r|dataframe|matching
0
61
1
72,188,494
72,188,494
1
true
2022-05-10T13:27:19.813Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: match two DFs based on first, middle, last name & date of birth (account for data flaws)<p>I have a very simple problem: I want to check which persons in DF1...
72,186,246
pine script : color the current candle different color<p>i wanna to color all candles , all down candles will be red ,, all up candle will be green and the current candle will be black (if not closed yet)</p> <p>this is for example</p> <pre><code>//@version=4 study(&quot;color all except current candle&quot;, overlay=t...
<p>you use <code>barstate.isconfirmed</code>function</p> <pre><code> //@version=5 indicator(&quot;barcolor example&quot;, overlay=true) barcolor(barstate.isconfirmed ? na : color.black) </code></pre>
pine script : color the current candle different color
pine-script|script|cryptocurrency|forex|pine-script-v4
0
75
1
72,188,545
72,188,545
1
true
2022-05-10T12:22:55.470Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: pine script : color the current candle different color<p>i wanna to color all candles , all down candles will be red ,, all up candle will be green and the c...
72,188,478
Can Notification Center Observe Value Change Swift<p>Is something like this possible?</p> <p>Observe <code>SearchUtil().getSearchList().count</code> so whenever the count changes or equals to a specific int value(<code>SearchUtil().getSearchList().count == 0</code>) run <code>@objc func OnAppBecameActive()</code></p> <...
<p>Yes, there are several ways to do this. The thing you want to observe needs to be a property, not the outcome of an expression. If this is (or can be) an NSObject, you can use <a href="https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/KeyValueObserving/KeyValueObserving.html#//apple_ref/doc/...
Can Notification Center Observe Value Change Swift
swift|nsnotificationcenter|observers
0
52
1
72,188,554
72,188,554
1
true
2022-05-10T14:45:55.913Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can Notification Center Observe Value Change Swift<p>Is something like this possible?</p> <p>Observe <code>SearchUtil().getSearchList().count</code> so whene...
72,188,220
How to split the textfile<p>04-05-1993:1.068</p> <p>04-12-1993:1.079</p> <p>04-19-1993:1.079</p> <p>06-06-1994:1.065</p> <p>06-13-1994:1.073</p> <p>06-20-1994:1.079</p> <hr /> <p>I have text file for date-year-price for gas and i want to calculate the avg gas prices for year. So i tried to split,</p> <pre><code>with op...
<p>I see no need to split the input lines as they have a fixed format for the date - i.e., its length is known. Therefore we can just slice.</p> <pre><code>with open('gas.txt') as gas: td = dict() for line in gas: year = line[6:10] price = float(line[11:]) td.setdefault(year, []).append(...
How to split the textfile
python|file|dictionary|split|average
0
66
4
72,188,742
72,188,742
1
true
2022-05-10T14:29:01.600Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to split the textfile<p>04-05-1993:1.068</p> <p>04-12-1993:1.079</p> <p>04-19-1993:1.079</p> <p>06-06-1994:1.065</p> <p>06-13-1994:1.073</p> <p>06-20-199...
72,188,252
AWS Neptune connection pool settings<p>We're using a connection pool to communicate with AWS Neptune from an AWS Lambda. Due to this, we are experiencing various connection problems. Usually, it happens after a maintenance window and requires a Neptune restart to fix it.</p> <p>For example, below is an error rised in a...
<p>The general best practice is to assume a connection is still alive/valid and catch/reconnect when you encounter these sorts of exceptions. Example Lambda function architecture (mainly for Gremlin, but other query languages would have similar patterns) are displayed here: <a href="https://docs.aws.amazon.com/neptune/...
AWS Neptune connection pool settings
aws-lambda|aws-neptune
0
24
1
72,188,771
72,188,771
1
true
2022-05-10T14:31:28.760Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: AWS Neptune connection pool settings<p>We're using a connection pool to communicate with AWS Neptune from an AWS Lambda. Due to this, we are experiencing var...
72,187,865
What is the message broker for in this ActiveMQ example?<p>I'm new to ActiveMQ and tested <a href="https://activemq.apache.org/how-should-i-implement-request-response-with-jms" rel="nofollow noreferrer">this implementation</a> for request/response.</p> <p>I run Apache ActiveMQ on the same machine.</p> <p>It works as ex...
<p>It helps to understand that ActiveMQ is essentially &quot;just a library&quot;. You can run it as a stand alone server (as you are on your machine), or embed it within Java code, unit test, or a Java app. The example on that webpage uses an embedded ActiveMQ broker (server-side) to provide an all-in-one view of the ...
What is the message broker for in this ActiveMQ example?
java|jms|activemq|messagebroker
0
59
1
72,188,784
72,188,784
1
true
2022-05-10T14:06:04.517Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What is the message broker for in this ActiveMQ example?<p>I'm new to ActiveMQ and tested <a href="https://activemq.apache.org/how-should-i-implement-request...
72,188,260
how to display bottom navbar without scrolling down<p>In my flutter code, I have created a separate navbar widget and called it on my page. I have used a single-child scroll view. now I have to scroll the page to see the navbar. I want it to be appeared bottom top of the page. how can I do this? the image shows when I ...
<p>you can do it like that</p> <pre><code>class _ProfessionalProfileState extends State&lt;ProfessionalProfile&gt; { @override Widget build(BuildContext context) { return Scaffold( bottomNavigationBar: BottomNavigation() , // your BottomNavigation here appBar: AppBar( backgroundColor: Colors.t...
how to display bottom navbar without scrolling down
flutter
0
22
1
72,188,801
72,188,801
1
true
2022-05-10T14:32:03.887Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to display bottom navbar without scrolling down<p>In my flutter code, I have created a separate navbar widget and called it on my page. I have used a sin...
72,185,047
Datadog grok custom java stack parsing and ordered list fields<p>I have the following log sample in a grok pipeline in datadog:</p> <pre><code>2022-05-10 11:26:58 [SEVERE]: Log from eu.myapp dev added message - eu.myapp.Controller.&lt;init&gt; java.lang.NullPointerException at eu.myapp.Controller.&lt;init&gt;(Con...
<p>The entire stack trace should be inside the <code>error.msg</code> attribute.</p> <p><a href="https://i.stack.imgur.com/Ju9Vb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ju9Vb.png" alt="grok parser preview" /></a></p> <p>So you can update your grok parser to this (You can put back in your stat...
Datadog grok custom java stack parsing and ordered list fields
java|stack-trace|datadog|grok
0
132
1
72,188,840
72,188,840
1
true
2022-05-10T10:53:22.823Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Datadog grok custom java stack parsing and ordered list fields<p>I have the following log sample in a grok pipeline in datadog:</p> <pre><code>2022-05-10 11:...
72,187,889
Keep nested array structure the same but attach a property<p>I have the following nested array which I to preserve and keep the same, but also attach a property called <code>indexes</code> to each nested <code>items</code> object which stores a top-down list of indexes so I can keep track of the nested items when I fla...
<p>In my opinion the most elegant way would be to run through all the items using a <code>forEach</code> loop.</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override"><code>const cats = [{ ...
Keep nested array structure the same but attach a property
javascript
0
34
1
72,188,861
72,188,861
1
true
2022-05-10T14:07:36.693Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Keep nested array structure the same but attach a property<p>I have the following nested array which I to preserve and keep the same, but also attach a prope...
72,188,783
How do I conditionally select a unique value in SQL?<p>I've been tasked with returning only rows with unique IDs but returning a row for every ID in SQL. How would I go about this?</p> <p>Logic: For primary row, select where JOB_INDICATOR = ‘P’. If there are multiple rows, then use the record where PRIM_ROLE_IND = ‘Y’...
<p>You can use window function <code>ROW_NUMBER()</code> to accomplish this:</p> <pre><code>SELECT * FROM ( SELECT EMPLOYEE.*, ROW_NUMBER() OVER (PARTITION BY id ORDER BY prim_role_ind DESC, empl_rcd ASC) as rn FROM EMPLOYEE WHERE JOB_INDICATOR = 'P' ) dt WHERE rn = 1 </code></...
How do I conditionally select a unique value in SQL?
sql|oracle
0
36
1
72,188,865
72,188,865
1
true
2022-05-10T15:06:23.443Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I conditionally select a unique value in SQL?<p>I've been tasked with returning only rows with unique IDs but returning a row for every ID in SQL. Ho...
72,173,096
Where is the setting for highlighting unused variables and constants in Visual Studio 2022?<p>I am working in a C# project where this has been turned off.</p> <p>I can't find out how to turn it on again.</p> <p>It's pretty hard to google as it's default behavior, and no sane person would turn it off...</p>
<h5>Did you perhaps change your compiler warning level?</h5> <p>Unused variables should have the warning of <a href="https://docs.microsoft.com/en-us/dotnet/csharp/misc/cs0168?f1url=%3FappId%3Droslyn%26k%3Dk(CS0168)" rel="nofollow noreferrer">CS0168</a>. If you look at that page, the title is &quot;Compiler Warning (<...
Where is the setting for highlighting unused variables and constants in Visual Studio 2022?
visual-studio-2022
0
245
1
72,188,879
72,188,879
1
true
2022-05-09T13:51:54.857Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Where is the setting for highlighting unused variables and constants in Visual Studio 2022?<p>I am working in a C# project where this has been turned off.</p...
72,188,228
DART - Filter JSON Data<p>I'm trying to filter the json data. There is a field called &quot;brand&quot; in my json (so basically I'm trying to filter the data by brands)</p> <p>This is how my json looks</p> <pre><code>{ &quot;items&quot;: [ { &quot;_id&quot;: &quot;30baa1ca-4186-4ff0-abe8-a5970e753444&quot;...
<p>Better to use <code>contains</code> to check if a brand is listed. Also check if &quot;brands&quot; field is available for better stability.</p> <pre><code> final filteredData = data.where((element) =&gt; (element['brands'] != null ? element['brands'].contains('Amazon') : false)); </code></pre>
DART - Filter JSON Data
json|flutter|dart
0
128
3
72,188,935
72,188,935
1
true
2022-05-10T14:29:43.347Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: DART - Filter JSON Data<p>I'm trying to filter the json data. There is a field called &quot;brand&quot; in my json (so basically I'm trying to filter the dat...
72,172,263
Scoping issue with instance attributes and Class methods in tkinter/customtkinter<p>My tkinter/customtkinter GUI uses multiple frames raised above one another. I have a two frames both containing switches that need to invert one another (ie when one is 'ON' the other must be 'OFF'). Both switches are created as instanc...
<p>'Try configuring the switches' commands after creating them:</p> <pre><code>self.switch_1.config(command=lambda: self.switch_2.toggle()) </code></pre> <p>and</p> <pre><code>self.switch_2.config(command=lambda: self.switch_1.toggle()) </code></pre> <p>at the end of the <strong>init</strong>() method. – Sylvester Kru...
Scoping issue with instance attributes and Class methods in tkinter/customtkinter
python|class|tkinter|scope
0
159
1
72,189,036
72,189,036
1
true
2022-05-09T12:47:06.150Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Scoping issue with instance attributes and Class methods in tkinter/customtkinter<p>My tkinter/customtkinter GUI uses multiple frames raised above one anothe...
72,182,468
How can I apply custom styles to the mat-menu content?<p>I use the mat-menu for filtering the columns in the custom table component. In the mat-menu I have a search input which I want to style. I have tried:</p> <pre><code>class panelClass backdropClass </code></pre> <p>but with no success. I want to point out that if ...
<p>As per comments from question:</p> <p>Due to how MatMenu (and CdkOverlay in general, which is used underneath) is instantiated, styles have to be scoped globally for them to affect things rendered in the overlay. They can be placed in different file, but they have to pierce the component level in some way.</p> <p>Th...
How can I apply custom styles to the mat-menu content?
angular|html-table|angular-material
0
239
1
72,189,170
72,189,170
1
true
2022-05-10T07:45:54.417Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I apply custom styles to the mat-menu content?<p>I use the mat-menu for filtering the columns in the custom table component. In the mat-menu I have a...
72,186,684
from Pandas adjacency matrix to NetworkX affiliation network<p>I want to create a NetworkX graph from a Pandas adjacency matrix.</p> <p>Usually this works with <code>nx.from_pandas_adjacency(df)</code>. But this time I have an affiliation network.</p> <p>here is an example:</p> <pre><code>import pandas as pd import num...
<p>You can melt the dataframe and then use <code>nx.from_pandas_edgelist</code>:</p> <pre><code>G = nx.from_pandas_edgelist( df.reset_index().melt(id_vars='Tag'), source='Tag', target='variable', edge_attr='value' ) </code></pre>
from Pandas adjacency matrix to NetworkX affiliation network
python|pandas|networkx
0
127
1
72,189,347
72,189,347
1
true
2022-05-10T12:53:11.537Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: from Pandas adjacency matrix to NetworkX affiliation network<p>I want to create a NetworkX graph from a Pandas adjacency matrix.</p> <p>Usually this works wi...
72,188,996
Problem initializing a struct with the {0} initializer<p>I encountered a bizarre problem while trying to use the {0} initializer on a struct.<br /> The struct I built consists of a 2D array of size 4x4 and was defined as the following:</p> <pre><code>typedef struct Matrix{ double array[4][4]; } mat; </code></pre> <p>wh...
<p>You're not printing the result correctly:</p> <pre><code>printf(&quot;%f,&quot;, *(*(MAT_A.array + row) + i)); </code></pre> <p>The value of <code>i</code> ranges from 0 to 15, and you're using that value to index the second dimension of the array. That dimension only has size 4 so you're reading past the end of th...
Problem initializing a struct with the {0} initializer
c|struct|initialization
0
33
1
72,189,355
72,189,355
1
true
2022-05-10T15:20:19.960Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Problem initializing a struct with the {0} initializer<p>I encountered a bizarre problem while trying to use the {0} initializer on a struct.<br /> The struc...
72,176,271
Jelastic - How to fix bash_profile with invalid characters entered when creating environment variables?<p>In advance, I apologize for my English. It was while researching how to solve the problem that I discovered Jelastic's recommendations for creating environment variables. Without this knowledge, I created variables...
<h1>1. What went wrong?</h1> <pre><code>export BACKUP_DELETE_SCHEDULE=0 0 * * 1-5 </code></pre> <p>Is interpreted as something like:</p> <pre><code>export BACKUP_DELETE_SCHEDULE=0 export 0 export * export * export 1-5 </code></pre> <p>To put all of that into the variable you must wrap it in quotation marks:</p> <pre><c...
Jelastic - How to fix bash_profile with invalid characters entered when creating environment variables?
linux|server|jelastic
0
68
1
72,189,403
72,189,403
1
true
2022-05-09T17:52:08.983Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Jelastic - How to fix bash_profile with invalid characters entered when creating environment variables?<p>In advance, I apologize for my English. It was whil...
72,189,378
Finding minimum value of 2d numpy array based on second value of row<p>I have a NumPy array similar to as shown below and I want to find the minimum element based on the second item of the row. I can achieve this using the sorted function, is there a built-in NumPy function to achieve the same (probably the one-liner f...
<p>You can also have it like</p> <pre><code>a[np.argmin(a[:, 1])] </code></pre>
Finding minimum value of 2d numpy array based on second value of row
python|numpy|sorting
0
46
3
72,189,427
72,189,427
1
true
2022-05-10T15:45:40.513Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Finding minimum value of 2d numpy array based on second value of row<p>I have a NumPy array similar to as shown below and I want to find the minimum element ...
72,189,392
Create custom type from object by extracting types of object's values<p>I am trying to create a type from this object:</p> <pre><code>export const AppStore = { LoggedInUserState: { stateName: &quot;LoggedInUserState&quot;, stateModel: LoggedInUserStateModel, }, JwtDecodedUserState: { ...
<p>You should try it like this:</p> <pre class="lang-js prettyprint-override"><code>export type TAppStore = typeof AppStore; export type AppState = { -readonly [ K in keyof TAppStore as TAppStore[K][&quot;stateName&quot;] ]: TAppStore[K][&quot;stateModel&quot;] } </code></pre> <p><a href="https://www.typ...
Create custom type from object by extracting types of object's values
typescript
0
34
1
72,189,489
72,189,489
1
true
2022-05-10T15:46:24.263Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Create custom type from object by extracting types of object's values<p>I am trying to create a type from this object:</p> <pre><code>export const AppStore =...
72,142,282
show masking on object which is between camera and wall using RealityKit<p>I made a video for generating a floor plan in which I need to capture the wall and floor together at a certain position if a user is too near to the wall or if any object come between the camera and wall/floor then need to show <strong>Too Close...
<p>I am just learning ARKit and RealityKit as well, but wouldn't your code be:</p> <pre><code>let currentPositionOfCamera = self.arView.cameraTransform.translation if currentPositionOfCamera != .zero { // distance is defined in simd as the distance between 2 points let distanceFromCamera = distance(raycastRes...
show masking on object which is between camera and wall using RealityKit
swift|arkit|raycasting
0
95
1
72,189,506
72,189,506
1
true
2022-05-06T13:30:04.567Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: show masking on object which is between camera and wall using RealityKit<p>I made a video for generating a floor plan in which I need to capture the wall and...
72,189,441
Check one column with strings and get sum of values from second column (pythonic way)<p>Given this data frame:</p> <pre><code>d = {'SITE':['AB', 'ON', 'YO', 'YO', 'AB'], 'MARK':['ss', 'ss', 'tt', 'ss', 'tt'], 'SIZE': [4, 5, 2, 3, 4]} ex_df = pd.DataFrame(data=d) </code></pre> <p><a href="https://i.stack.imgur.com...
<p>Q1 Can be accomplished with a groupby in Pandas:</p> <pre class="lang-py prettyprint-override"><code>grouped_df = ex_df.groupby('SITE').agg({'SIZE': 'sum'} </code></pre> <p>To accomplish Q2, you likely need to implement a custom function to pass to the <code>.agg</code> call, something like:</p> <pre class="lang-py ...
Check one column with strings and get sum of values from second column (pythonic way)
python|python-3.x|pandas
0
37
2
72,189,573
72,189,573
1
true
2022-05-10T15:49:43.113Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Check one column with strings and get sum of values from second column (pythonic way)<p>Given this data frame:</p> <pre><code>d = {'SITE':['AB', 'ON', 'YO', ...
72,189,363
how do i fix my grappling hook script bug<p>im making a game similar to karlson and struggling to fix this line of code to stop a bug the bug is the grappling gun stuck in grappling mode while the player is not holding down the mouse button the code i want to do is an if statement to check if the bool is true and Input...
<pre><code>if (IsGrappling == true &amp;&amp; Input.GetMouseButtonUp(0)) { StopGrapple; } </code></pre> <p>OR</p> <pre><code>if (IsGrappling &amp;&amp; Input.GetMouseButtonUp(0)) { StopGrapple; } </code></pre>
how do i fix my grappling hook script bug
c#|unity3d|if-statement|boolean
0
38
2
72,189,680
72,189,680
1
true
2022-05-10T15:44:43.310Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how do i fix my grappling hook script bug<p>im making a game similar to karlson and struggling to fix this line of code to stop a bug the bug is the grapplin...
72,187,386
Logical OR in pyomo to force consecutive assignment<p>I want to optimise my model that finds the highest possible overlap (<code>assignment</code>) of items (<code>probes</code>) against a sequence (<code>sequence</code>). I have the starting and end positions of all items and can thus build up my model as follows:</p>...
<p>Here is a cut at this....</p> <p>The other way I mentioned would be to introduce another binary variable for each point in sequence and control that (somehow) via the assignment of probes. The method below should be <em>much</em> more efficient than that.</p> <p>Try this out with a larger dataset... The current on...
Logical OR in pyomo to force consecutive assignment
python|optimization|pyomo
0
124
1
72,189,687
72,189,687
1
true
2022-05-10T13:38:04.590Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Logical OR in pyomo to force consecutive assignment<p>I want to optimise my model that finds the highest possible overlap (<code>assignment</code>) of items ...
72,189,402
TypeError:unsupported format string passed to Series.__format__<p>I am trying to print time in 12 hour clock format but django throws TypeError. works fine for python but shows error in django Thanks is Advance</p> <pre><code>def solve(s, n): h, m = map(int, s[:-2].split(':')) h =h% 12 if s[-2:] == 'pm': ...
<p>Like I said, use strftime to do this dirty work, instead of doing it on your own.</p> <pre><code>from datetime import datetime, timedelta def solve(s, minutes): time_instance = datetime.strptime(s, '%I:%M%p') time_instance += timedelta(minutes=minutes) return time_instance.strftime('%I:%M%p').lower() ...
TypeError:unsupported format string passed to Series.__format__
python|django
0
217
1
72,189,713
72,189,713
1
true
2022-05-10T15:47:18.910Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: TypeError:unsupported format string passed to Series.__format__<p>I am trying to print time in 12 hour clock format but django throws TypeError. works fine f...
72,189,317
Snowflake in One Region, AWS bucket in another. Costs?<p>Any Snowflake experts? We have Snowflake Database in eu-west-2 and we have to read data from s3 buckets in us-west. Created snowpipes and SQS notification in s3 buckets. Will there be additional costs for reading from us-west-2 notification channel. Will it be ch...
<p>For external stage in Snowflake for pulling data into Snowflake, AWS will charge you directly for the egress of the data moving from one region to another region. Snowflake will not charge you anything for that egress. So, moving it manually and then ingesting will incur the same egress on AWS. It'd be wasted eff...
Snowflake in One Region, AWS bucket in another. Costs?
amazon-web-services|snowflake-cloud-data-platform|snowpipe
0
131
1
72,189,727
72,189,727
1
true
2022-05-10T15:40:53.580Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Snowflake in One Region, AWS bucket in another. Costs?<p>Any Snowflake experts? We have Snowflake Database in eu-west-2 and we have to read data from s3 buck...
72,189,086
mqtt subscribe to change relay state json<p>what the data should be sent if the code like this</p> <pre><code>void mqttCallback(char *topic, byte *payload, unsigned int length) { Serial.print(&quot;Message arrived [&quot;); Serial.print(topic); Serial.print(&quot;] &quot;); for (int i = 0; i &lt; length; i++) ...
<p>It looks like the MQTT message payload needs to be a JSON object with at least the following:</p> <pre class="lang-json prettyprint-override"><code>{ &quot;state&quot;: 1 } </code></pre>
mqtt subscribe to change relay state json
json|deserialization|mqtt
0
26
1
72,189,779
72,189,779
1
true
2022-05-10T15:27:10.453Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: mqtt subscribe to change relay state json<p>what the data should be sent if the code like this</p> <pre><code>void mqttCallback(char *topic, byte *payload, u...
72,153,861
How can I reduce the bundle size in React App when only using Authenticator from Amplify UI?<p>I would like to use the Authenticator component from <a href="https://ui.docs.amplify.aws/?platform=react" rel="nofollow noreferrer">Amplify UI</a> for sign in in my React App but doing so makes my apps bundle size huge; it i...
<p>Prior to version 2.12.0 we had some treeshaking issues in the <code>@aws-amplify/ui-react</code> package which prevented the icons from being removed. This was fixed in version 2.12.0. See <a href="https://github.com/aws-amplify/amplify-ui/blob/main/packages/react/CHANGELOG.md#minor-changes-4" rel="nofollow noreferr...
How can I reduce the bundle size in React App when only using Authenticator from Amplify UI?
reactjs|amazon-web-services|aws-amplify
0
306
2
72,189,801
72,189,801
1
true
2022-05-07T15:21:27.447Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I reduce the bundle size in React App when only using Authenticator from Amplify UI?<p>I would like to use the Authenticator component from <a href="...
72,189,412
Iterate over pyspark dataframe and send each value to the UDF<p>I have a data frame like the below:</p> <pre><code>+---------+----------+--------+-----+------+------+----------------------------------------------------------------------------------------------------+ |firstname|middlename|lastname|id |gender|salary|m...
<p>I think the main issue here is that User Defined Functions expect to be called once per row, rather than passed the entire data frame. So for me the following works:</p> <pre class="lang-py prettyprint-override"><code>new_df = ctx.spark.createDataFrame(( [&quot;James&quot;, &quot;&quot;, &quot;Smith&quot;, 3663...
Iterate over pyspark dataframe and send each value to the UDF
python|pyspark
0
142
2
72,189,806
72,189,806
1
true
2022-05-10T15:48:18.287Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Iterate over pyspark dataframe and send each value to the UDF<p>I have a data frame like the below:</p> <pre><code>+---------+----------+--------+-----+-----...
72,189,096
Consolidate python pandas table<p>I am using pyATS to gather information about a device's ARP table. The output is a dictionary-like object which I have managed to turn into a table by using pandas.</p> <p>I now have the following table in pandas:</p> <pre><code> interface neighbor ip link_l...
<pre><code>df.groupby('neighbor').first().reset_index() neighbor interface ip link_layer_address type origin age protocol 0 10.122.41.129 GigabitEthernet1 10.122.41.129 001a.6c78.e7ff ARPA dynamic 47 Internet 1 10.122.41.169 GigabitEthernet1 10.122.41.169 0050.569...
Consolidate python pandas table
python|pandas|dataframe|nan
0
30
1
72,189,814
72,189,814
1
true
2022-05-10T15:27:53.997Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Consolidate python pandas table<p>I am using pyATS to gather information about a device's ARP table. The output is a dictionary-like object which I have mana...
72,186,948
Bokeh bold some text in title<p>Good day,</p> <p>I am quite new to Bokeh and I'm making a few charts. I want to bold only part of the text in the title of the chart.</p> <hr /> <p>As an example, I want to take this:</p> <ul> <li>&quot;Number of schools in District B in 2022&quot;</li> </ul> <p>And turn it into this:</p...
<p>Basic plot titles are rendered directly on the HTML canvas, which has very simple text rendering options. Bokeh only exposes one set of text properties for standard titles. Accordingly, what you are asking for is not possible using standard titles.</p> <p>For now, your best option is to not use a plot title at all. ...
Bokeh bold some text in title
python|latex|bokeh
0
58
1
72,189,901
72,189,901
1
true
2022-05-10T13:09:17.290Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Bokeh bold some text in title<p>Good day,</p> <p>I am quite new to Bokeh and I'm making a few charts. I want to bold only part of the text in the title of th...
72,184,207
Is it possible to enable android multi-user from adb?<p>As stated in the <a href="https://source.android.com/devices/tech/admin/multi-user#applying_the_overlay" rel="nofollow noreferrer">official document</a>, it is possible to enable android multiple user feature at build time, but there is no document about enabling ...
<p>One can edit <code>/system/build.prop</code> on a rooted device and add multi-user support, then reboot:</p> <pre><code>fw.max_users=3 fw.show_multiuserui=1 </code></pre>
Is it possible to enable android multi-user from adb?
android|android-source|android-multiple-users|android-managed-profile
0
422
2
72,189,921
72,189,921
1
true
2022-05-10T09:54:51.020Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is it possible to enable android multi-user from adb?<p>As stated in the <a href="https://source.android.com/devices/tech/admin/multi-user#applying_the_overl...
72,189,342
Javascript to return the declared method as string<p>I am working with a svg element and I am trying to create a <code>text</code> element by dynamically retrieving a parameter that gets passed on to a function argument prior.</p> <p>For example, a minimal sample</p> <p><div class="snippet" data-lang="js" data-hide="fa...
<p>No, there's no way to get the expression that was used in the declaration of a a variable as a string.</p> <p>You should solve this with a level of indirection. Put the property in a string variable, and use that when calculating <code>data2</code> and also for the <code>textContent</code>.</p> <pre><code>const data...
Javascript to return the declared method as string
javascript
0
41
1
72,189,989
72,189,989
1
true
2022-05-10T15:42:40.437Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Javascript to return the declared method as string<p>I am working with a svg element and I am trying to create a <code>text</code> element by dynamically ret...
72,179,983
Create Digital Signature for XML with reference to KeyInfo<p>I need to create a digital signature for an XML with ISO20022 standard.</p> <p>The example shows 3 references, one of which is for KeyInfo element (the one with #_33d232d2-4591-4b49-b28d-3cb825fbeaa4 URI).</p> <pre><code>&lt;ds:Signature xmlns:ds=&quot;http:/...
<blockquote> <p>it seems that KeyInfo is missing from the CanonicalXmlNodeList in the BuildDigestedReferences method.</p> </blockquote> <p>That's because it's not part of the document.</p> <blockquote> <p>Is there any way around this?</p> </blockquote> <p>Add it to the document. Rather than try to construct it by hand...
Create Digital Signature for XML with reference to KeyInfo
c#|.net|xml|certificate|digital-signature
0
369
1
72,189,998
72,189,998
1
true
2022-05-10T02:07:53.250Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Create Digital Signature for XML with reference to KeyInfo<p>I need to create a digital signature for an XML with ISO20022 standard.</p> <p>The example shows...
72,189,701
Returning a pointer to a struct from a function in Go<p>I have two public structs that contain different data, and a private intermediate struct containing either of the two public structs. I also have a function that unmarshalls the intermediate struct, determines which public struct it contains, and returns one of th...
<p>Your <code>unmarshallStruct</code> function returns a pointer to type <code>Struct1</code> or <code>Struct2</code> (depending on which version of the function gets called). And therefore the variables <code>struct1</code> and <code>struct2</code> are pointers to types <code>Struct1</code> and <code>Struct2</code> re...
Returning a pointer to a struct from a function in Go
go
0
66
1
72,190,033
72,190,033
1
true
2022-05-10T16:10:00.627Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Returning a pointer to a struct from a function in Go<p>I have two public structs that contain different data, and a private intermediate struct containing e...
72,189,864
Updating a single value in firebase Doc<p>first time using firebase, i'm creating a blog, when i create a post i'm creating it as:</p> <pre><code> const postCollection = collection(database, &quot;posts&quot;); const submitPost = async () =&gt; { await addDoc(postCollection, { title, body, com...
<p>If a post already exists then you can use <code>updateDoc()</code> to update specific fields in that document instead of <code>setDoc()</code> that will overwrite the document if exists. Since 'comments' is an array, you can use <a href="https://firebase.google.com/docs/firestore/manage-data/add-data#update_elements...
Updating a single value in firebase Doc
javascript|reactjs|firebase|google-cloud-firestore
0
41
1
72,190,117
72,190,117
1
true
2022-05-10T16:22:09.580Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Updating a single value in firebase Doc<p>first time using firebase, i'm creating a blog, when i create a post i'm creating it as:</p> <pre><code> const pos...
72,188,632
How can i bring a variable through a button<p>I am making a simple shopping website and i wanted to make a loop that created a display for all the items.</p> <pre><code>&lt;script&gt; function Test(A) { alert(A) } &lt;/script&gt; &lt;body&gt; &lt;h1&gt;Hello&lt;/h1&gt; &lt;button on:click = {Te...
<p>You want this:</p> <pre><code>&lt;button on:click={() =&gt; Test(&quot;Hello&quot;)}&gt;Test button&lt;/button&gt; </code></pre> <p>By doing <code>on:click={Test(&quot;Hello&quot;)}</code>, you are saying &quot;call <code>Test</code> when the page loads and add the return value as a click handler on the button.&quot...
How can i bring a variable through a button
html|svelte
0
31
1
72,190,119
72,190,119
1
true
2022-05-10T14:56:15.120Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can i bring a variable through a button<p>I am making a simple shopping website and i wanted to make a loop that created a display for all the items.</p>...
72,189,859
Laravel prioritize or operator in relation query (hasMany). How to add parenthesis?<p>The events method in my model returns all related events from the database. The code below is working fine, the only problem is dat it don't prioritze the or. (See <code>orWhereHas</code>)</p> <pre><code>public function events() { ...
<p>You could move the logic outside the relationship method and use a <code>where</code>/<code>orWhere</code> Closure.</p> <pre class="lang-php prettyprint-override"><code>public function events() { return $this-&gt;hasMany(Event::class) } </code></pre> <pre class="lang-php prettyprint-override"><code>$model-&gt;ev...
Laravel prioritize or operator in relation query (hasMany). How to add parenthesis?
laravel|eloquent
0
39
1
72,190,130
72,190,130
1
true
2022-05-10T16:20:53.533Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Laravel prioritize or operator in relation query (hasMany). How to add parenthesis?<p>The events method in my model returns all related events from the datab...
72,189,982
useRef not update<p>Can someone help me to understand why the contentHeight doesnt update? it seems that contentEl (useRef) is not updating correctly.</p> <p>If u check the &quot;LONG CONTENT&quot; accordion item, u can see the content height is so much short and the content text remains hide. :(</p> <p>Codesandbox pre...
<p>Your problem is you only set a single ref initially for content and <code>useEffect</code> with your setup run once solely after the component is mounted, so that's why it's always referred to the same content element.</p> <p>I'd suggest that you should use one ref for all content elements by indexes.</p> <p><a href...
useRef not update
next.js|accordion|use-ref
0
147
1
72,190,141
72,190,141
1
true
2022-05-10T16:31:25.180Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: useRef not update<p>Can someone help me to understand why the contentHeight doesnt update? it seems that contentEl (useRef) is not updating correctly.</p> <p...
72,190,032
How to work with data values formatted [{}, {}, {}]<p>I apologize if this is a simple question - I had some trouble even formatting the question when I was trying to Google for help!</p> <p>In one of the tables I am working with, there's data value that looks like below:</p> <div class="s-table-container"> <table class...
<p>You can use a <code>JSON</code> function named: <code>json_array_length</code> and cast this column like a <code>JSON</code> data type (as long as possible), for example:</p> <pre class="lang-sql prettyprint-override"><code> select invoice_id, json_array_length(Product_list::json) as count from quote_table where ...
How to work with data values formatted [{}, {}, {}]
postgresql
0
23
2
72,190,177
72,190,177
1
true
2022-05-10T16:35:56.373Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to work with data values formatted [{}, {}, {}]<p>I apologize if this is a simple question - I had some trouble even formatting the question when I was t...
72,183,316
How to customize TinyMCE dialog CSS?<p>I'm trying to get custom CSS control over TinyMCE dialogs/modals but not getting anywhere and not finding clear instructions for this in the Docs. I'm using TinyMCE 6 (the latest version).</p> <p>I'm able to successfully control the main editor CSS with either of the following:</p...
<p>In TinyMCE 6 you would control the look of the dialogs via the skin you use with TinyMCE.</p> <p>The documentation for this in TinyMCE 6 is here: <a href="https://www.tiny.cloud/docs/tinymce/6/creating-a-skin/" rel="nofollow noreferrer">https://www.tiny.cloud/docs/tinymce/6/creating-a-skin/</a></p> <p><em><strong>N...
How to customize TinyMCE dialog CSS?
css|tinymce|tinymce-6
0
74
1
72,190,353
72,190,353
1
true
2022-05-10T08:54:29.020Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to customize TinyMCE dialog CSS?<p>I'm trying to get custom CSS control over TinyMCE dialogs/modals but not getting anywhere and not finding clear instru...
72,190,427
Formik FieldArray error messages - React Native<p>I'm using Formik <code>FieldArray</code> as part of my form and would like to show error messages, I can access the error messages within a component via <code>errors.familyMembers[0]</code>, which looks like</p> <pre><code>[{&quot;first_name&quot;: &quot;First Name is ...
<p>You can use <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining" rel="nofollow noreferrer"><code>Optional chaining</code></a>, like:</p> <pre><code>isInvalid={errors?.familyMembers &amp;&amp; fieldName in errors.familyMembers[0] &amp;&amp; touched[fieldName]} &lt;F...
Formik FieldArray error messages - React Native
react-native|formik
0
162
1
72,190,480
72,190,480
1
true
2022-05-10T17:07:01.550Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Formik FieldArray error messages - React Native<p>I'm using Formik <code>FieldArray</code> as part of my form and would like to show error messages, I can ac...
72,187,820
Validatecommand is called when I edit the entry programmatically<p>I am trying to create an entry with a very special validation. For that, I'm playing dirty with validatecommand. However, I got a problem:</p> <p>When something in the entry is deleted, I can't tell if it was done with the delete or backspace key (and t...
<blockquote> <p>Is there a way to skip that validation when programmatically editing an entry?</p> </blockquote> <p>The simplest solution is to set the <code>validate</code> option to &quot;none&quot; before making the edits. You then can turn the validation back on via <code>after_idle</code> as documented in the <a h...
Validatecommand is called when I edit the entry programmatically
python|validation|tkinter
0
24
1
72,190,508
72,190,508
1
true
2022-05-10T14:03:36.227Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Validatecommand is called when I edit the entry programmatically<p>I am trying to create an entry with a very special validation. For that, I'm playing dirty...
72,189,599
Target one specific Jquery Data Table theader for CSS styles<p>Working with a dynamic Jquery Data Table with 10 table headers. Not able to physically add in a class or an Id in code to the particular th whose title is 'Unused'.</p> <p>In .css I have tried</p> <pre><code>[title~= Unused] { background-color: goldenro...
<p>You can use the DataTables <a href="https://datatables.net/reference/option/initComplete" rel="nofollow noreferrer"><code>initComplete</code></a> option.</p> <p>This ensures the table has been initialized and the headings are available to be manipulated.</p> <p>The following demo searches the headings for the title ...
Target one specific Jquery Data Table theader for CSS styles
jquery|css|datatable|css-selectors
0
29
1
72,190,524
72,190,524
1
true
2022-05-10T16:01:29.403Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Target one specific Jquery Data Table theader for CSS styles<p>Working with a dynamic Jquery Data Table with 10 table headers. Not able to physically add in ...
72,189,109
__init__ from ctypes constructor<p>I have a C struct and a constructor</p> <pre><code>typedef struct { uint32_t index; int32_t line; int16_t column; } Position; Position positionCreate() { Position position; position.index = 0; position.line = -1; position.column = -1; return position; ...
<p><code>self</code> can't be assigned like that. What you need is <code>__new__</code>, which can return an instance of the class like you want:</p> <p>test.c</p> <pre class="lang-c prettyprint-override"><code>#include &lt;stdint.h&gt; #ifdef _WIN32 # define API __declspec(dllexport) #else # define API #endif t...
__init__ from ctypes constructor
python|c|ctypes
0
37
1
72,190,531
72,190,531
1
true
2022-05-10T15:28:45.970Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: __init__ from ctypes constructor<p>I have a C struct and a constructor</p> <pre><code>typedef struct { uint32_t index; int32_t line; int16_t colu...
72,190,007
reactiveValues ​does not update on nested observeEvent<p>I tried to make a minimal reproducible code that tries to simulate my problem. I would like to know why the <code>RESCID$rr</code> object does not appear in <code>renderDT</code>. When I comment out the command <code>output$noshow</code> I can see the result of <...
<p>You have a few issues. Nesting reactives is not a good idea. I have put it outside. Also, you need to specify what should happen when user clicks on <code>No</code> in the modal dialog. Lastly, <code>DTOutput</code> goes with <code>renderDT</code>, and not <code>uiOutput</code>. Try this</p> <pre><code>library(DT)...
reactiveValues ​does not update on nested observeEvent
r|shiny
0
19
1
72,190,660
72,190,660
1
true
2022-05-10T16:34:07.010Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: reactiveValues ​does not update on nested observeEvent<p>I tried to make a minimal reproducible code that tries to simulate my problem. I would like to know ...
72,180,334
AWS s3 caching images by url<p>One of the functions of my app is storing images for cars in an s3 bucket. The images are categorized by their url eg: <code>https://{bucketName}.s3.amazonaws.com/{vin}/{photoCategory}.jpg</code> <code>https://{bucketName}.s3.amazonaws.com/1B3EL46X95N553721/Full_Instrument_Cluster.jpg</co...
<p>What you can do is if you don't have any other caching layer (CDN, service worker, etc) in your setup to set the <code>Cache-Control</code> of the S3 object to <code>no-cahe</code> like the following way.</p> <p>Go to the object -&gt; Select <code>Edit Metadata</code> -&gt; add the <code>header/metadata</code></p> <...
AWS s3 caching images by url
javascript|reactjs|amazon-web-services|amazon-s3|caching
0
235
1
72,190,661
72,190,661
1
true
2022-05-10T03:11:21.097Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: AWS s3 caching images by url<p>One of the functions of my app is storing images for cars in an s3 bucket. The images are categorized by their url eg: <code>h...
72,185,556
access arguments similar to this.variable<pre><code>void main() { doStuff(&quot;foo&quot;); } void doStuff(String myString) { String myString = &quot;bar&quot;; print(myString); //prints &quot;bar&quot; } </code></pre> <p>The above executed in the dartpad yields &quot;bar&quot;, the local variable is used instea...
<p>No.</p> <p>For local variables, you are expected to be able to rename any local variable which shadows the variable you want to access, so there is no scope override.</p> <p>For instance variables, you can use <code>this.x</code>, for static variables you can use <code>ClassName.x</code>, for an imported top-level n...
access arguments similar to this.variable
dart
0
21
1
72,190,673
72,190,673
1
true
2022-05-10T11:30:48.560Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: access arguments similar to this.variable<pre><code>void main() { doStuff(&quot;foo&quot;); } void doStuff(String myString) { String myString = &quot;ba...
72,187,823
Is ADAL used in ASP Net Core with OpenIdConnect<p>I have an old web application in ASP .Net core 2.1 which is authenticating users against Azure AD.</p> <p>Give the fact that Microsoft will end support for ADAL, recommending to move to MSAL, I need to figure out if my application will still work, and if is using ADAL</...
<p>Yes, your resource URL <code>https://graph.windows.net</code> points to the token endpoint for <strong>Azure AD Graph (ADAL)</strong></p> <p>The token endpoint for <strong>MS Graph (MSAL)</strong> is <code>https://graph.microsoft.com</code></p> <p>Here is extended information about <a href="https://docs.microsoft.co...
Is ADAL used in ASP Net Core with OpenIdConnect
asp.net-core|authentication|azure-active-directory|openid-connect|adal
0
108
1
72,190,683
72,190,683
1
true
2022-05-10T14:03:42.327Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is ADAL used in ASP Net Core with OpenIdConnect<p>I have an old web application in ASP .Net core 2.1 which is authenticating users against Azure AD.</p> <p>G...
72,189,753
C# How to convert SQL into a LINQ query<p>I have a WinForms application connected to a <code>Movies</code> SQL Server database via Entity Framework (EF 6).</p> <p>I have the following SQL which I'm attempting to convert into a LINQ query</p> <pre><code>SELECT t.movieId,m.Title, t.number_of_files FROM (SELECT...
<p>To get all movies that have more than one file starting with &quot;M:\&quot;, use <code>Count</code> with the <code>Path.StartsWith</code> expression, and check the result of Count is greater than 1.</p> <pre><code>var filteredMovies = movies .Where(movie =&gt; movie.Files .Count(file =&gt; file.Path.Sta...
C# How to convert SQL into a LINQ query
c#|sql-server|winforms|linq
0
130
1
72,190,710
72,190,710
1
true
2022-05-10T16:13:37.980Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: C# How to convert SQL into a LINQ query<p>I have a WinForms application connected to a <code>Movies</code> SQL Server database via Entity Framework (EF 6).</...
72,190,550
Auth0 API can't see URI parameter submitted with Python Requests<p>I'm trying to do an authentication against Auth0 from a Python script using the <a href="https://auth0.com/docs/get-started/authentication-and-authorization-flow/add-login-using-the-authorization-code-flow-with-pkce" rel="nofollow noreferrer">PKCE authe...
<p>Ah, I found my own answer not long after.</p> <p>The key is the <code>%253A</code> in the URI encoding in the outgoing request body. (See <a href="https://stackoverflow.com/a/8348287/1751190">this answer</a>) Python's requests library is already URI-encoding the parameters, so my URI encoded <code>urllib.parse.quot...
Auth0 API can't see URI parameter submitted with Python Requests
python|python-requests|auth0|urlencode
0
43
1
72,190,717
72,190,717
1
true
2022-05-10T17:16:16.467Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Auth0 API can't see URI parameter submitted with Python Requests<p>I'm trying to do an authentication against Auth0 from a Python script using the <a href="h...
72,190,475
Plotting class decision boundary: determine a "good fit" range directly<p>I am trying to figure out how to plot the decision boundary line picking just few middle values instead of the entirety of the separator line such that it spans roughly the y-range that also the observations span.</p> <p>Currently, I manually rep...
<p>Instead of having <code>x_points</code> go from -1 to 1, you could invert the linear equation and specify the bounds you want on <code>y_points</code> directly:</p> <pre class="lang-python prettyprint-override"><code>y_points = np.linspace(X[:, 1].min(), X[:, 1].max()) x_points = -(w[1] * y_points + b) / w[0] </code...
Plotting class decision boundary: determine a "good fit" range directly
python|numpy|matplotlib
0
48
1
72,190,721
72,190,721
1
true
2022-05-10T17:11:06.340Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Plotting class decision boundary: determine a "good fit" range directly<p>I am trying to figure out how to plot the decision boundary line picking just few m...
72,188,266
backgroundImage React Native not working with flatlist not showing me the images<p>i need to show the images on my screen with the element flatlist</p> <pre><code>const renderItem = ({ item }) =&gt; ( &lt;ImageBackground source={{ uri: item.imageUrl }} imageStyle={{ borde...
<p>I see a few issues:</p> <ol> <li>Why are you using ImageBackground instead of just Image? ImageBackground is intended for use as a background.</li> <li>If the source of your image is a url you must specify an image height and width.</li> <li>give Flatlist style={{ flex: 1 }}, this will allow it to take up all the s...
backgroundImage React Native not working with flatlist not showing me the images
react-native|react-native-flatlist
0
35
1
72,190,816
72,190,816
1
true
2022-05-10T14:32:30.190Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: backgroundImage React Native not working with flatlist not showing me the images<p>i need to show the images on my screen with the element flatlist</p> <pre>...
72,189,978
React.JS Validating Two Inputs<p>I am currently in the process of learning React JS. I have a register file that allows the user to register. I want to validate that the two fields match each other before passing the information to the server in that register file. My code is shown below for a visual view. I did some s...
<p>If you want to validate fields, then just before the axios call , compare the fields/ values that are required, and if they match then call the axios api else just throw the error that is required to be shown on the UI for user.</p> <pre><code>//Add validation inside the function const register = () =&gt; { //...
React.JS Validating Two Inputs
mysql|node.js|reactjs|passport.js
0
40
1
72,190,869
72,190,869
1
true
2022-05-10T16:31:13.457Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: React.JS Validating Two Inputs<p>I am currently in the process of learning React JS. I have a register file that allows the user to register. I want to valid...
72,189,372
How can I add a Widget between items in a list?<h2>Problem:</h2> <blockquote> <p>Hi everyone! I have this &quot;<em>problem</em>&quot; that I want to add a <code>Widget</code> between the elements but I can't... <em>idk</em> why, here's an example of my <code>List</code> type <code>ChatMessage</code>:</p> </blockquote>...
<p>Make Changes to the type of List specified in arrow brackets &lt;&gt;</p> <p>From this:</p> <pre><code>List&lt;ChatMessage&gt; messages = [ ChatMessage(content: 'Hi!', type: 'sent', date: DateTime(2022, 5, 7)), ChatMessage(content: 'Hello!', type: 'received', date: DateTime(2022, 5, 8)), ChatMessage(content: 'How...
How can I add a Widget between items in a list?
arrays|list|flutter|arraylist|widget
0
34
1
72,190,892
72,190,892
1
true
2022-05-10T15:45:16.997Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I add a Widget between items in a list?<h2>Problem:</h2> <blockquote> <p>Hi everyone! I have this &quot;<em>problem</em>&quot; that I want to add a <...
72,190,838
React useState doesnt update from localstorage<p>When i try to use setTodos(storedTodos) it just resets the array. if i replace the <code>const [todos, setTodos] = useState([]);</code> with <code>const [todos, setTodos] = useState(JSON.parse(localStorage.getItem('todos')));</code> it works but only when theres alread...
<p>Try this method using Logical OR operator.</p> <pre><code>const [todos, setTodos] = useState(JSON.parse(localStorage.getItem('todos')) || []); </code></pre>
React useState doesnt update from localstorage
reactjs|react-hooks|local-storage|use-state
0
275
1
72,190,909
72,190,909
1
true
2022-05-10T17:42:07.123Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: React useState doesnt update from localstorage<p>When i try to use setTodos(storedTodos) it just resets the array. if i replace the <code>const [todos, setTo...
72,190,630
Determining 32-bit Mask in C<p>I'm not a C programmer, but found myself in a situation where I need to do some coding. I am using an ADC to determine voltage levels running through a device, and the ADC has 3 channels (0, 1, 2). I need to be able to determine the voltages on each channel separately. I found a function ...
<p>channel 0, 1, 2, 3 ... correspond to the masks <code>1 &lt;&lt; channel</code> which are 1, 2, 4, 8 ... You can make a mask of multiple channels by combining bits with the <code>|</code> (bitwise OR) operator.</p> <p>The example mask 0x0103 corresponds to channels 0, 1 and 8. Since only 6 channels are enabled the ...
Determining 32-bit Mask in C
c|32-bit|bitmask
0
46
1
72,190,958
72,190,958
1
true
2022-05-10T17:23:27.167Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Determining 32-bit Mask in C<p>I'm not a C programmer, but found myself in a situation where I need to do some coding. I am using an ADC to determine voltage...
72,190,833
Sort two groups of columns in dataframe separately?<pre><code>a = pd.DataFrame({'Foo':['A_1', 'A_4', 'A_3','A_6'],'Doo':['5', '7', '6','9'], 'Goo':[True, False, False, True]}) b = pd.DataFrame({'Poo':['A_6', 'A_1', 'A_3','A_4'], 'Moo':['1', '2', '3','4'],'Roo':[False, True, True, True]}) result=pd.concat([a, b], axis...
<p>You can use <code>merge</code> instead of <code>concat</code>, so that the values of the columns <code>Foo</code> and <code>Poo</code> match. Then you can sort according to <code>Foo</code> (or <code>Poo</code>, same thing).</p> <pre><code>result = pd.merge(left=a, right=b, left_on='Foo', right_on=...
Sort two groups of columns in dataframe separately?
pandas
0
19
1
72,190,982
72,190,982
1
true
2022-05-10T17:41:52.743Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Sort two groups of columns in dataframe separately?<pre><code>a = pd.DataFrame({'Foo':['A_1', 'A_4', 'A_3','A_6'],'Doo':['5', '7', '6','9'], 'Goo':[True, Fal...
72,190,405
Switching between threads with C++20 coroutines<p>There is an <a href="https://en.cppreference.com/w/cpp/language/coroutines" rel="nofollow noreferrer">example</a> of switching to a different thread with C++20 coroutines:</p> <pre><code>#include &lt;coroutine&gt; #include &lt;iostream&gt; #include &lt;stdexcept&gt; #in...
<p><code>switch_to_new_thread</code> actually <em>creates a new thread</em>, it doesn't <em>switch to a new thread</em>. It then injects code that resumes the coroutine in it.</p> <p>To run code on a specific thread, you have to actually run code on that thread. To resume a coroutine, that specific thread has to run ...
Switching between threads with C++20 coroutines
c++|c++20|c++-coroutine
0
237
2
72,191,099
72,191,099
1
true
2022-05-10T17:05:17.290Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Switching between threads with C++20 coroutines<p>There is an <a href="https://en.cppreference.com/w/cpp/language/coroutines" rel="nofollow noreferrer">examp...
72,045,342
universal ctags user-define syntax override built-in syntax<p>Universal-ctags does support org files. But its output does not contain Hanji characters. So I define org syntax in <code>~/.ctags.d/default.ctags</code>.</p> <pre><code>--regex-Org=/^\*+\s+(\S.*)/\1/h,heading/ </code></pre> <p>It works. But built-in syntax ...
<p>Universal Ctags doesn't provide a way to override built-in patterns.</p> <p>Using uniq command after generating a tags file is one way to eliminate the duplicated entries.</p> <p>Editing the source code, <a href="https://github.com/universal-ctags/ctags/blob/master/optlib/org.ctags" rel="nofollow noreferrer">https:/...
universal ctags user-define syntax override built-in syntax
ctags|universal-ctags
0
27
1
72,191,168
72,191,168
1
true
2022-04-28T14:18:16.403Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: universal ctags user-define syntax override built-in syntax<p>Universal-ctags does support org files. But its output does not contain Hanji characters. So I ...
72,187,714
Return a fixed sized list based on an other list<p>I am looking in Kotlin for a method who return me from a list a new list with a defined number of elements (for example 10). Whatever the size of the list, the method would always return the same number of elements.</p> <p>For example, suppose a list of 3000 elements, ...
<p>That's kind of a specialised thing, so there's nothing (that I know of) in the standard library - but you could easily make your own extension function:</p> <pre><code>fun &lt;T: Any&gt; List&lt;T&gt;.sample2(count: Int): List&lt;T&gt; { // this allows for a fractional step, so we get a more accurate distributio...
Return a fixed sized list based on an other list
algorithm|kotlin
0
36
2
72,191,249
72,191,249
1
true
2022-05-10T13:57:29.677Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Return a fixed sized list based on an other list<p>I am looking in Kotlin for a method who return me from a list a new list with a defined number of elements...
72,188,190
Redeploy Dynamic Web Project to Wildfly Server with Eclipse EE<p>I am creating a dynamic web project using Eclipse EE to run on a Wildfly v18 server. I setup a test servlet just to ensure that my setup is working and mapped it in the web.xml file:</p> <pre><code>@WebServlet(&quot;/Test&quot;) public class Test extends ...
<p>&quot;Automatically publish after a build event&quot; implies that you <em>build</em>, i.e. leave automatic builds on, to deploy updated class files. This is also not specific to WildFly servers.</p>
Redeploy Dynamic Web Project to Wildfly Server with Eclipse EE
java|eclipse|jakarta-ee|jboss|wildfly
0
85
1
72,191,343
72,191,343
1
true
2022-05-10T14:27:38.547Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Redeploy Dynamic Web Project to Wildfly Server with Eclipse EE<p>I am creating a dynamic web project using Eclipse EE to run on a Wildfly v18 server. I setup...
72,190,275
How to scrape this website items with beautiful soup?<p>Hi I am trying to scrape all the products on this site. <a href="https://segari.id/" rel="nofollow noreferrer">https://segari.id/</a></p> <p>However the url is static, and also soup when I tried scraping doesn't work on this site. Even if it does, how do I infinit...
<p>You can grab data using only <code>requests</code> module as data is dynamically loaded by Javascript from API calls json response along with GET method.</p> <pre><code>import requests data = requests.get('https://api-v2.segari.id/v1.1/products/price?agentId=311&amp;size=40&amp;page=0&amp;paginationType=slice&amp;de...
How to scrape this website items with beautiful soup?
python|beautifulsoup
0
68
1
72,191,419
72,191,419
1
true
2022-05-10T16:54:44.450Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to scrape this website items with beautiful soup?<p>Hi I am trying to scrape all the products on this site. <a href="https://segari.id/" rel="nofollow no...
72,190,975
binfmt_misc kernel module not used<p>I am evaluating an NXP iMX.8 based (which is arm64v8) board. The eval kit came with a 5.10.72 Linux kernel but did not have <code>binfmt_misc</code> kernel module. After contacting the vendor, they provided the needed module which matches the kernel version. I placed it into <code>/...
<p>It seems that the module was compiled separately and kernel itself was not built with <code>CONFIG_BINFMT_MISC</code> enabled, therefore the code that should create this mountpoint is still excluded: <a href="https://elixir.bootlin.com/linux/v5.10.72/source/kernel/sysctl.c#L3304" rel="nofollow noreferrer">https://el...
binfmt_misc kernel module not used
linux|linux-kernel|kernel-module|imx8
0
194
2
72,191,528
72,191,528
1
true
2022-05-10T17:54:16.607Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: binfmt_misc kernel module not used<p>I am evaluating an NXP iMX.8 based (which is arm64v8) board. The eval kit came with a 5.10.72 Linux kernel but did not h...
72,191,365
Creating and Capturing payment with paypal v2 node.js<p>I am trying to integrate PayPal server-side payment on a website with a new v2 since v1 is deprecated. Since I had to include quite a lot of code from their git, i will post here everything for a working example</p> <p>In v1 i could do it really easily:</p> <pre><...
<p>With your v2 code, do not use any redirects. At all. Your button should call 2 endpoints on your server. These two endpoints should (respectively) do the API operations of creating and capturing the order, and return the JSON result in each case (the capture route can do any server-side operations like storing the t...
Creating and Capturing payment with paypal v2 node.js
node.js|reactjs|paypal|paypal-rest-sdk
0
224
1
72,191,552
72,191,552
1
true
2022-05-10T18:27:18.600Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Creating and Capturing payment with paypal v2 node.js<p>I am trying to integrate PayPal server-side payment on a website with a new v2 since v1 is deprecated...
72,188,429
What's the equivalent of `width: max(100%, fit-content)`?<p>I would like my div to fit the size of it's content if the size of parent div is smaller than content,<br /> and be the size of parent otherwise.</p> <p>I can do the 1st by <code>width: fit-content</code>,<br /> and the 2nd by <code>width: 100%</code>,</p> <p>...
<p>Instead of trying to set the max between 100% and fitting the content, you should instead set the minumum width of the your <code>&lt;div&gt;</code> to the size of its parent. I was able to reporoduce what you were asking for by setting the container in question (blue box in the example below) to be an <code>inline-...
What's the equivalent of `width: max(100%, fit-content)`?
css
0
408
2
72,191,637
72,191,637
1
true
2022-05-10T14:42:23.257Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What's the equivalent of `width: max(100%, fit-content)`?<p>I would like my div to fit the size of it's content if the size of parent div is smaller than con...
72,191,595
can't set a foreign key on oracle sql<p>Here is my code:</p> <pre><code>SQL&gt; CREATE TABLE manufacturer( manufacturer_id integer primary key, manufacturer_name varchar2(20) ); Table created. SQL&gt; CREATE TABLE models( model_id integer primary key, model_name varchar2(20), model_year integer, eng_cylin...
<p>No &quot;FOREIGN KEY&quot; keyword is used for inline constraints. So, like this:</p> <pre><code>CREATE TABLE manufacturer (manufacturer_id integer primary key, manufacturer_name varchar2(20)); CREATE TABLE models (model_id integer primary key, model_name varchar2(20), mo...
can't set a foreign key on oracle sql
sql|database|oracle
0
28
2
72,191,656
72,191,656
1
true
2022-05-10T18:47:39.093Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: can't set a foreign key on oracle sql<p>Here is my code:</p> <pre><code>SQL&gt; CREATE TABLE manufacturer( manufacturer_id integer primary key, manufactu...
72,191,201
With Prism, can I use DependencyInjection by Microsoft rather than using either Prism.Unity or Prism.DryLoc?<p>My .NET 6 WPF application uses Prism.Wpf 8.1.97. I am also using Visual Studio Community 2022 (64bit). I am hesitant to use Prism.Unity because Unity has been deprecated. Because of my experience with the now...
<p>You can use <a href="https://www.nuget.org/packages/Prism.Container.Extensions/" rel="nofollow noreferrer">Prism.Container.Extensions</a>. It seems to work, but it's not recommended for production.</p> <p>Prism relies on named registrations, a feature that the Microsoft container does not have. All in all, Microsoft...
With Prism, can I use DependencyInjection by Microsoft rather than using either Prism.Unity or Prism.DryLoc?
.net|wpf|prism|unity-container
0
109
1
72,191,681
72,191,681
1
true
2022-05-10T18:13:35.160Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: With Prism, can I use DependencyInjection by Microsoft rather than using either Prism.Unity or Prism.DryLoc?<p>My .NET 6 WPF application uses Prism.Wpf 8.1.9...
72,191,566
How can I position two elements close to each other in a flexbox navigation bar<p>So I have a simple flexbox navigation bar with three elements.</p> <ol> <li>A logo</li> <li>a list of items and</li> <li>a div with two buttons.</li> </ol> <p>What I would like is for the div with two buttons to be on the right side of my...
<p>Just wrap img and ul tags in a div and add display flex to it. Hope this help you solve your problem.</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-css lang-css prettyprint-override"><code>* { padding: 0; ...
How can I position two elements close to each other in a flexbox navigation bar
html|css|flexbox|nav
0
144
2
72,191,698
72,191,698
1
true
2022-05-10T18:45:21.223Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I position two elements close to each other in a flexbox navigation bar<p>So I have a simple flexbox navigation bar with three elements.</p> <ol> <li...
72,191,504
How to fix warning occured during compiling of C program on fedora<p>I am trying to learn how to split a c program in more than one file but during compilation it throws warning as given below:</p> <pre class="lang-sh prettyprint-override"><code>$ gcc ./p1.c ./p2.c -o ./p1 ./p2.c:2:1: warning: data definition has no ty...
<p><code>p2.c</code> should have a normal definition of the global variable:</p> <pre><code>#include &quot;./p2.h&quot; int b = 6; int square(int x) { return x * x; } </code></pre>
How to fix warning occured during compiling of C program on fedora
c|compiler-warnings
0
51
1
72,191,715
72,191,715
1
true
2022-05-10T18:39:40.537Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to fix warning occured during compiling of C program on fedora<p>I am trying to learn how to split a c program in more than one file but during compilati...
72,185,842
how to get file details of uploaded file in extJS<p>how to get file details of uploaded file in extJS</p> <p>I am using file upload and I need to first conveert into Grid and then sumbit.</p> <p>for grid conversion I have to take all files details like this :</p> <pre><code>File { webkitRelativePath: &quot;&quot;, ...
<p>For the classic framework, following way should work:</p> <pre><code> listeners: { change: function(fld, value) { let file = fld.fileInputEl.dom.files[0]; } }, </code></pre>
how to get file details of uploaded file in extJS
javascript|extjs|extjs6
0
47
1
72,191,745
72,191,745
1
true
2022-05-10T11:53:34.993Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to get file details of uploaded file in extJS<p>how to get file details of uploaded file in extJS</p> <p>I am using file upload and I need to first conve...
72,191,626
Postgres: Searching all sub-arrays of an array<p>I have a Postgres table with a json column, named <code>raw_data</code>, that is structured like this:</p> <p><code>[{&quot;id&quot;:1234, &quot;name&quot;:&quot;John Doe&quot;, &quot;purchases&quot;:12}, {&quot;id&quot;:1234, &quot;name&quot;:&quot;Jane Doe&quot;, &quot...
<p>You can use a JSON path expression:</p> <pre><code>select * from my_table where raw_data @@ '$[*].name == &quot;John Doe&quot;'; </code></pre> <p>This assumes that <code>raw_data</code> is a <code>jsonb</code> column (which it should be). If it's not, you need to cast it <code>raw_data::jsonb</code></p>
Postgres: Searching all sub-arrays of an array
sql|json|postgresql
0
25
1
72,191,760
72,191,760
1
true
2022-05-10T18:50:23.553Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Postgres: Searching all sub-arrays of an array<p>I have a Postgres table with a json column, named <code>raw_data</code>, that is structured like this:</p> <...
72,191,584
How to push to another upstream<p>When I run <code>git branch --av</code> I got theses lines.</p> <p><a href="https://i.stack.imgur.com/7MVgx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7MVgx.png" alt="enter image description here" /></a></p> <p>I am trying to push changes to different remote url...
<p>Just say the name of the remote you want to push to. For example, if you are on <code>master</code>:</p> <pre><code>git push upstream master </code></pre>
How to push to another upstream
git|github
0
41
1
72,191,792
72,191,792
1
true
2022-05-10T18:46:49.863Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to push to another upstream<p>When I run <code>git branch --av</code> I got theses lines.</p> <p><a href="https://i.stack.imgur.com/7MVgx.png" rel="nofol...
72,191,464
replace all dates that occur after a specified end date with an *NA* in a rowwise manner<p>I want to replace all dates that occur after a specified end date stored in the column <em>&quot;date_end&quot;</em> with an <em>NA</em> in a rowwise manner.</p> <p>Original data frame:</p> <pre><code>date_end &lt;-as.Date(c(&quo...
<p>This should also work - as long as date1 of the first row should be NA because it is after the corresponding end date:</p> <pre><code>date_end &lt;-as.Date(c(&quot;2019-07-31&quot;, &quot;2019-07-17&quot;, &quot;2019-12-18&quot;)) date1 &lt;-as.Date(c(&quot;2019-10-31&quot;, &quot;2019-05-01&quot;, &quot;2019-07-27...
replace all dates that occur after a specified end date with an *NA* in a rowwise manner
r|dplyr|rowwise
0
36
3
72,191,821
72,191,821
1
true
2022-05-10T18:35:53.383Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: replace all dates that occur after a specified end date with an *NA* in a rowwise manner<p>I want to replace all dates that occur after a specified end date ...
72,191,727
How do I use lag to get the previous row before a specific time window of data?<p>Every day I create a table that looks like this:</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>user_id</th> <th>received_at</th> <th>age_pref</th> <th>ethnicity_pref</th> </tr> </thead> <tbody> <tr> <td>1</t...
<p>I guess you can <code>union all</code> the following query:</p> <pre><code>select distinct on (user_id) user_id, received_at, age_pref, ethnicity_pref from t order by user_id, received_at desc where received_at &lt; '10:00' </code></pre>
How do I use lag to get the previous row before a specific time window of data?
sql|postgresql
0
30
1
72,191,826
72,191,826
1
true
2022-05-10T18:58:27.907Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I use lag to get the previous row before a specific time window of data?<p>Every day I create a table that looks like this:</p> <div class="s-table-co...
72,191,632
Oracle SQL - Model Clause for Calculating Loan Future Balance<p>I am trying to calculate the future balances of a loan. I don't have write privileges to the Oracle database I am working on so I can't use create table. I will have access to account information that includes the account ID, current balance, interest rate...
<p>Without reviewing your whole approach, one way to do this that is very close to what you already have is to add <code>pmt_freq</code> and <code>remain_amort</code> to a <code>PARTITION</code> clause in your <code>MODEL</code>.</p> <p>(You'll probably want to <code>PARTITION BY account_id</code> anyway, if you ever r...
Oracle SQL - Model Clause for Calculating Loan Future Balance
sql|oracle
0
41
2
72,191,833
72,191,833
1
true
2022-05-10T18:50:47.863Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Oracle SQL - Model Clause for Calculating Loan Future Balance<p>I am trying to calculate the future balances of a loan. I don't have write privileges to the ...
72,191,399
Hiding all instances of 2 divs depending on contents of a string<p>I have a custom Wordpress blog post page that is showing personnel profile cards, 12 people at a time. Sometimes, people have a Twitter handle, others not. When the value entered in the backend for their handle is &quot;none&quot;, both the title and th...
<p>As mentioned, <code>getElementsByClassName</code> returns a <code>HTMLCollection</code> of all of the targeted elements.</p> <p>To apply your intended logic to each profile card you will need to iterate over each one and run your checks and style updates on <em>each</em> iteration.</p> <p>To make this easier, I'd su...
Hiding all instances of 2 divs depending on contents of a string
javascript|html
0
31
1
72,191,859
72,191,859
1
true
2022-05-10T18:30:37.083Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Hiding all instances of 2 divs depending on contents of a string<p>I have a custom Wordpress blog post page that is showing personnel profile cards, 12 peopl...
72,191,682
How to specify to show a navigation bar on one screen and not to show it on another?<p>I have two viewControllers, <code>vcA</code> and <code>vcB</code>. <code>vcA</code> is the initial view controller and it's embedded in a navigation controller, <code>navVC</code>. To display <code>vcB</code> I push <code>vcB</code> ...
<p>While the default view controllers make life really great initially, they usually come with very specific ways they operate and trying to operate outside those paradigms will be difficult if not impossible.</p> <p>I would suggest not using the default navigation view controller on the view that you don’t want the ba...
How to specify to show a navigation bar on one screen and not to show it on another?
ios|swift|viewcontroller
0
132
2
72,192,074
72,192,074
1
true
2022-05-10T18:55:32.300Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to specify to show a navigation bar on one screen and not to show it on another?<p>I have two viewControllers, <code>vcA</code> and <code>vcB</code>. <co...
72,191,840
Retrieve rows where Column1 != Multiple Values from Column2<p>I have 2 Location columns. I need to find a way to show only exceptions, where Location1 != Location2, <strong>BUT</strong> there are multiple values in Location2 column that can be associated with value in Lcoation1.</p> <p>For example: San Diego in Locatio...
<p>If you are willing to do some manual (ongoing) maintenance, you could create a mapping table of valid <code>Location1</code>-<code>Location2</code> relations and filter <code>Locations</code> based on the mapping table. This way <em>you</em> define what is valid and you can easily find things that aren't.</p> <pre>...
Retrieve rows where Column1 != Multiple Values from Column2
sql|sql-server
0
51
2
72,192,109
72,192,109
1
true
2022-05-10T19:09:43.433Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Retrieve rows where Column1 != Multiple Values from Column2<p>I have 2 Location columns. I need to find a way to show only exceptions, where Location1 != Loc...
72,192,073
Strange C++ output with boolean pointer<p>I have the following code:</p> <pre><code>#include &lt;iostream&gt; using namespace std; int main() { int n = 2; string s = &quot;AB&quot;; bool* xd = nullptr; for (int i = 0; i &lt; n; i += 100) { if (xd == nullptr) { bool tmp = false; ...
<blockquote> <pre><code>if (xd == nullptr) { bool tmp = false; xd = &amp;tmp; } </code></pre> </blockquote> <p><code>tmp</code> is an automatic variable. It is destroyed automatically at the end of the scope where the variable is declared. In this case, the lifetime of the object ends when the if-statement ends...
Strange C++ output with boolean pointer
c++|pointers|boolean
0
74
1
72,192,161
72,192,161
1
true
2022-05-10T19:35:15.563Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Strange C++ output with boolean pointer<p>I have the following code:</p> <pre><code>#include &lt;iostream&gt; using namespace std; int main() { int n = ...
72,192,048
Matlab matrix to cell<p>I'm trying to avoid loops in Matlab. How can I do the following matrix to cell conversion vectorized?</p> <pre><code>m1 = ones(10, 2); i = [1:10]'; m2 = [i i]; c = cell(10, 2); for i=1:10 c{i, 1} = m1(i, :); c{i, 2} = m2(i, :); end </code></pre>
<p>As mentioned by @beaker mat2cell() is the function to use here...this should work:</p> <p><code>c = mat2cell([m1,m2],ones(10,1),[2,2])</code></p>
Matlab matrix to cell
algorithm|matlab|loops|vectorization
0
46
1
72,192,175
72,192,175
1
true
2022-05-10T19:32:42.373Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Matlab matrix to cell<p>I'm trying to avoid loops in Matlab. How can I do the following matrix to cell conversion vectorized?</p> <pre><code>m1 = ones(10, 2)...
72,177,570
How to pass Github secrets as value in json file?<p>I'm using <a href="https://docs.cypress.io/guides/overview/why-cypress" rel="nofollow noreferrer">Cypress.io</a> for my automated tests &amp; triggering it in CI/D with <a href="https://github.com/features/actions" rel="nofollow noreferrer">Github Actions</a>. The con...
<p>I solved this issue by storing the entire <code>cypress.json</code> config file's content as <a href="https://docs.github.com/en/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-an-environment" rel="nofollow noreferrer">GitHub's repository encrypted secret</a>. Then, I used the <a href="https...
How to pass Github secrets as value in json file?
javascript|continuous-integration|cypress|github-actions|continuous-deployment
0
1,428
2
72,192,186
72,192,186
1
true
2022-05-09T19:56:42.400Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to pass Github secrets as value in json file?<p>I'm using <a href="https://docs.cypress.io/guides/overview/why-cypress" rel="nofollow noreferrer">Cypress...
72,191,445
WebRTC on shared hosting ( SSH ) without nodejs, preferrably in php<p>So ive been looking for a way to integrate webRTC into a site im making, but i want to do it on shared hosting. I came across <a href="https://github.com/nielsbaloe/webrtc-php" rel="nofollow noreferrer">this repo on GitHub</a> by nielsbaloe and it ha...
<p>As far as I know, there is no way to re-use the same RTCPeerConnection for multiple peers, so you'll have to do the same thing as 1-on-1 but between every single peer in a group.</p> <p>As far as signalling, it's pretty simple, goes kind of like this:</p> <p>Client A -&gt; [Offer] -&gt; Server -&gt; [Offer] -&gt; Cl...
WebRTC on shared hosting ( SSH ) without nodejs, preferrably in php
javascript|php|html|webrtc
0
87
1
72,192,324
72,192,324
1
true
2022-05-10T18:34:21.970Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: WebRTC on shared hosting ( SSH ) without nodejs, preferrably in php<p>So ive been looking for a way to integrate webRTC into a site im making, but i want to ...
72,192,021
How can I make sure that a change in one dataframe is reflected by a similar change in another dataframe<p>I'm working with two dataframes similar to this:</p> <pre><code>import pandas as pd records_A = pd.DataFrame({'id': [1001,1001,1001,1002,1002,1002,1003,1003,1003,1004,1005,1006], 'location': ['NJ','OH','OH','CA',...
<p>You don't need to use apply for flagging the location changes. Here is a full working solution.</p> <pre><code>import pandas as pd #flag location changed in records_A records_A['location_changed'] = records_A.groupby('id')['location'].\ shift().\ bfill...
How can I make sure that a change in one dataframe is reflected by a similar change in another dataframe
python|pandas|dataframe|numpy
0
32
2
72,192,341
72,192,341
1
true
2022-05-10T19:29:30Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I make sure that a change in one dataframe is reflected by a similar change in another dataframe<p>I'm working with two dataframes similar to this:</...
72,191,631
Is there a short elegant way to write variable providing with exception?<p>So, I want to write these kind of things for my code, but there's too much code for one variable. How can I use modern Java for solving this problem shorter or cleaner? Moving it in the separate method doesn't solve the problem, because I still ...
<p>What you're asking is not very clear, so I don't know at which extent my answer will be meaningful.</p> <p>If I understand well, you have fields of any type (<code>Foo</code>, <code>Bar</code>...) and you would like to instantiate them using whatever kind of provider you wish, which can throw an exception while prov...
Is there a short elegant way to write variable providing with exception?
java|coding-style|refactoring
0
56
2
72,192,498
72,192,498
1
true
2022-05-10T18:50:42.617Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is there a short elegant way to write variable providing with exception?<p>So, I want to write these kind of things for my code, but there's too much code fo...
72,192,508
How to add authorization to a Contentful webhook so it triggers a GitHub action?<p>I've got a simple Gatsby site that pulls some content from a Contentful CMS. The repo is set up to publish to GitHub pages via an action that's triggered on commits to <code>main</code>. That all works.</p> <p>Now I'm trying to add a w...
<p>Being an auth newbie, I now realize I wasn't setting up the header correctly. Since the examples showed a <code>token</code> string before the personal access token, I used that as the header key, and put the PAT in the value field. <a href="https://github.community/t/trigger-workflow-from-url/16416" rel="nofollow...
How to add authorization to a Contentful webhook so it triggers a GitHub action?
gatsby|github-actions|github-pages|contentful
0
82
1
72,192,510
72,192,510
1
true
2022-05-10T20:20:01.367Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to add authorization to a Contentful webhook so it triggers a GitHub action?<p>I've got a simple Gatsby site that pulls some content from a Contentful CM...
72,192,447
Solana REST API - getting metadata<p>I am new in this world and don't have experience. is there API for solana? if yes could you please a tutorial or give tipp . For example can i getting the matadata?</p> <p>Best regards,</p>
<p>Solana has a JSON RPC API that you can use to grab data on the chain:</p> <p><a href="https://docs.solana.com/developing/clients/jsonrpc-api" rel="nofollow noreferrer">https://docs.solana.com/developing/clients/jsonrpc-api</a></p>
Solana REST API - getting metadata
rest|solana
0
120
1
72,192,537
72,192,537
1
true
2022-05-10T20:13:30.363Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Solana REST API - getting metadata<p>I am new in this world and don't have experience. is there API for solana? if yes could you please a tutorial or give ti...
72,192,566
How fix TypeScript errors in React function that handles input changes of multiple form fields<p>I liked the approach taught at <a href="https://www.pluralsight.com/guides/handling-multiple-inputs-with-single-onchange-handler-react" rel="nofollow noreferrer">https://www.pluralsight.com/guides/handling-multiple-inputs-w...
<p>Use the Typescript 'as' keyword to narrow down the type of the event object.</p> <pre><code>const value = event.target.type === 'checkbox' ? (event as React.ChangeEvent&lt;HTMLInputElement&gt;).target.checked : event.target.value; </code></pre>
How fix TypeScript errors in React function that handles input changes of multiple form fields
reactjs|typescript
0
29
1
72,192,751
72,192,751
1
true
2022-05-10T20:26:21.330Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How fix TypeScript errors in React function that handles input changes of multiple form fields<p>I liked the approach taught at <a href="https://www.pluralsi...
72,191,017
Laravel-Vuejs App not running in live domain<p>I am getting no error but a couple of warnings: I am sharing the image of the application landing page, It's a completely blank page, while it runs nicely in localhost:</p> <p><a href="https://i.stack.imgur.com/Qwp7L.png" rel="nofollow noreferrer"><img src="https://i.stack...
<p>You need to edit this code to be like this</p> <pre><code>if(!loggedIn() &amp;&amp; to.name!=&quot;login&quot;) { next({name : &quot;login&quot;}) } else{ next() } </code></pre> <p>The problem is the router is redirect user even in the login page and that make infinite loop</p>
Laravel-Vuejs App not running in live domain
laravel|vue.js
0
54
1
72,192,804
72,192,804
1
true
2022-05-10T17:57:45.237Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Laravel-Vuejs App not running in live domain<p>I am getting no error but a couple of warnings: I am sharing the image of the application landing page, It's a...
72,179,703
spock testing of endpoint and repository<p>Working on my Spring 2.67 and Spock 2.1-groovy-3.0 testing. I have the basic testing working but now trying some integration testing without success. I have a controller with:</p> <pre><code> private ApiService apiService; @Autowired public ApiController(ApiService ...
<p>The problem is that your test is annotated with <code>@Transactional</code> that means that only things that run in that method can see the data. The rest request you are sending out, will be handled by another thread that doesn't have access to the transaction and thus will not see the data.</p> <p>You'll have to r...
spock testing of endpoint and repository
spock|spring-test
0
53
1
72,192,845
72,192,845
1
true
2022-05-10T01:13:20.133Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: spock testing of endpoint and repository<p>Working on my Spring 2.67 and Spock 2.1-groovy-3.0 testing. I have the basic testing working but now trying some ...
72,178,281
python decorator takes 1 positional argument but 5 were given after modifying for pytest<p>I'd appreciate some help with the following code, as I'm still relatively new to Python, and despite countless days trying to figure out where i'm going wrong, i cant seem to spot the error i'm making.</p> <p>I've adapted the fol...
<p>I think the problem is that the wrapper is including the function as an argument to the function.</p> <p>Try adding this line and see if it helps</p> <pre><code>args = args[1:] </code></pre> <p>intor your log_decorator_wrapper function towards the top. Like this.</p> <pre><code>def log_decorator(_func=None): de...
python decorator takes 1 positional argument but 5 were given after modifying for pytest
python|decorator|keyword-argument
0
206
2
72,192,862
72,192,862
1
true
2022-05-09T21:15:38.617Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: python decorator takes 1 positional argument but 5 were given after modifying for pytest<p>I'd appreciate some help with the following code, as I'm still rel...
72,172,200
Checking Json type in kotlin<p>I have an json object that can be String or JsonArray. Its depending on the API which I get the data from, but I dont know what I am getting so I need to check.</p> <p>What I tried to do:</p> <pre><code> val myData = optional.get(&quot;keyOfData&quot;) when(myData) { is Jso...
<p>You could try something like this (this is for testing with Assertion.Builder).</p> <p>with it.nodeType you can detect the type of the json node.</p> <pre><code>infix fun Assertion.Builder&lt;JsonNode&gt;.isEqualTo(expected: String?): Assertion.Builder&lt;JsonNode&gt; { return assert(&quot;is a string with value...
Checking Json type in kotlin
android|json|kotlin
0
238
1
72,192,871
72,192,871
1
true
2022-05-09T12:41:37.433Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Checking Json type in kotlin<p>I have an json object that can be String or JsonArray. Its depending on the API which I get the data from, but I dont know wha...
72,192,833
Drop group if another column has duplicate values - pandas dataframe<p>I have the following df</p> <pre><code>id value many other variables A 5 A 5 A 8 A 9 B 3 B 4 B 5 B 9 C 10 C 11 C 19 D 6 D 6 D 10 E 0 E 0 E 0 ... </code></pre> <p>I want to drop the whole id g...
<p>You can use <code>duplicated</code> to flag the duplicates, then transform <code>groupby.any</code> to flag the groups with duplicates. Then to get the rows with 0s, chain this boolean mask with a boolean mask that flags 0s:</p> <pre class="lang-py prettyprint-override"><code>out =df[~df.duplicated(['id','value']).g...
Drop group if another column has duplicate values - pandas dataframe
python|pandas|dataframe|pandas-groupby
0
46
1
72,192,878
72,192,878
1
true
2022-05-10T20:55:10.950Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Drop group if another column has duplicate values - pandas dataframe<p>I have the following df</p> <pre><code>id value many other variables A 5 A 5 A ...
72,176,856
How to recreate google keep note<p>I tried to create my own notes for the school project. And I ran into some problems, I am using contentEditable for the note-taking part and it auto-generates divs. I tried to remove them with not much luck.</p> <blockquote> <p>Html</p> </blockquote> <pre><code>&lt;div id=&quot;main&q...
<p>With a little research, I found out...</p> <p>Use of <code>contenteditable</code> across <strong>different browsers</strong> has been painful for a long time because of the differences in <strong>generated markup between browsers</strong>. For example, even something as simple as what happens when you press Enter/Re...
How to recreate google keep note
javascript|html|jquery|flask|contenteditable
0
118
2
72,192,887
72,192,887
1
true
2022-05-09T18:47:26.833Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to recreate google keep note<p>I tried to create my own notes for the school project. And I ran into some problems, I am using contentEditable for the no...