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,935,667 | How to call a method from a mocked object when a method from another mock is called?<p>Given below is the structure of my project</p>
<pre><code>class A{
void methodA(){
// Gets data from the DB
// Processes the data
// Sends the data via a kafka topic MyTopic
kafka.send(topicName, d... | <p>Not sure that I am understanding what you have mocked and what not but my approach would look like this:</p>
<pre><code>@InjectMocks
private ClassA classA;
@Mock
Kafka kafka
private String data = "someData";
private String topicName = "someTopicName";
@Test
void yourTestMethod() {
B objectO... | How to call a method from a mocked object when a method from another mock is called? | spring-boot|mocking|mockito | 0 | 42 | 1 | 72,941,029 | 72,941,029 | 0 | true | 2022-07-11T08:28:46.877Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to call a method from a mocked object when a method from another mock is called?<p>Given below is the structure of my project</p>
<pre><code>class A{
... |
72,874,255 | Get the input again if wrong by using input validation<p>Here I need to get 10 IPv4 addresses and check them using a validator function if the IPv4 address is invalid it should again ask for that input alone which was invalid out of 10 from the user. If the IPv4 address is valid no problem it goes to the converter func... | <p>make these changes in the second while loop:</p>
<pre><code>while True:
print(f"{ipv4[i]} is an Invalid IPv4 Address, add valid IPv4 Address")
ipv4[i] = input("Enter the Valid IPv4 Address:")
if validator(ipv4[i]):
converter(ipv4[i])
break
</code></pre> | Get the input again if wrong by using input validation | python-3.x|validation|while-loop | 1 | 42 | 1 | 72,880,487 | 72,880,487 | 0 | true | 2022-07-05T18:52:11.840Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Get the input again if wrong by using input validation<p>Here I need to get 10 IPv4 addresses and check them using a validator function if the IPv4 address i... |
73,031,094 | Identify rows containing repeating customers and assigning them new id as per serial number generated in sql<p>I have a table</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>id</th>
<th>repeat customer id</th>
<th>store</th>
<th>date</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td></td>
<td... | <p>The best way to incorporate it, would be to use Alphanumeric String as NEW_ID, and <code>concat</code> STORE and ID to create NEW_ID. For example <code>A_000000001</code>. In that way you can add similar STORE to REPEAT_CUSTOMER_ID as well.</p>
<p>So in this case, instead of <code>NEW_ID</code>=6, you would have <co... | Identify rows containing repeating customers and assigning them new id as per serial number generated in sql | sql|sql-server | 2 | 42 | 1 | 73,031,340 | 73,031,340 | 0 | true | 2022-07-19T04:23:09.423Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Identify rows containing repeating customers and assigning them new id as per serial number generated in sql<p>I have a table</p>
<div class="s-table-contain... |
73,017,808 | Can someone confirm below array is a valid javascript array?<p>We mainly write object or string in an array like this -</p>
<pre><code>const arr = [{id: 123}, 'test']
</code></pre>
<p>And then we can access it through the index of the item -</p>
<pre><code>console.log(arr[0], arr[1]);
</code></pre>
<p>But is it a valid... | <p>Arrays in JS are sequence of elements that you can access with its indexes.</p>
<pre><code>const arr = [{id: 123}, 'test']
</code></pre>
<p>So here <code>arr</code> contain two elements <code>{id: 123}</code> at index <code>0</code> and <code>'test'</code> at index <code>1</code>.</p>
<p>So, you can access array ele... | Can someone confirm below array is a valid javascript array? | javascript|arrays|typescript | -2 | 42 | 1 | 73,017,850 | 73,017,850 | 0 | true | 2022-07-18T05:50:46.057Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Can someone confirm below array is a valid javascript array?<p>We mainly write object or string in an array like this -</p>
<pre><code>const arr = [{id: 123}... |
72,817,354 | Write permutation to text file, keeping only unique permutations<p>I would like to write the unique permutations to a text file. I want only the unique version.
My code is as follows:</p>
<pre><code>def permute(lst,f=0):
if f>=len(lst):
print(lst)
return
for s in range(f, len(lst)):
l... | <p>It doesn't seem that you want to generate all permutations at all, you can calculate what you want by just 'rolling' the list:</p>
<pre><code>lst = ['Cat', 'Dog', 'Bird', 'Rabbit']
[lst[i:]+lst[:i] for i, _ in enumerate(lst)]
</code></pre>
<p>Output:</p>
<pre><code>[['Cat', 'Dog', 'Bird', 'Rabbit'],
['Dog', 'Bird'... | Write permutation to text file, keeping only unique permutations | python|python-3.x|permutation | -3 | 42 | 1 | 72,817,832 | 72,817,832 | 0 | true | 2022-06-30T14:13:21.863Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Write permutation to text file, keeping only unique permutations<p>I would like to write the unique permutations to a text file. I want only the unique versi... |
72,783,577 | How to invoke a user's function properly from a data step with SAS?<p>I'm new to SAS and I would like to generate a simple graph according to a variable's value.
I have wrote:</p>
<pre><code>%MACRO generate_bar_plot();
%proc sgplot data=sashelp.heart;
%hbar smoking_status /
response=ageatdeath
stat=mean;
%run... | <p>A macro is not a "function". The macro pre-processor passes the modified text of your program on to SAS itself to execute. When you execute a macro any text it emits becomes part of your program.</p>
<p>So you tried to run code like:</p>
<pre><code>data ...
when ('scatter_plot') do;
put "Scatte... | How to invoke a user's function properly from a data step with SAS? | sas|sas-macro | 0 | 42 | 2 | 72,787,367 | 72,787,367 | 0 | true | 2022-06-28T09:00:39.530Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to invoke a user's function properly from a data step with SAS?<p>I'm new to SAS and I would like to generate a simple graph according to a variable's va... |
72,981,971 | How to split Lines using shell SED or something similar<p>I have a file containing the following</p>
<pre><code>String, SomeotherString Additional, StringNew String
</code></pre>
<p>I would like to have the following output:</p>
<pre><code>String, Someother
String Additional, String
New String
</code></pre>
<p>The deli... | <p>With sed:</p>
<pre><code>sed 's/\([a-z]\)\([A-Z]\)/\1\n\2/g'
</code></pre>
<p>Matches a small letter (sub-expression 1) followed by a capital letter (sub-expression 2) and replaces them with the part matching sub-expression 1, a newline character, and the part matching sub-expression 2.</p>
<p>The previous should wo... | How to split Lines using shell SED or something similar | linux|shell|sed | 0 | 42 | 3 | 72,982,280 | 72,982,280 | 0 | true | 2022-07-14T14:13:23.543Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to split Lines using shell SED or something similar<p>I have a file containing the following</p>
<pre><code>String, SomeotherString Additional, StringNew... |
73,002,030 | How to use alternationindex on code behind wpf<p>I have Itemcontrol in WPF. And Items source using Binding property.Items are only one button
How can I show index of item when I clicked Button? I read about AlternationIndex but only show on the xaml page.</p> | <p>You can pass it via Tag property.</p>
<pre><code> <ItemsControl AlternationCount="10">
<ItemsControl.Items>
<Button Tag="{Binding Path=(ItemsControl.AlternationIndex), RelativeSource={RelativeSource Mode=Self}}" Click="Button_Click"/>
<Button ... | How to use alternationindex on code behind wpf | c#|wpf|itemscontrol | -1 | 42 | 1 | 73,003,462 | 73,003,462 | 0 | true | 2022-07-16T06:31:09.623Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to use alternationindex on code behind wpf<p>I have Itemcontrol in WPF. And Items source using Binding property.Items are only one button
How can I show ... |
72,824,882 | Callback function placement in setState()<p>Whats the difference between</p>
<pre><code>setState((prevState)=>{return {value:prevState.value+1}},callback)
</code></pre>
<p>vs</p>
<pre><code>setState((prevState)=>{return {value:prevState.value+1}},()=>{callback})
</code></pre>
<p>I am getting old state in 1st t... | <pre><code>setState((prevState)=>{return {value:prevState.value+1}},()=>{callback})
</code></pre>
<p>In the above code, you're using an anonymous function to wrap <code>callback</code>, but <code>callback</code> is not triggered as you expected.</p>
<p>If you want to trigger <code>callback</code>, you need to mak... | Callback function placement in setState() | reactjs | 1 | 42 | 1 | 72,824,966 | 72,824,966 | 0 | true | 2022-07-01T05:46:49.840Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Callback function placement in setState()<p>Whats the difference between</p>
<pre><code>setState((prevState)=>{return {value:prevState.value+1}},callback)... |
72,919,853 | vscode .net assembly error "The type or namespace name 'Configuration' does not exist in the namespace"<p><a href="https://i.stack.imgur.com/iKdU5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iKdU5.png" alt="added Microsoft.Extensions.Configuration in .csproj" /></a></p>
<p>I am still getting a re... | <p>The following steps solved this for me:</p>
<ol>
<li>Deleted <code>bin</code> directory</li>
<li>Add packages</li>
<li><code>dotnet restore -f</code></li>
</ol> | vscode .net assembly error "The type or namespace name 'Configuration' does not exist in the namespace" | c#|.net|visual-studio-code|vscode-extensions | 0 | 42 | 2 | 72,965,914 | 72,965,914 | 0 | true | 2022-07-09T07:56:33.497Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
vscode .net assembly error "The type or namespace name 'Configuration' does not exist in the namespace"<p><a href="https://i.stack.imgur.com/iKdU5.png" rel="... |
72,830,461 | Why does this code not read the sudoku numbers from csv file and reconstruct it?<p>This <code>print_board</code> is the code to reconstruct the the sudoku.
it works perfectly fine when I use the sudoku numbers from the
board, but it doesn't work from the <code>sudoku.csv</code> file. What have I done wrong?</p>
<pre><c... | <p>There are multiple things that don't work.</p>
<ol>
<li>around the <code>print_board</code> function there should be no <code>print</code> function.</li>
<li>don't pass a row to <code>print_board</code>, but the whole <code>board</code></li>
<li>rather use <a href="https://numpy.org/doc/stable/reference/generated/nu... | Why does this code not read the sudoku numbers from csv file and reconstruct it? | python|csv|recursion|sudoku | 0 | 42 | 2 | 72,830,789 | 72,830,789 | 0 | true | 2022-07-01T14:02:06.910Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why does this code not read the sudoku numbers from csv file and reconstruct it?<p>This <code>print_board</code> is the code to reconstruct the the sudoku.
i... |
72,900,207 | GCP - Reaching AppEngine Standard Environment with internal ingress from resources in a shared VPC<p>I have a GCP project where I deployed an AppEngine application. I have set the service's ingress to internal.
In this project i use a shared VPC hosted in another project. This shared VPC is connected to an on-prem envi... | <p>At this time it is not possible to do this.</p>
<p>I suspect this limitation is because App Engine is not available for VPC Service Controls like other services as <a href="https://cloud.google.com/run/docs/securing/using-vpc-service-controls" rel="nofollow noreferrer">Cloud Run</a> or <a href="https://cloud.google.... | GCP - Reaching AppEngine Standard Environment with internal ingress from resources in a shared VPC | google-app-engine|google-cloud-platform|vpc | 1 | 42 | 1 | 72,904,744 | 72,904,744 | 0 | true | 2022-07-07T15:05:49.007Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
GCP - Reaching AppEngine Standard Environment with internal ingress from resources in a shared VPC<p>I have a GCP project where I deployed an AppEngine appli... |
72,882,229 | Robocode getName() requires variable?<p>So I want my Robot to behave differently when the scanned robot it called "RamFire", and I tried doing this:</p>
<pre><code>public void onScannedRobot(ScannedRobotEvent e) {
if (getName() = "RamFire") {
// If the robot is called "RamFire"... | <p>To compare values of variables you use ==<br />
To assign a value to a variable, you use =<br />
So in your case, you want to compare Values, so it should look like this:</p>
<pre><code>if (getName() == "RamFire")
</code></pre>
<p>Or better yet, check the name via an <code>equals</code> call. Because strin... | Robocode getName() requires variable? | java|robocode | 2 | 42 | 1 | 72,883,006 | 72,883,006 | 0 | true | 2022-07-06T10:48:23.810Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Robocode getName() requires variable?<p>So I want my Robot to behave differently when the scanned robot it called "RamFire", and I tried doing this... |
72,941,278 | How to make a query with relations and order it by date of the relation in Laravel 9<p>I have the User model, I also have the Post model.</p>
<p>I would like to get 4 users through the newest posts of my entire Post model (taking into account that even a single user could have n number of newest posts) and then get the... | <p>I found <a href="https://laravel.com/docs/9.x/eloquent#subquery-ordering" rel="nofollow noreferrer">subquery ordering</a></p>
<pre><code>public function getUsersByNewerPosts()
{
return User::query()
->whereHas('posts', function ($query) {
$query->where('state', PostStateEnum::PUBLISHED)... | How to make a query with relations and order it by date of the relation in Laravel 9 | laravel|relationship | 0 | 42 | 1 | 72,942,201 | 72,942,201 | 0 | true | 2022-07-11T15:50:43.900Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to make a query with relations and order it by date of the relation in Laravel 9<p>I have the User model, I also have the Post model.</p>
<p>I would like... |
72,927,433 | How can I create these images/col?<p>I'm new, and I want to learn how can I create these images to be in the center of the page and I want to be a very small gap between them? May you please help me? I was searching on the internet about how can I create this, but unfortunately I wasn't very lucky. What's the code for ... | <p>Is this what you want? You wrap the two images inside a <code>div</code> container and apply flex property to it. Then use a padding of 5px on each image to get that little space between. Also I have used a custom height to the container, you can adjust it according to your need.
<div class="snippet" data-lang="js" ... | How can I create these images/col? | javascript|html|css|image|twitter-bootstrap | -1 | 42 | 1 | 72,927,516 | 72,927,516 | 0 | true | 2022-07-10T09:23:32.167Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I create these images/col?<p>I'm new, and I want to learn how can I create these images to be in the center of the page and I want to be a very small... |
72,898,982 | how do you sort out a 2-dimensional array like this one here? i need to remove duplicates and have the duplicates values add to eachother<p>total_list = [['Argon', 1], ['Hematite', 1], ['Organic', 1], ['Argon', 1], ['Hematite', 1], ['Organic', 1], ['Graphite', 2], ['Ammonium', 4], ['Hydrogen', 2]]</p>
<p>in this list e... | <p>You could use a <code>collections.Counter</code> to sum the amount and list the items:</p>
<pre><code>from collections import Counter
total_list = [['Argon', 1], ['Hematite', 1], ['Organic', 1], ['Argon', 1], ['Hematite', 1], ['Organic', 1], ['Graphite', 2], ['Ammonium', 4], ['Hydrogen', 2]]
result = Counter()
fo... | how do you sort out a 2-dimensional array like this one here? i need to remove duplicates and have the duplicates values add to eachother | python | 2 | 42 | 3 | 72,899,217 | 72,899,217 | 0 | true | 2022-07-07T13:46:35.517Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how do you sort out a 2-dimensional array like this one here? i need to remove duplicates and have the duplicates values add to eachother<p>total_list = [['A... |
72,938,318 | Mean of column in PySpark without using collect<p>I have a dataframe that looks like below</p>
<pre class="lang-none prettyprint-override"><code>accuracy
--------
91.0
92.0
73.0
72.0
88.0
</code></pre>
<p>I am using aggregate, count and collect to get the column sum which is taking too much time. Below is my code</p>
<... | <p>First, you can aggregate the column values and calculate the average. Then, extract it into the variable.</p>
<pre class="lang-py prettyprint-override"><code>df = df.agg(F.avg('accuracy'))
acc_top_k = df.head()[0] * 100
</code></pre>
<p>Full test:</p>
<pre class="lang-py prettyprint-override"><code>from pyspark.sql... | Mean of column in PySpark without using collect | python|dataframe|apache-spark|pyspark|mean | 1 | 42 | 1 | 72,938,625 | 72,938,625 | 0 | true | 2022-07-11T12:06:00.120Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Mean of column in PySpark without using collect<p>I have a dataframe that looks like below</p>
<pre class="lang-none prettyprint-override"><code>accuracy
---... |
72,781,804 | JS transform deeply nested array of objects at the top level with renaming<p>I would like to simplify this nested array of objects move some items at the top level with a new property name. Given this data:</p>
<pre><code>let data = [
{
"id": 1001,
"model": "Lemon",
... | <p>First, we need to loop through the data array. We can get the <code>model</code> from the data element namely <code>item</code>. Then we need to loop through that <code>item.details</code> array. From that we can get <code>id</code>, <code>detail.color</code>. Hers's the full code.</p>
<p><div class="snippet" data-l... | JS transform deeply nested array of objects at the top level with renaming | javascript|ecmascript-6|lodash | 0 | 42 | 1 | 72,782,017 | 72,782,017 | 0 | true | 2022-06-28T06:44:37.353Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
JS transform deeply nested array of objects at the top level with renaming<p>I would like to simplify this nested array of objects move some items at the top... |
72,906,337 | How can i make multiple text so that it can show 3 data in a block in flutter?<p>I want to show three data block of column, that is include date, title, and content. How can i do it? I only show 1 data that's title <a href="https://i.stack.imgur.com/qTBwS.png" rel="nofollow noreferrer">main.dart</a></p>
<p>Here's my co... | <p>You can use <a href="https://api.flutter.dev/flutter/widgets/Column-class.html" rel="nofollow noreferrer">Column</a> widget. Three <code>Text</code> will be the child of the <code>Column</code>.</p>
<pre><code>Column(
children: const <Widget>[
Text(...),
Text(...),
Text(...) ... | How can i make multiple text so that it can show 3 data in a block in flutter? | flutter|dart | 0 | 42 | 1 | 72,906,387 | 72,906,387 | 0 | true | 2022-07-08T03:27:07.307Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can i make multiple text so that it can show 3 data in a block in flutter?<p>I want to show three data block of column, that is include date, title, and ... |
73,000,840 | Regex patterns with windows paths in python<p>I found a python package on GitHub that doesn't work. It attempts to replace a substring within a url with another string.</p>
<pre class="lang-py prettyprint-override"><code>string = "filename.txt"
rewrite = "c:\\windows\\system32\\drivers\\hosts"
url =... | <p>This is my understanding, please correct me if i'm wrong.</p>
<p>You don't get double backslashes, but escaped backslashes. In Re and Python, one backslash is a special character. It does not match the backslash character.(or rather, not always) To print one backslash, one would need to escape it with another.(again... | Regex patterns with windows paths in python | python|regex|string | -2 | 42 | 1 | 73,001,123 | 73,001,123 | 0 | true | 2022-07-16T01:00:22.633Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Regex patterns with windows paths in python<p>I found a python package on GitHub that doesn't work. It attempts to replace a substring within a url with anot... |
72,982,564 | How to Update Annotation Coordinates on MapView<p>I have a mapView and vehicle coordinates which changes in every 15 seconds so I want to update the coordinates. My current approach is to delete all annotations and adding new ones. However, I can't use animations in that approach, they are just spawning. When I looked ... | <p>That was exhausting, I still don't get the logic but here is how I fixed it;</p>
<p>I had to use a custom class(of MKAnnotation) to set coordinates otherwise the coordinate property is read-only. So, here is an example custom annotation class;</p>
<pre><code> final class BusAnnotation: NSObject, MKAnnotation{
... | How to Update Annotation Coordinates on MapView | ios|swift|mapkit|mkmapview | 0 | 42 | 1 | 73,032,295 | 73,032,295 | 0 | true | 2022-07-14T14:53:50.373Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to Update Annotation Coordinates on MapView<p>I have a mapView and vehicle coordinates which changes in every 15 seconds so I want to update the coordina... |
72,947,809 | Matplotlib not showing librosa specshow in custom class constructor<p>I have a custom "waveform"-class which I use for tkinter-applications. Due to testing reasons, i would like to see a spectrogram via <code>librosa.display.specshow()</code> without calling any tkinter-app. Sadly, the following code does not... | <p>The problem seems to come from the fact that you use <code>matplotlib.figure</code> which is not managed by <code>pyplot</code>.
Changing the import works for me</p>
<pre><code>from matplotlib.pyplot import figure
# instead of from matplotlib.figure import Figure
# ...
class waveform():
# ...
self.f... | Matplotlib not showing librosa specshow in custom class constructor | python|matplotlib|librosa | 0 | 42 | 1 | 72,947,885 | 72,947,885 | 0 | true | 2022-07-12T06:17:00.537Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Matplotlib not showing librosa specshow in custom class constructor<p>I have a custom "waveform"-class which I use for tkinter-applications. Due to... |
72,859,375 | Javascript: array as useEffect depencendy<pre><code>useEffect(() => {
changeColumnsState(mapOrder({array: columnsState, order: columnOrder, key: 'name'}))
}, [JSON.stringify(columnOrder)])
</code></pre>
<p>What is the best way to check if array changed? Not length, but order
<code>columnOrder</code> is array o... | <blockquote>
<p>What is the best way to check if array changed?</p>
</blockquote>
<p>The best way is not to check at all. You don't need that <code>columnOrder</code> array state and an initialisation and an effect depending on it. Just directly set the order of your <code>columnsState</code> array in the handler funct... | Javascript: array as useEffect depencendy | javascript|arrays|use-effect | 0 | 42 | 1 | 72,859,923 | 72,859,923 | 0 | true | 2022-07-04T15:56:18.690Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Javascript: array as useEffect depencendy<pre><code>useEffect(() => {
changeColumnsState(mapOrder({array: columnsState, order: columnOrder, key: 'name... |
72,770,296 | Kotlin - categorized subenums<p>I am trying to implement a Role class/interface/enum that I can use throughout my program. I want the roles to be somewhat categorized - I want some roles to be of type A, some roles to be of type B, and some roles to be part of multiple types. I want to be able to know all the roles fro... | <p>You <em>could</em> reflect your roles in the type system by defining a sealed interface for each role type like this:</p>
<pre><code>sealed interface Type1 {
val t: Int
fun test()
}
sealed interface Type2 {
val s: String
}
</code></pre>
<p>Then your <code>Role</code> class could be defined as a <code>se... | Kotlin - categorized subenums | kotlin|enums|interface|sealed|sealed-class | 2 | 42 | 1 | 72,771,410 | 72,771,410 | 1 | true | 2022-06-27T10:06:52.533Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Kotlin - categorized subenums<p>I am trying to implement a Role class/interface/enum that I can use throughout my program. I want the roles to be somewhat ca... |
72,771,481 | Parsing nested json into pandas DataFrame<p>I am reading data from JSON files that represent football games of tournaments:
tournament_1.json, tournament_2.json, ...
the files are of the form</p>
<pre><code>{
"name": "tournament_7",
"start_date": "2022-05-01",
"end_date"... | <p>You haven't specified exactly what is the output that you are looking for. Here is how I've done it:</p>
<pre><code>import json
import pandas as pd
with open('tournament_7.json') as data_file:
data = json.load(data_file)
df = pd.DataFrame(columns=['name','start_date', 'end_date', 'tours', 'type', 'winner'])
f... | Parsing nested json into pandas DataFrame | python|json|pandas | 0 | 42 | 1 | 72,771,886 | 72,771,886 | 1 | true | 2022-06-27T11:39:50.277Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Parsing nested json into pandas DataFrame<p>I am reading data from JSON files that represent football games of tournaments:
tournament_1.json, tournament_2.j... |
72,769,771 | How to limit CSS Drop Caps to only Filled Paragraphs of more than one line?<p>Given a standard well working Drop Caps styler in pure CSS.</p>
<pre><code> /* Automatic CSS Drop Caps on First Letter on the First Paragraph */
article:first-of-type p:first-of-type:first-letter{
font-size: 3em;
margin: 0... | <p>We need to find out whether the paragraph is more than one line. This snippet uses a slightly hacky method of writing a single line (one character) into the innerHTML and measuring its height.</p>
<p>If the actual paragraph is higher than that then a class of DropCap is set. Otherwise a class of oneLineDropCapAltern... | How to limit CSS Drop Caps to only Filled Paragraphs of more than one line? | html|css|layout|word-count|drop-cap | 1 | 42 | 1 | 72,773,670 | 72,773,670 | 1 | true | 2022-06-27T09:26:11.840Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to limit CSS Drop Caps to only Filled Paragraphs of more than one line?<p>Given a standard well working Drop Caps styler in pure CSS.</p>
<pre><code> ... |
72,774,504 | TypeError: remove() argument must be xml.etree.ElementTree.Element, not dict<p>How to remove specific indexing attribute</p>
<p>For example : if you look at below xml data from that need to remove the <code>name</code> attribute which at first indexing <code>-> get_root_element[0]</code></p>
<p><strong>XML data :</s... | <p>Here's another option that is, in my opinion, a bit easier to read/understand.</p>
<pre class="lang-py prettyprint-override"><code>import xml.etree.ElementTree as ET
parsed_xml = ET.parse("/content/sample_data/xyz.xml")
first_row = parsed_xml.find("row[1]")
name_elem = first_row.find("name... | TypeError: remove() argument must be xml.etree.ElementTree.Element, not dict | python|xml | 1 | 42 | 2 | 72,775,229 | 72,775,229 | 1 | true | 2022-06-27T15:16:55.453Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
TypeError: remove() argument must be xml.etree.ElementTree.Element, not dict<p>How to remove specific indexing attribute</p>
<p>For example : if you look at ... |
72,775,298 | How can I join pd dataframes on complex condition?<p>I have two dataframes. The first one contains <code>ID</code> , time marks (can be different dates) and some value. Another contains <code>ID</code> and two time intervals. Based on that, I want to deduce class for each entry in the first dataframe. If time between c... | <p>First reshape the second dataframe and create the future class value.</p>
<pre><code># future class value
d = {'start1':1, 'end1':2, 'start2':3, 'end2':4}
_df = (
df_times.set_index('ID')
.rename(columns=d)
.rename_axis(columns='class')
.stack()
.astype('datetime64[ns]')
.reset_ind... | How can I join pd dataframes on complex condition? | python|pandas|datetime | 0 | 42 | 1 | 72,775,961 | 72,775,961 | 1 | true | 2022-06-27T16:17:54.767Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I join pd dataframes on complex condition?<p>I have two dataframes. The first one contains <code>ID</code> , time marks (can be different dates) and ... |
72,775,159 | prometheus fails to start with error on Windows<p>I am trying to run the prometheus for wmi exporter with below configuration. But its failing with error :</p>
<p>ts=2022-06-27T16:04:42.665Z caller=main.go:450 level=error msg="Error loading config (--config.file=prometheus.yml)" file=C:\prometheus\prometheus.... | <p>Your indentation is wrong on line 31 onwards. YAML is very very strict about spacing.</p>
<p>Fixed:</p>
<pre><code># my global config
global:
scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is e... | prometheus fails to start with error on Windows | yaml|prometheus | 0 | 42 | 1 | 72,777,862 | 72,777,862 | 1 | true | 2022-06-27T16:06:44.860Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
prometheus fails to start with error on Windows<p>I am trying to run the prometheus for wmi exporter with below configuration. But its failing with error :</... |
72,778,197 | MySQL table join with COUNT column - where to place AND condition for count?<p>I have 2 tables</p>
<p><strong>Table_1:</strong></p>
<pre><code>| ID | ARRIVAL | DEPARTED | OTHER_COLUMNS |
| ----- | ---------- |-------------- |---------------
| 1 | 2022-07-24 | 0 | data |
| 2 | 202... | <p>Your query is invalid. Why doesn't MySQL throw an error? I suppose you are working in MySQL's notorious cheat mode. Make sure to set</p>
<pre><code>SET sql_mode = 'ONLY_FULL_GROUP_BY';
</code></pre>
<p>to prevent MySQL from surpressing such errors. You group by table1.id, but select table2.condition. As you know you... | MySQL table join with COUNT column - where to place AND condition for count? | mysql|sql|count | 1 | 42 | 1 | 72,778,842 | 72,778,842 | 1 | true | 2022-06-27T20:54:10.123Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
MySQL table join with COUNT column - where to place AND condition for count?<p>I have 2 tables</p>
<p><strong>Table_1:</strong></p>
<pre><code>| ID | ARRI... |
72,781,545 | how can we place image outside the parent container in flutter<p>I am trying to implement this kind of UI. But i can't find a way to place image outside the container.(Check the image <a href="https://i.stack.imgur.com/0HRHq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0HRHq.png" alt="enter image ... | <p>Hey you can use <code>Stack</code> widget to overlap from card, use <code>Positioned</code> to align your widget at particular position.</p>
<p>For - Eg.</p>
<pre><code> Stack(
children: [
Padding(
padding: const EdgeInsets.symmetric(vertical: 20, hor... | how can we place image outside the parent container in flutter | flutter | -1 | 42 | 2 | 72,783,767 | 72,783,767 | 1 | true | 2022-06-28T06:18:33.050Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how can we place image outside the parent container in flutter<p>I am trying to implement this kind of UI. But i can't find a way to place image outside the ... |
72,781,172 | finding max date of consecutive zero in int comp column<p>I want to calculate max date of consecutive zero in PRIN COMP column. In end date column the date should be max date of consecutive zero. I tried using rank function but not able to get that max date</p>
<pre><code>AGREEMENTID DUEDATE PRINCOMP ... | <pre><code>data have;
infile cards firstobs=2;
input id date:datetime. princomp intcomp;
format date datetime.;
cards;
AGREEMENTID DUEDATE PRINCOMP INTCOMP END_DATE
267 15FEB2017:00:00:00.000 0 46411
267 15MAR2017:00:00:00.000 32258 64167
267 ... | finding max date of consecutive zero in int comp column | sas|sas-macro | 0 | 42 | 1 | 72,786,778 | 72,786,778 | 1 | true | 2022-06-28T05:32:34.113Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
finding max date of consecutive zero in int comp column<p>I want to calculate max date of consecutive zero in PRIN COMP column. In end date column the date s... |
72,788,026 | How can I add space in the RecyclerView?<p>I need to add some space to start of the first item and to end of the last item of RecyclerView, so they can scroll to edge of the screen (as they can't with RecyclerView's margin or padding)</p>
<p>The problem is spacing between items should be different, so I can't just add ... | <p>Found the solution by setting LayoutParams to items' parent views. Not the best way I guess, but it works fine for me.</p>
<pre><code>RecyclerView.LayoutParams params = new RecyclerView.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
if (position == 0 || position == 14) {
... | How can I add space in the RecyclerView? | java|android | 1 | 42 | 2 | 72,789,846 | 72,789,846 | 1 | true | 2022-06-28T14:11:36.193Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I add space in the RecyclerView?<p>I need to add some space to start of the first item and to end of the last item of RecyclerView, so they can scrol... |
72,785,719 | Javascript local datetime into selected timezone<p>I have <a href="https://www.daterangepicker.com/" rel="nofollow noreferrer">https://www.daterangepicker.com/</a> which outputs some datetimes.</p>
<p>If I am in timezone (device timezone) Europe/Kiev (GMT+3) the outputs will be in those timeszones. For example 27 Jun... | <p><strong>You can try this way</strong></p>
<pre><code>// Without moment-timezone
new Date().toLocaleString("en-US", { timeZone: "America/New_York" });
// With moment-timezone
var moment = require("moment-timezone");
const today = new Date();
var timeGet = moment(today);
timeGet.tz("... | Javascript local datetime into selected timezone | javascript|datetime|daterangepicker | 0 | 42 | 2 | 72,790,759 | 72,790,759 | 1 | true | 2022-06-28T11:38:43.623Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Javascript local datetime into selected timezone<p>I have <a href="https://www.daterangepicker.com/" rel="nofollow noreferrer">https://www.daterangepicker.co... |
72,790,739 | tkinter destroy method not working the right way<p>What i expect to happen:</p>
<ol>
<li>Window is opened with a button in it</li>
<li>When pressing the button the button is being deleted</li>
<li>After the button was deleted a countdown starts</li>
<li>After the countdown finished the program closes itself</li>
</ol>
... | <p>You can call the <code>update()</code> method and then the button will be deleted first.</p>
<pre><code>from tkinter import *
import time
count = 5
window = Tk()
def func():
global count
button.destroy() #This should destroy the button but it stays there until the while loop is finished
windo... | tkinter destroy method not working the right way | python|tkinter | 0 | 42 | 1 | 72,790,866 | 72,790,866 | 1 | true | 2022-06-28T17:20:35.100Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
tkinter destroy method not working the right way<p>What i expect to happen:</p>
<ol>
<li>Window is opened with a button in it</li>
<li>When pressing the butt... |
73,028,492 | How does one subclass QValue3DAxisFormatter with PySide for use in Q3DScatter?<p>When I subclass QValue3DAxisFormatter in my application, the application simply hangs and then exits without an exception or explanation. I have tried removing every and all methods in my subclass (even though they are supposed to be impl... | <p>Apparently there is some bug that requires a persistent reference to the formatter, so the problem is not in the code above, but rather in the assignment of the formatter to the axis. I did have:</p>
<pre><code>my_chart.axisX().setFormatter(AxisFormatter())
</code></pre>
<p>But it must be created as follows:</p>
<p... | How does one subclass QValue3DAxisFormatter with PySide for use in Q3DScatter? | python|qt|qtdatavisualization | 0 | 42 | 1 | 73,278,659 | 73,278,659 | 0 | true | 2022-07-18T20:51:14.300Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How does one subclass QValue3DAxisFormatter with PySide for use in Q3DScatter?<p>When I subclass QValue3DAxisFormatter in my application, the application sim... |
73,012,726 | React Redux createAsyncThunk actions don't update the state<p>I'm implementing a registration page to my nodejs api. With createAsyncThunk I implemented the function to fetch the user data and update the state.
The api works correctly, in fact it returns the created user data in the payload when the action is dispatche... | <p>I modified the request field in this way:</p>
<pre><code>export const fetchUserData = createAsyncThunk(
'userAuth',
async ({ requestUrl, userData }) => {
const resp = await axios.post(requestUrl, serializeAndStringify(userData))
return resp.data
}
)
</code></pre>
<p>And instead of wri... | React Redux createAsyncThunk actions don't update the state | javascript|html|reactjs|redux|react-hooks | 0 | 42 | 1 | 73,385,205 | 73,385,205 | 0 | true | 2022-07-17T14:41:45.503Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
React Redux createAsyncThunk actions don't update the state<p>I'm implementing a registration page to my nodejs api. With createAsyncThunk I implemented the ... |
73,015,886 | Apache camel don´t use all the dynamic queues created<p>I'm using apache camel for consuming an IBM Mq, I use jms for that, everything is ok that works fine, but in the performance testing the api create a lot of dynamic queues but just use once, I've used a lot of properties for solve this problem but I didn't get it ... | <p>I found a solution for this and is this.</p>
<p>this is my consume to mq</p>
<pre><code>.setHeader("CamelJmsDestinationName",
constant("queue:///"+queue+"?targetClient=1"))
.to("jms://queue:" + queue
+"?excha... | Apache camel don´t use all the dynamic queues created | java|apache-camel | 2 | 42 | 1 | 73,802,485 | 73,802,485 | 0 | true | 2022-07-17T22:50:23.890Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Apache camel don´t use all the dynamic queues created<p>I'm using apache camel for consuming an IBM Mq, I use jms for that, everything is ok that works fine,... |
72,859,862 | why extension better-comment not working?<p><a href="https://i.stack.imgur.com/rUHFb.png" rel="nofollow noreferrer">https://i.stack.imgur.com/rUHFb.png</a></p>
<p>why my better comment single comment not working , just muti-line working?</p>
<p>I have check the setting all i can change</p> | <p>I solved it by myself.</p>
<p>It turns out that better-comment only work on .js files.</p>
<p>For .html files, you need to use muti-line comment to make it work.</p> | why extension better-comment not working? | vscode-extensions | 0 | 42 | 1 | 73,553,141 | 73,553,141 | 0 | true | 2022-07-04T16:45:00.750Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
why extension better-comment not working?<p><a href="https://i.stack.imgur.com/rUHFb.png" rel="nofollow noreferrer">https://i.stack.imgur.com/rUHFb.png</a></... |
72,802,867 | React Rich text editor is not installing<p>I'm trying to use React mui rte from <a href="https://github.com/niuware/mui-rte" rel="nofollow noreferrer">Here</a> but when I tried <code>npm install mui-rte --save</code> its showing the below error:</p>
<pre><code> npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to reso... | <p>You can install this package using</p>
<p><code>npm install --legacy-peer-deps</code></p>
<p>Then try to install your package</p> | React Rich text editor is not installing | reactjs|editor|text-editor|rich-text-editor | 0 | 42 | 1 | 73,490,980 | 73,490,980 | 0 | true | 2022-06-29T14:11:43.040Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
React Rich text editor is not installing<p>I'm trying to use React mui rte from <a href="https://github.com/niuware/mui-rte" rel="nofollow noreferrer">Here</... |
72,967,937 | How to require ES module with node -r options<p>In some case I need to start a node.js process with the <code>-r</code> option to preload a ESM library <code>mriya</code>. The library can be installed with the command <code>npm i mriya</code>, and the command I want to run is <code>node -r mriya</code>. It works when I... | <pre class="lang-bash prettyprint-override"><code>node --experimental-loader your-esm-module
</code></pre>
<p><a href="https://nodejs.org/api/esm.html#loaders" rel="nofollow noreferrer">https://nodejs.org/api/esm.html#loaders</a></p>
<hr />
<p>You can omit <code>experimental-</code> too:</p>
<pre><code>node --loader yo... | How to require ES module with node -r options | node.js|command-line-interface|es6-modules|preload | 2 | 42 | 1 | 73,738,293 | 73,738,293 | 0 | true | 2022-07-13T14:23:28.037Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to require ES module with node -r options<p>In some case I need to start a node.js process with the <code>-r</code> option to preload a ESM library <code... |
72,241,795 | Increase div id number with new div fields<p>The following script creates new input fields up to 4. I need to know how can I increase the ID also as follows..</p>
<p>with first click, "var fieldHTML" generate :</p>
<pre><code><div><input type="text" id="sPhone_1" value=""... | <pre><code>$(addButton).click(function(){
//Check maximum number of input fields
if(x < maxField){
x++; //Increment field counter
$(wrapper).append(fieldHTML); //Add field html
newId = 'sPhone_' + x;
document.getElementById('sPhone_').id = newId;
... | Increase div id number with new div fields | javascript|html|jquery | 0 | 42 | 1 | 72,241,908 | 72,241,908 | 0 | true | 2022-05-14T15:46:42.760Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Increase div id number with new div fields<p>The following script creates new input fields up to 4. I need to know how can I increase the ID also as follows.... |
72,246,968 | Using variable name to access service,model,<p>I have an app that uses multiple categories. Two of them are "solarpanels" and "inverters".</p>
<p>In a component, named stockitems, I have a table which lists the products of the selected category.</p>
<pre><code> <ul class="list-group"... | <p>You can use an object as a dictionary to look up your services, or their function, as you could use a dictionary for any kind of mapping from keys to values:</p>
<pre><code>const serviceMap = {
"solarpanel": SolarPanelService.getSolarPanel,
"inverters": InverterService.getInverter
}
let look... | Using variable name to access service,model, | angular|typescript | 0 | 42 | 1 | 72,247,012 | 72,247,012 | 0 | true | 2022-05-15T09:14:36.140Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Using variable name to access service,model,<p>I have an app that uses multiple categories. Two of them are "solarpanels" and "inverters"... |
72,246,424 | Iteration over elements of 1D array is giving index error after few iterations<p>I have an array 'A' consisting of 15 elements. I have to delete a few elements and make the array with 8 elements.
I have to compare the adjacent elements and for the minimum value of the difference between them, it should delete the secon... | <p>You could use a single loop iterating <code>len(A)-8</code> times to remove a single element per iteration. Subtract the array from a shifted version to calculate differences between successive elements and remove the right element with the minimum difference. Finally print outside the loop.</p>
<pre><code>import nu... | Iteration over elements of 1D array is giving index error after few iterations | python|arrays|indexing | 1 | 42 | 2 | 72,249,709 | 72,249,709 | 0 | true | 2022-05-15T07:47:58.250Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Iteration over elements of 1D array is giving index error after few iterations<p>I have an array 'A' consisting of 15 elements. I have to delete a few elemen... |
72,243,711 | Mapping canvas LinearGradient to an image<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>function show(d) {
function normalize(val, max, min) { return (val - min) / (max - min... | <p>A simplistic way of getting rid of the gradient bar across the top once it is no longer needed is to overwrite it with white when you have finished using it.</p>
<p>The size of the final image is set with w and h variables and this snippet increases them from 50 to 300 so the image is still within the canvas.</p>
<p... | Mapping canvas LinearGradient to an image | javascript|css|canvas|html5-canvas | 0 | 42 | 1 | 72,250,566 | 72,250,566 | 0 | true | 2022-05-14T20:39:50.387Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Mapping canvas LinearGradient to an image<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet... |
72,251,137 | parse string and print it in python<p>i want to parse @google.com from this string</p>
<pre><code>str = 'purple alice-b@google.com monkey dishwasher'
</code></pre>
<p>and print it</p>
<pre><code>import re
str = 'purple alice-b@google.com monkey dishwasher'
match = re.search(r'\@\w+', str)
a=re.match(r'(@)://.*\.( )$', ... | <p>Please do not overwrite python types. Give your <code>str</code> variable another name than <code>str</code>.</p>
<p>Maybe try finding <em>@google.com</em> like this: <code>re.findall(r'@\w+\.\w+', your_string)</code></p> | parse string and print it in python | python|regex|parsing | -3 | 42 | 1 | 72,251,158 | 72,251,158 | 0 | true | 2022-05-15T18:30:54.433Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
parse string and print it in python<p>i want to parse @google.com from this string</p>
<pre><code>str = 'purple alice-b@google.com monkey dishwasher'
</code>... |
72,254,537 | how to display url taxonomy in loop taxonomy wordpress?<p>i have a custom taxonomy genre, i want to show all taxonomy in genre.php page. when I try to use this code php echo $term->slug;</p>
<p>the result does not meet my expectations :</p>
<p>http://localhost/site/action</p>
<p>I want the result like this :</p>
<p>... | <p>You can use this code it will give results as per your requirement.</p>
<pre><code><?php
/*
Template Name: Genre
*/
get_header(); ?>
<div class="content">
<div class="main-content">
<div class="main-container">
<div id="list_categories_categor... | how to display url taxonomy in loop taxonomy wordpress? | php|wordpress | 0 | 42 | 1 | 72,254,640 | 72,254,640 | 0 | true | 2022-05-16T05:33:05.533Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to display url taxonomy in loop taxonomy wordpress?<p>i have a custom taxonomy genre, i want to show all taxonomy in genre.php page. when I try to use th... |
72,255,367 | joining list of lines if they have mutual segments?<p>i have list of lines , each line is a list like this</p>
<pre><code>[firstpoint, secondpoint]
</code></pre>
<p>for example i have 4 lines like this:</p>
<pre><code>listoflines = [[0,2],[1,3],[2,5],[6,7]]
</code></pre>
<p>so as you see some lines have mutual segments... | <p>Your solution is appending the result of the JOINLINES function.</p>
<p>It is not considering that the next item could also be a mutual segment.</p>
<p>Try this instead.
I have assumed a few things.</p>
<pre><code># assuming that the items in the list are ordered according to the first item in each sublist.
# This ... | joining list of lines if they have mutual segments? | python|list|join | 0 | 42 | 1 | 72,255,768 | 72,255,768 | 0 | true | 2022-05-16T07:11:26.720Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
joining list of lines if they have mutual segments?<p>i have list of lines , each line is a list like this</p>
<pre><code>[firstpoint, secondpoint]
</code></... |
72,243,203 | How to divide by infinity in MathCAD<p>Could anyone recommend a proper way to work with infinite values in MathCAD? For example when calculating resistances. If I use the infinity constant I get a floating point error.</p>
<pre><code>w := 314.159 s^-1
C := \infinity F
X.C := 1/wC
</code></pre>
<p>I have to use large v... | <p>I think the Infinit is symbolic concept. Try to use symbolic calculations like that:</p>
<p><a href="https://i.stack.imgur.com/7rSRa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7rSRa.png" alt="enter image description here" /></a></p>
<p>In my practice if I know that number may be too small I a... | How to divide by infinity in MathCAD | mathcad | 0 | 42 | 1 | 72,259,813 | 72,259,813 | 0 | true | 2022-05-14T19:12:19.190Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to divide by infinity in MathCAD<p>Could anyone recommend a proper way to work with infinite values in MathCAD? For example when calculating resistances.... |
72,251,080 | Shiny - avoid overlapped titlePanel<p>I'd like to fix a titlePanel on top of my app windows (position:fixed).
But the latter get overlaid by the below mainpanel when scrolling down.
Any thought on how to keep the titlePanel above other panels ?
(or any other solution leading to a nice header with styling features - eg.... | <p>This should do it:</p>
<pre class="lang-r prettyprint-override"><code>library(shiny)
library(readr)
text <- read_file(file.path(R.home("doc"), "AUTHORS"))
shinyApp(
ui = fluidPage(
titlePanel(h1(
id="title", "Fixed title that I'd like not to be overlapp... | Shiny - avoid overlapped titlePanel | r|shiny | 0 | 42 | 1 | 72,265,930 | 72,265,930 | 0 | true | 2022-05-15T18:22:48.090Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Shiny - avoid overlapped titlePanel<p>I'd like to fix a titlePanel on top of my app windows (position:fixed).
But the latter get overlaid by the below mainpa... |
72,267,247 | Is the sharp+something format common in bash?<p>This may be a duplicate or too naive a question but I couldn't find the proper keywords to search on Google. I'm learning from some example bash scripts for jobs using SGE and SLURM and I couldn't completely figure out the logic behind this. In a script for SGE, we have</... | <p>This is very specify to how resource managers like Slurm, PBS, SGE, etc. work and you should not expect other software to work like that.</p>
<p>As for the equal sign, that question is more generic and applies to most Linux software, you will find a good answer <a href="https://unix.stackexchange.com/questions/57337... | Is the sharp+something format common in bash? | linux|bash|slurm|sungridengine | 1 | 42 | 1 | 72,270,130 | 72,270,130 | 0 | true | 2022-05-17T01:30:48.580Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is the sharp+something format common in bash?<p>This may be a duplicate or too naive a question but I couldn't find the proper keywords to search on Google. ... |
72,265,759 | Can't seem to scrape specific information from webpage?<p>I'm attempting to scrape some information for each item displayed on the following page:
<a href="https://www.finewineandgoodspirits.com/webapp/wcs/stores/servlet/CatalogSearchResultView?storeId=10051&catalogId=10051&langId=-1&categoryId=1351370&... | <p>I guess that the best approach here is to inspect the network traffic and query the API directly. Eg for above url there is some <code>POST</code> request against an API at <code>https://www.finewineandgoodspirits.com/webapp/wcs/stores/servlet/CategoryProductsListingView</code>.</p>
<p>I can use that to get a list o... | Can't seem to scrape specific information from webpage? | python|web-scraping|beautifulsoup | -1 | 42 | 1 | 72,271,701 | 72,271,701 | 0 | true | 2022-05-16T21:22:16.533Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Can't seem to scrape specific information from webpage?<p>I'm attempting to scrape some information for each item displayed on the following page:
<a href="h... |
72,270,161 | How to make fasttext's get_sentence_vector vector larger?<p>I have trained in unsupervised way fasttext model and now I am using <code>get_sentence_vector()</code> function to get vectors of sentences. But it outputs vectors with length 100. How could I make those vectors longer (300 values)? Is there any hyper paramet... | <p>As you can read in the <a href="https://fasttext.cc/docs/en/unsupervised-tutorial.html#advanced-readers-playing-with-the-parameters" rel="nofollow noreferrer">documentation</a>, if you want vectors with size 300, you have to train your unsupervised model, by setting <code>dim</code> parameter to 300.</p>
<pre><code>... | How to make fasttext's get_sentence_vector vector larger? | python|python-3.x|nlp|fasttext | 1 | 42 | 1 | 72,275,211 | 72,275,211 | 0 | true | 2022-05-17T07:56:25.473Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to make fasttext's get_sentence_vector vector larger?<p>I have trained in unsupervised way fasttext model and now I am using <code>get_sentence_vector()<... |
72,275,205 | Changing column value based on another column using vba in excel<p>I am trying to create a macro button that will help me update the the value in the AE column to "N" if the value in the same row of the H column is "REPO".</p>
<p>I am not sure why my code doesn't work properly and just seems to sele... | <p>Probably mistake due to one if these 3:</p>
<ul>
<li>Lack of <code>Trim()</code></li>
<li>Lack of <code>UCase()</code> (<code>Option Compare Text</code> is an alternative of this one)</li>
<li><code>Select()</code> is too slow and does not refer correctly to the worksheet (<a href="https://stackoverflow.com/question... | Changing column value based on another column using vba in excel | excel|vba | 1 | 42 | 1 | 72,275,368 | 72,275,368 | 0 | true | 2022-05-17T13:47:16.477Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Changing column value based on another column using vba in excel<p>I am trying to create a macro button that will help me update the the value in the AE colu... |
72,276,838 | Check if textbox contains specific decimal numbers<p>I'm doing a school project but we weren't really taught about complex parts like this, so I'm hoping someone can help me.</p>
<p>I want my program to check whether my textbox contains 0.1-0.4 decimal numbers when I click a button. If yes, a message box will show that... | <p>You can use a <a href="https://docs.microsoft.com/en-us/dotnet/visual-basic/language-reference/statements/select-case-statement" rel="nofollow noreferrer"><code>Select</code></a> statement once you have converted the TextBox's Text to a numeric value:</p>
<pre><code>Sub CheckDecimals(number As String)
If IsNume... | Check if textbox contains specific decimal numbers | vb.net|visual-studio | 0 | 42 | 1 | 72,277,280 | 72,277,280 | 0 | true | 2022-05-17T15:31:36.583Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Check if textbox contains specific decimal numbers<p>I'm doing a school project but we weren't really taught about complex parts like this, so I'm hoping som... |
72,282,604 | Multiprocessing queries new lines from a file<p>I'm trying to use Multiprocessing to speed-up times.The goal is; processes will queries into domain defined inside a text file. Upon executing; the multiprocesses just doing the same: every process queries from the first line instead of new lines per process. So the main ... | <p>You need to split <code>domainlist</code> up into <code>cpu_count()</code> sections, and pass each section to a different process.
You're also using the events incorrectly: currently, it will exit 3 seconds after any process finishes, regardless of whether the others are still working.
You should use a <code>Barrier... | Multiprocessing queries new lines from a file | python|python-3.x|multiprocessing | 0 | 42 | 1 | 72,282,989 | 72,282,989 | 0 | true | 2022-05-18T02:30:42.960Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Multiprocessing queries new lines from a file<p>I'm trying to use Multiprocessing to speed-up times.The goal is; processes will queries into domain defined i... |
72,285,393 | Regular expression that stops at first letter encountered<p>I want my regex expression to stop matching numbers of length between 2 and 10 after it encounters a letter.</p>
<p>So far I've come up with <code>(\d{2,10})(?![a-zA-Z])</code> this. But it continues to match even after letters are encountered.
<code>221610122... | <p>You can use the following .NET regex</p>
<pre class="lang-none prettyprint-override"><code>(?<=^\P{L}*)(?<!\d)\d{2,10}(?!\d)
(?<=^[^a-zA-Z]*)(?<!\d)\d{2,10}(?!\d)
</code></pre>
<p>See the <a href="https://regex101.com/r/I7KrAL/2" rel="nofollow noreferrer">regex demo</a>. <em>Details</em>:</p>
<ul>
<li><c... | Regular expression that stops at first letter encountered | c#|regex|regex-group | 2 | 42 | 2 | 72,285,562 | 72,285,562 | 0 | true | 2022-05-18T08:08:04.707Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Regular expression that stops at first letter encountered<p>I want my regex expression to stop matching numbers of length between 2 and 10 after it encounter... |
72,284,772 | PHP 7.4 form data returns empty string<p>I try to delete data from database</p>
<pre><code>if (isset($_POST['checkbox']) && isset($_POST['delete_btn'])) {
$productId = $_POST['id'];
$stmt = $database->prepare("DELETE FROM product WHERE id = :id");
$stmt->execute(array(':id' => $p... | <p>The reason for not getting any values is because you close the form immediately after the submit button. So no other data belongs to that form. Either put the button in the same form as the checkbox or vice versa.</p> | PHP 7.4 form data returns empty string | php | -2 | 42 | 2 | 72,285,663 | 72,285,663 | 0 | true | 2022-05-18T07:22:56.913Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
PHP 7.4 form data returns empty string<p>I try to delete data from database</p>
<pre><code>if (isset($_POST['checkbox']) && isset($_POST['delete_btn'... |
72,297,376 | Nested Div at Full Width Expands out of Bounds<p>I have a form centered in a main with flex. When I set the elements of the form to width 100% they extend past the max width of the form element:</p>
<p><img src="https://i.stack.imgur.com/ZZOoO.png" alt="Form Head and Text Extends Beyond Form Max Width" /></p>
<p><div c... | <p>As m4n0 commented, you need to set <code>box-sizing: border-box</code> on your form elements.</p>
<p><code><input></code> and <code><textarea></code> contain default <em>padding</em> and <em>borders</em>. The default behaviour when you declare <code>width: 100%</code> is that the content is 100% width an... | Nested Div at Full Width Expands out of Bounds | css | 0 | 42 | 1 | 72,298,167 | 72,298,167 | 0 | true | 2022-05-19T00:30:29.053Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Nested Div at Full Width Expands out of Bounds<p>I have a form centered in a main with flex. When I set the elements of the form to width 100% they extend pa... |
72,283,173 | EGit could not detect where Git is installed warning is coming even we are not use Git in our project in Eclipse rich client platform<p>We have desktop application which uses eclipse rich client platform(eclipse RCP) and when I run the application it always shows these Egit and home environment warnings even we are not... | <p>EGit is based on JGit and does not required the command line Git installed at all. I guess you talking about <a href="https://git.eclipse.org/c/egit/egit.git/commit/?id=7545e66c83f54777e06db05390854939e925fdce" rel="nofollow noreferrer">this warning that is shown when Git's system-wide settings cannot be found</a> (... | EGit could not detect where Git is installed warning is coming even we are not use Git in our project in Eclipse rich client platform | eclipse|eclipse-rcp|egit | 0 | 42 | 1 | 72,299,844 | 72,299,844 | 0 | true | 2022-05-18T04:21:43.367Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
EGit could not detect where Git is installed warning is coming even we are not use Git in our project in Eclipse rich client platform<p>We have desktop appli... |
72,300,527 | Oracle concatenate with conditions<p>I need to concatenate data from different column with comma in between. However, the column might also have null value, so the comma between is not needed anymore. Means that, it should have comma in between but if ADDR4 or ADDR5 has no data, then it should ignore the comma added</p... | <p>Include <code>CASE</code> (or <code>DECODE</code>), e.g.</p>
<pre><code>select addr1 || case when addr2 is not null then ','|| addr2 end
|| case when addr3 is not null then ','|| addr3 end
|| case when addr4 is not null then ','|| addr4 end
|| case when addr5 is not null then '... | Oracle concatenate with conditions | sql|oracle|plsql|concatenation | 0 | 42 | 2 | 72,300,589 | 72,300,589 | 0 | true | 2022-05-19T07:42:22.087Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Oracle concatenate with conditions<p>I need to concatenate data from different column with comma in between. However, the column might also have null value, ... |
72,295,868 | How to get the surround points of a specific centre point?<p>[Image representation of what I want, I need to find get the points that surround the middle point, I have no idea how to implement such a thing. It's my first project and I am trying to build a game. The surround points represent the area of which an effect ... | <p>I have validated if the locations of the surround area of the centre champion are out of bounds of the game board or not, here is the code:</p>
<pre class="lang-java prettyprint-override"><code>if (a.getCastArea() == AreaOfEffect.SURROUND) {
Point currentLoc = getCurrentChampion().getLocation();
... | How to get the surround points of a specific centre point? | java | 0 | 42 | 2 | 72,303,164 | 72,303,164 | 0 | true | 2022-05-18T20:54:04.300Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to get the surround points of a specific centre point?<p>[Image representation of what I want, I need to find get the points that surround the middle poi... |
72,308,068 | how to get all value in list in same time<p>following show the my list value (variable is "data")</p>
<pre><code>[{'letters': ['R', 'V', 'X', 'U', 'M', 'Z', 'B', 'O', 'R'],
'words': ['RVX', 'BOM', 'RUB', 'RUZ', 'MBOOO', 'RMR'],
'score': 51},
{'letters': ['P', 'X', 'M', 'R', 'D', 'S', 'I', 'C', 'E'],
'w... | <p>Is this what you are trying to accomplish?</p>
<pre><code>print(*data, sep=",\n")
</code></pre>
<p>That will put your items on separate lines, with commas after all but the last.</p> | how to get all value in list in same time | python | -1 | 42 | 2 | 72,308,178 | 72,308,178 | 0 | true | 2022-05-19T16:29:08.450Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to get all value in list in same time<p>following show the my list value (variable is "data")</p>
<pre><code>[{'letters': ['R', 'V', 'X', 'U', ... |
72,310,459 | SQL error message: ORA-00907: missing right parenthesis<pre><code>CREATE TABLE visitors
(
V_ID NUMBER(6)
CONSTRAINT pk_visitors_V_ID PRIMARY KEY,
V_FN VARCHAR2(15) NOT NULL,
V_LN VARCHAR2(15) NOT NULL,
V_Contact NUMBER(10) NOT NULL,
V_Address CHAR(10) NOT NULL,
DoB DATE NOT NULL,
... | <p>That error is for missing comma after <code>Covid_Vaccine</code> column declaration. But after correcting this you will get <code>invalid identifier</code> error since <code>date</code> is reserve word . So I have changed the column name to ColDate.
You will face another error <code>ORA-02253: constraint specificati... | SQL error message: ORA-00907: missing right parenthesis | sql|oracle | 0 | 42 | 2 | 72,310,597 | 72,310,597 | 0 | true | 2022-05-19T20:01:25.083Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SQL error message: ORA-00907: missing right parenthesis<pre><code>CREATE TABLE visitors
(
V_ID NUMBER(6)
CONSTRAINT pk_visitors_V_ID PRIMARY KE... |
72,311,603 | How could I import AngularFirestoreModule correctly?<p><a href="https://i.stack.imgur.com/yiiox.png" rel="nofollow noreferrer">import problem</a></p>
<p>I've tried to import AngularFirestoreModule but it doesn't want to work</p> | <p>The module is <a href="https://github.com/angular/angularfire/blob/b34b2188356c93cf3ad2a9495d145927a2a79ede/docs/firestore/offline-data.md?plain=1#L16" rel="nofollow noreferrer">exported</a> by <code>@angular/fire/compat/firestore</code>, so:</p>
<pre class="lang-js prettyprint-override"><code>import { AngularFirest... | How could I import AngularFirestoreModule correctly? | angular|firebase|api|google-cloud-firestore|import | 0 | 42 | 1 | 72,312,067 | 72,312,067 | 0 | true | 2022-05-19T22:11:53.940Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How could I import AngularFirestoreModule correctly?<p><a href="https://i.stack.imgur.com/yiiox.png" rel="nofollow noreferrer">import problem</a></p>
<p>I've... |
72,312,889 | Why does this code display a blank screen when running?<p>Before displaying the code, here are the things that I checked to avoid similar answers :</p>
<ul>
<li><p>android:extratNativeLibs="true"</p>
</li>
<li><p>Jsonfile firebase connected</p>
</li>
<li><p>routegenerator and initialroute checked in the main ... | <p>Warp your <code>FractionallySizedBox</code> with <code>Expanded</code></p>
<pre><code> Expanded(
child: FractionallySizedBox(
widthFactor: 0.15,
heightFactor: 0.15,
child: Image.asset('assets/crown.png')),
),
... | Why does this code display a blank screen when running? | android|firebase|flutter|dart | 0 | 42 | 1 | 72,312,930 | 72,312,930 | 0 | true | 2022-05-20T02:16:59.943Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why does this code display a blank screen when running?<p>Before displaying the code, here are the things that I checked to avoid similar answers :</p>
<ul>
... |
72,309,546 | Django Rest Framework can't add nested obejct<p>I'm quite new in drf and I'm trying to display nested objects and have the choices functionality in the ListCreateView at the same time</p>
<p><strong>models.py</strong></p>
<pre><code>class CarBrand(SoftDeletionModel):
CAR_BRAND_NAME_MAX_LEN = 30
name = models.Ch... | <p>I'm not really good in django, but I'm trying to answer this question.</p>
<p>To do this, you simply have to :</p>
<p>Add one class to your serializers.py</p>
<p><strong>serializers.py</strong></p>
<pre><code>...
class FullCarModelSerializer(serializers.ModelSerializer):
car_brand = IdAndNameCarBrandSerializer(... | Django Rest Framework can't add nested obejct | python|django|rest|django-rest-framework | 1 | 42 | 1 | 72,312,967 | 72,312,967 | 0 | true | 2022-05-19T18:35:01.750Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Django Rest Framework can't add nested obejct<p>I'm quite new in drf and I'm trying to display nested objects and have the choices functionality in the ListC... |
72,292,099 | Display User Data From Map String Dynamic Using Provider<p>I am trying to Display Data on another Page I am Using provider to get the user data and put it to my model like this:</p>
<pre><code> getUserData() async {
User user = FirebaseAuth.instance.currentUser!;
String value = user.uid;
return usersFirebaseReference.d... | <p>I got it it is a mistake from me, I am trying to get current user id from firestore but it saved with it own document id, I solved it by saving the document id with the user id at signup.</p> | Display User Data From Map String Dynamic Using Provider | firebase|flutter|dart|google-cloud-firestore | 0 | 42 | 1 | 72,317,654 | 72,317,654 | 0 | true | 2022-05-18T15:35:47.230Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Display User Data From Map String Dynamic Using Provider<p>I am trying to Display Data on another Page I am Using provider to get the user data and put it to... |
72,317,704 | EDITING ONE FOR ALL<p>how to make it so that if you change the value from true to false or vice versa in one place, all others change.
class Ralevant default is True
class Rooms default is True
class Registration value changes
and if in the registration class you change from true to false, then the Room class and Ralev... | <p>You can implement it in your <code>views.py</code> or in your <code>serializers.py</code>, simple import model and update <code> Model.objects.filter(pk=obj.pk).update()</code> something like that</p> | EDITING ONE FOR ALL | python|django | 0 | 42 | 2 | 72,317,846 | 72,317,846 | 0 | true | 2022-05-20T10:51:45.827Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
EDITING ONE FOR ALL<p>how to make it so that if you change the value from true to false or vice versa in one place, all others change.
class Ralevant default... |
72,317,960 | join two dataframes after a specific column but showing no index<p>I am converting my date into matlab datenum and saving values in text file. then I am reading that csv and trying to add those values in existing dataframe after id column. I can direct add it at the end or as a 1st column but I can't add it after a spe... | <p>If you are looking to just re-arrange your dataframe columns after concat you can do,</p>
<pre><code>column_order = ['id', 'datenum', 'A', 'B', 'C']
df = df[column_order]
</code></pre> | join two dataframes after a specific column but showing no index | python|pandas | 0 | 42 | 1 | 72,318,387 | 72,318,387 | 0 | true | 2022-05-20T11:09:33.160Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
join two dataframes after a specific column but showing no index<p>I am converting my date into matlab datenum and saving values in text file. then I am read... |
72,317,973 | sort array of object based on data inside array<p>let say I have array like following</p>
<pre><code>[
{
id:"1",
name: "satu",
data: [
{
id: "1.a",
last_update: "07:00:00",
value: 12
... | <p>I solved it, here is working solution.</p>
<p>first of sort the <code>data</code> array inside each object</p>
<pre><code>data.sort((a, b) => Date.parse(b.last_update) - Date.parse(a.last_update))
</code></pre>
<p>then sort the main array</p>
<pre><code>main.sort(a, b) => Date.parse(b.data[0].last_update) - Da... | sort array of object based on data inside array | javascript | -2 | 42 | 2 | 72,318,498 | 72,318,498 | 0 | true | 2022-05-20T11:10:12.813Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
sort array of object based on data inside array<p>let say I have array like following</p>
<pre><code>[
{
id:"1",
name: "sa... |
72,319,847 | How to free agents from a wait block based on same value of a integer parameter<p>I have agents (of type <code>Segment</code>) with parameter <code>ring</code> (of type <code>int</code>). I want to release my agents when three rings with equal <code>ring</code> parameter have entered the <code>wait</code> block. For ex... | <p>While this article does not directly answer your question, it has enough information to help you do what you need to do:</p>
<p><a href="https://noorjax.com/2019/07/02/dynamic-batches/" rel="nofollow noreferrer">https://noorjax.com/2019/07/02/dynamic-batches/</a></p>
<p>The idea is that on each arrival, you will nee... | How to free agents from a wait block based on same value of a integer parameter | anylogic | 0 | 42 | 1 | 72,319,920 | 72,319,920 | 0 | true | 2022-05-20T13:35:01.157Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to free agents from a wait block based on same value of a integer parameter<p>I have agents (of type <code>Segment</code>) with parameter <code>ring</cod... |
72,322,240 | Can PWA listen in on OS events?<p>To my knowledge, it's not possible for a regular website to have access to operating system level stuff.</p>
<p>In theory, PWA does have the capability to access system level stuff. However, I think that PWA are restricted according to what the browser support. I know that there isn'... | <p>There are things like File System API's that allow a PWA to request access to local files or apps. I have yet to find one that listens to events from the OS</p> | Can PWA listen in on OS events? | operating-system|progressive-web-apps|event-listener | 0 | 42 | 1 | 72,322,318 | 72,322,318 | 0 | true | 2022-05-20T16:43:24.843Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Can PWA listen in on OS events?<p>To my knowledge, it's not possible for a regular website to have access to operating system level stuff.</p>
<p>In theory, ... |
72,323,483 | kafka producer reading events from wikipedia in Java<p>I'm quite new to Kafka and as one of my first projects I'm trying to create a kafka producer in Java which will read events from Wikipedia/Wikimedia and post them to relevant topics.</p>
<p>I'm looking at <a href="https://wikitech.wikimedia.org/wiki/Event_Platform/... | <p>Spring just wraps the native Kafka libraries to ease development and configuration. It is not required, and so, yes, you can essentially do the same that they do, but with less overhead.</p>
<blockquote>
<p>mainly rely on events created locally on my machine</p>
</blockquote>
<p>Because that is easier to demo, and a... | kafka producer reading events from wikipedia in Java | java|apache-kafka | 0 | 42 | 1 | 72,323,675 | 72,323,675 | 0 | true | 2022-05-20T18:37:42.540Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
kafka producer reading events from wikipedia in Java<p>I'm quite new to Kafka and as one of my first projects I'm trying to create a kafka producer in Java w... |
72,324,403 | Loop to remove inverted commas (") in a dataset in bash<p>I would like to find a way to use an iterative loop (for or while) to remove quotes (") from a dataset like the following:</p>
<pre><code>",great britain,"America"
</code></pre>
<p>I know that there is the following way to remove them, which ... | <p>You can use <code>while read -r</code> to read the lines. Use Parameter Expansion to remove the double quotes.</p>
<pre><code>while read -r line ; do printf '%s\n' "${line//\"}" ; done < input
</code></pre> | Loop to remove inverted commas (") in a dataset in bash | bash|for-loop|ubuntu|while-loop | -1 | 42 | 1 | 72,324,470 | 72,324,470 | 0 | true | 2022-05-20T20:17:02.440Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Loop to remove inverted commas (") in a dataset in bash<p>I would like to find a way to use an iterative loop (for or while) to remove quotes (") from a... |
72,324,966 | How to ignore values that are not repeated in Python Counter<p>I need to make sure that the answer in the first case does not output the value of the count_value.</p>
<pre class="lang-py prettyprint-override"><code>from collections import Counter
def duplicate_count(text):
count, value, count_value = len(set([i fo... | <p>is this what you are looking for?</p>
<pre><code>def duplicate_count(text):
tlower = text.lower()
count = set([(i, tlower.count(i)) for i in tlower if tlower.count(i) >= 2])
chars = ' and '.join([i[0] for i in count])
if count:
return f'->{len(count)} # {chars} повторилось {max(i[1] for... | How to ignore values that are not repeated in Python Counter | python | -1 | 42 | 1 | 72,326,024 | 72,326,024 | 0 | true | 2022-05-20T21:32:09.923Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to ignore values that are not repeated in Python Counter<p>I need to make sure that the answer in the first case does not output the value of the count_v... |
72,327,352 | Regex to get part of the string after dot and before hyphen?<p>I'm new to regex and have tried to get the regex expression in Python for the following string but still no luck. Just wondering if anyone know the best regex to get <strong>group1</strong> from:</p>
<pre><code>test-50.group1-random01.ab.cd.website.com
</co... | <p>You can just do it with <code>str.split</code></p>
<pre><code>s = "test-50.group1-random01.ab.cd.website.com"
after_first_dot = s.split(".", maxsplit=1)[1]
before_hyphen = after_first_dot.split("-")[0]
print(before_hyphen) # group1
</code></pre>
<hr />
<p>With a regex, take what is b... | Regex to get part of the string after dot and before hyphen? | python|regex | 0 | 42 | 1 | 72,327,389 | 72,327,389 | 0 | true | 2022-05-21T06:57:01.700Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Regex to get part of the string after dot and before hyphen?<p>I'm new to regex and have tried to get the regex expression in Python for the following string... |
72,327,945 | How to get specific property from contact form 7 (WordPress) object?<p>I am very new to programming and I would like to extract and save the email address of the person who use my contact form 7.</p>
<p>I am able to extract the contact form id by using</p>
<pre><code>function action_wpcf7_mail_failed( $contact_form ) {... | <p>please add this to your function:</p>
<pre><code> $submission = WPCF7_Submission::get_instance();
$posted_data = $submission->get_posted_data();
</code></pre>
<p>the <code>$posted_data</code> variable hold all values you need.</p> | How to get specific property from contact form 7 (WordPress) object? | wordpress|contact-form-7 | 1 | 42 | 1 | 72,327,997 | 72,327,997 | 0 | true | 2022-05-21T08:39:20.620Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to get specific property from contact form 7 (WordPress) object?<p>I am very new to programming and I would like to extract and save the email address of... |
72,280,098 | Music Bot FFmpeg/avconv DiscordJS13<p><code>FFmpeg/avconv not found!</code> Can someone help me how to fix this? Also can someone give me the proper way to install this. Thank you.</p> | <p>you can do <em><code>npm i ffmpeg-static</code></em></p>
<p>If the problem is not resolved, you can download and install the setup file manually. <a href="http://ffmpeg.org/download.html" rel="nofollow noreferrer">http://ffmpeg.org/download.html</a></p> | Music Bot FFmpeg/avconv DiscordJS13 | discord.js | -2 | 42 | 1 | 72,330,241 | 72,330,241 | 0 | true | 2022-05-17T20:09:23.957Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Music Bot FFmpeg/avconv DiscordJS13<p><code>FFmpeg/avconv not found!</code> Can someone help me how to fix this? Also can someone give me the proper way to i... |
72,329,794 | How to order a list of maps in dart<p>I'm supposed to order a list of maps and I've tried everything I can think of, no breakthrough.</p>
<p>Here's my code:</p>
<pre><code>var orgs = [
{"name": "Google", "category": "Search Engine"},
{"name": "Facebook", &... | <p>The solution is defining the array as a list of maps</p>
<pre><code>
List<Map<String, dynamic>> orgs = [
{"name": "Google", "category": "Search Engine"},
{"name": "Facebook", "category": "Social Media"},
{"name&quo... | How to order a list of maps in dart | flutter|dart | 0 | 42 | 3 | 72,332,544 | 72,332,544 | 0 | true | 2022-05-21T12:59:18.073Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to order a list of maps in dart<p>I'm supposed to order a list of maps and I've tried everything I can think of, no breakthrough.</p>
<p>Here's my code:<... |
72,337,417 | Intersections of given sets with repeat of elements<p>Logic to count intersections in a given set is correct for no repetitive pattern, but for this set, the output count is wrong.</p>
<pre><code>int a[] = {1,1,1,2};
int b[] = {1,1,2,2,3};
int count = 0;
for(int i=0;i<a.length;i++) {
for(int j =0;j<b.length;j++){... | <p>Try the following code. I use Math.min() for the second statement of for-loop to avoid IndexOutOfBounds error</p>
<pre><code>public static void main(String[] args) {
int a[] = {1,1,1,2};
int b[] = {1,1,2,2,3};
int count = 0;
int min_len = Math.min(a.length, b.length);
for(int i=0;i< min_l... | Intersections of given sets with repeat of elements | java | -2 | 42 | 2 | 72,337,482 | 72,337,482 | 0 | true | 2022-05-22T12:04:01.163Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Intersections of given sets with repeat of elements<p>Logic to count intersections in a given set is correct for no repetitive pattern, but for this set, the... |
72,339,059 | Trying to setup unit stats based off a class in another script using objects name as a filter. (Unity)<p>I'm new to coding games, so my logic may not be right for creating stats.</p>
<p>Quick intro: I'm creating a game that spawns units at the players command that go fight other units. To store all the different units ... | <p>Searching by class name does not make sense because your class name may not have a health attribute. Then it will error the compiler. You need another logic. If you want to have different entities in the game, all you have to do is inherit them from the Entity class and then customize the variables. Finally prefab t... | Trying to setup unit stats based off a class in another script using objects name as a filter. (Unity) | c#|unity3d | 2 | 42 | 1 | 72,339,478 | 72,339,478 | 0 | true | 2022-05-22T15:43:28.417Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Trying to setup unit stats based off a class in another script using objects name as a filter. (Unity)<p>I'm new to coding games, so my logic may not be righ... |
72,341,527 | Running Into a Object Null Error Building Bug Tracker<p>I am building an Bug Tracker with Asp.Net following a self paced online course. I'm running into an 'Object not set to a reference error" while attemping to list out Tickets assigned to each project in my Project Details View. I know information isn't being p... | <p>In your project service, you aren't <code>Include</code>-ing the ticket status so it will be null. Try something like this instead:</p>
<pre><code>Project project = await _context.Projects
.Include(p => p.Tickets)
.ThenInclude(t => t.TicketStatus) // <-- add this line
.Include(p => p.Memb... | Running Into a Object Null Error Building Bug Tracker | c#|.net-core|asp.net-core-mvc | -1 | 42 | 1 | 72,341,624 | 72,341,624 | 0 | true | 2022-05-22T21:53:39.557Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Running Into a Object Null Error Building Bug Tracker<p>I am building an Bug Tracker with Asp.Net following a self paced online course. I'm running into an '... |
72,342,940 | Printing numers without using PHP inbuild functions<pre><code>$numbers = array(3,5,6,7,8,11);
$missing = array();
for ($i = 3; $i < 11; $i++) {
if (!in_array($i, $numbers)){
$missing[] = $i;
}
}
</code></pre>
<p>I want to find the missing numbers from <code>3</code> to <code>11</code> without using P... | <p>Use <code>foreach</code> loop inside on <code>$numbers</code> and check for the value of <code>$i</code>. Declare a flag variable, say <code>$found</code> to <code>false</code>. While looping inside if we get the number, set <code>$found</code> to <code>true</code> and exit the loop. In the end, if <code>$found</cod... | Printing numers without using PHP inbuild functions | php | 0 | 42 | 2 | 72,343,470 | 72,343,470 | 0 | true | 2022-05-23T03:17:50.953Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Printing numers without using PHP inbuild functions<pre><code>$numbers = array(3,5,6,7,8,11);
$missing = array();
for ($i = 3; $i < 11; $i++) {
if (!i... |
72,341,306 | trigger to compare a new entry with previous entries from a column in sql<p>im trying to build an app on apex oracle for a school project, but first i need some functionalities. one of them is a trigger. i want to compare a new entry with previous entries from a column from a table. if the entry is there, will display ... | <p>It seems you simply need a count function to count the no of orders -</p>
<pre><code>create or replace TRIGGER client_check
BEFORE INSERT
ON ORDERS
for each row
DECLARE
new_client number := 0;
BEGIN
select COUNT(CLIENT_ID)
into new_client
from ORDERS
where CLIENT_ID = :new.CLIENT_ID;
if new_client > 0
... | trigger to compare a new entry with previous entries from a column in sql | database|oracle|plsql | 0 | 42 | 1 | 72,345,655 | 72,345,655 | 0 | true | 2022-05-22T21:07:55.893Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
trigger to compare a new entry with previous entries from a column in sql<p>im trying to build an app on apex oracle for a school project, but first i need s... |
72,328,830 | NullPointerException and OneToMany Eager Fetch<p>In a Service I want to set the betrag for a BudgetGeschaeftfeld.
After setting the Betrag, a method of budgetPlan which is Fetch.Eager should be called to update its own Betrag. However I get a NullPointerException</p>
<blockquote>
<p>java.lang.NullPointerException: Cann... | <p>The answer was</p>
<pre><code>@JsonIgnore
@ManyToOne( fetch=FetchType.Lazy,
cascade=CascadeType.PERSIST)
@JoinColumn(name="pid")
@ToString.Exclude
private BudgetPlan budgetPlan;
</code></pre>
<p>and then getting the budgetplan before calling the method</p>
<pre><code>public void setBetrag(Double betrag... | NullPointerException and OneToMany Eager Fetch | spring-boot|hibernate|jpa | -1 | 42 | 2 | 72,346,914 | 72,346,914 | 0 | true | 2022-05-21T10:46:51.070Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
NullPointerException and OneToMany Eager Fetch<p>In a Service I want to set the betrag for a BudgetGeschaeftfeld.
After setting the Betrag, a method of budge... |
72,352,322 | Class behavior based on given data<p>I am receiving an IFormFile from a controller.
What I want to do next is to process it and get its content. I expect to get .docx, .txt or .pdf file and I want a single class to process any of these files based on extension given. I created and made my class to do it like that:</p>
... | <p>Create a new interface</p>
<pre class="lang-cs prettyprint-override"><code>interface IDocumentParser {
string GetContent(IFormFile file);
}
</code></pre>
<p>Implement that interface once per parser extension, e.g.:</p>
<pre class="lang-cs prettyprint-override"><code>class TextFileParser : IDocumentParser {
p... | Class behavior based on given data | c#|asp.net-core|design-patterns|review | -1 | 42 | 1 | 72,352,507 | 72,352,507 | 0 | true | 2022-05-23T17:05:20.510Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Class behavior based on given data<p>I am receiving an IFormFile from a controller.
What I want to do next is to process it and get its content. I expect to ... |
72,358,810 | SQL sum of negative values until condition (positive value is seen) is met, then restart the summation<p>I would like to get the total of negative row values until there is a positive value (here column change in table below).
After another negative value in the column, the sum should start accumulating the negative ro... | <p>This is a gaps and islands problem, where each island is defined by having the same <code>id</code> along with streak of negative numbers. Here is one approach:</p>
<pre class="lang-sql prettyprint-override"><code>WITH cte AS (
SELECT *, SUM(change > 0) OVER (PARTITION BY id ORDER BY start_time) grp
FROM... | SQL sum of negative values until condition (positive value is seen) is met, then restart the summation | mysql|sql|sum | 0 | 42 | 1 | 72,358,928 | 72,358,928 | 0 | true | 2022-05-24T07:28:19.443Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SQL sum of negative values until condition (positive value is seen) is met, then restart the summation<p>I would like to get the total of negative row values... |
72,359,328 | Generate Label by First occurrence<p>Below is a snapshot of my data frame, and I have a list of ID from 1 to N, with outcomes 1 or 0. What I am trying to do is to generate the Label and csum columns basic on the occurrence of the outcome in Python, how do I achieve this and loop through N Ids?</p>
<p>Label: the past 3 ... | <p>IIUC, you can use:</p>
<pre><code># identify the rows with a 1 in the next 3 rows (per group)
m = df[::-1].groupby('ID').rolling(3, min_periods=1)['Outcome'].max().droplevel(0)
# identify the rows where 0 restarts
df['Label'] = m.mask(m.eq(1), 'lab1')
group = (df['Label'].eq(0)&df['Label'].ne(df['Label'].shift(... | Generate Label by First occurrence | python|pandas|multilabel-classification|find-occurrences | 1 | 42 | 1 | 72,359,435 | 72,359,435 | 0 | true | 2022-05-24T08:07:15.093Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Generate Label by First occurrence<p>Below is a snapshot of my data frame, and I have a list of ID from 1 to N, with outcomes 1 or 0. What I am trying to do ... |
72,363,252 | second if statement returns result, first if statement doesn't<p>In the code below, the when check_result returns true, I want my program to terminate.
However, when check_result(p1) returns <code>True</code> the print statement prints, but the program carries on.</p>
<p>BUT if check_result(p2) returns <code>True</code... | <pre><code>while game_on:
p1_turn = int(input(f"Player 1, choose a number between 1 and 9\n"))
matrix[p1_turn - 1] = "X"
p1.append(p1_turn)
place_mark(matrix)
if check_result(p1):
print("Player 1 wins")
game_on = False
... | second if statement returns result, first if statement doesn't | python|debugging | 1 | 42 | 3 | 72,363,461 | 72,363,461 | 0 | true | 2022-05-24T12:52:25.643Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
second if statement returns result, first if statement doesn't<p>In the code below, the when check_result returns true, I want my program to terminate.
Howev... |
72,336,219 | lex:converting hex to dec<p>I am trying to build a simple lexical analysis with flex and bison, but I have a problem with converting hex to dec in my lexer.l.
Here are my codes.</p>
<blockquote>
<p>hex (0)([x]|[X])([0-9][A-Fa-f])+</p>
</blockquote>
<blockquote>
<p>{hex}{count++;printf("%d\t(hex,%s)\n",count,y... | <p>ohhh!I solved the problem! I just need to add two functions like c program and change the type of my output.</p>
<pre><code>{hex} {count++;printf("%d\t(hex,%d)\n",count,hextodec(yytext));}
{oct} {count++;printf("%d\t(oct,%d)\n",count,octtodec(atoi(yytext)));}
int octtodec(int oct){
int dec=0,... | lex:converting hex to dec | lex | 1 | 42 | 1 | 72,366,771 | 72,366,771 | 0 | true | 2022-05-22T09:17:01.643Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
lex:converting hex to dec<p>I am trying to build a simple lexical analysis with flex and bison, but I have a problem with converting hex to dec in my lexer.l... |
72,371,109 | .htaccess rewrite conditon after spesific url<p>I'm using apache2 and laravel so I put this code inside <code>.htaccess</code> on <code>/public</code> folder</p>
<pre><code>RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} ^/?(blog|dont/you|brave-to|fvck|me)$
RewriteRule ^(.*)$ http://%... | <p>OK So i got it use this condition</p>
<pre><code>RewriteEngine On
// check if not a file
RewriteCond %{REQUEST_FILENAME} !-f
// check if there start with blog/ and not end with /
RewriteCond %{REQUEST_URI} ^/(blog/.*)[^/]$ [OR]
// OR check if contain specific words
RewriteCond %{REQUEST_URI} ^/(blog|dont/you|brave-... | .htaccess rewrite conditon after spesific url | apache|.htaccess|mod-rewrite|url-rewriting | 0 | 42 | 1 | 72,372,802 | 72,372,802 | 0 | true | 2022-05-25T01:34:39.943Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
.htaccess rewrite conditon after spesific url<p>I'm using apache2 and laravel so I put this code inside <code>.htaccess</code> on <code>/public</code> folder... |
72,380,981 | Removing characters from a matrix column name<p>I have a large data matrix with thousands of columns.</p>
<p>The names look like this <code>PID.ZYT6.0926.SM.5GIEM</code> however I would like them to look like <code>PID-ZYT6</code>
So sub the first <code>.</code> for <code>-</code> and remove the everything from second ... | <p>Try this:</p>
<pre><code>colnames(df) = gsub("\\..*","", (sub("\\.", "-", colnames(df))))
</code></pre> | Removing characters from a matrix column name | r | 0 | 42 | 2 | 72,381,229 | 72,381,229 | 0 | true | 2022-05-25T16:05:55.857Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Removing characters from a matrix column name<p>I have a large data matrix with thousands of columns.</p>
<p>The names look like this <code>PID.ZYT6.0926.SM.... |
72,382,528 | Join 2 dataframes in pandas using join<p>I have two data frames df1 and df2</p>
<p>df1</p>
<pre><code>id name
ada1 mike
ad23 tom
cev2 tim
</code></pre>
<p>df2</p>
<pre><code> id month. sales
ada1. 1/11. 23
ada1. 4/11. 34
ad23. 3/12. 34
cev2. 4/11. 32
</code></pre>
<p>I need :</p>
<pre><code> ... | <p>Use <code>pd.merge</code>:</p>
<pre><code>>>> df2.merge(df1, on='id', how='left')
id month sales name
0 ada1 1/11 23 mike
1 ada1 4/11 34 mike
2 ad23 3/12 34 tom
3 cev2 4/11 32 tim
</code></pre> | Join 2 dataframes in pandas using join | python|pandas|dataframe|join | 0 | 42 | 3 | 72,382,595 | 72,382,595 | 0 | true | 2022-05-25T18:22:40.547Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Join 2 dataframes in pandas using join<p>I have two data frames df1 and df2</p>
<p>df1</p>
<pre><code>id name
ada1 mike
ad23 tom
cev2 tim
</code></pre... |
72,390,684 | Authentication with a password and access + refresh tokens<p>I am currently working on an App and just got the authentication API. And, I am a bit confused. Mainly about why the API uses a password when it also uses access and refresh tokens.</p>
<p>The API (for simplicity's sake) has four endpoints. <strong>/register<... | <p>I would like to start by saying, that different applications have different security requirements around authentication, so what is acceptable for some, might not be acceptable for others. Having said that, let's try to understand what is going on here:</p>
<ol>
<li>First of all, the thing you have named password is... | Authentication with a password and access + refresh tokens | security|authentication | 1 | 42 | 1 | 72,391,467 | 72,391,467 | 0 | true | 2022-05-26T10:55:49.790Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Authentication with a password and access + refresh tokens<p>I am currently working on an App and just got the authentication API. And, I am a bit confused. ... |
72,393,147 | Nested ListView in Qml<p>I am trying to achieve this output [Refer snapshot :
<a href="https://i.stack.imgur.com/UyiHz.png" rel="nofollow noreferrer">click here</a>]</p>
<p>I tried Using, since I am new to Qt not sure whether my approach of using repeater is right or wrong.</p>
<pre><code>ListView {
id: outer
model: mo... | <p>I have found the solution to my problem.
Obtained output <a href="https://i.stack.imgur.com/tpUm6.png" rel="nofollow noreferrer">click here</a></p>
<pre><code>Rectangle {
width: 360
height: 360
ListView {
id: outer
model: 4
delegate:
Rectangle {
i... | Nested ListView in Qml | c++|qt|qml | 0 | 42 | 1 | 72,401,259 | 72,401,259 | 0 | true | 2022-05-26T14:06:13.847Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Nested ListView in Qml<p>I am trying to achieve this output [Refer snapshot :
<a href="https://i.stack.imgur.com/UyiHz.png" rel="nofollow noreferrer">click h... |
72,397,705 | Get primal ray in Pyscipopt<p>If we are solving a linear program and the problem is unbounded, then is it possible to get a primal ray which leads to the unboundedness? I found this <a href="https://imada.sdu.dk/%7Emarco/Misc/PySCIPOpt/lp_8pxi_source.html#l00396" rel="nofollow noreferrer">pyscipopt.lp.getPrimalRay</a>.... | <p>There is a method in SCIP that gives you the values of the primal ray (if one exists) called <code>SCIPgetPrimalRayVal</code> which will give you the value for a certain variable. However, that method is not yet wrapped inside <code>PySCIPopt</code>.</p>
<p>You can easily do this yourself though (just do the same as... | Get primal ray in Pyscipopt | python|optimization|scip | 0 | 42 | 1 | 72,401,508 | 72,401,508 | 0 | true | 2022-05-26T20:29:18.467Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Get primal ray in Pyscipopt<p>If we are solving a linear program and the problem is unbounded, then is it possible to get a primal ray which leads to the unb... |
72,399,018 | How to arrange text for header, on one line<p>I have a project and I need some text to look like this on my website, I managed to put them on one line, but I can t separate them. How can I do it, what should I use?</p>
<p>Exemple:</p>
<p>Header link 1 link 2 link 3</p>
<p>(There is space between header and ... | <p>If the elements are on a single line, you can use display:flex and the gap property. If you want to pad only one element, give it a margin / padding property (depending on the situation)</p>
<blockquote>
<p><a href="https://coryrylan.com/blog/css-gap-space-with-flexbox" rel="nofollow noreferrer">https://coryrylan.co... | How to arrange text for header, on one line | html|css | -2 | 42 | 1 | 72,401,894 | 72,401,894 | 0 | true | 2022-05-26T23:27:45.860Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to arrange text for header, on one line<p>I have a project and I need some text to look like this on my website, I managed to put them on one line, but I... |
72,393,278 | Bind to ObsevableCollection not working in WINUI3 app<p>I am building a semi automatic administration platform to keep track of my daytrading.
With a python script I can get information out of the platform and through a pipe it gets to the app who passes it into a <code>SQLite</code> database.</p>
<p>Now I'm working on... | <p>I fixed it by changing the <code>DataBaseQueryToGUI()</code> function as follows:</p>
<pre class="lang-csharp prettyprint-override"><code>private async void DataBaseQueryToGUI() // Made it an async method.
{
await Task.Run(() => // Added
{
while (true)
... | Bind to ObsevableCollection not working in WINUI3 app | c#|windows|xaml|task|winui-3 | 0 | 42 | 1 | 72,406,579 | 72,406,579 | 0 | true | 2022-05-26T14:16:39.370Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Bind to ObsevableCollection not working in WINUI3 app<p>I am building a semi automatic administration platform to keep track of my daytrading.
With a python ... |
72,364,231 | How to ensure onblur event before ontouchstart<p>Our in-house web app uses onblur to capture user input and onmouseup to act on it. We had problems with the onblur event not always triggering before onclick, so I changed that to onmouseup (although, it would seem that onclick can be combined with onfocus to ensure the ... | <p>Fixed my case by using a Deferred object with when().done()
The application I'm supporting makes it hard to consolidate the click and onblur scripts into one, which would have made this easy. Instead I'm using a global Deferred object (with lots of utility code wrapped around it). This way the last action of the ont... | How to ensure onblur event before ontouchstart | javascript|ontouchstart | 0 | 42 | 1 | 72,438,433 | 72,438,433 | 0 | true | 2022-05-24T13:55:52.360Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to ensure onblur event before ontouchstart<p>Our in-house web app uses onblur to capture user input and onmouseup to act on it. We had problems with the ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.