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,859,922
Admin mask with custom entity with ManyToManyAssociation<p>I have an shopware6 admin extension where some custom entity is stored and loaded. This custom entity has a ManyToManyAssociation to another custom entity. In my mask I use a entity multi select component for the selection.</p> <p><div class="snippet" data-lang...
<p>By using a <code>ManyToManyAssociationField</code> the values for the columns of the mapping table are resolved dynamically. Since these columns belong to the mapping definition, not to your actual <code>CategoryCertificate</code> entity, they get stripped. You don't need to provide these IDs when you use the respec...
Admin mask with custom entity with ManyToManyAssociation
shopware|shopware6
0
66
1
72,862,455
72,862,455
2
true
2022-07-04T16:53:07.157Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Admin mask with custom entity with ManyToManyAssociation<p>I have an shopware6 admin extension where some custom entity is stored and loaded. This custom ent...
72,872,694
SwiftUI: View crashes when removing object from array stored in observableObject<p>I have an observable object that stores an array of contentItems (struct). My &quot;root&quot; view owns the observable object and subviews are generated with ForEach. Each subview has a textfield that should modify its content stored in...
<p>Best would be to pass the <code>ContentItem</code> itself down to your <code>ContentItemView</code>. In order to do so see the following commented code.</p> <pre><code>class Obs: ObservableObject { @Published var contentArray : [ContentItem] = [] func removeItem(id: UUID) { contentArray.rem...
SwiftUI: View crashes when removing object from array stored in observableObject
swift|swiftui
2
66
1
72,872,902
72,872,902
2
true
2022-07-05T16:23:50.127Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: SwiftUI: View crashes when removing object from array stored in observableObject<p>I have an observable object that stores an array of contentItems (struct)....
72,875,832
Oracle - Sort by letters first then numbers<p>I want to sort the following data items in the order they are presented below ( letters then numbers ) :</p> <pre><code>AA AB AC .. 00 01 02 .. 99 </code></pre> <p>However, my query - using Order by xxxxx ASC - based on ASCII code - which retrieves all numbers first...
<p>One way to do this would be to prioritize the ordering of items by alphabets using case when condition and after that to use the regular ordering. This way the priority sort would be on alphabets then numbers, followed by ordering within the respective categories</p> <p>Eg:</p> <pre><code>select a.* from t a order...
Oracle - Sort by letters first then numbers
sql|oracle|sorting
0
66
3
72,876,818
72,876,818
2
true
2022-07-05T21:38:15.327Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Oracle - Sort by letters first then numbers<p>I want to sort the following data items in the order they are presented below ( letters then numbers ) :</p> <p...
72,879,078
how to convert nested dict to dataframe using python?<p>I need to convert this dict to dataframe/csv</p> <pre><code>data= { &quot;message&quot;: { &quot;id&quot;: 474735, &quot;token&quot;: &quot;GI797jMv8FuG&quot;, &quot;direction&quot;: &quot;outgoing&quot;, &quot;message_id&quot;: &quot;t&quot;, ...
<p>You need to create a <code>dictionary</code> with the default value of <code>list</code> and add each element in this <code>dictionary</code>.</p> <pre><code>import pandas as pd tmp = {} for k,v in data.items(): if isinstance(v, dict): for a,b in v.items(): tmp.setdefault(f'{k}/{a}', []).app...
how to convert nested dict to dataframe using python?
python|json|pandas|dataframe|dictionary
0
66
2
72,879,523
72,879,523
2
true
2022-07-06T06:54:54.353Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to convert nested dict to dataframe using python?<p>I need to convert this dict to dataframe/csv</p> <pre><code>data= { &quot;message&quot;: { &quo...
72,835,340
What's the benefit of unmapping a resource in DirectX12<p>In a past question <a href="https://stackoverflow.com/questions/67362312/directx12-upload-synchronization-d3d12-heap-type-upload">DirectX12 Upload Synchronization D3D12_HEAP_TYPE_UPLOAD</a>, I got into trouble unmaping an upload resource, using it in a command l...
<p>First, I think it's worth addressing the remapping issue.</p> <p>In DX11, the driver does all the heavy lifting, so when you map (write/discard) a resource the driver's doing a bunch of work under the hood, specifically allocating a new buffer and returning you the address (referred to as &quot;resource renaming&quo...
What's the benefit of unmapping a resource in DirectX12
virtual-memory|directx-12|direct3d12
2
66
1
72,887,651
72,887,651
2
true
2022-07-01T23:11:16.380Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What's the benefit of unmapping a resource in DirectX12<p>In a past question <a href="https://stackoverflow.com/questions/67362312/directx12-upload-synchroni...
72,889,009
How can I map over an object and set it to another object without overwriting the previous values?<p>I'm working with a form that has sections where there can be multiple addresses, ids, etc. I'm taking the value of those objects and mapping it to another object that my API can understand. The problem I'm having is tha...
<p>You pass the same object to your &quot;generate&quot; function twice by reference:</p> <pre><code>const addressObject = {}; const addressCounterArray = ... // [0,1]; const addressCopyArray = addressCounterArray.map((index) =&gt; { return generateCorrectAddressFormat(index, addressObject, sectionAddress); }); </c...
How can I map over an object and set it to another object without overwriting the previous values?
javascript|arrays|typescript|object|redux
0
66
3
72,889,173
72,889,173
2
true
2022-07-06T19:37:12.277Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I map over an object and set it to another object without overwriting the previous values?<p>I'm working with a form that has sections where there ca...
72,917,671
How can you initialize a Captured variable inside a Lambda expression<p>In Java, it is only possible to capture final (or effectively final) variables in lambda expressions. It is possible to declare a final variable first and then initialize it once, but not if the initialization occurs in a lambda expression. This is...
<p>The best fit for your example is to <a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ExecutorService.html#submit-java.util.concurrent.Callable-" rel="nofollow noreferrer"><code>submit()</code></a> a <code>Callable</code> to an <code>ExecutorService</code>. Later, when you need the result, you ...
How can you initialize a Captured variable inside a Lambda expression
java|lambda|final|effectively-final
-1
66
3
72,917,900
72,917,900
2
true
2022-07-08T22:45:10.333Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can you initialize a Captured variable inside a Lambda expression<p>In Java, it is only possible to capture final (or effectively final) variables in lam...
72,934,719
Save lists as rows of a dataframe<p>I am new to pandas. I hope this is not too easy :). I have tried to solve this problem without success.</p> <p>I am using beatifulsoup to scrape a website. My variable gets the result I am looking for.</p> <pre><code>var = [sd.get_text() for sd in x.select(&quot;li&quot;)] </code></p...
<p>Convert your variable to a list of lists and pass it to a DataFrame constructor -</p> <pre class="lang-py prettyprint-override"><code>myvar = [[A, B, C, D, E, F, G, H], [I, J, K, L, M, M, N, O, P], [Q, R, S, T, U, V, W, X]] df = pd.DataFrame(myvar, columns=columns) </code></pre>
Save lists as rows of a dataframe
python|pandas|dataframe|beautifulsoup
1
66
2
72,934,795
72,934,795
2
true
2022-07-11T06:52:09.443Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Save lists as rows of a dataframe<p>I am new to pandas. I hope this is not too easy :). I have tried to solve this problem without success.</p> <p>I am using...
72,941,134
Bar plot in seaborn<p>While doing EDA of <a href="https://www.kaggle.com/competitions/titanic" rel="nofollow noreferrer">Titanic dataset</a> in Kaggle I combined &quot;Parch&quot; and &quot;SibSp&quot; values into single feature &quot;relative&quot; containing total no of relatives of each passenger.</p> <pre><code>dat...
<p>From <code>seaborn.barplot</code> documentation.</p> <blockquote> <p>help(seaborn.barplot)</p> </blockquote> <p>The plot is showing you the mean of the 'Survived' values per bin ('N of relatives'). You could specify the <code>estimator</code> parameter to change this behaviour (e.g. <code>estimator=median</code>).</...
Bar plot in seaborn
seaborn|bar-chart|eda
1
66
1
72,941,257
72,941,257
2
true
2022-07-11T15:38:23.187Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Bar plot in seaborn<p>While doing EDA of <a href="https://www.kaggle.com/competitions/titanic" rel="nofollow noreferrer">Titanic dataset</a> in Kaggle I comb...
72,949,766
Python regex Get first element after specific string<p>I'm trying to get the first number (int and float) after a specific pattern:</p> <pre><code>strings = [&quot;Building 38 House 10&quot;, &quot;Building : 10.5 house 900&quot;] for x in string: print(&lt;rule&gt;) </code></pre> <p>Wanted result:</p> <...
<p>You could use a capture group:</p> <pre><code>\bBuilding[\s:]+(\d+(?:\.\d+)?)\b </code></pre> <p><strong>Explanation</strong></p> <ul> <li><code>\bBuilding</code> Match the word <code>Building</code></li> <li><code>[\s:]+</code> Match 1+ whitespace chars or colons</li> <li><code>(\d+(?:\.\d+)?)</code> Capture group ...
Python regex Get first element after specific string
python|regex
2
66
3
72,950,068
72,950,068
2
true
2022-07-12T09:10:40.387Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python regex Get first element after specific string<p>I'm trying to get the first number (int and float) after a specific pattern:</p> <pre><code>strings = ...
72,945,320
sf::st_transform() returns empty geometry<p>I have transformed the rnaturalearth countries dataset for orthographic plotting using the procedure outlined <a href="https://gist.github.com/fzenoni/ef23faf6d1ada5e4a91c9ef23b0ba2c1" rel="nofollow noreferrer">here</a>.</p> <p><a href="https://i.stack.imgur.com/F3J1X.png" re...
<p>The gist you linked is inspiring, and it has helped me a lot in the past. But it is rooted in an obsolete version of <code>{sf}</code> - and with release 1.0 (which introduces S2 backend for geographic CRS) things got somewhat easier.</p> <p>I have updated the logic somewhat and published it a while back in this ans...
sf::st_transform() returns empty geometry
r|sf|coordinate-systems|map-projections
0
66
1
72,954,190
72,954,190
2
true
2022-07-11T22:35:57.737Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: sf::st_transform() returns empty geometry<p>I have transformed the rnaturalearth countries dataset for orthographic plotting using the procedure outlined <a ...
72,950,982
Generic razor component allowing arithmetic operations<p>I want to create a razor component allowing to enter int or float numbers and increment or decrement them using a spin control. However, I have no idea to tell the Blazor generator / C# compiler how to handle an arithmetic operation on the value passed to the com...
<p>Seems a bit long winded but:</p> <blockquote> <p>Happy for any ways to shorten it!</p> </blockquote> <pre class="lang-cs prettyprint-override"><code>@typeparam TValue &lt;div&gt; &lt;button class=&quot;btn btn-danger&quot; @onclick=SpinDown&gt;-&lt;/button&gt; &lt;button class=&quot;btn btn-success&quot; @on...
Generic razor component allowing arithmetic operations
blazor|integer-arithmetic|generic-type-parameters
0
66
2
72,959,126
72,959,126
2
true
2022-07-12T10:39:47.517Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Generic razor component allowing arithmetic operations<p>I want to create a razor component allowing to enter int or float numbers and increment or decrement...
72,976,262
How to extract the minimum value in all columns in a dataframe in R?<p>I am working on mass spectrometry proteomics expression data. For statistical analysis of the data, I have to find the top three minimum value of each column in the dataframe like below,</p> <pre><code>structure(list(Type = c(&quot;knn_vsn&quot;, &q...
<pre><code>library(tidyverse) df %&gt;% pivot_longer(-Type) %&gt;% group_by(name) %&gt;% slice_min(value, n = 3) %&gt;% # You might stop here, already tidy mutate(row = row_number()) %&gt;% ungroup() %&gt;% pivot_wider(names_from = name, values_from = c(Type, value), names_vary = &quot;sl...
How to extract the minimum value in all columns in a dataframe in R?
r|dataframe|extract|multiple-columns|minimum
0
66
3
72,976,595
72,976,595
2
true
2022-07-14T06:44:33.997Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to extract the minimum value in all columns in a dataframe in R?<p>I am working on mass spectrometry proteomics expression data. For statistical analysis...
72,976,649
How to upload multiple files in Django<p>I've been trying to find a solution to add multiple files using a drag and drop form. I'm using Django's Rest API and React.</p> <p>This is what i have been trying so far but it seems like this will only do for one file at a time:</p> <pre><code>class FileCollection(models.Model...
<p>Since you only show the model in your question, I assume you are asking about how to create a model that stores multiple files. Your current <code>Files</code> field is actually only a single file since you declare it as a <code>FileField</code>. To have multiple files, you need to use multiple <code>FileField</code...
How to upload multiple files in Django
python|django|django-rest-framework
2
66
1
72,976,778
72,976,778
2
true
2022-07-14T07:17:02.870Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to upload multiple files in Django<p>I've been trying to find a solution to add multiple files using a drag and drop form. I'm using Django's Rest API an...
72,995,700
Looking for an explanation of this attempted SQL injection query<p>Looking through my logs I found the following query string as an attempt to perform a SQL injection, probably from an automated tool:</p> <pre><code>(select*from(select+sleep(10)union/**/select+1)a) </code></pre> <p>From what I can tell, it’s attempting...
<p>I don't know what the point of this is, nor what the point is of trying to figure out the point. Injections are easier to block than to reverse engineer, and the latter doesn't contribute much to the former.</p> <p>The point of the + and the /**/ are probably pretty much the same, they separate tokens without the u...
Looking for an explanation of this attempted SQL injection query
sql|postgresql|sql-injection
1
66
3
72,997,686
72,997,686
2
true
2022-07-15T14:39:44.910Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Looking for an explanation of this attempted SQL injection query<p>Looking through my logs I found the following query string as an attempt to perform a SQL ...
73,016,794
Should I use react useState and conditional rendering to handle various screen sizes or media queries<p>I'm using standard css3 and creating css files for each component and I am trying to decide on whether or not to use an event listener and multiple return functions inside of my react component. As apposed to writing...
<p>Using media queries for responsive UI is best practice. If you use conditional rendering in order to differentiate UI by screen size, there will be a lot of rendering and thus, the quality of react application lowers. For better performance and better quality code, you should use media queries and it's more natural ...
Should I use react useState and conditional rendering to handle various screen sizes or media queries
css|reactjs|conditional-statements|rendering
1
66
2
73,016,853
73,016,853
2
true
2022-07-18T02:36:07.670Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Should I use react useState and conditional rendering to handle various screen sizes or media queries<p>I'm using standard css3 and creating css files for ea...
73,019,366
How to check if a SDT collection is empty<p>I'm having this grid to insert records into the database <a href="https://i.stack.imgur.com/EXao7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EXao7.png" alt="Grid with info" /></a>. How can I check if there isn't any information on the grid when insert ...
<p>To check if an SDT collection is empty, use the <strong>count</strong> property. For example, if your collection is &amp;SdtProducts, use &amp;SdtProducts.Count to get the number of items in the collection. The count will return zero if there are no items in the collection.</p> <p>Although you don't describe your ex...
How to check if a SDT collection is empty
grid|genexus
1
66
1
73,029,624
73,029,624
2
true
2022-07-18T08:27:00.940Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to check if a SDT collection is empty<p>I'm having this grid to insert records into the database <a href="https://i.stack.imgur.com/EXao7.png" rel="nofol...
73,031,111
Link HTML file outside its folder<p>I have a folder named <code>&quot;myWebsite&quot;</code>. Inside that folder I have <code>&quot;index.html&quot;</code> and another folder named <code>&quot;other&quot;</code>. Inside <code>&quot;other&quot;</code> I have CSS files JS files and <code>&quot;page2.html&quot;</code>. I ...
<p>In order to navigate back you should use <strong>'../'</strong> if you want point two folders back you can use <strong>'../../'</strong> for instance.</p> <p>In this case, within Page2.html use:</p> <pre><code>&lt;a href=&quot;../index.html&quot;&gt;go back&lt;a&gt; </code></pre> <p>NOTE: You have an extra dot.</p>
Link HTML file outside its folder
javascript|html
0
66
2
73,031,420
73,031,420
2
true
2022-07-19T04:26:37.690Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Link HTML file outside its folder<p>I have a folder named <code>&quot;myWebsite&quot;</code>. Inside that folder I have <code>&quot;index.html&quot;</code> a...
73,016,113
Change createMaterialTopTabNavigator active style<p>I am using react native and currently have this css code for the navigator function code</p> <pre><code>&lt;Tabs.Navigator screenOptions={{ tabBarScrollEnabled: true, tabBarShowLabel: false, t...
<p>Use the <code>tabBarIndicatorStyle: { backgroundColor: 'green' },</code> to change bar color in version 6 :)</p>
Change createMaterialTopTabNavigator active style
css|react-native
2
66
2
73,090,606
73,090,606
2
true
2022-07-17T23:48:30.377Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Change createMaterialTopTabNavigator active style<p>I am using react native and currently have this css code for the navigator function code</p> <pre><code>&...
72,784,873
Conditional peak & valley signal detection in realtime timeseries data [R]<p>I have a timeseries data which contain some peaks and valleys which significantly differ from the threshold level (an example vector is provided below).</p> <p>The peak/valley height/width may vary as well as the noise level.</p> <p>I am inter...
<p>I am the author of the original algorithm you were referring to.</p> <p>To answer your question, let's first discuss the characteristics of your data:</p> <ul> <li>The timeseries is stationary: the average value seems to be constant around 700</li> <li>There are infrequent peaks, both up and down</li> <li>The peaks ...
Conditional peak & valley signal detection in realtime timeseries data [R]
r|time-series|signal-processing
1
66
3
73,121,449
73,121,449
2
true
2022-06-28T10:33:58.273Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Conditional peak & valley signal detection in realtime timeseries data [R]<p>I have a timeseries data which contain some peaks and valleys which significantl...
72,835,901
SwiftUI: macOS Can't change TabView's tabItem accent color<pre><code>TabView { Text(&quot;The First Tab&quot;) .badge(10) .tabItem { Image(systemName: &quot;1.square.fill&quot;) Text(&quot;First&quot;) } Text(&quot;Another Tab&quot;) .tabItem { ...
<p>On macOS it can be changed this way:</p> <pre><code>struct ContentView: View { init() { UserDefaults.standard.set(1, forKey: &quot;AppleAccentColor&quot;) // &lt;&lt; here !! } var body: some View { TabView { </code></pre> <p>Tested with Xcode 13.4 / macOS 12.4</p> <p><a href="https://i....
SwiftUI: macOS Can't change TabView's tabItem accent color
swift|macos|swiftui|tabview
0
66
1
72,836,237
72,836,237
2
true
2022-07-02T01:43:48.713Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: SwiftUI: macOS Can't change TabView's tabItem accent color<pre><code>TabView { Text(&quot;The First Tab&quot;) .badge(10) .tabItem { ...
72,957,847
Cannot access nested type through typealias<p>I have a Quantity/Units library in Kotlin which has classes like <code>Weight</code>, <code>Distance</code>, <code>Force</code>. These classes inherit from a <code>Quantity</code> class and each contain a nested enum class <code>Unit</code> with information about the respec...
<p>Given that the <a href="https://kotlinlang.org/spec/declarations.html#type-alias" rel="nofollow noreferrer">Kotlin Language Specification</a> says &quot;Type alias introduces an alternative name for the specified type&quot;, you would reasonably expect to be able to use the typealias name wherever you can use the or...
Cannot access nested type through typealias
kotlin|inner-classes
2
66
1
72,965,041
72,965,041
2
true
2022-07-12T20:07:26.307Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Cannot access nested type through typealias<p>I have a Quantity/Units library in Kotlin which has classes like <code>Weight</code>, <code>Distance</code>, <c...
72,841,058
Can I borrow immutably again after a mutable borrow goes out of scope?<p><code>inspect</code> is a closure that takes an immutable reference to <code>ball</code>.</p> <p><code>edit</code> is a closure that takes a mutable reference to <code>ball</code>.</p> <hr /> <p>I know that the borrow checker doesn't let you borro...
<blockquote> <p>I know that the borrow checker doesn't let you borrow at all while a mutable borrow is around.</p> </blockquote> <p>Yes, but it also don't allow you to mutably borrow, while one or more immutable borrow is around.</p> <p>The problem is that you are trying to mutably borrow <code>ball</code> in <code>edi...
Can I borrow immutably again after a mutable borrow goes out of scope?
rust
1
66
3
72,841,327
72,841,327
2
true
2022-07-02T17:21:28.240Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can I borrow immutably again after a mutable borrow goes out of scope?<p><code>inspect</code> is a closure that takes an immutable reference to <code>ball</c...
72,997,130
Need to write a equals-method to check if a book is the same as another book but one book contains multiple values<p>Below is my code at this moment, I need to add to the equals method so when I create a two books they will only be equal if both of the attributes are the same. Hopefully you guys can help.</p> <pre clas...
<p>The correct implementation would be:</p> <pre><code>@Override public boolean equals(Object obj) { if(this == obj) return true; if(!(obj instanceof Book)) return false; Book other = (Book) obj; return bound == other.bound &amp;&amp; Objects.equals(title, other.title); } </code></pre> <...
Need to write a equals-method to check if a book is the same as another book but one book contains multiple values
java|equals
0
66
2
72,997,340
72,997,340
2
true
2022-07-15T16:33:59.530Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Need to write a equals-method to check if a book is the same as another book but one book contains multiple values<p>Below is my code at this moment, I need ...
72,822,172
How to get HTML element width dynamically in React.js?<p>I would like to dynamically get the <code>div</code> element's width. With <code>useRef</code> I can get the width of my <code>div</code>, but when I resize my page, the width value doesn't update automatically. Can you tell me what I need to do to make this happ...
<p>Change your <code>useEffect</code> as below so you add an event listener for when you resize the page. Updated Codesandbox <a href="https://codesandbox.io/s/magical-johnson-i778pb" rel="nofollow noreferrer">here</a>. Also notice I removed <code>width</code> state from the dependency array.</p> <pre><code>React.useEf...
How to get HTML element width dynamically in React.js?
javascript|reactjs
0
66
1
72,822,207
72,822,207
2
true
2022-06-30T21:21:38.810Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to get HTML element width dynamically in React.js?<p>I would like to dynamically get the <code>div</code> element's width. With <code>useRef</code> I can...
72,850,574
A system in C++ to create a file, store users login, then validate that login later<p>I've been attempting this for awhile but I keep getting lost the more I look into it.</p> <p>I've been attempting to create a system which allows a user to input their sign up details, have them stored in a file, then later have a log...
<p>There are a lot of problems with your code.</p> <ul> <li><p><code>main()</code> should not be calling <code>addtofile()</code> and <code>VerifyPass()</code> since those are called inside of <code>Menu()</code>.</p> </li> <li><p><code>Menu()</code> should use a <code>do..while</code> loop instead of <code>goto</code>...
A system in C++ to create a file, store users login, then validate that login later
c++
1
66
1
72,850,624
72,850,624
2
true
2022-07-03T23:33:24.663Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: A system in C++ to create a file, store users login, then validate that login later<p>I've been attempting this for awhile but I keep getting lost the more I...
72,891,856
How to perform multiple linear model fits of one column against all (pairwise) using dplyr and broom<p>Given the <code>mtcars</code> data:</p> <pre><code>&gt; head(mtcars) mpg cyl disp hp drat wt qsec vs am gear carb Mazda RX4 21.0 6 160 110 3.90 2.620 16.46 0 1 4 4 Mazda RX4 ...
<p>You could reshape, groupby and then do the lm:</p> <pre><code>library(tidyverse) mtcars %&gt;% pivot_longer(-mpg) %&gt;% group_by(name) %&gt;% summarise(broom::tidy(lm(mpg~value, cur_data())), .groups='drop') name term estimate std.error statistic p.value &lt;chr&gt; &lt;chr&gt; &lt;dbl&...
How to perform multiple linear model fits of one column against all (pairwise) using dplyr and broom
r|tidyverse|linear-regression|broom
0
66
3
72,903,008
72,903,008
2
true
2022-07-07T03:05:27.190Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to perform multiple linear model fits of one column against all (pairwise) using dplyr and broom<p>Given the <code>mtcars</code> data:</p> <pre><code>&gt...
72,935,662
Extract text not surrounded by hrefs<p>I must extract all the text from a <code>&lt;p&gt;</code>.</p> <p>This paragraph is full of links, so it is very easy to extract the text, by using this expression:</p> <pre><code>//div[@class=&quot;content clearfix&quot;]/p[2]//a/text() </code></pre> <p>Problem is sometimes, from...
<p>Try using normalize-space():</p> <pre class="lang-xml prettyprint-override"><code>normalize-space(//div[@class=&quot;content clearfix&quot;]/p[2]) </code></pre> <p>This will get you close. It would be a string that looks something like this:</p> <pre class="lang-none prettyprint-override"><code>text1, text2, text3, ...
Extract text not surrounded by hrefs
python|xpath|lxml|href
0
66
3
72,941,044
72,941,044
2
true
2022-07-11T08:28:25.913Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Extract text not surrounded by hrefs<p>I must extract all the text from a <code>&lt;p&gt;</code>.</p> <p>This paragraph is full of links, so it is very easy ...
73,026,573
How to Fix Histogram for Frequency of Years with matplotlib?<p>I'm trying to create a simple histogram with the x-axis as years and the y-axis as the count of each year. Using pandas, I created a data frame, called df1, from a CSV seen below, where it's just a single column of years. <a href="https://i.stack.imgur.com/...
<p>You don't need a histogram. If you have discrete values and want one value per bin, you can simply <a href="https://pandas.pydata.org/docs/reference/api/pandas.core.groupby.GroupBy.count.html#pandas.core.groupby.GroupBy.count" rel="nofollow noreferrer"><code>count</code></a> the values per year and plot the counts a...
How to Fix Histogram for Frequency of Years with matplotlib?
python|matplotlib|seaborn|data-visualization|histogram
-1
66
2
73,027,120
73,027,120
2
true
2022-07-18T17:52:34.087Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to Fix Histogram for Frequency of Years with matplotlib?<p>I'm trying to create a simple histogram with the x-axis as years and the y-axis as the count o...
72,808,854
How to loop through an array and continue at beginning once it reaches end?<p><strong>My problem:</strong></p> <p>I have an array called &quot;weekdays&quot;:</p> <p><code>const weekdays = [&quot;Mon&quot;, &quot;Tue&quot;, &quot;Wed&quot;, &quot;Thu&quot;, &quot;Fri&quot;, &quot;Sat&quot;, &quot;Sun&quot;];</code></p>...
<p>This loop seems most appropriate to the question asked. Although a bit silly if you run 2 indexOf you already got the distance. just need to substract and module array length. But this approach is good for the loop, because you can just compare the values as you go until you find &quot;Tue&quot;</p> <p><div class="s...
How to loop through an array and continue at beginning once it reaches end?
javascript|arrays|loops|for-loop
1
66
4
72,808,943
72,808,943
2
true
2022-06-29T23:30:27.013Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to loop through an array and continue at beginning once it reaches end?<p><strong>My problem:</strong></p> <p>I have an array called &quot;weekdays&quot;...
72,880,991
How do I deduplicate a list based on hourly intervals in Java?<p>First of all, I have this object that I call <strong>MyObject</strong>;</p> <pre><code>public class MyObject{ private google.protobuf.Timestamp timestamp; private String description; } </code></pre> <p>Then I have this list:</p> <pre><code>List&lt...
<p>Based on the clarifications you've given in the comments I've used a <code>LocalDateTime</code> to simplify the sample entry and retrieve the hour, but I'm sure that <code>google.protobuf.Timestamp</code> can be converted to a proper date and extract its hour.</p> <p>To keep only one object according to description,...
How do I deduplicate a list based on hourly intervals in Java?
java|list|duplicates
0
66
4
72,881,846
72,881,846
2
true
2022-07-06T09:26:16.347Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I deduplicate a list based on hourly intervals in Java?<p>First of all, I have this object that I call <strong>MyObject</strong>;</p> <pre><code>publi...
72,846,772
How to add an object to an array based on its values?<p>I have an array of objects, it looks like this:</p> <pre class="lang-js prettyprint-override"><code>[{ Rank: 1, Speed1: 91, Speed2: 457, Username: 'monizotic', ProfileLink: 'profile_link', VerifiedSpeed: null, Video: null }, { Rank:...
<p>Please see the below solution with an <code>O(N)</code> time complexity.</p> <p>It was made with an assumption that the desired insertion index logic is <code>(user.Speed1 * user.Speed2) &lt; (newUser.Speed1 * newUser.Speed2)</code>. Consequently, among all users with identical speeds, the new user will be inserted ...
How to add an object to an array based on its values?
javascript|arrays|javascript-objects
0
66
2
72,847,132
72,847,132
2
true
2022-07-03T13:10:15.547Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to add an object to an array based on its values?<p>I have an array of objects, it looks like this:</p> <pre class="lang-js prettyprint-override"><code>[...
72,835,859
How to read a File character-by-character in reverse without running out-of-memory?<hr /> <h2>The Story</h2> <hr /> <p>I've been having a problem lately...</p> <p>I have to read a file in reverse character by character without running out of memory.</p> <p>I can't read it line-by-line and reverse it with <strong><code>...
<p>This will do it (but as written it is not very efficient).</p> <ul> <li>just skip to the last location read less one and read and print the character.</li> <li>then reset the location to the mark, adjust size and continue.</li> </ul> <pre><code>File f = new File(&quot;Some File name&quot;); int size = (int) f.length...
How to read a File character-by-character in reverse without running out-of-memory?
java|file|out-of-memory|fileinputstream|mappedbytebuffer
1
66
2
72,836,084
72,836,084
2
true
2022-07-02T01:27:10.427Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to read a File character-by-character in reverse without running out-of-memory?<hr /> <h2>The Story</h2> <hr /> <p>I've been having a problem lately...</...
73,013,913
Check for precision loss when converting string to float<p>I have a string representing a rational number.</p> <p>I want to convert the string to a float with <code>strtof(nptr, &amp;endptr)</code></p> <p>The problem is that e.g. a string <code>&quot;1.0000000000000000000001&quot;</code> will be converted to <code>1.</...
<blockquote> <p>How does one catch this precision loss?</p> </blockquote> <p>One doesn't, at least not with anything in the standard library; none of the <code>strto*</code> conversion functions will tell you if the value cannot be represented exactly.</p> <p><strong>Edit</strong></p> <p>I know that's not terribly help...
Check for precision loss when converting string to float
c
0
66
1
73,014,065
73,014,065
2
true
2022-07-17T17:27:08.527Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Check for precision loss when converting string to float<p>I have a string representing a rational number.</p> <p>I want to convert the string to a float wit...
72,957,623
Why Omit from type of intersection with Record<string, any> makes all values any?<p>Why in <a href="https://www.typescriptlang.org/play?#code/JYOwLgpgTgZghgYwgAgILIN4Chm+XALmQGcwpQBzAbhzwCMjTyRqsBfLLMATwAcUAQsgC8aZADJkAJQgIA9lAAmAHiaUANPhDcAfJ0WyANnCgpDEMMgbIBNLHQB0dKsgD0rkmUrIe-Tr5QAYRFkAHkAW2AwZQFNAHI4OJ07AwRjU2RzSwQ...
<p>This happens the way <code>Omit</code> works.</p> <p>Lets look at how it's defined:</p> <pre><code>type Omit&lt;T, K extends string | number | symbol&gt; = { [P in Exclude&lt;keyof T, K&gt;]: T[P]; } </code></pre> <p>You see that it uses <code>Exclude&lt;keyof T, K&gt;</code> to defines the keys.</p> <p>In our case ...
Why Omit from type of intersection with Record<string, any> makes all values any?
typescript
1
66
1
72,957,833
72,957,833
2
true
2022-07-12T19:45:10.570Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why Omit from type of intersection with Record<string, any> makes all values any?<p>Why in <a href="https://www.typescriptlang.org/play?#code/JYOwLgpgTgZghgY...
72,949,426
How can I override object methods inside interface?<p>All classes in java extend the Object class implicitly. But that doesn't concern interfaces. Interfaces can only extend other interfaces, but no classes. However, I can override object class methods inside my interface.</p> <pre><code>public interface NewInterface {...
<p>Interface is a just contract. It says that all classes that inherits interface should implement these methods. Interface cannot have implementation. It is possible to override a class that implements this interface.</p> <p>However, <a href="https://stackoverflow.com/a/22713721/1646240">from Java 8 you can define sta...
How can I override object methods inside interface?
java|object|oop|interface
1
66
1
72,949,474
72,949,474
2
true
2022-07-12T08:45:55.297Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I override object methods inside interface?<p>All classes in java extend the Object class implicitly. But that doesn't concern interfaces. Interfaces...
72,780,562
Way to accept different clousure in inits and assign it to the same private variable<p>Suppose I have two inits and one private property like below.</p> <pre><code>struct MyStruct { let clousure: (Int, String, Bool) -&gt; String public init(clousure: @escaping (Int, String) -&gt; String) { /// How ...
<p>If you would share more info about the goal and what you are trying to achieve by passing the clousure and/or disregard part of the arguments we can help further. From the code point of view, it seems like the @escaping closure you are passing can just disregard the boolean value as follow:</p> <pre><code>struct MyS...
Way to accept different clousure in inits and assign it to the same private variable
swift|closures
1
66
1
72,781,504
72,781,504
2
true
2022-06-28T03:52:23.630Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Way to accept different clousure in inits and assign it to the same private variable<p>Suppose I have two inits and one private property like below.</p> <pre...
72,929,201
React - Axios Showing Message to User<p>want to show message to user. console log working fine im not sure why i cant show to user.</p> <p>tried several methods to fix. error message from axios = 'Request failed with status code 404'</p> <pre><code>import { useParams, Link, Route, Routes } from 'react-router-dom'; impo...
<p>You have a couple bugs:</p> <ul> <li>use <code>===</code> when comparing instead of <code>==</code> to avoid type coercion</li> <li>when setting state <code>setError(typeof (error.message));</code>, remove <code>typeof</code> of it , <code>setError(error.message);</code></li> <li>when testing the <code>error.messag...
React - Axios Showing Message to User
javascript|reactjs|react-hooks|axios|use-effect
1
66
3
72,929,320
72,929,320
2
true
2022-07-10T14:23:27.970Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: React - Axios Showing Message to User<p>want to show message to user. console log working fine im not sure why i cant show to user.</p> <p>tried several meth...
72,967,735
How to convert equation from R code into readable text?<p>I have defined multiple different functions, each containing one equation each, like so:</p> <pre><code>catalanFormula &lt;- function(n){ return( (factorial(2 * n)) / ((factorial(n + 1)) * factorial(n)) ) } triangularFormula &lt;- function(n){ return( ...
<p>Here's a base R function that will walk the abstract syntax tree to replace the factorial and <code>/</code> functions with the corresponding <code>?plotmath</code> markup so you can add them to R plots.</p> <pre><code> returnToPlotmath &lt;- function(fun) { swap &lt;- function(x) { if (class(x) %in% c(&quot;c...
How to convert equation from R code into readable text?
r
3
66
3
72,968,644
72,968,644
2
true
2022-07-13T14:09:00.660Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to convert equation from R code into readable text?<p>I have defined multiple different functions, each containing one equation each, like so:</p> <pre><...
72,866,100
How to overwrite a theme function within a custom plugin?<p><em>To begin with, my problem</em>:</p> <ul> <li>I have a <code>WooCommerce</code> error on the <code>W3C Validator</code> platform.</li> <li>I overwrite the file by redirecting the template path of <code>WooCommerce</code> for that specific file.</li> </ul> <...
<p>That's an example on how to override a woocommerce template with a plugin:</p> <pre><code>add_filter( 'woocommerce_locate_template', 'woo_custom_template', 1, 3 ); function woo_custom_template( $template, $template_name, $template_path ) { global $woocommerce; $_template = $template; if ( ! $templa...
How to overwrite a theme function within a custom plugin?
php|wordpress|woocommerce|plugins|wordpress-theming
1
66
3
72,866,824
72,866,824
2
true
2022-07-05T08:14:11.327Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to overwrite a theme function within a custom plugin?<p><em>To begin with, my problem</em>:</p> <ul> <li>I have a <code>WooCommerce</code> error on the <...
72,811,207
Change the position of text in HTML<p>Below is my HTML code that is working fine. Just that I need to change the position of the texts here. Basically, I have written a text like &quot;Top Left&quot; meaning this should be displayed Top left of the button and so on. Can anyone help me here?</p> <p><div class="snippet" ...
<p>You can use a <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Grid_Layout" rel="nofollow noreferrer">grid</a>. This will be more robust when changing the dimensions of the button.</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-co...
Change the position of text in HTML
html|css
0
66
2
72,811,453
72,811,453
2
true
2022-06-30T06:32:30.450Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Change the position of text in HTML<p>Below is my HTML code that is working fine. Just that I need to change the position of the texts here. Basically, I hav...
72,799,717
Force type change in TypeScript<p>I have a function that detects whether a type could be a number and changes it to <code>Float</code> whenever posible, this is quite usefull to me when getting data converted from csv to JSON that stringifies everything.</p> <pre><code>const possibleNum: string | number = '3' export c...
<p>The compiler cannot understand whether you are referring <code>string</code> or <code>number</code> in <code>parseFloat</code>. You can add another <code>if</code> condition to make the compiler know your type in <code>parseFloat</code> is <code>string</code> 100%.</p> <pre><code>const posibleNum: string | number = ...
Force type change in TypeScript
javascript|node.js|typescript
1
66
2
72,799,896
72,799,896
3
true
2022-06-29T10:19:53.267Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Force type change in TypeScript<p>I have a function that detects whether a type could be a number and changes it to <code>Float</code> whenever posible, this...
72,810,270
How do I deal with the String.Encoding initializer never failing?<pre class="lang-swift prettyprint-override"><code>if let encoding = String.Encoding(rawValue: 999) { // ... } </code></pre> <p>Produces a compiler error saying &quot;Initializer for conditional binding must have Optional type, not 'String.Encoding'&quo...
<p>The documentation is misleading, <code>String.Encoding</code> has a non-failable</p> <pre><code> public init(rawValue: UInt) </code></pre> <p>initializer. A list of all valid string encodings is <a href="https://developer.apple.com/documentation/swift/string/availablestringencodings" rel="nofollow noreferrer"><code>...
How do I deal with the String.Encoding initializer never failing?
swift
2
66
2
72,810,623
72,810,623
3
true
2022-06-30T04:20:08.997Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I deal with the String.Encoding initializer never failing?<pre class="lang-swift prettyprint-override"><code>if let encoding = String.Encoding(rawValu...
72,815,658
Swift Accidental Infinite ForEach Loop<p>I'm trying to use a foreach loop to show multiple Elements in an [[String]] with the help of an incremented Index in a list. But when I want to generate the list the loop repeats infinity regardless of the specified loop-count.</p> <p>This is my function that gets called in the ...
<p>Your <code>incrementIndex()</code> function updates the variable <code>@State var index</code>. This will cause the view to re-render and in turn call the <code>incrementIndex()</code> again. This causes the infinite loop.</p> <p>Currently, you are not using the function parameter ForEach supplies, but instead disca...
Swift Accidental Infinite ForEach Loop
arrays|swift|list|swiftui|foreach
0
66
1
72,815,920
72,815,920
3
true
2022-06-30T12:15:41.260Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Swift Accidental Infinite ForEach Loop<p>I'm trying to use a foreach loop to show multiple Elements in an [[String]] with the help of an incremented Index in...
72,860,803
How do I turn a sequence of sequences into a map, where the values are the count of the first item in the sequence?<p>I have data like <code>((&quot;generic&quot; 7) (&quot;ore&quot; 1) (&quot;generic&quot; 4) (&quot;wood&quot; 6) (&quot;wheat&quot; 3) (&quot;generic&quot; 2) (&quot;generic&quot; 9) (&quot;sheep&quot; ...
<p>Use <a href="https://clojuredocs.org/clojure.core/map" rel="nofollow noreferrer"><code>map</code></a>, <a href="https://clojuredocs.org/clojure.core/first" rel="nofollow noreferrer"><code>first</code></a> and <a href="https://clojuredocs.org/clojure.core/frequencies" rel="nofollow noreferrer"><code>frequencies</code...
How do I turn a sequence of sequences into a map, where the values are the count of the first item in the sequence?
clojure
0
66
1
72,860,843
72,860,843
3
true
2022-07-04T18:32:22.697Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I turn a sequence of sequences into a map, where the values are the count of the first item in the sequence?<p>I have data like <code>((&quot;generic&...
72,908,913
How to read Excel file in Spreadsheet::ParseXLSX<p>I'm trying to read <code>.xlsx</code> file in <code>Spreadsheet::ParseXLSX</code></p> <pre><code>#!/home/bin/perl use strict; use warnings; use Spreadsheet::ParseXLSX; my $oExcel = new Spreadsheet::ParseExcel; die &quot;You must provide a filename to $0 to be parsed...
<p>Where did you read that was the correct way to use SpreadSheet::ParseXLSX?</p> <p>I don't know the module at all well but, reading <a href="https://metacpan.org/pod/Spreadsheet::ParseXLSX" rel="nofollow noreferrer">the documentation</a>, it says:</p> <blockquote> <p>This module returns data using classes from <a hre...
How to read Excel file in Spreadsheet::ParseXLSX
perl
1
66
1
72,909,480
72,909,480
3
true
2022-07-08T08:49:09.577Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to read Excel file in Spreadsheet::ParseXLSX<p>I'm trying to read <code>.xlsx</code> file in <code>Spreadsheet::ParseXLSX</code></p> <pre><code>#!/home/b...
72,928,041
How to add days to today? javascript<p>How to add days to today in day-month-year format? I tried this code but additionally get the time zone and month in the short word name. I want to receive, for example, August 12, 2023 here is the code:</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="tr...
<p>To get the format: <code>Month Day, Year</code>, Simply use <strong>ECMAScript Internationalization API</strong>:</p> <pre class="lang-js prettyprint-override"><code>return date.toLocaleString('en-us',{month:'long', year:'numeric', day:'numeric'}) </code></pre> <pre><code>month:'long' //August day:'numeric' //12 yea...
How to add days to today? javascript
javascript
1
66
4
72,928,095
72,928,095
3
true
2022-07-10T11:10:57.643Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to add days to today? javascript<p>How to add days to today in day-month-year format? I tried this code but additionally get the time zone and month in t...
72,931,649
Why might a DynamoDB scan fail to paginate properly?<p>I am using DynamoDB, and although there is a DAX cluster associated with this database, I am looking to do some scans just on the underlying database for now. (I am running this code locally with session-based AWS auth, and DynamoDB is available in the default VPC,...
<p>I am not familiar with typescript, but my guess is that the exit condition from the loop doesn't work: On the <strong>last</strong> page, the LastEvaluatedKey would be missing, but perhaps it's not <code>null</code> as your loop test checks but something else (<code>undefined</code>?). If the loop continues with <co...
Why might a DynamoDB scan fail to paginate properly?
typescript|amazon-web-services|amazon-dynamodb
1
66
1
72,934,908
72,934,908
3
true
2022-07-10T20:25:41.937Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why might a DynamoDB scan fail to paginate properly?<p>I am using DynamoDB, and although there is a DAX cluster associated with this database, I am looking t...
73,009,682
Why dynamic_cast from reference causes a segmentation fault?<p>I have an <code>expr_t</code> base class, from which <code>ident_t</code> is derived. I wrote some <code>to_string</code> overloads to display differently between <code>expr_t</code> and <code>ident_t</code>:</p> <pre class="lang-cpp prettyprint-override"><...
<p>The <strong>problem</strong> is that at the point of the call <code>return to_string(*id)</code> the compiler doesn't have a declaration for the second overload <code>std::string to_string(ident_t&amp; v)</code>. Thus the same first version will be recursively called eventually resulting in a seg fault.</p> <p>To <...
Why dynamic_cast from reference causes a segmentation fault?
c++
2
66
2
73,009,730
73,009,730
3
true
2022-07-17T06:37:04.517Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why dynamic_cast from reference causes a segmentation fault?<p>I have an <code>expr_t</code> base class, from which <code>ident_t</code> is derived. I wrote ...
72,900,880
How can I use an Alias as function parameter, In PowerShell?<p>I have an Alias named &quot;github&quot;, for example.</p> <pre><code>Set-Alias -Name github -Value &quot;C:\UserName\Folder\github&quot; </code></pre> <p>Also I have a function named &quot;goto&quot;, for example:</p> <pre><code>Function goto ( [string] al...
<p>An Alias, in simple terms, is just an <strong>association to a cmdlet, function, script file, or executable program</strong>. When we <a href="https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/set-alias?view=powershell-7.2" rel="nofollow noreferrer"><code>Set-Alias</code></a>, what's ha...
How can I use an Alias as function parameter, In PowerShell?
powershell|function|alias
3
66
1
72,903,166
72,903,166
3
true
2022-07-07T15:55:03.810Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I use an Alias as function parameter, In PowerShell?<p>I have an Alias named &quot;github&quot;, for example.</p> <pre><code>Set-Alias -Name github -...
72,835,457
Web Scraping with python I can't print my variable<p>In my Django project I use BeautifulSoup for web scraping.It works ut I can't print or slice it. When I try it give the error: <strong>(I'm doing this on the views.py)</strong></p> <blockquote> <p>&quot;UnicodeEncodeError 'charmap' codec can't encode character '\u200...
<p>The desired data is not possible to pull by bs4 only because of dynamically loaded by JavaScript but grab using bs4 with selenium and It didn't throw <code>UnicodeEncodeError</code></p> <pre><code>import time from selenium import webdriver from bs4 import BeautifulSoup from selenium.webdriver.chrome.service import S...
Web Scraping with python I can't print my variable
python|django|web-scraping|beautifulsoup|django-views
1
66
1
72,835,472
72,835,472
3
true
2022-07-01T23:34:12.460Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Web Scraping with python I can't print my variable<p>In my Django project I use BeautifulSoup for web scraping.It works ut I can't print or slice it. When I ...
72,934,065
How to run 2 and more npm tasks in parallell by ".sh" file at Windows?<p>Completely novice at &quot;.sh&quot; at the moment when asked this question. I even not sure on what .sh&quot; refering - Shell, Powershell, Bourne shell, etc, but currently I am working from the Windows OS.</p> <p>What I want to do in this questi...
<p>I had some difficulties understanding exactly what you mean with &quot;(if to run it will be executed while will not be killed)&quot;.<br /> If you want the npm runs to execute as background tasks, meaning the script will proceed without waiting for the command to finish you can add the <code>&amp;</code> operator a...
How to run 2 and more npm tasks in parallell by ".sh" file at Windows?
node.js|powershell|shell|npm
0
66
1
72,978,627
72,978,627
3
true
2022-07-11T05:24:56.307Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to run 2 and more npm tasks in parallell by ".sh" file at Windows?<p>Completely novice at &quot;.sh&quot; at the moment when asked this question. I even ...
73,012,761
In R, how do you make a new row that is the combination of two other rows without removing the original rows?<p>I have a longitudinal dataset about individuals from different socioeconomic backgrounds. The raw data is broken up into high, middle, lower middle, and lower SES statuses. However, I want to add a fifth row ...
<p>Try this:</p> <pre class="lang-r prettyprint-override"><code>library(dplyr) test_data %&gt;% filter(ses %in% c(&quot;Low&quot;, &quot;Mid Low&quot;)) %&gt;% group_by(month) %&gt;% summarize( ses = &quot;Mid Low and Low&quot;, across(-c(ses, succes_rate), sum), succes_rate = total_selected / total ...
In R, how do you make a new row that is the combination of two other rows without removing the original rows?
r|dplyr|tidyr
1
66
4
73,012,943
73,012,943
3
true
2022-07-17T14:46:20.193Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: In R, how do you make a new row that is the combination of two other rows without removing the original rows?<p>I have a longitudinal dataset about individua...
72,961,890
I want to delete objects that do not have a specific array<pre><code>console.log(value) { List: [ { id: 1 title: 'hi', content: [ { id: 1, functionId: 11, } ] } { ...
<p>First <code>filter</code> out the elements with 0 length content array or content array doesn't exists and then <code>map</code> to transform it</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 prettypr...
I want to delete objects that do not have a specific array
javascript|reactjs|arrays|ecmascript-6|frontend
2
66
3
72,961,948
72,961,948
3
true
2022-07-13T06:37:32.703Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: I want to delete objects that do not have a specific array<pre><code>console.log(value) { List: [ { id: 1 title: 'hi', ...
72,904,392
When I put foreground image on the background, why this distortion happens?<p><strong>Here is the background image;</strong></p> <p><a href="https://i.stack.imgur.com/jkU1C.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jkU1C.jpg" alt="enter image description here" /></a></p> <p><strong>Here is the...
<p>Carefully look at the <strong>data types</strong> you are handling. All three images are <code>BGR</code>, they have <strong>three intensity values per pixel</strong>. In the <code>where</code> function you are only checking and setting one intensity value, so you only change the <em>blue</em> channel, instead of al...
When I put foreground image on the background, why this distortion happens?
python|opencv|image-processing
0
66
1
72,905,089
72,905,089
3
true
2022-07-07T21:24:20.487Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: When I put foreground image on the background, why this distortion happens?<p><strong>Here is the background image;</strong></p> <p><a href="https://i.stack...
72,941,116
CUDA optimise number of blocks for grid stride loop<p>I have started implementing a simple 1D array calculation using CUDA. Following the documentation I have first tried to define an optimal number of blocks and block size</p> <pre><code>... int N_array = 1000000 ... int n_threads = 256; int n_blocks = ceil(float(N_a...
<p>Conventional wisdom is that the number of threads in the grid for a grid-stride loop should be sized to roughly match the thread-carrying capacity of the GPU in question. The reason for this is to maximize the exposed parallelism, which is one of the 2 most important objectives for any CUDA programmer. This gives t...
CUDA optimise number of blocks for grid stride loop
c++|multithreading|cuda|nvidia
0
66
1
72,941,252
72,941,252
3
true
2022-07-11T15:37:03.723Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: CUDA optimise number of blocks for grid stride loop<p>I have started implementing a simple 1D array calculation using CUDA. Following the documentation I hav...
73,027,243
Why the for loop doesn't stop at i == 0 in strangeForLoop?<p>I tried the following code on <a href="https://www.onlinegdb.com/" rel="nofollow noreferrer">https://www.onlinegdb.com/</a></p> <p>Also tried it on Mac.</p> <p>Couldn't find out why the for loop in strangeForLoop will not stop when i is equal to 0?</p> <pre><...
<p><code>i</code> is an <a href="https://en.wikipedia.org/wiki/Signedness" rel="nofollow noreferrer">unsigned integer</a>. Such a <code>uint</code> can represent only positive values and zero;</p> <p><code>[0, 1, 2, 3, ... 2^number_of_bits - 1]</code></p> <p>When an operation would decrease a uint below zero, or above ...
Why the for loop doesn't stop at i == 0 in strangeForLoop?
c
0
66
1
73,027,406
73,027,406
3
true
2022-07-18T18:52:20.600Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why the for loop doesn't stop at i == 0 in strangeForLoop?<p>I tried the following code on <a href="https://www.onlinegdb.com/" rel="nofollow noreferrer">htt...
72,837,301
How can I convert the sum of my list to an Integer in Python 3?<p>I don't understand why the code is causing errors. For example, the error says that you can't add an integer and a string together, but I've already converted the string to an Integer. Could you help me fix it? The code is attached. Thanks.</p> <pre><cod...
<p>You need to use <code>int()</code> function after checking if <code>y</code> value is True. If not you will be appending an string value always to your list:</p> <pre><code>def enterNumber(): print() x = input(&quot;Enter an integer: &quot;) y = str.isdigit(x) if y == True: list.append(int(x)...
How can I convert the sum of my list to an Integer in Python 3?
python
0
66
3
72,837,324
72,837,324
4
true
2022-07-02T07:32:26.273Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I convert the sum of my list to an Integer in Python 3?<p>I don't understand why the code is causing errors. For example, the error says that you can...
72,935,620
Repeat elements in array based on length of another array<p>I have two arrays of string with dynamic lenght, for example:</p> <pre class="lang-js prettyprint-override"><code>const categories = ['apple', 'pear', 'melon', 'lemon'] const colors = ['red', 'blue', 'green'] </code></pre> <p>and I would like that <code>colors...
<p>you can do something like this</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 categories = ['apple', 'pear', 'melon', 'lemon', 'banana'] const colors = ['red', 'blue'...
Repeat elements in array based on length of another array
javascript
1
66
1
72,935,655
72,935,655
4
true
2022-07-11T08:23:41.103Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Repeat elements in array based on length of another array<p>I have two arrays of string with dynamic lenght, for example:</p> <pre class="lang-js prettyprint...
72,876,639
why scala puts the version on stderr instead<p>I have to do this:</p> <p><code>scala -version 2&gt;&amp;1 | sed 's/.*version \([0-9]*\.[0-9]*\).*/\1/'</code></p> <p>Instead of this:</p> <p><code>scala -version | sed 's/.*version \([0-9]*\.[0-9]*\).*/\1/'</code></p> <p>so I am wondering why does <code>scala -version</co...
<p>Actually, in Unix stderr is not used for errors <em>only</em>.</p> <p>It's more like stdin and stdout are using for the default piping streams (<code>cmd1 | cmd2 | cmd3</code>) and sdterr is everything that the command creators thought that should not go into this default pipeline, and instead should be shown to the...
why scala puts the version on stderr instead
scala|shell|posix|file-descriptor
0
66
1
72,908,242
72,908,242
4
true
2022-07-06T00:01:32.027Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: why scala puts the version on stderr instead<p>I have to do this:</p> <p><code>scala -version 2&gt;&amp;1 | sed 's/.*version \([0-9]*\.[0-9]*\).*/\1/'</code>...
72,822,052
How to utilize sleep method for calculator error<p>I am trying to set the calculator text to an error message, wait for 2 seconds, then clear the field text. Below is my current code.</p> <pre><code>public static void wait(int ms) { try { Thread.sleep(ms); } catch(InterruptedException ex) { Thre...
<p>Are you using Swing? Is the code you show running from an event handler (triggered by keypress, mouseclick or something)? Then this cannot work.</p> <p>The code is running in the Event Dispatcher Thread (EDT). Once you use something like field.setText() you have to exit your code and allow the EDT to fire the update...
How to utilize sleep method for calculator error
java|swing|sleep
-2
66
1
72,822,140
72,822,140
5
true
2022-06-30T21:08:07.950Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to utilize sleep method for calculator error<p>I am trying to set the calculator text to an error message, wait for 2 seconds, then clear the field text....
72,930,287
Understanding how pattern matching works in Coq<p>I'm currently following the <a href="https://softwarefoundations.cis.upenn.edu/" rel="nofollow noreferrer">Software Foundations</a> book, I am currently on the <strong>Lists chapter.</strong> However, I'm having a hard time wrapping my head around a specific case of pat...
<p>The pattern</p> <pre><code>match h with | v =&gt; S (count' v t) end </code></pre> <p>introduces a new variable <code>v</code> bound to <code>h</code>, shadowing the existing <code>v</code>. It is equivalent to a <code>let</code> expression:</p> <pre><code>let v := h in S (count' v t) (* or, without shadowing *) let...
Understanding how pattern matching works in Coq
pattern-matching|coq
1
66
2
72,931,388
72,931,388
5
true
2022-07-10T16:54:12.330Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Understanding how pattern matching works in Coq<p>I'm currently following the <a href="https://softwarefoundations.cis.upenn.edu/" rel="nofollow noreferrer">...
73,003,523
How to get all inherited classes<p>Let's imagine that we have a class called <code>A</code>, and this class is inherited from class <code>B</code>, and also class <code>B</code> inherited from class <code>C</code>. We can extend this sequence as long as we want. How can we get all classes from this sequence? Like:</p> ...
<p>Try this code:</p> <pre><code> Type type = typeof(C); while (type.BaseType!=null) { type = type.BaseType; Console.WriteLine(type.Name); } // C // B // A // Object </code></pre>
How to get all inherited classes
c#|.net|inheritance|.net-core
0
66
2
73,003,723
73,003,723
5
true
2022-07-16T10:44:19.673Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to get all inherited classes<p>Let's imagine that we have a class called <code>A</code>, and this class is inherited from class <code>B</code>, and also ...
72,948,907
c# sorting by part of string<p>I got a list of strings like:</p> <pre><code>{ID: caa206a29 Product Stock is: MMB-808 -&gt; Expected Stock on MMB: MMB-813, ID: 46ca37fbb Product Stock is: MMB-8002 -&gt; Expected Stock on MMB: MMB-222, ID: e8109b18d Product Stock is...
<p>Given your list of items is in an enumerable called <code>input</code> you can use regex to pull out the value of MMB-**** and order by it</p> <pre><code>var items = input.Select(x =&gt; new { Original = x, MMBVal = int.Parse(Regex.Match(x, &quot;Product Stock is: MMB-([0-9]+)&quot;).Groups[1]....
c# sorting by part of string
c#|sorting
0
66
2
72,949,076
72,949,076
5
true
2022-07-12T08:02:14.207Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: c# sorting by part of string<p>I got a list of strings like:</p> <pre><code>{ID: caa206a29 Product Stock is: MMB-808 -&gt; Expected Stock on...
72,897,029
Blazor Server-App: Bind code behind to multiple Razor-components<p>I want to make a mobile desgin for my already existing blazor-server application I currently have my .razor files and the code behind in .razor.cs files.</p> <p><strong>What i want to do now is, to use 2 Front ends refering to the same Backend.</strong>...
<p>The solution I came up with goes like:</p> <ol> <li>Foo.razor.cs goes into a seperate class like FooComponent.cs</li> <li>FooMobile.razor and FooDesktop.razor now inherits this base class</li> <li>U can you all functionality of the base type inside your razor component</li> </ol>
Blazor Server-App: Bind code behind to multiple Razor-components
c#|asp.net-core|blazor|blazor-server-side
-2
66
1
72,907,578
72,907,578
-1
true
2022-07-07T11:28:53.250Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Blazor Server-App: Bind code behind to multiple Razor-components<p>I want to make a mobile desgin for my already existing blazor-server application I current...
72,913,471
Could you give me some guidance on how to efficiently design an assembly language program?<p>I'm a CS student at university, and I'm supposed to develop a MIPS assembly language program for an exam, but I do have a hard time designing it, especially when it comes to assigning registers, following calling conventions, s...
<p>MIPS is a very unique language compared to other high level languages like Java OR Python, so it takes some time to get used to it. The way I would recommend about going with program development in MIPS is by doing the following:</p> <ol> <li>Make sure you understand and memorize each MIPS instruction that your prof...
Could you give me some guidance on how to efficiently design an assembly language program?
mips|software-design|mips32
0
66
2
72,916,580
72,916,580
-1
true
2022-07-08T15:09:44.087Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Could you give me some guidance on how to efficiently design an assembly language program?<p>I'm a CS student at university, and I'm supposed to develop a MI...
73,011,118
Problem using Ajax function with Bootstrap Validation<p>I am encountering issues with my Ajax function combining it with Bootstrap validation. I guess it could be an issue with the form call in the Ajax function.</p> <p>The email is properly sent as per PHP file, but not with Ajax function. I don't receive any error, b...
<p>I had to convert the form to a jQuery object -&gt; $(form).</p> <p>Here is the final code working. Thanks guys.</p> <pre><code> // Bootstrap forms validation function submitForm() { var forms = document.querySelectorAll('.needs-validation') Array.prototype.slice.call(forms).forEach(function (form) { ...
Problem using Ajax function with Bootstrap Validation
jquery|bootstrap-5|ajaxform|bootstrap-validate
3
66
2
73,011,864
73,011,864
-1
true
2022-07-17T10:46:17.950Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Problem using Ajax function with Bootstrap Validation<p>I am encountering issues with my Ajax function combining it with Bootstrap validation. I guess it cou...
72,770,518
Is it possible to make a localStorage wrapper with TypeScript typed parameters and mapped return values?<p>I'm trying to construct a TS wrapper for localStorage with a TS schema that defines all the possible values in localStorage. Problem is that I can't figure out how to type the return value so that it's mapped to t...
<p>Use generics to return the right type for the key !</p> <pre><code>type LocalStorageSchema = { token: string; some_string: string; some_number: number; }; type Keys = keyof LocalStorageSchema; export const LocalStorage = { get&lt;T extends Keys&gt;(key: T): LocalStorageSchema[T] | null { // Return ...
Is it possible to make a localStorage wrapper with TypeScript typed parameters and mapped return values?
javascript|typescript
0
67
2
72,771,081
72,771,081
0
true
2022-06-27T10:23:47.210Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is it possible to make a localStorage wrapper with TypeScript typed parameters and mapped return values?<p>I'm trying to construct a TS wrapper for localStor...
72,786,140
Multiple y-axes using Chart JS with data as a dictionary<p>I'm using Flask and the library Chart JS to do graph visualization. However, I need to be able to use multiple y-axes (2 for the moment) and I can't figure out a way to make things work. I've already done it with data as lists but now that I am using dictionary...
<p>In your object for your second dataset you define your object with a x and z key. Chart.js looks for an x and y key by default. If you want to change this and make chart.js look for different keys you need to configure that in the dataset like so:</p> <pre class="lang-js prettyprint-override"><code>{ data: [{x:new...
Multiple y-axes using Chart JS with data as a dictionary
javascript|chart.js|yaxis
1
67
1
72,786,377
72,786,377
0
true
2022-06-28T12:07:18.987Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Multiple y-axes using Chart JS with data as a dictionary<p>I'm using Flask and the library Chart JS to do graph visualization. However, I need to be able to ...
72,784,896
I need help fixing a batch script I've created<pre class="lang-bash prettyprint-override"><code>:test powershell -Command &quot;exit (Get-CimInstance -Namespace root\wmi -ClassName WmiMonitorBasicDisplayParams | Select-String -Pattern 'InstanceName').length&quot; set nMons=%ERRORLEVEL% if %errorlevel% equ 2 start C:\Bo...
<p>You need your script to know the number of expected monitors to realize any change. Use a variable to save the old value to compare it with a new value:</p> <pre><code>@echo off setlocal REM get first number (at startup) %SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe -NoLogo -NoProfile -Command &quot;Ex...
I need help fixing a batch script I've created
powershell|batch-file|cmd
0
67
1
72,787,857
72,787,857
0
true
2022-06-28T10:35:08.053Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: I need help fixing a batch script I've created<pre class="lang-bash prettyprint-override"><code>:test powershell -Command &quot;exit (Get-CimInstance -Namesp...
72,795,635
Adjust number of data for each row in the data frame<p>I'm new in r and currently trying to adjust the number of data in each row in my data frame. I need this data as input in the dynamic global vegetation model: Fortran-based.</p> <p>Here is my data: <a href="https://i.stack.imgur.com/3K0Jn.png" rel="nofollow norefer...
<p>One way to do this is with <code>dyplr</code> and <code>tidyr</code>:</p> <ol> <li>Separate rows by comma</li> <li>group rows of n = 8</li> <li>use <code>toString</code> same as paste ...</li> </ol> <pre><code>library(dplyr) library(tidyr) df %&gt;% separate_rows(X1) %&gt;% group_by(group_id =as.integer(gl(n(...
Adjust number of data for each row in the data frame
r|dataframe|row
-3
67
1
72,795,711
72,795,711
0
true
2022-06-29T03:56:28.733Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Adjust number of data for each row in the data frame<p>I'm new in r and currently trying to adjust the number of data in each row in my data frame. I need th...
72,770,650
How to render different Pages(Strapi Collection) on same Angular Component with help of navigation menu?<p>I have created collection in Strapi called Pages i want to render them in a same component using my Navigation Bar Component but i don't know how to accomplish it.</p> <p>What I'm actually getting is all the data ...
<p>I wanna post an answer to my Problem, maybe someone will encounter the same problem in a future. I'm not sure it is a correct way but it's working for now.</p> <p>This video helped me: <a href="https://www.youtube.com/watch?v=JT3s9HQxc1c" rel="nofollow noreferrer">https://www.youtube.com/watch?v=JT3s9HQxc1c</a></p> ...
How to render different Pages(Strapi Collection) on same Angular Component with help of navigation menu?
angular|typescript|strapi
0
67
1
72,797,827
72,797,827
0
true
2022-06-27T10:34:00.813Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to render different Pages(Strapi Collection) on same Angular Component with help of navigation menu?<p>I have created collection in Strapi called Pages i...
72,798,935
How to distribute passengers to flights using Javascript<p>I've got a project I'm working on that deals with managing flights and passenger numbers. I'm currently stuck implementing the function below, any suggestions for how I could go about this would be excellent, what I currently have is below which I don't think i...
<p>This is what i came up with, i don't know if it is according to your teacher's (i assume) guidelines, but it should work. Maybe usable as a starting point. I added explanations.</p> <p>The problem with your line <code>vipPassengersAssignedToBusinessSeats = vipPassengers / businessSeatsPerFlight;</code> is that you m...
How to distribute passengers to flights using Javascript
javascript|java|jquery|node.js|arrays
1
67
1
72,800,427
72,800,427
0
true
2022-06-29T09:22:28.603Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to distribute passengers to flights using Javascript<p>I've got a project I'm working on that deals with managing flights and passenger numbers. I'm curr...
72,802,525
React avoid reload of component<p>We have a dropdownlist which is populated by a get request to backend. The dropdownlist contains certain possible filters. ie: client number and type.</p> <p>When I select something in one of the DDLs i want to keep the selected value I think it is refreshing the whole page.</p> <p>So ...
<p>Your problem lies here:</p> <pre><code> if(isLoading) { return ( &lt;section&gt; &lt;p&gt;Loading...&lt;/p&gt; &lt;/section&gt; ); } </code></pre> <p>Every time your first effect runs you will set loading to true and it will rerender whole content and display only load...
React avoid reload of component
reactjs|react-hooks
0
67
1
72,802,760
72,802,760
0
true
2022-06-29T13:47:28.327Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: React avoid reload of component<p>We have a dropdownlist which is populated by a get request to backend. The dropdownlist contains certain possible filters. ...
72,803,406
c# start a exe until it is completely started and then append the arguments<p>I was trying to start a exe with arguments by Process.Start. My first try is using Process.Start(&quot;Path/of/the/exe&quot;, &quot;arguments of exe&quot;). Here's my code snippets:</p> <pre><code>Process.Start(@&quot;D:\Program Files\ITASCA\...
<p>It appears this is a console application and you are typing in the console after it starts. This typing is not arguments: Arguments are provided only when starting a new process and never change.</p> <p>What you are doing is providing something to the standard input of the program. Console programs have three stream...
c# start a exe until it is completely started and then append the arguments
c#|process
0
67
1
72,804,044
72,804,044
0
true
2022-06-29T14:47:18Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: c# start a exe until it is completely started and then append the arguments<p>I was trying to start a exe with arguments by Process.Start. My first try is us...
72,805,670
How to build USD library for Win32 and distribute it along with exe<p>So I need to support .usd/.usda/.usdc for my renderer application, and I need to distribute the resulting project .exe and usd .libs/.dlls to our users on install. How do I build the <a href="https://github.com/PixarAnimationStudios/USD" rel="nofollo...
<p>I found a ok solution from compiling from the command line, there is probably a much better way to do this, but to get it going here is what I did</p> <p>The following wastes lots of memory on ur build machine, lots of files that don't need to be there, so go through and remove them:</p> <ol> <li>download: lastest r...
How to build USD library for Win32 and distribute it along with exe
visual-studio|visual-c++|build|usdz|usd
0
67
1
72,809,241
72,809,241
0
true
2022-06-29T17:37:02.460Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to build USD library for Win32 and distribute it along with exe<p>So I need to support .usd/.usda/.usdc for my renderer application, and I need to distri...
72,819,327
Splitting the tokens with Java StringTokenizer<p>I have a data set that looks like this:</p> <pre><code>drawdate lotterynumbers meganumber multiplier 2005-01-04 03 06 07 12 32 30 NULL 2005-01-07 02 08 14 15 51 38 NULL etc. </code></pre> <p>and the following code:</p> <pre><code>public cla...
<blockquote> <p><em>I am just interested in counting the occurrences for each individual drawn lottery number. How can I do this by using the StringTokenizer from my code? I know that I have to split the whole row because the tokenizer is &quot;fed&quot; with the whole. How can I take the lotterynumbers, split them and...
Splitting the tokens with Java StringTokenizer
java|hadoop|mapreduce|stringtokenizer
0
67
2
72,822,814
72,822,814
0
true
2022-06-30T16:45:13.213Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Splitting the tokens with Java StringTokenizer<p>I have a data set that looks like this:</p> <pre><code>drawdate lotterynumbers meganumber multiplier 20...
72,827,549
REST Controller test POST method java.lang.AssertionError: Content type not set<p>I'm trying to test controller with POST method. I can't believe how is it possible, that content type is not set when I set it in test method. Can anybody help me? I loose my mind and I'm totally frustrated. I haven't found the answer any...
<p>You have missed one point. Your endpoint expects a body of type <code>UserRequestDto</code>:</p> <pre><code>public UserResponseDto createUser(@Valid @RequestBody UserRequestDto request) { return service.createUser(request); } </code></pre> <p>but what you do is sending user properties as URL parameters:</p> <pre...
REST Controller test POST method java.lang.AssertionError: Content type not set
spring|rest|junit|mockito
0
67
2
72,829,377
72,829,377
0
true
2022-07-01T09:58:43.367Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: REST Controller test POST method java.lang.AssertionError: Content type not set<p>I'm trying to test controller with POST method. I can't believe how is it p...
72,843,847
How to load the whole dataset to GPU<p>I have dataset of 1550 images 3x112x112. When i am training my model I create dataset wia ImageFolder and then use DataLoader. It takes so much time because of reading from memory every time. I have enough gpu memory to load the whole dataset at once. It will be much faster. What ...
<p>You can store the images as an attribute of the dataset, put it on the GPU at initialization, and let <code>__getitem__</code> return images from this directly.</p> <pre class="lang-py prettyprint-override"><code>import torch from torch.utils.data import Dataset, DataLoader class GPUDataset(Dataset): def __init...
How to load the whole dataset to GPU
deep-learning|neural-network|pytorch|computer-vision
0
67
1
72,844,082
72,844,082
0
true
2022-07-03T04:04:30.113Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to load the whole dataset to GPU<p>I have dataset of 1550 images 3x112x112. When i am training my model I create dataset wia ImageFolder and then use Dat...
72,806,480
Combine multiple docx with columns in officer R<p>I am trying to use the <code>officer</code> package in R to create multiple outputs with columns and then combine the outputs into a single document. I am able to create the initial outputs with columns, but when I combine them with <code>body_add_docx()</code> the colu...
<p>A thread is already available here: <a href="https://github.com/davidgohel/officer/issues/431" rel="nofollow noreferrer">https://github.com/davidgohel/officer/issues/431</a></p> <p>Word does not keep the sections of the embedded documents as is. officer just adds it and does not change the file. It seems to me it is...
Combine multiple docx with columns in officer R
r|officer|officedown
0
67
1
72,853,536
72,853,536
0
true
2022-06-29T18:55:35.690Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Combine multiple docx with columns in officer R<p>I am trying to use the <code>officer</code> package in R to create multiple outputs with columns and then c...
72,841,465
What is the compiler-defined macro for WASM?<p>What is the macro that <code>clang</code> and/or <code>gcc</code> would define when compiling for a WASM backend?</p> <p>To clarify, one can write platform-specific code using macros the compiler defines like so:</p> <pre><code>#if _WIN32 // Windows-specific code #elif __l...
<p>As per @Jonathan Leffler's comment, there does not appear to be a standard macro that is defined across compilers.</p> <p>My current solution for working with different compilers is to create a separate build job for WASM that defines a macro. For <code>gcc</code> and <code>clang</code>, it passes the flag <code>-D_...
What is the compiler-defined macro for WASM?
c|webassembly
0
67
1
72,864,558
72,864,558
0
true
2022-07-02T18:21:08.253Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What is the compiler-defined macro for WASM?<p>What is the macro that <code>clang</code> and/or <code>gcc</code> would define when compiling for a WASM backe...
72,862,579
I have a race game. How would I structure my code?<p>Suppose a variable<br /> <code>CoinsObtainedByStunts = 0</code></p> <p>When a player performs a backflip with their car and lands on the 4 wheels.<br /> <code>CoinsObtainedBystunts = CoinsObtainedByStunts + 10</code></p> <p>how would I define what a backflip is?</p> ...
<p>Dot products - this is your answer.</p> <p>I'm going to write code in the context of Roblox and using the language Lua but you can easily translate this to Unity or something else.</p> <p>The idea is, you would attach a 'Root' part to your vehicle whose <strong>LookVector</strong> (Z-axis in Roblox's case) will be f...
I have a race game. How would I structure my code?
lua|roblox
0
67
1
72,866,362
72,866,362
0
true
2022-07-04T22:45:10.620Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: I have a race game. How would I structure my code?<p>Suppose a variable<br /> <code>CoinsObtainedByStunts = 0</code></p> <p>When a player performs a backflip...
72,805,698
How to combine data from two kafka topics ZStreams to one ZStream?<pre><code>import org.slf4j.LoggerFactory import zio.blocking.Blocking import zio.clock.Clock import zio.console.{Console, putStrLn} import zio.kafka.consumer.{CommittableRecord, Consumer, ConsumerSettings, Subscription} import zio.kafka.consumer.Consume...
<p>You are composing 1 shared layer that provides one instance of a consumer and initialize this instance twice after eachother to subscribe to 2 topics one after the other. A single consumer instance should only be initialized once, so the above code will never work.</p> <p>I believe setting up 2 independent compositi...
How to combine data from two kafka topics ZStreams to one ZStream?
scala|apache-kafka|zio
0
67
1
72,868,534
72,868,534
0
true
2022-06-29T17:39:36.307Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to combine data from two kafka topics ZStreams to one ZStream?<pre><code>import org.slf4j.LoggerFactory import zio.blocking.Blocking import zio.clock.Clo...
72,868,097
How to scrape company names from inc5000?<p>I am trying to scrape all company names from inc5000 site (&quot;https://www.inc.com/inc5000/2021&quot;). The problem is that the company names are displayed using JavaScript. I have tried using selenium and requests_html both to render the site but still when I fetch source ...
<p>Why do you need beautiful soup, you just could use selenium:</p> <pre><code>from selenium import webdriver from selenium.webdriver.common.by import By driver = webdriver.Chrome() driver.get(&quot;https://www.inc.com/inc5000/2021&quot;) companies = [e.text for e in driver.find_elements(By.CLASS_NAME, &quot;company&...
How to scrape company names from inc5000?
selenium|web-scraping|beautifulsoup|screen-scraping
0
67
2
72,868,758
72,868,758
0
true
2022-07-05T10:44:57.353Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to scrape company names from inc5000?<p>I am trying to scrape all company names from inc5000 site (&quot;https://www.inc.com/inc5000/2021&quot;). The pro...
72,863,288
python how to get truncated modulo vs floored modulo<p>I get Truncated versus floored division in Python can be used like this <a href="https://stackoverflow.com/questions/15633787/truncated-versus-floored-division-in-python">Truncated versus floored division in Python</a></p> <p>we use / vs //</p> <pre><code>&gt;&gt;&...
<p>So upon some research the default modulo method is language dependent, for python</p> <pre><code>8 % -3 = -1 </code></pre> <p>for javascript for example</p> <pre><code>8 % -3 = 2 </code></pre> <p>it is because for js it uses the trunc method</p> <pre><code>r = a - (n * trunc(a/n)) r is the remainder. a is the divide...
python how to get truncated modulo vs floored modulo
python|modulo
0
67
2
72,874,048
72,874,048
0
true
2022-07-05T01:55:17.173Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: python how to get truncated modulo vs floored modulo<p>I get Truncated versus floored division in Python can be used like this <a href="https://stackoverflow...
72,861,583
How to assign public IP address from old cluster to new cluster<p>I just created a new AKS cluster that has to replace an old cluster. The new cluster is now ready to replace the old one, except for one crucial thing, it's outbound ip address. The address of the old cluster must be used so that our existing DNS records...
<p>I managed to assign the old ip to the new cluster. These are the steps that I followed:</p> <ol> <li><p>Create a new static and public ip in the old cluster (nn.nn.nn.nn):</p> <pre><code>az network public-ip create --resource-group MC_rg-my-old-cluster \ --name aks-public-ip-tmp --sku Standard --allocation-method st...
How to assign public IP address from old cluster to new cluster
azure|kubernetes|azure-aks|nginx-ingress|azure-load-balancer
1
67
2
72,876,819
72,876,819
0
true
2022-07-04T20:09:36.980Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to assign public IP address from old cluster to new cluster<p>I just created a new AKS cluster that has to replace an old cluster. The new cluster is now...
72,878,803
Java Specific webclient connect timeout per request<p>I have to call different urls with different connection timeout with webclient. But i found that we can set connect timeout globally only and not per resquest .. what to do please to set this timeout on a request without creating a new weblient each time.</p>
<p>You need to instantiate one webclient per url. For each webclient, you can set the connection timeout :</p> <pre><code>HttpClient httpClient = HttpClient.create() .option(ChannelOption.CONNECT_TIMEOUT_MILLIS, 10000); WebClient client = WebClient.builder() .baseUrl(&quot;http://yourendpoint:8080&quot;) .clientC...
Java Specific webclient connect timeout per request
java|spring-boot|timeout|spring-webflux|webclient
0
67
1
72,879,522
72,879,522
0
true
2022-07-06T06:27:46.003Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Java Specific webclient connect timeout per request<p>I have to call different urls with different connection timeout with webclient. But i found that we can...
72,829,982
HSTS is redirecting from HTTP to HTTPS with a remote address on port 80<p>We are having a weird issue where sometimes the browser will decide to use port 80 for HTTPS.</p> <p>The flow looks like this when it's not working (copied from network devtools):</p> <p><strong>Flow with port 80 as remote address</strong></p> <p...
<p>Turns out it is in fact using port 443. I was looking at a HAR export from a colleague and there is a bug in Chromium:</p> <p><a href="https://bugs.chromium.org/p/chromium/issues/detail?id=1334230" rel="nofollow noreferrer">https://bugs.chromium.org/p/chromium/issues/detail?id=1334230</a></p>
HSTS is redirecting from HTTP to HTTPS with a remote address on port 80
http|web-services|browser|https|hsts
0
67
1
72,885,158
72,885,158
0
true
2022-07-01T13:24:36.760Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: HSTS is redirecting from HTTP to HTTPS with a remote address on port 80<p>We are having a weird issue where sometimes the browser will decide to use port 80 ...
72,876,207
resizable header in SwiftUI<p>I was trying to make resizable header but it breaks. I am trying to clone twitter profile, I think logic is right but can I know why this one is not working? I made HStack and try to hide it but when I scroll back it can't come back. Tried with GeometryReader Please help me, thanks</p> <p>...
<p>While the animation between show and hide is running, the <code>GeometryReader</code> is still calculating values – which lets the view jump between show and hide – and gridlock.</p> <p>You can introduce a new <code>@State var isInTransition = false</code> that checks if a show/hide animation is in progress and chec...
resizable header in SwiftUI
swiftui
0
67
1
72,887,396
72,887,396
0
true
2022-07-05T22:32:55.813Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: resizable header in SwiftUI<p>I was trying to make resizable header but it breaks. I am trying to clone twitter profile, I think logic is right but can I kno...
72,890,409
How to set values with react-hook-form on native html select multi<p>My goal is to use all native html elements in my project and I currently have working input and checkboxes using react form hook but I can't seem to get a select (multiple) to work.</p> <p>Specifically, the part that doesn't work is the setting of the...
<p>and of course, after struggling with this for a day and finally posting in here, I found the answer about 10 minutes later. Posting here so someone else doesn't need to go through the same pain.</p> <p>The answer was very close to what I had already tried with my stypes variable in the example above. The problem w...
How to set values with react-hook-form on native html select multi
typescript|multi-select|react-hook-form
0
67
1
72,890,582
72,890,582
0
true
2022-07-06T22:12:29.003Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to set values with react-hook-form on native html select multi<p>My goal is to use all native html elements in my project and I currently have working in...
72,896,117
Working with Flask routes in Python classes<p>I want to implement a REST server with Flask in Python 3.7. In particular, I want to separate the controller (the one who handles the URLs) from the business logic because it seems more maintainable to me. Below is a sample code that represents my code (although I actually ...
<p>I think flask's <strong><a href="https://flask.palletsprojects.com/en/2.0.x/views/" rel="nofollow noreferrer">pluggable views</a></strong> should be able to solve your problem.</p> <p>Another option would be the extension <a href="http://flask-classful.teracy.org/" rel="nofollow noreferrer">flask-classful</a>. I don...
Working with Flask routes in Python classes
python|flask|routes|flask-restful
0
67
1
72,896,307
72,896,307
0
true
2022-07-07T10:19:35.837Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Working with Flask routes in Python classes<p>I want to implement a REST server with Flask in Python 3.7. In particular, I want to separate the controller (t...
72,827,886
Cloudflare / Chrome DNS Cache and TTL<p>We have a website that we recently revamped.</p> <p>The domain it lived on use to have a CNAME record for @ and www pointing to a different domain while the site was being developed.</p> <p>We have now deployed the site (48+ hours ago) and chrome users who have previously visited...
<p>The answer was the TTL on each record, you just have to wait it out</p>
Cloudflare / Chrome DNS Cache and TTL
dns|cloudflare|cname|a-records
-2
67
1
72,897,169
72,897,169
0
true
2022-07-01T10:27:29.453Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Cloudflare / Chrome DNS Cache and TTL<p>We have a website that we recently revamped.</p> <p>The domain it lived on use to have a CNAME record for @ and www p...
72,898,276
Is there a way to modify userAgent in Cypress to simulate mobile [2022] Chrome 100+<p>when google introduced Chrome 100 they disabled possibility to modify userAgent string from for example Cypress tests.</p> <p>We were using that technique to simulate that we are on mobile devices. For example:</p> <pre><code>cy.visit...
<p>You can no longer alter the userAgent via <code>.visit()</code>. In order to modify the userAgent, you must pass it in as a argument via <a href="https://docs.cypress.io/guides/references/configuration#Browser" rel="nofollow noreferrer">CLI</a>. You can verify the userAgent is updated on the Settings tab of the test...
Is there a way to modify userAgent in Cypress to simulate mobile [2022] Chrome 100+
javascript|google-chrome|mobile|cypress|user-agent
0
67
1
72,901,197
72,901,197
0
true
2022-07-07T12:59:38.773Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is there a way to modify userAgent in Cypress to simulate mobile [2022] Chrome 100+<p>when google introduced Chrome 100 they disabled possibility to modify u...
72,901,892
Flutter: How to run remote db transactions in the background<p>I have an e-commerce app. When user add/remove items I need to have them logged into my remote database. Each transaction is important and I have to make sure that I have logged them in the same order it had happened. However it slows my app and the round t...
<p>you can try <a href="https://pub.dev/packages/workmanager" rel="nofollow noreferrer">workmanager</a></p> <pre><code>void callbackDispatcher() { Workmanager.executeTask((task) { //Write codes to perform required tasks return Future.value(true); }); } Workmanager.initialize( callbackDispatcher, //the ...
Flutter: How to run remote db transactions in the background
postgresql|flutter|dart|flutter-hive
0
67
1
72,902,060
72,902,060
0
true
2022-07-07T17:14:52.283Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Flutter: How to run remote db transactions in the background<p>I have an e-commerce app. When user add/remove items I need to have them logged into my remote...
72,903,246
Issue retrieving keys and values from nested JSON object<p>I need help retrieving the keys and values of this nested <code>JSON</code>. It is a <code>JSON</code> object of multiple values wrapped in another <code>JSON</code> object that is finally wrapped in an array. See an example of what I'm talking about</p> <p><im...
<p>I would recommend using the Jackson json processor, it's simple and intuitive.</p> <p>here is a example.</p> <pre><code>//json string to JsonNode String data = &quot;{\&quot;x_metadata\&quot;: {\&quot;key_1\&quot;: \&quot;text1\&quot;,&quot; + &quot; \&quot;key_2\&quot;: true, \&quot;key_3\&quot;: 100.0,&quo...
Issue retrieving keys and values from nested JSON object
java|json|wordpress|api
0
67
1
72,904,627
72,904,627
0
true
2022-07-07T19:27:21.767Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Issue retrieving keys and values from nested JSON object<p>I need help retrieving the keys and values of this nested <code>JSON</code>. It is a <code>JSON</c...
72,794,787
Custom Wordpress Query not showing 2nd page Pagination results<p>I'm believe I'm having some scoping issues trying to get this code to work and I'm not exactly sure where. I have an index page where I have a container that allows me to filter my blog posts.<a href="https://i.stack.imgur.com/T78KX.png" rel="nofollow nor...
<p>So finally after about two weeks of messing with this I figured out that my issue was mostly the form I was using to make the query. I've cleaned up my code a bit as well which helped out a ton as far as trying to read what was going on.</p> <p><strong>this is what the query logic looks like now</strong></p> <pre><c...
Custom Wordpress Query not showing 2nd page Pagination results
php|wordpress|pagination
0
67
1
72,913,711
72,913,711
0
true
2022-06-29T01:26:37.147Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Custom Wordpress Query not showing 2nd page Pagination results<p>I'm believe I'm having some scoping issues trying to get this code to work and I'm not exact...
72,925,863
How to use regular expressions to match and replace more complex html tag?<p>How can I use regular expressions to match all tags with a style attribute and a color value, then extract their color value and replace the tag with &lt;color=colorValue&gt;content, please help me, thank you</p> <p><div class="snippet" data-l...
<pre><code>const regex = /(?=.*style=&quot;color:(#\w+?);&quot;)&lt;([a-zA-z]+)[^&gt;]+&gt;(.+?)&lt;\/(\2)&gt;/gm; const str = `//original tag // &lt;p style=&quot;color:#ffffff;&quot;&gt;content&lt;/p&gt; // &lt;span style=&quot;color:#ffffff;&quot;&gt;content&lt;/span&gt; // &lt;i style=&quot;color:#ffffff;&quot;&gt...
How to use regular expressions to match and replace more complex html tag?
javascript|html|css|regex|regexp-replace
0
67
1
72,926,058
72,926,058
0
true
2022-07-10T02:53:51.223Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to use regular expressions to match and replace more complex html tag?<p>How can I use regular expressions to match all tags with a style attribute and a...
72,920,007
How can I get a first cell address of the page<p>I want to use the &quot;CELL&quot; formula on excel to get address of the first cell of the page.</p> <p>for example: when I input this formula</p> <pre><code>=CELL(&quot;address&quot;;Page1) </code></pre> <p>it will have output like this</p> <pre><code>A1 </code></pre> ...
<p>Solved, I've created my own code that solve my question</p> <pre><code>Function FirstPageCell(thepage As String) As String ' Get the first cell of the page Dim wks As Worksheet Dim iPage As Integer Dim iHorPgs As Integer Dim iHP As Integer Dim lRow As Long Set wks = ActiveSheet iHorPgs ...
How can I get a first cell address of the page
excel|vba
-2
67
1
72,926,165
72,926,165
0
true
2022-07-09T08:30:35.823Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I get a first cell address of the page<p>I want to use the &quot;CELL&quot; formula on excel to get address of the first cell of the page.</p> <p>for...
72,925,892
how can i set the position of an object though the average of two other objects then add an offset | unity | c# | 2D<p>Im making a little project using procedural animation in 2D, to set the y pos for the body of the character, I made it so it finds the average of the y between the two of the target objects for the leg...
<p>I think you need to just change the finalpos.y assignment to</p> <pre><code>finalpos.y = (distanceobj1pos.y + distanceobj2pos.y) / 2 + offset; </code></pre>
how can i set the position of an object though the average of two other objects then add an offset | unity | c# | 2D
c#|unity3d|2d
1
67
2
72,926,703
72,926,703
0
true
2022-07-10T03:03:23.157Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how can i set the position of an object though the average of two other objects then add an offset | unity | c# | 2D<p>Im making a little project using proce...
72,918,159
Html video won't autoplay on ios with playsinline<p>I have an html video that I'm trying to render on ios but the video won't autoplay. I found similar questions mentioning to use &quot;playsinline&quot; but I tried this approach and it doesn't fix the issue in my case. Here is how I'm currently displaying the video in...
<p>So, I'm not exactly sure why but, Changing my html to this (with the src specified directly in the video html rather than in a sub &quot;source&quot; html class) fixed the issue:</p> <pre><code>&lt;video class=&quot;remoteVideo&quot; src=&quot;https://192.168.1.134:7278/GetVideo&quot; playsinline loop muted autoplay...
Html video won't autoplay on ios with playsinline
html|asp.net|.net|blazor
0
67
1
72,930,562
72,930,562
0
true
2022-07-09T00:41:26.333Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Html video won't autoplay on ios with playsinline<p>I have an html video that I'm trying to render on ios but the video won't autoplay. I found similar quest...