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,380,447
TortoiseORM: custom queryset<p>In Django ORM, you can write a custom <code>QuerySet</code> class for your model and then use that queryset instead of a manager, so that you can then chain filtering methods like so:</p> <pre class="lang-py prettyprint-override"><code>Users.objects.active(False).created_before(a_month_ag...
<p>For now, I have found the following approach, which feels a bit hacky:</p> <pre class="lang-py prettyprint-override"><code>class EventQuerySet(QuerySet): def by_id(self, id) -&gt; Self: return self.filter(id=id) def by_name(self, name) -&gt; Self: return self.filter(name=name) class EventM...
TortoiseORM: custom queryset
python|tortoise-orm
0
50
1
72,383,068
72,383,068
0
true
2022-05-25T15:29:08.763Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: TortoiseORM: custom queryset<p>In Django ORM, you can write a custom <code>QuerySet</code> class for your model and then use that queryset instead of a manag...
72,384,416
create a function findItems<p>I have been learning Javascript for a few weeks now(mostly just arrays, functions, for loops and if statements). I have come across a problem that has stumped me and would greatly appreciate any kind of insight or breakdown of the problem.</p> <p>Here is the problem:</p> <pre><code>Create ...
<p>You should loop over the given array, then add any objects with the <code>type</code> field to a temporary array, then return the array. Something like this:</p> <pre class="lang-js prettyprint-override"><code>function findItems(arr, type) { let temp = []; for (let i = 0; i &lt; arr.length; i++) { co...
create a function findItems
javascript|arrays|function|for-loop
-1
50
1
72,384,463
72,384,463
0
true
2022-05-25T21:36:15.140Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: create a function findItems<p>I have been learning Javascript for a few weeks now(mostly just arrays, functions, for loops and if statements). I have come ac...
72,385,121
Update label continuously while accessing data from a for loop inside a button's callback function<p>I think this one is the kind of problem that will make me change much of my code.</p> <p>The program is basically a genetic algorithm that finds the best solutions of a given function and plots them over generations pas...
<p>While multi-threading can be a way out for tkinter apps, tkinter itself is not thread-safe, and events or calls into tkinter made from other threads may cause strange errors.</p> <p>This can be run in a single thread - the catch is that tkinter won't , by default, update anything on screen, until your long <code>run...
Update label continuously while accessing data from a for loop inside a button's callback function
python|tkinter
0
50
2
72,386,712
72,386,712
0
true
2022-05-25T23:28:51.910Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Update label continuously while accessing data from a for loop inside a button's callback function<p>I think this one is the kind of problem that will make m...
72,393,129
Flutter user not being able to log in from firebase<p>I am trying to build a log in and logout feature in flutter using firebase auth. I have created the UI and have even assigned controllers to the email and password. My project is also connected to firebase and all relevant packages installed. After I log in, a new p...
<p>This code should work.</p> <p>1 - Make sure the user is created in Firebase Console (authentication).</p> <p>2 - If you are not using Google SignIn, I suggest using the recent launched &quot;automatic&quot; Firebase configuration (instead of the manual). That will rule out any configuration issues you might have. Fi...
Flutter user not being able to log in from firebase
android|flutter|firebase|firebase-authentication
0
50
1
72,394,577
72,394,577
0
true
2022-05-26T14:04:58.650Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Flutter user not being able to log in from firebase<p>I am trying to build a log in and logout feature in flutter using firebase auth. I have created the UI ...
72,319,339
Expanded tree cache full when performing many queries<p>I am implementing a batch processing that needs to execute a high number of search queries in MarkLogic to find the documents to be modified. The query which I am using looks like this:</p> <pre><code>cts:search(/ch:haufe-document, cts:and-query(( cts:elemen...
<p>The solution I found is this: I modified the Java application such that it does not send all data to MarkLogic at once, but split it up into chunks of 10000 IDs. Now the error is gone. The downside is that the change is now done in several transactions, so the modifications become visible before everything is done. ...
Expanded tree cache full when performing many queries
marklogic|marklogic-10
3
50
3
72,401,977
72,401,977
0
true
2022-05-20T12:59:45.613Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Expanded tree cache full when performing many queries<p>I am implementing a batch processing that needs to execute a high number of search queries in MarkLog...
72,400,223
JQuery Datatables Ajax Datasource Error - Requested unknown parameter<p>I'm pretty stuck as to why I'm receiving this error from JQuery Datatables &quot;DataTables warning: table id=myTable - Requested unknown parameter '0' for row 0, column 0. For more information about this error, please see <a href="http://datatable...
<p>The main problem is you have placed your column definitions inside the <code>ajax</code> section of your DataTable. You need to move <code>columns</code> outside of that <code>ajax</code> option.</p> <p>Also, the Ajax response uses <code>leage</code> instead of <code>league</code> - I assume that is just a spelling ...
JQuery Datatables Ajax Datasource Error - Requested unknown parameter
javascript|jquery|datatables
1
50
1
72,405,965
72,405,965
0
true
2022-05-27T03:40:42.627Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: JQuery Datatables Ajax Datasource Error - Requested unknown parameter<p>I'm pretty stuck as to why I'm receiving this error from JQuery Datatables &quot;Data...
72,343,082
SOLVED - Nested PHP If-else doesn't working properly<p>I have registration and login system with codeigniter, all basic functions work fine.</p> <p>On how the verification works, it will check the condition of the account whether the account exists, the token has expired, the account has been activated, or the account ...
<p>I think there is some error in your syntax at</p> <pre><code>$cek_token = $this-&gt;db-&gt;get_where('users',array('token_email' =&gt; $token_email))-&gt;num_rows(); if ($cek_token == 1) { echo &quot;account not activated&quot;; } else { echo &quot;account already activated&quot;; } <...
SOLVED - Nested PHP If-else doesn't working properly
php|codeigniter|if-statement
0
50
1
72,373,051
72,373,051
0
true
2022-05-23T03:49:47.437Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: SOLVED - Nested PHP If-else doesn't working properly<p>I have registration and login system with codeigniter, all basic functions work fine.</p> <p>On how th...
72,347,130
Should I use AND or OR when combining two negative conditions?<p>Three vehicle types are <code>Car</code>, <code>Motorcycle</code> and <code>Bicycle</code>. Three statuses are <code>Available</code>, <code>Reserved</code> and <code>Sold</code>.</p> <p>I want to print the information of all vehicles that are <em>not</em...
<p>Your problem statement is... unclear. The statement</p> <blockquote> <p>I want to print the information of all vehicles that are not <code>Car</code> <strong>and</strong> are not <code>Sold</code>,...</p> </blockquote> <p>But the remainder of the problem statement:</p> <blockquote> <p>... i.e. sold cars should not b...
Should I use AND or OR when combining two negative conditions?
go|if-statement
-3
50
1
72,353,328
72,353,328
0
true
2022-05-23T10:36:26.293Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Should I use AND or OR when combining two negative conditions?<p>Three vehicle types are <code>Car</code>, <code>Motorcycle</code> and <code>Bicycle</code>. ...
72,374,471
How to remove UnderlineSpan() text using button click<p>I am trying things out by creating a small notepad project. And now i am having a hard time finding a solution to remove the underline on text. I can set it but i cant remove it.</p> <p>Heres my code:</p> <h2>Heres how i set it</h2> <h3>I use span to get the selec...
<p>If you want to remove all styling of the <code>text</code>, you could just use <code>toString()</code> on the <code>spannable</code> and it would remove everything.</p> <p>If you just want to remove the styling of a part of the <code>spannable</code>, just make an <code>anonymous object</code> of <code>UnderlineSpan...
How to remove UnderlineSpan() text using button click
android|kotlin
1
50
2
72,376,071
72,376,071
0
true
2022-05-25T08:43:29.277Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to remove UnderlineSpan() text using button click<p>I am trying things out by creating a small notepad project. And now i am having a hard time finding a...
72,392,163
Parsed the key and values from Json nested object output in Ansible<p>I am pulling the information from the device and saving as json and yaml format and the going through the data then parse and generate a csv file for specific key and value.</p> <p>Can you please help me to get these specific key/values (some key/val...
<p>use template module to create final csv:</p> <p>create a template file <code>csv.j2</code> in <code>templates</code> folder</p> <pre><code>OPER_ID, TYPE, TAG, DATA SIZE REQ, SRC ADDR, DEST ADDR, DEST PORT, FREQUENCY, PACKET COUNT, PACKET INTERVAL {% for k0 in json %} {% set oper_id = k0 %} {% set type = json[k0]['ty...
Parsed the key and values from Json nested object output in Ansible
python|json|python-3.x|parsing|ansible
1
50
1
72,396,068
72,396,068
0
true
2022-05-26T12:54:07.143Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Parsed the key and values from Json nested object output in Ansible<p>I am pulling the information from the device and saving as json and yaml format and the...
72,315,216
why take an typescript error with union type?<pre><code>interface Bird { age:string, eat:()=&gt;any } interface Fish { age:string, swim:()=&gt;any } type Pet = Fish | Bird; </code></pre> <p>this is ok, set a Pet type</p> <pre><code>const pet:Pet={ age:&quot;sd&quot;, eat:()=&gt;{} } </code></pre> <p>when ...
<p>From your code:</p> <pre><code>interface Bird { age:string, eat:()=&gt;any } interface Fish { age:string, swim:()=&gt;any } type Pet = Fish | Bird; </code></pre> <p>so objects of type <code>Pet</code>:</p> <ul> <li>definitely have attribute <code>age</code> because it's in both <code>Fish</code> and <code>B...
why take an typescript error with union type?
typescript
-2
50
1
72,316,475
72,316,475
0
true
2022-05-20T07:40:27.013Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: why take an typescript error with union type?<pre><code>interface Bird { age:string, eat:()=&gt;any } interface Fish { age:string, swim:()=&gt;any }...
72,349,904
Complex function to cut a different decimal places after comma<p>The input data for the program is JSON with BigDecimal value like this example: 345.0197 I have 2 problems:</p> <ol> <li>Some fields has to display different number of digits after comma:</li> </ol> <ul> <li>3 digits after comma like: 345.019</li> <li>2 d...
<p>Maybe something like this?</p> <pre><code>var decimal_places = 3 val value = 745.49.toBigDecimal() val part_a = value.toBigInteger() val part_b = value.subtract(BigDecimal(part_a)).toString().drop(2).take(decimal_places) </code></pre> <p>Or a more mathematical way:</p> <pre><code> val part_a = value.toBigIntege...
Complex function to cut a different decimal places after comma
java|kotlin
0
50
1
72,350,584
72,350,584
0
true
2022-05-23T14:03:04.157Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Complex function to cut a different decimal places after comma<p>The input data for the program is JSON with BigDecimal value like this example: 345.0197 I h...
72,348,293
Deletion in array implementation of queues reduces capacity?<p>In all queue array implementations I have seen, when they 'pop an element from front', they basically change the front tag of the queue to the next element. but then the capacity of the queue is technically reduced (since array is used). How hasn't this cau...
<p>You are right with your concern about the C++ implementation given in the article <a href="https://www.softwaretestinghelp.com/queue-in-cpp/" rel="nofollow noreferrer">https://www.softwaretestinghelp.com/queue-in-cpp/</a>. With that implementation, basically when you dequeue an element, the pointer to the &quot;firs...
Deletion in array implementation of queues reduces capacity?
c++|data-structures|queue
0
50
1
72,358,779
72,358,779
0
true
2022-05-23T12:09:03.917Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Deletion in array implementation of queues reduces capacity?<p>In all queue array implementations I have seen, when they 'pop an element from front', they ba...
72,248,400
Is there a way to change the color of your website when refreshing it?<p>I have made a website with one specific theme, is there a way to change the color of the background/text of the website when you refresh it? here is some code which can only change the background. How to make it so it will pick a theme with the te...
<p>if you want change color of background or text, use DOM to access this style and edit:</p> <pre><code>var bgcolorArr = new Array(&quot;silver&quot;, &quot;#BAF3C3&quot;, &quot;#c3baf3&quot;, &quot;red&quot;, &quot;green&quot;, &quot;blue&quot;) document.body.style.backgroundColor = bgcolorArr[Math.floor(Math.random(...
Is there a way to change the color of your website when refreshing it?
javascript|html|css|random
-1
50
2
72,248,477
72,248,477
0
true
2022-05-15T12:47:58.700Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is there a way to change the color of your website when refreshing it?<p>I have made a website with one specific theme, is there a way to change the color of...
72,248,115
QTextCursor disappears from view while editing QTableView cell<p>Here's an MRE:</p> <pre><code>import sys, time from PyQt5 import QtWidgets, QtCore, QtGui start_time = time.time_ns() def get_time(): return '{:.3f}'.format((time.time_ns() - start_time) / 1000000000.) class MainWindow(QtWidgets.QMainWindow): ...
<p>Musicamante explained to me in a discussion that the most relevant method for my purposes is <code>QTableView.scrollTo()</code>. Using that tip I changed the delegate's method <code>editor_text_changed</code> to the following:</p> <pre><code>def editor_text_changed(self, *args): print(f'{get_time()}: Delegate ed...
QTextCursor disappears from view while editing QTableView cell
scroll|pyqt5|qt5|qtableview|qtextedit
0
50
2
72,250,410
72,250,410
0
true
2022-05-15T12:09:04.540Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: QTextCursor disappears from view while editing QTableView cell<p>Here's an MRE:</p> <pre><code>import sys, time from PyQt5 import QtWidgets, QtCore, QtGui ...
72,367,391
Is there a function to convert coordinates to a list of coordinates creating a circular polygon?<p>Example code:</p> <pre><code>def circle_to_polygon(coordinates, radius, edge_count): list = [[1,2],[3,4],[5,6],[7,8],[9,10]] return list </code></pre> <p>Basically I need to create a polygon with a specific radius...
<p>Shapely - <a href="https://shapely.readthedocs.io/en/stable/project.html" rel="nofollow noreferrer">https://shapely.readthedocs.io/en/stable/project.html</a> ?<br /> You could create a <a href="https://shapely.readthedocs.io/en/stable/manual.html#points" rel="nofollow noreferrer">point</a>, add a <a href="https://sh...
Is there a function to convert coordinates to a list of coordinates creating a circular polygon?
python|math|geography
0
50
1
72,367,868
72,367,868
0
true
2022-05-24T17:55:05.393Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is there a function to convert coordinates to a list of coordinates creating a circular polygon?<p>Example code:</p> <pre><code>def circle_to_polygon(coordin...
72,258,411
How can I get a working corrplot for my data?<p>I am trying to get the corrplot for my data variables which are a combination of binary, continuous and categorical variables. However, when I run this code, it keeps giving me errors. The error when i load my data frame, called df2, is: Error in corrplot(df2) : The matri...
<p>If you have a table in which some columns are numeric and others are categorical, you can use the function <code>GGally::ggpairs</code> to get an overview about the associations between these variables:</p> <pre class="lang-r prettyprint-override"><code>library(GGally) #&gt; Loading required package: ggplot2 #&gt; R...
How can I get a working corrplot for my data?
r|dataframe|correlation|r-corrplot
0
50
1
72,269,555
72,269,555
0
true
2022-05-16T11:23:36.710Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I get a working corrplot for my data?<p>I am trying to get the corrplot for my data variables which are a combination of binary, continuous and categ...
72,275,380
Event Listener in Firestore doesn’t see field updates in documents inside collection. Android, Java<p>I have next firestore scheme: collection &quot;users&quot; - document user_id - collection &quot;trips&quot; - document trip_id - collection &quot;requests&quot; - document request_user_id with fields: and boolean fie...
<p>Your listener is only being added to documents where <code>accepted</code> is already set to 1. Remove <code>.whereEqualTo(&quot;accepted&quot;, 1)</code> when registering the listener, or change it to 0 to only listen to documents that have not been accepted yet.</p>
Event Listener in Firestore doesn’t see field updates in documents inside collection. Android, Java
java|android|google-cloud-firestore
0
50
1
72,275,706
72,275,706
0
true
2022-05-17T13:58:11.103Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Event Listener in Firestore doesn’t see field updates in documents inside collection. Android, Java<p>I have next firestore scheme: collection &quot;users&qu...
72,329,031
counting the number of sub palindroms in a string, including the string it self<p>I want to count the number of sub palindromes in a string and count also the string itself if it's a palindrome. Single letters are not palindromes.</p> <p>Example <strong>input</strong>: RRR</p> <p>The palindromes here are RRR, and twice...
<p>There are the following issues in your code:</p> <ul> <li><code>num_of_pol</code> is never incremented</li> <li>if the <code>while (i &lt;= j)</code> loop is entered, execution will never get out of it, because neither <code>i</code> nor <code>j</code> are modified in the loop. So this represents an infinite loop. I...
counting the number of sub palindroms in a string, including the string it self
python
0
50
1
72,338,444
72,338,444
0
true
2022-05-21T11:14:12.163Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: counting the number of sub palindroms in a string, including the string it self<p>I want to count the number of sub palindromes in a string and count also th...
72,305,912
How do I use a file with numbers on each line as an input (not a .txt file), do some calculations, then write the results into another file in pascal?<p>I am trying to make a program that will take a file called &quot;root.inp&quot; (file contains 3 integers) as its input, with each integer in a separate line, and then...
<p>The main problem is the semicolon after <code>while not eof (f) do</code> - this should be removed. The semicolon prevents the loop from running. Also, what is <code>file of input</code> and <code>input.firstnum</code>? Standard Pascal would have three separate <code>read</code> commands, one for each variable.</p>
How do I use a file with numbers on each line as an input (not a .txt file), do some calculations, then write the results into another file in pascal?
file-handling|pascal|calculation
0
50
2
72,314,142
72,314,142
0
true
2022-05-19T13:57:06.360Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I use a file with numbers on each line as an input (not a .txt file), do some calculations, then write the results into another file in pascal?<p>I am...
72,279,186
My VBA Macro crashes after changing one cell<p>I am trying to make a Macro to collect data from one sheet of the Workbook (it contains output from another system) and arrange the data to make it readable on another sheet. It has been a long time since I last did any coding, so I looked over many tutorials before build...
<p>If this line returns true <code>Do Until source.Range(&quot;A&quot; &amp; sourceI).Value = &quot;&quot;</code></p> <p>You never increment <code>invI = invI + 1</code></p> <p>That causes you to enter an infinite loop.</p> <p>Move the incrementer to after the <code>Loop</code></p> <pre><code> End Select ...
My VBA Macro crashes after changing one cell
excel|vba
0
50
1
72,279,311
72,279,311
0
true
2022-05-17T18:43:24.727Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: My VBA Macro crashes after changing one cell<p>I am trying to make a Macro to collect data from one sheet of the Workbook (it contains output from another sy...
72,278,908
Return of None not expected<p>I have a small function as follows:</p> <pre><code># Given the numerical value of a minute hand of a clock, return the number of degrees assuming a circular clock. # Raise a ValueError for values less than zero or greater than 59. def exercise_20(n): try: if n &lt; 0 or n &gt...
<p>your function should just raise the error. let the called to the catching:</p> <pre><code>def exercise_20(n): if n &lt; 0 or n &gt; 59: raise ValueError(&quot;Number supplied is less than 0 or greater than 59&quot;) return n * 6 for n in (-15, 30, 75, 30): print(f&quot;{n=}:&quot;, end=&quot; &q...
Return of None not expected
python|python-3.x
0
50
3
72,278,955
72,278,955
0
true
2022-05-17T18:18:47.433Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Return of None not expected<p>I have a small function as follows:</p> <pre><code># Given the numerical value of a minute hand of a clock, return the number o...
72,284,779
How to use order_by when using group_by in Dajngo-orm, and take out all fields<p>I used Django-orm,postgresql, Is it possible to query by group_by and order_by?</p> <p><strong>this table</strong></p> <pre><code> | id | b_id | others | | 1 | 2 | hh | | 2 | 2 | hhh | | 3 | 6 | h | | 4 | 7 | hi | | 5 | 7 | i | </code></p...
<p>Try window function and subquery in the following way:</p> <pre class="lang-py prettyprint-override"><code>from django.db.models import Window, F, Subquery, Count from django.db.models.functions import FirstValue queryset = A.objects.annotate(count=Count('b_id')).filter(pk__in=Subquery( A.objects.annotate( ...
How to use order_by when using group_by in Dajngo-orm, and take out all fields
python-3.x|django|postgresql|django-orm
1
50
2
72,299,550
72,299,550
0
true
2022-05-18T07:23:17.937Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to use order_by when using group_by in Dajngo-orm, and take out all fields<p>I used Django-orm,postgresql, Is it possible to query by group_by and order_...
72,286,255
Using Table 1 as Title column and Table 2 as Content columns<p>I have two tables:</p> <p>Table 1: Category Table</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>CatCode</th> <th>CatDesc</th> <th>Total</th> </tr> </thead> <tbody> <tr> <td>CAT0001</td> <td>Drinks</td> <td>22</td> </tr> <tr> <...
<ol> <li>Try this (tested on <a href="https://dbfiddle.uk/?rdbms=mysql_5.7&amp;fiddle=b95adea60a38840d70829ac5d9846b1b" rel="nofollow noreferrer">dbfiddle</a>)</li> </ol> <pre><code>SELECT catcode as code, catdesc as name, total as amount FROM ( SELECT catcode, catdesc, total, catcode AS catcode2 FROM category UNIO...
Using Table 1 as Title column and Table 2 as Content columns
mysql|sql
0
50
1
72,286,602
72,286,602
0
true
2022-05-18T09:08:48.947Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Using Table 1 as Title column and Table 2 as Content columns<p>I have two tables:</p> <p>Table 1: Category Table</p> <div class="s-table-container"> <table c...
72,253,470
How to add a single value in datagridview with c#?<p>I am trying to perform a database query, which should only bring me a single value, since I do a search by the product id, then when displaying the value in the griddataview it is not displayed, it is only displayed if I get all values from the database.</p> <p>In th...
<p>The error was that it does not return a list, that it is only a value, I only cast the value to type list</p> <pre><code>List&lt;Shoes&gt; shoe = new List&lt;Shoes&gt;(); Shoe data = execute_GetById(Convert.ToInt32(TxtId.Text)); shoe.Add(data); GrdBarcos.DataSource = data; </code></pre>
How to add a single value in datagridview with c#?
c#|.net-core|datagridview
0
50
2
72,369,160
72,369,160
0
true
2022-05-16T01:49:54.290Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to add a single value in datagridview with c#?<p>I am trying to perform a database query, which should only bring me a single value, since I do a search ...
72,257,057
How to check and wait previous file is completed and execute next files<p>system: Linux, Ubuntu</p> <p>I have several files needs to execute sequentially (to execute command iperf), I created a main.py file and imports these files, after all iperf done, need to reset setting (file: reset.py). And one of the file in the...
<p><s>You can try using <code>subprocess.run()</code> instead of <code>os.system()</code>. It blocks the execution until the process finishes.</p> <pre class="lang-py prettyprint-override"><code>import subprocess r = subprocess.run(['python3', 'getcpu.py']) print(r.returncode) </code></pre> <p><a href="https://docs.p...
How to check and wait previous file is completed and execute next files
python|linux
0
50
1
72,259,106
72,259,106
0
true
2022-05-16T09:34:47.297Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to check and wait previous file is completed and execute next files<p>system: Linux, Ubuntu</p> <p>I have several files needs to execute sequentially (to...
72,238,470
CSS Background Image using url() Not Displaying<p>I recently have being following this tutorial on youtube <a href="https://www.youtube.com/watch?v=FazgJVnrVuI" rel="nofollow noreferrer">https://www.youtube.com/watch?v=FazgJVnrVuI</a> and I am up to a part where I am adding images (around 1 hour in). I have tried every...
<p>I think the issue is both with the URL and linear-gradient or either of them. If your code is in main folder and images are in the images folder then URL should be <code>url('images/pic2.png')</code>. Also, try to change the linear gradient to test if it works.</p> <pre><code>background-image: linear-gradient(to rig...
CSS Background Image using url() Not Displaying
css
1
50
2
72,238,584
72,238,584
1
true
2022-05-14T08:20:15.777Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: CSS Background Image using url() Not Displaying<p>I recently have being following this tutorial on youtube <a href="https://www.youtube.com/watch?v=FazgJVnrV...
72,243,137
Async calls within setInterval where every next is dependent on previous<p>I have a <code>setInterval</code> setup which internally calls an API. Based on the api response I manage <code>previousState</code> &amp; <code>currentState</code> variables.</p> <p>I need to make sure that every next setInterval stuff happens ...
<p>Instead of setInterval, you could create an <code>sleep</code> function and then call the <code>fetchData</code> after its finished</p> <pre><code>let previous = null; let current = null; const fakeApi = () =&gt; { return new Promise((resolve) =&gt; setTimeout(resolve(1), 3000)); }; const sleep = (ms) =&gt; new P...
Async calls within setInterval where every next is dependent on previous
javascript|async-await|setinterval
0
50
2
72,243,314
72,243,314
1
true
2022-05-14T19:00:05.580Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Async calls within setInterval where every next is dependent on previous<p>I have a <code>setInterval</code> setup which internally calls an API. Based on th...
72,242,868
How to make this responsive layout<p>I can't get the right part to assume the center of the page while being constrained by the content of the left part.</p> <p>Does anyone have time to look into my problem?</p> <p>Here is an images 1: <a href="https://i.stack.imgur.com/r930m.png" rel="nofollow noreferrer"><img src="ht...
<p>This should be starting point for your case:</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-css lang-css prettyprint-override"><code> body { background-color: #eee; } .content...
How to make this responsive layout
html|css
0
50
1
72,244,137
72,244,137
1
true
2022-05-14T18:19:24.047Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to make this responsive layout<p>I can't get the right part to assume the center of the page while being constrained by the content of the left part.</p>...
72,244,847
Canvas fillstyle to make background blacker<p>Here is a <a href="https://codepen.io/StuckDuckF/pen/oNEYPQg" rel="nofollow noreferrer">codepen</a> of a simple OpenLayers map with an example overlay. My goal is to have essentially a dark mode OSM layer. I am currently using <a href="https://stackoverflow.com/questions/63...
<p>I have gotten acceptably close by using the following function on the basemap (OSM) <code>postcompose</code> event :</p> <pre class="lang-js prettyprint-override"><code>map.getLayers().getArray()[0].on('postcompose', function (evt) { evt.context.globalCompositeOperation = 'color'; evt.context.fillStyle = 'rg...
Canvas fillstyle to make background blacker
canvas|html5-canvas|openlayers
0
50
1
72,245,300
72,245,300
1
true
2022-05-15T00:58:44.187Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Canvas fillstyle to make background blacker<p>Here is a <a href="https://codepen.io/StuckDuckF/pen/oNEYPQg" rel="nofollow noreferrer">codepen</a> of a simple...
72,246,582
Is "foo === bar" equal to "if (foo === bar) {return true}"?<p>I know this question falls in the realm of &quot;basics&quot;, however I'd like to understand the inner workings of the language.</p> <p>My question is:<br /> Do operators <em>'return'</em> the expression's value by default after evaluation?<br /> 'return' a...
<p>There is a slight difference.</p> <p>foo===bar does not return anything, it only calculates a boolean value.</p> <p>You can combine this with a return statement, foo===bar to return true if foo == bar, and false otherwise.</p> <p>if (foo === bar){return true} ONLY returns true if the two are equal, it would return n...
Is "foo === bar" equal to "if (foo === bar) {return true}"?
javascript|syntax|operators
0
50
1
72,246,590
72,246,590
1
true
2022-05-15T08:11:28.947Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is "foo === bar" equal to "if (foo === bar) {return true}"?<p>I know this question falls in the realm of &quot;basics&quot;, however I'd like to understand t...
72,249,712
How to import vue components?<p>In a tutorial I have seen this way to import a component:</p> <p>export default { name: 'Home', components: { 'counter' :require('@/components/Counter.vue').default</p> <p>What would be the default way to do it?</p>
<p>You have 2 way to import component the first local if this components will be used in only one or 2 page you can import it like this</p> <pre><code>&lt;script&gt; import ButtonCounter from './ButtonCounter.vue' export default { components: { ButtonCounter } } &lt;/script&gt; </code></pre> <p>If this components wi...
How to import vue components?
vue.js
-1
50
1
72,250,199
72,250,199
1
true
2022-05-15T15:33:31.763Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to import vue components?<p>In a tutorial I have seen this way to import a component:</p> <p>export default { name: 'Home', components: { 'counter' :requ...
72,248,376
Pass FromHeader the httpClient to webapi 6.0<p>Below is the code, I have used to call the api. However, May I know how to pass http header</p> <p>for example Get customer has a header [FromHeader] field.</p> <p>string uri = &quot;https://localhost:7290/customers&quot;; var response = await _httpClient.GetAsync(uri);</p...
<p>HttpClient <code>GetAsync()</code> is a shortcut for generating an instance of a <code>HttpRequestMessage</code> set to perform a GET for the specified URI and passing it to the <code>SendAsync()</code> method.</p> <p>You can create your own request message instance and append additional details such as headers, the...
Pass FromHeader the httpClient to webapi 6.0
asp.net-core-webapi
0
50
1
72,253,086
72,253,086
1
true
2022-05-15T12:44:16.203Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Pass FromHeader the httpClient to webapi 6.0<p>Below is the code, I have used to call the api. However, May I know how to pass http header</p> <p>for example...
72,248,012
Set UIBarButtonItem's background color working with Storyboard swift<p>I know that this has been asked really often, but I couldn't find anything about doing this with an <code>IBOutlet</code>.</p> <p>I have already found some code how to set the background color of an <code>UIBarButtonItem</code> when you create it wi...
<p>First, drag and drop a <code>UIButton</code> to <code>UINavigationBar</code>. Then from <strong>Document Outline</strong> select the <code>UIButton</code> which is a child of <code>UIBarButtonItem</code>.</p> <p><a href="https://i.stack.imgur.com/iBmIj.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.c...
Set UIBarButtonItem's background color working with Storyboard swift
swift|uikit|storyboard|uibarbuttonitem|iboutlet
0
50
1
72,253,861
72,253,861
1
true
2022-05-15T11:54:22.033Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Set UIBarButtonItem's background color working with Storyboard swift<p>I know that this has been asked really often, but I couldn't find anything about doing...
72,254,989
query by timestamp range not working unless with keyword<p>Newbie question on ElasticSearch:</p> <p>I have following data with <code>http://localhost:9200/tutorial/_doc/7</code>:</p> <pre class="lang-json prettyprint-override"><code>&quot;_index&quot;:&quot;tutorial&quot;,&quot;_type&quot;:&quot;_doc&quot;,&quot;_id&qu...
<p>Your <code>@timestamp</code> field is not mapped correctly, as <code>text</code>/<code>keyword</code> field types are not appropriate for date values. You need to change your mapping to this instead:</p> <pre><code> &quot;@timestamp&quot;:{ &quot;type&quot;:&quot;date&quot; }, </code></pre>...
query by timestamp range not working unless with keyword
elasticsearch|elastalert
0
50
1
72,255,100
72,255,100
1
true
2022-05-16T06:37:39.433Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: query by timestamp range not working unless with keyword<p>Newbie question on ElasticSearch:</p> <p>I have following data with <code>http://localhost:9200/tu...
72,256,830
How can I write this code in a more efficient way?<p>This code has a lot of repetition, I tried to optimise it but failed. Any advice?</p> <p>I'm using python/flask and SQLite.</p> <p>It's about getting data from the database and showing it in a graph, every plastic form has many fields where I'm saving their values in...
<p>You can have a list of <code>str</code> keys and a dict mapping from this keys to corresponding arrays. This way you will only have several <code>for</code> loops and a single long section to parse rows.</p>
How can I write this code in a more efficient way?
python|sqlite|flask
-1
50
1
72,256,903
72,256,903
1
true
2022-05-16T09:17:48.887Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I write this code in a more efficient way?<p>This code has a lot of repetition, I tried to optimise it but failed. Any advice?</p> <p>I'm using pytho...
72,258,402
Select with transparent background and white text causes options to be invisible in Chrome<p>There seems to be an issue when using a select element with white text and transparent background in Chrome. It causes all options apart from the selected one to be invisible (white text on white background). How can I work aro...
<p>you can just set different color to text inside select options</p> <p><div class="snippet" data-lang="js" data-hide="true" data-console="false" data-babel="false"> <div class="snippet-code snippet-currently-hidden"> <pre class="snippet-code-css lang-css prettyprint-override"><code>html, body { background: black; }...
Select with transparent background and white text causes options to be invisible in Chrome
html|css|google-chrome|html-select
0
50
1
72,258,774
72,258,774
1
true
2022-05-16T11:22:58.873Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Select with transparent background and white text causes options to be invisible in Chrome<p>There seems to be an issue when using a select element with whit...
72,240,722
Angular MatStepper fails to recognize cached values from two str arrays (but successfully recognizes values from another str array)<p>I have a <code>MatStepper</code> that's used to navigate to the next page of a signup flow. I also have a method that loads values from a cache if it's available, and if so then the <cod...
<p>It's the <code>ViewChild</code> not being defined/set when <code>goForward</code> is called.</p> <p>If the template is being updated then it's probably a timing issue. For testing purposes you can wrap the code in <code>goForward</code> in a <code>setTimeout()</code></p>
Angular MatStepper fails to recognize cached values from two str arrays (but successfully recognizes values from another str array)
javascript|angular|typescript|caching|angular-material
0
50
2
72,261,239
72,261,239
1
true
2022-05-14T13:35:32.140Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Angular MatStepper fails to recognize cached values from two str arrays (but successfully recognizes values from another str array)<p>I have a <code>MatStepp...
72,260,684
MaxHeap Python implementation<p>I found an <a href="https://www.youtube.com/watch?v=GnKHVXv_rlQ" rel="nofollow noreferrer">implementation</a> of a MaxHeap in python. It performs as intended; however, I'm confused about array indexing--namely, because the max element is stored at index 0 and I had expected this to break...
<p>First of all, you are right that this computation of <code>left</code> and <code>right</code> is not how it should be, but... it still works.</p> <p>With this way of working we have a graph where the root's left child is actually a self-reference (a loop). Because the code never continues a <code>__floatUp</code> or...
MaxHeap Python implementation
python|arrays|heap
0
50
1
72,261,707
72,261,707
1
true
2022-05-16T14:17:43.247Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: MaxHeap Python implementation<p>I found an <a href="https://www.youtube.com/watch?v=GnKHVXv_rlQ" rel="nofollow noreferrer">implementation</a> of a MaxHeap in...
72,263,767
Fit PrintDocument to an A4<p>I wrote(copied) a small code to select some image files and print it every five minutes.</p> <p>When it prints, the image doesn't fit to the paper. It's smaller or bigger. So I want to fit the Images to an A4 Page Size. I couldn't find any properties for that.</p> <p>Is there a way to do th...
<p>You do not need to define Point;<br> To fit image to a page just use <code>args.Graphics.DrawImage(i, args.PageBounds);</code> instead of <code>args.Graphics.DrawImage(i, p);</code></p>
Fit PrintDocument to an A4
c#|windows|winforms
0
50
1
72,264,370
72,264,370
1
true
2022-05-16T18:11:29.783Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Fit PrintDocument to an A4<p>I wrote(copied) a small code to select some image files and print it every five minutes.</p> <p>When it prints, the image doesn'...
72,265,559
comparing request.time to value set using toMillis() in firestore rules?<p>I have the following code and I want to compare 2 values and set rules accordingly, but apparently there is no consistency between the two, at least the comparation is not working issue was I want to make all timestamps stored in ms.</p> <p><div...
<p><a href="https://firebase.google.com/docs/reference/rules/rules.firestore.Request#time" rel="nofollow noreferrer">request.time</a> is a <a href="https://firebase.google.com/docs/reference/rules/rules.Timestamp" rel="nofollow noreferrer">Timestamp</a> object, not time in millis. It's not directly comparable to an in...
comparing request.time to value set using toMillis() in firestore rules?
firebase|google-cloud-firestore|firebase-security
0
50
1
72,265,824
72,265,824
1
true
2022-05-16T20:59:00.663Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: comparing request.time to value set using toMillis() in firestore rules?<p>I have the following code and I want to compare 2 values and set rules accordingly...
72,267,948
how to make terminal ask for string then after string is received remove it<p>hi so I'm making a mini bank and I want to have the user put in the email and then once they put it in it clears and then moves to the password I'm having trouble doing that please help.</p> <pre><code>#include &lt;iostream&gt; #include &lt;...
<p>Have you tried using the system function from <code>cstdlib</code> to execute the <code>cls</code> command to clear the console before Asking for Password.</p> <p>Example Usage:</p> <pre class="lang-cpp prettyprint-override"><code>system(&quot;cls&quot;); </code></pre> <p>So Your Code is modified as below to clear t...
how to make terminal ask for string then after string is received remove it
c++
1
50
1
72,268,114
72,268,114
1
true
2022-05-17T03:40:12.527Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to make terminal ask for string then after string is received remove it<p>hi so I'm making a mini bank and I want to have the user put in the email and t...
72,267,502
algorithm problem: uniform noise binary image classification<p>I have a very interesting <b>algorithm problem</b> (not image processing!). But I still don't understand. Please help me.</p> <p>Problem:<br> There are 10 patterns with 4×4 size (binary). For example,</p> <pre><code>0001 0011 0111 0001 </code></pre> <p>and ...
<p>Because 16x16 board was initialized to <code>0</code>, unless the number of <code>1</code> in the pattern is extremely small, it will be extremely unlikely that &quot;10% flipping&quot; will mislead the location of the pattern. In other words, &quot;Where the pattern existed&quot; is automatically solved.</p> <p>The...
algorithm problem: uniform noise binary image classification
algorithm|probability
4
50
1
72,270,970
72,270,970
1
true
2022-05-17T02:19:48.707Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: algorithm problem: uniform noise binary image classification<p>I have a very interesting <b>algorithm problem</b> (not image processing!). But I still don't ...
72,272,380
I need Assistance with my Function Problem, I am getting zero for all my answers<p>This is the problem I am trying to solve:</p> <p>Write a function my_is_orthogonal(v1,v2, tol), where v1 and v2 are column vectors of the same size and tol is a scalar value strictly larger than 0. The output should be 1 if the angle bet...
<p>Here's a fixed version of your code.</p> <p>There were quite some nonsensicalities:</p> <ul> <li>You overwrote <code>v1</code> and <code>v2</code> at the start of the function with a constant. Secondly, you overwrote <code>tol</code> with <code>print(...) &gt; 0</code>, i.e. <code>false</code> (and as a side effect ...
I need Assistance with my Function Problem, I am getting zero for all my answers
python|arrays|numpy
-3
50
1
72,272,504
72,272,504
1
true
2022-05-17T10:28:14.663Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: I need Assistance with my Function Problem, I am getting zero for all my answers<p>This is the problem I am trying to solve:</p> <p>Write a function my_is_or...
72,275,032
How to make this camera movement smoother?<p>I am making a game where I would like the camera to be moved with a limit, I already have the script for that but I'd really like for the camera to be more smoother, If possible.</p> <p>Thanks!</p> <pre><code>public class LimitedCamera : MonoBehaviour { public float Lim...
<p>the Solution is Multiply the <code>Time.deltaTime</code> in <code>InputAxis</code> for smoothing camera. This method inhibits frame fluctuations in the game and also makes it smoother on weaker systems.</p> <pre class="lang-cs prettyprint-override"><code>var xAxis = Input.GetAxisRaw(&quot;Mouse X&quot;) * Time.unsca...
How to make this camera movement smoother?
c#|unity3d|camera|smoothing
1
50
2
72,275,466
72,275,466
1
true
2022-05-17T13:36:10.900Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to make this camera movement smoother?<p>I am making a game where I would like the camera to be moved with a limit, I already have the script for that bu...
72,277,810
In Python, I am comparing dataframes containing strings to decide if it should pass or fail. How can I stop data from passing when it should fail?<p>I have over 20 test cases that check a CSV for data anomalies due to data entry. This test case (#15) compares the salutation and addressee to marital status.</p> <pre><co...
<p>You have an AND condition b/w the second and third condition, you can separate these out and capturing the result from each condition. finally combine the two lists together</p> <pre><code># Test case 15 # Compares MrtlStat to PrimAddText and PrimSalText df = data[data['MrtlStat'].str.contains(&quot;Widow|Divorced...
In Python, I am comparing dataframes containing strings to decide if it should pass or fail. How can I stop data from passing when it should fail?
python|pandas|dataframe|contains|tolist
1
50
2
72,278,066
72,278,066
1
true
2022-05-17T16:43:50.363Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: In Python, I am comparing dataframes containing strings to decide if it should pass or fail. How can I stop data from passing when it should fail?<p>I have o...
72,280,481
Looking for days between two given dates in a string format<p>I do have data like this: [a, startdate, enddate]</p> <p><code> a_list = [ ['a', '2021-02-22', '2021-02-25'] ]</code></p> <p>and would like to get the days between those two dates to be like [a, startdate, enddate, days between those dates]</p> <pre><code>a_...
<p>Working out of the box solution:</p> <pre class="lang-py prettyprint-override"><code>from datetime import datetime a_list = [ ['a', '2021-02-22', '2021-02-25'] ] res = [] for el in a_list: d1 = datetime.strptime(el[1], '%Y-%M-%d') d2 = datetime.strptime(el[2], '%Y-%M-%d') res.append(el + [(d2-d1).days]...
Looking for days between two given dates in a string format
python|csv
1
50
3
72,280,525
72,280,525
1
true
2022-05-17T20:44:21.697Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Looking for days between two given dates in a string format<p>I do have data like this: [a, startdate, enddate]</p> <p><code> a_list = [ ['a', '2021-02-22', ...
72,274,781
Show failed function instead of macro in gtest<p>currently I'm working on creating new tests using gtest. There are some cases where I use same groups of EXPECT_EQs, so I wrap them up in a function. And now when particular test failes, it prints out the line where EXPECT that failed was written instead of the line wher...
<p>This is done by adding <code>SCOPED_TRACE(&quot;exampleName&quot;)</code> before the function call. This will create something similar to the stack trace in the output:</p> <pre class="lang-cpp prettyprint-override"><code>TEST_F(TestSuite, exampleName) { SCOPED_TRACE(&quot;exampleName_scope&quot;); // &lt;-----...
Show failed function instead of macro in gtest
c++|console|macros|wrapper|googletest
3
50
1
72,281,766
72,281,766
1
true
2022-05-17T13:18:05.497Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Show failed function instead of macro in gtest<p>currently I'm working on creating new tests using gtest. There are some cases where I use same groups of EXP...
72,282,116
What's the easiest way to duplicate observations in a dataset while making a small change to each new observation?<p>first-time poster, so I hope I'm giving enough information, and I hope that this question isn't an obvious duplicate (I ran a search and couldn't find exactly what I needed). If I can clarify anything, p...
<pre><code>df %&gt;% pivot_longer(-(1:4))%&gt;% filter(value&gt;0) %&gt;% mutate(nm = name) %&gt;% pivot_wider(values_fill = 0) %&gt;% select(-nm) # A tibble: 10 x 9 PossessionID OffensiveTeam DefensiveTeam Points `24` `23` `22` `21` `20` &lt;int&gt; &lt;chr&gt; &lt;chr&gt; ...
What's the easiest way to duplicate observations in a dataset while making a small change to each new observation?
r
0
50
2
72,282,176
72,282,176
1
true
2022-05-18T00:46:49.797Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What's the easiest way to duplicate observations in a dataset while making a small change to each new observation?<p>first-time poster, so I hope I'm giving ...
72,284,580
Find elements' indices with maximum difference between two lists<p>There are two lists</p> <p>l1 = [1, 2.3, 1.4, 1.1]</p> <p>l2 = [2.1, 0.9, 1.1, 3.2]</p> <p>and I want to find the elements in the lists that have the maximum difference between the lists.</p> <p>I.e.:</p> <p>l1 = [<strong>1</strong>, 2.3, 1.4, 1.1] shou...
<p>Try this:</p> <pre><code>l1 = [1, 2.3, 1.4, 1.1] l2 = [2.1, 0.9, 1.1, 3.2] def max_diff(l1, l2): min_l1 = min(l1) max_l1 = max(l1) min_l2 = min(l2) max_l2 = max(l2) max_diff1 = max_l2 - min_l1 max_diff2 = max_l1 - min_l2 if max_diff1 &gt; max_diff2: return l1.index(min_l1), l2.i...
Find elements' indices with maximum difference between two lists
python|list
-1
50
3
72,284,797
72,284,797
1
true
2022-05-18T07:05:50.113Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Find elements' indices with maximum difference between two lists<p>There are two lists</p> <p>l1 = [1, 2.3, 1.4, 1.1]</p> <p>l2 = [2.1, 0.9, 1.1, 3.2]</p> <p...
72,275,104
React Native Open Modal from another Modal<p>Hi I am new to React Native. I want to open a modal from another modal. I have a modal showing event details and user can delete this event. When they press delete button, I want to add another modal saying 'are you sure ?' as in the picture [![enter image description here][...
<p>Here are some way of debugging.</p> <ol> <li>first check both the modal is showing up by passing harcoded true value for one by one.</li> <li>if its working correctly, remove those timeouts and apicalls and just check with useState only.</li> <li>if all are fine then try to call the api.</li> </ol>
React Native Open Modal from another Modal
react-native
0
50
1
72,293,150
72,293,150
1
true
2022-05-17T13:40:36.373Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: React Native Open Modal from another Modal<p>Hi I am new to React Native. I want to open a modal from another modal. I have a modal showing event details and...
72,305,402
Return a Cell from a Pandas Dataframe based on other values<p>I have the following dataset in a Pandas Dataframe:</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th style="text-align: center;">Id</th> <th style="text-align: center;">Year</th> <th style="text-align: center;">Month</th> <th styl...
<p>You can use <a href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.loc.html" rel="nofollow noreferrer"><code>.loc[]</code></a>:</p> <pre><code>df.loc[(df['Year'] == 2021) &amp; (df['Month'] == 1), 'Total'] </code></pre> <p>Which will give you:</p> <pre><code>0 1875.1 Name: Total, dty...
Return a Cell from a Pandas Dataframe based on other values
python|pandas|dataframe
0
50
3
72,305,726
72,305,726
1
true
2022-05-19T13:25:20.180Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Return a Cell from a Pandas Dataframe based on other values<p>I have the following dataset in a Pandas Dataframe:</p> <div class="s-table-container"> <table ...
72,312,664
Can the id and a class have the same name of an html element?<p>The CSS allows that I can have a class called “.header”, as well as “.main”, “.footer”, “.aside” and so on... the same for IDs. In theory, I can have 3 selectors with almost the “same” name, like “article”, “.article” and “#article”. And I can do the same ...
<p>Yup, you absolutely can. If you’re the only one working on the project, and if this is intuitive to you, go right ahead, no issues.</p> <p>But when working with a larger team, it generally makes sense to use ids and classes that are little more descriptive in nature. For example, <code>.left-primary-sidebar</code> w...
Can the id and a class have the same name of an html element?
html|css|css-selectors|naming-conventions|custom-selectors
0
50
1
72,312,732
72,312,732
1
true
2022-05-20T01:30:48.230Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can the id and a class have the same name of an html element?<p>The CSS allows that I can have a class called “.header”, as well as “.main”, “.footer”, “.asi...
72,323,312
how can I transform a 'cookie' in a string keeping all the info?<p>I want to transform some cookies in strings, in order to reuse then. The problem is that the cookies are full of quotes and symbols, and when I try to turn it into a string I lose a lot of the information</p> <p>This is what a have:</p> <pre><code>respo...
<p>Regarding <a href="https://docs.python-requests.org/en/latest/api/#requests.cookies.RequestsCookieJar.get_dict" rel="nofollow noreferrer"><code>requests.cookies.RequestsCookieJar</code></a> there is a <code>get_dict</code> method</p> <pre><code>d = response.cookies.get_dict() </code></pre> <hr /> <p><a href="https:/...
how can I transform a 'cookie' in a string keeping all the info?
python|string|cookies|request
0
50
1
72,323,471
72,323,471
1
true
2022-05-20T18:22:30.727Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how can I transform a 'cookie' in a string keeping all the info?<p>I want to transform some cookies in strings, in order to reuse then. The problem is that t...
72,323,327
how to split array of strings, delete, and assign new array to same array<p>I want to delete items in an array that <code>include('https://www.agci.org')</code>. I am splitting the array first with <code>('&gt;')</code> and then using that to search each string with the includes function. I want to delete the ones that...
<p>Possibly just a case for <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp" rel="nofollow noreferrer">RegExp</a>? Here using <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/match" rel="nofollow noreferrer"><code>String.pr...
how to split array of strings, delete, and assign new array to same array
javascript|arrays|filter|include
0
50
2
72,324,248
72,324,248
1
true
2022-05-20T18:23:46.817Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to split array of strings, delete, and assign new array to same array<p>I want to delete items in an array that <code>include('https://www.agci.org')</co...
72,325,848
Best way to handle recursion with async functions and promises?<p>The following is pseudocode to illustrate my problem. The parent function must ultimately return a promise when all of the tasks are done (I've omitted the others for clarity). The parent function calls child functions and some of the child functions hav...
<p>just do recursion it's fine!</p> <pre class="lang-js prettyprint-override"><code>async function deleteFiles() { const query = await db.queryFiles().limit(100) if (query.size &gt; 0) { await db.batchDelete(query) } if (query.size === 100) { return deleteFiles() } return true; } </code></pre>
Best way to handle recursion with async functions and promises?
javascript|recursion
2
50
1
72,325,916
72,325,916
1
true
2022-05-21T00:32:17.253Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Best way to handle recursion with async functions and promises?<p>The following is pseudocode to illustrate my problem. The parent function must ultimately r...
72,327,652
I can't access object key because of - sign?<p>I want to reach the &quot;official-artwork&quot; key returned from the API, but I cannot reach the &quot;official-artwork&quot; key due to the - sign. How can I access keys of this type?</p> <pre><code>official-artwork: {value} </code></pre>
<p>try this:</p> <pre class="lang-js prettyprint-override"><code>item?.sprites.other['official-artwork'] </code></pre>
I can't access object key because of - sign?
javascript|json|object
1
50
2
72,327,665
72,327,665
1
true
2022-05-21T07:46:18.420Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: I can't access object key because of - sign?<p>I want to reach the &quot;official-artwork&quot; key returned from the API, but I cannot reach the &quot;offic...
72,327,763
Change position of <div> in <div class><p>I am looking to change the position of a div that is inside a div class. My only option is to add CSS, I cannot edit the HTML. The current code looks like this:</p> <pre><code>&lt;div class=&quot;additional-information&quot;&gt; &lt;div&gt; &lt;strong&gt; Name &lt;/strong&gt;...
<p>You could work with CSS Child Selector.</p> <p>Something like this:</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-css lang-css prettyprint-override"><code>.additional-information &gt; div:nth-of-type(1) { pos...
Change position of <div> in <div class>
css
0
50
1
72,327,820
72,327,820
1
true
2022-05-21T08:07:38.400Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Change position of <div> in <div class><p>I am looking to change the position of a div that is inside a div class. My only option is to add CSS, I cannot edi...
72,331,732
A pending promise is returned from stripe.checkout.sessions.listLineItems each time<p>Here I am trying to get the data from the firebase and then use that id to retrieve items from stripe checkout. But each time I try this I get a pending promise.</p> <pre class="lang-js prettyprint-override"><code>const colRef = colle...
<p>You'll need to combine the collection of promises with Promise.all. It will look like this:</p> <pre><code>const snapshot = await getDocs(q); const orders = await Promise.all(snapshot.docs.map(async (sdoc) =&gt; { const sessions = await stripe.checkout.sessions .listLineItems(sdoc.id); return {id: sd...
A pending promise is returned from stripe.checkout.sessions.listLineItems each time
reactjs|next.js|stripe-payments
1
50
1
72,331,777
72,331,777
1
true
2022-05-21T17:15:05.750Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: A pending promise is returned from stripe.checkout.sessions.listLineItems each time<p>Here I am trying to get the data from the firebase and then use that id...
72,331,950
Rename incrementing JSON objects in python<p>I have a JSON file that looks like this:</p> <pre><code>&quot;153689763780624385&quot;: { &quot;1&quot;: { &quot;author&quot;: &quot;Mike&quot;, &quot;date&quot;: &quot;05/06/2022, 12:00:57&quot; }, &quot;2&quot;: { &quot;author&quot;: &q...
<p>Assuming your keys are all numbers as strings and you just want to rest them 1. Using the <code>dict.pop()</code> method:</p> <pre><code>value_to_remove = 2 with open(&quot;pins.json&quot;, &quot;r+&quot;) as f: p = json.load(f) gid = &quot;153689763780624385&quot; del p[gid][str(value_to_remove)] for key, va...
Rename incrementing JSON objects in python
python|json|dictionary|object
1
50
2
72,332,099
72,332,099
1
true
2022-05-21T17:45:38.627Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Rename incrementing JSON objects in python<p>I have a JSON file that looks like this:</p> <pre><code>&quot;153689763780624385&quot;: { &quot;1&quot;: { ...
72,331,685
Decimal Compare is not returning expected values<p>I am trying to compare two decimals. I am trying to determine if the passed in quantity has too many significant digits. Each item in my database has the number of decimal places accepted for a quantity. So if item 'x' only allows 2 decimal places and I pass in a quant...
<p>It seems that you try to shift decimal places. That does obviously not work with e.g. <code>x * (2 * 10)</code> etc., you want <code>x * (10^2)</code></p> <p>This might work the way you intended:</p> <pre><code>var requestDto = new {Quantity = 1.235m}; var item = new {Decplqty = 3}; decimal sh = (decimal)Math.Pow(1...
Decimal Compare is not returning expected values
c#
1
50
2
72,332,228
72,332,228
1
true
2022-05-21T17:08:41.790Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Decimal Compare is not returning expected values<p>I am trying to compare two decimals. I am trying to determine if the passed in quantity has too many signi...
72,333,258
Nom parser that skips escaped terminator characters<p>I've checked the other SO answers for nom parser combinator questions, but this one doesn't seem to have been asked yet.</p> <p>I am attempting to parse delimited regular expressions, they will always be delimited with <code>/...../</code>, perhaps with the modifier...
<p>The parser passed as the first argument to <code>escaped()</code> should parse <em>one</em> character that is <em>not the escape character</em>, <em>and</em> stop on the correct character(s). <code>many1(anychar)</code> does not answer any of these conditions.</p> <p>Rather, you should call it this way:</p> <pre cla...
Nom parser that skips escaped terminator characters
regex|parsing|rust|parser-combinators
0
50
2
72,333,661
72,333,661
1
true
2022-05-21T21:14:59.490Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Nom parser that skips escaped terminator characters<p>I've checked the other SO answers for nom parser combinator questions, but this one doesn't seem to hav...
72,334,628
Figcaption going to the right of a image instead of below<p>Recently I've decided to redesign my website and change the games list design but the figcaption that is suppose to be below the image decides to go to the right of it.</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel...
<p>you can attain it using flex and grid. Do you mean like this?</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-css lang-css prettyprint-override"><code>.GameSelectList { list-style-type: none; display: fle...
Figcaption going to the right of a image instead of below
html|css
1
50
3
72,334,774
72,334,774
1
true
2022-05-22T03:34:43.453Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Figcaption going to the right of a image instead of below<p>Recently I've decided to redesign my website and change the games list design but the figcaption ...
72,338,190
className SerialNow = *((className*)ptr); vs className &SerialNow = *((className*)ptr);<p>What is difference between using or not reference when casting pointer to object?</p> <pre><code>void someClass::method() { xTaskCreatePinnedToCore(someTaskHandler,&quot;SerialNowTaskTX&quot;,XT_STACK_MIN_SIZE*3,this,4,&amp;ta...
<h3>Preliminary remark</h3> <p>First, keep in mind that casting <code>void*</code> pointers is in C++ a rather dangerous thing, that can be UB if the object pointed to is not compatible with the type you're casting to.</p> <p>Instead of a C-like cast between parenthesis, prefer a C++ more explicit cast, that shows bett...
className SerialNow = *((className*)ptr); vs className &SerialNow = *((className*)ptr);
c++|pointers|casting|reference|dereference
1
50
2
72,338,657
72,338,657
1
true
2022-05-22T13:52:18.580Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: className SerialNow = *((className*)ptr); vs className &SerialNow = *((className*)ptr);<p>What is difference between using or not reference when casting poin...
72,338,823
SQL creating table with foreign key results in "key": syntax error<p>I need some help with an error I'm getting with SQL. My goal is to make a simple proof of concept music database.</p> <p>Te problem is that when using foreign keys I'm getting these errors:</p> <blockquote> <p>Error: near line 134: near &quot;key&quot...
<p>There are some lines starting with the word key, what do you expect them to do? Like this one:</p> <pre><code> key [FK_117] ([SongId]), </code></pre> <p>I think that these are your problem.</p>
SQL creating table with foreign key results in "key": syntax error
sql|database|sqlite|datagrip|replit
0
50
1
72,338,916
72,338,916
1
true
2022-05-22T15:14:30.037Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: SQL creating table with foreign key results in "key": syntax error<p>I need some help with an error I'm getting with SQL. My goal is to make a simple proof o...
72,334,070
remove_action is not working for me to remove a theme's action..?<p>I'm running WordPress + WooCommerce + Storefront. I'm trying to remove the &quot;Built with Storefront &amp; WooCommerce&quot; credit in the footer.</p> <p>I see <a href="https://www.google.com/search?q=storefront%20remove%20built%20with%20storefront&...
<p>In order to remove the action you must be sure to remove it before it's added. This is a parent theme's hook, so if you remove_action from the child theme or via code Snippets, it's already too late.</p> <p>Unless... you make the remove_action trigger earlier, by hooking that to &quot;wp&quot; WordPress action.</p> ...
remove_action is not working for me to remove a theme's action..?
wordpress|woocommerce|themes|storefront|wordpress-hook
1
50
1
72,342,138
72,342,138
1
true
2022-05-22T00:35:45.360Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: remove_action is not working for me to remove a theme's action..?<p>I'm running WordPress + WooCommerce + Storefront. I'm trying to remove the &quot;Built w...
72,351,020
React native with axios fetch first post delayed<p>I am using react native, and axios. I have two parts.</p> <ol> <li><p>The exercice list that is rendered with <code>useEffect</code> in a div. Inside, there is a Input form which once pressed the <code>Add set</code> button, the set is added to the database and the exe...
<p>You need to toggle the error value when you have successful fetch as well</p> <p>update code to this</p> <pre><code>const getAllExercices = async () =&gt; { try { const response = await data.get('/api/get-all-ex/' + dayID); setExArray(response.data); setError(response.data.length &lt...
React native with axios fetch first post delayed
react-native|axios
0
50
1
72,352,177
72,352,177
1
true
2022-05-23T15:21:49.993Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: React native with axios fetch first post delayed<p>I am using react native, and axios. I have two parts.</p> <ol> <li><p>The exercice list that is rendered w...
72,352,407
Problems joining two Pandas Dataframes<p>I'm trying to create a report of the cards I have in Trello through Rest API, where I need to show in the same report the card data and the names of the members assigned to each card.</p> <p>The problem is that the Trello JSON is very cumbersome, and I need to make several queri...
<p>You can't do that for two reasons: A) as the error says, lists aren't hashable, and DataFrame operations tipically don't work on unhashable data types, and, B) you are trying to merge a <code>list</code> column with a <code>string</code> column. Both column types should be the same in order to perform a merge.</p> <...
Problems joining two Pandas Dataframes
python|pandas|dataframe|api|trello
0
50
1
72,353,146
72,353,146
1
true
2022-05-23T17:11:31.510Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Problems joining two Pandas Dataframes<p>I'm trying to create a report of the cards I have in Trello through Rest API, where I need to show in the same repor...
72,351,984
Batch probblem: Cant iterate through string variable<p>I'm going crazy for 2 days with this simple task: iterate through a 5 line string with delimiters (or a file with the same content). After I find a delimiter symbol I expect to write that line to the file, then add echo for a cr/lf representation and do next iterat...
<p>The subroutine <code>split_supplied_line</code> in the following batch code snippet should do the trick for (<em>almost</em>) any number of substrings and (<em>almost</em>) any delimiter. No matter whether there is a trailing delimiter.</p> <pre><code>@ECHO OFF SETLOCAL EnableExtensions DisableDelayedExpansion set &...
Batch probblem: Cant iterate through string variable
for-loop|batch-file|cmd|token|batch-processing
0
50
2
72,354,929
72,354,929
1
true
2022-05-23T16:36:03.203Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Batch probblem: Cant iterate through string variable<p>I'm going crazy for 2 days with this simple task: iterate through a 5 line string with delimiters (or ...
72,333,779
how to create dataframe columns with computation using for loop?<p>Instead of</p> <pre><code>cv['Open1'] = cv['Open'].pct_change(fill_method=None) cv['Open2'] = cv['Open'].pct_change(periods=2,fill_method=None) cv['Open3'] = cv['Open'].pct_change(periods=3,fill_method=None) cv['Open4'] = cv['Open'].pct_change(periods=4...
<p>no need to create the name of the column or concatenate separately, also the index of the range was off by 1.</p> <pre><code>for i in range(1, 6, 1): cv['Open%d'%(i)] = cv['Open'].pct_change(periods=i,fill_method=None) </code></pre>
how to create dataframe columns with computation using for loop?
python|pandas|dataframe
-1
50
1
72,356,139
72,356,139
1
true
2022-05-21T23:05:04.873Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to create dataframe columns with computation using for loop?<p>Instead of</p> <pre><code>cv['Open1'] = cv['Open'].pct_change(fill_method=None) cv['Open2'...
72,355,880
Primefaces charts replaced by chartJS?<p>Tried PF traditional charts like bar,line and pie. Bar is working. But line and pie did not show. From the showcase, do not have these charts listed on the left menu. Are they replaced by the new chartJS and not supported?</p> <p>Version 11.0.0.</p>
<p>No, they are not removed, they are deprecated since PrimeFaces 10 and will be removed in 13.</p> <p>See also</p> <ul> <li><a href="https://primefaces.github.io/primefaces/10_0_0/#/../migrationguide/10_0_0" rel="nofollow noreferrer">https://primefaces.github.io/primefaces/10_0_0/#/../migrationguide/10_0_0</a></li> <l...
Primefaces charts replaced by chartJS?
charts|primefaces|chart.js
0
50
1
72,358,968
72,358,968
1
true
2022-05-23T23:53:11.397Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Primefaces charts replaced by chartJS?<p>Tried PF traditional charts like bar,line and pie. Bar is working. But line and pie did not show. From the showcase,...
72,354,128
Move data from Firestore Database (not Realtime Database) to new collection in Android Studio<p>I need to transfer data from a document belonging to one collection to another. It doesn't matter how to do this (rename the sub-collection in the document, or copy the data and then delete it).</p> <p>I know about one examp...
<blockquote> <p>How exactly to assign collections for &quot;fromPath&quot; and &quot;toPath&quot;?</p> </blockquote> <p>The &quot;fromPath&quot; and &quot;toPath&quot; are <strong>not</strong> collection references, but document references. Since the <code>moveFirestoreDocument()</code> method contains two arguments, y...
Move data from Firestore Database (not Realtime Database) to new collection in Android Studio
java|android|firebase|google-cloud-platform|google-cloud-firestore
0
50
1
72,361,019
72,361,019
1
true
2022-05-23T19:51:28.810Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Move data from Firestore Database (not Realtime Database) to new collection in Android Studio<p>I need to transfer data from a document belonging to one coll...
72,370,360
Conditionally render useEffect fetch React<p>Making a video game clip posting app. I have a controller on the backend that will give me the clips in order of most commented on clips to least. I would like to switch between having the data ordered normally, to from most to least comments by using a select tag (later I w...
<p>As the error says, you can't have <code>useEffect</code> called conditionally. Instead, call it a single time regardless, and inside that function, look to see whether you need to fetch the clips or the comments.</p> <pre><code>useEffect(() =&gt; { if (boolean) { fetch(&quot;/clips&quot;) .th...
Conditionally render useEffect fetch React
javascript|reactjs|fetch|use-effect
0
50
1
72,370,377
72,370,377
1
true
2022-05-24T23:09:26.753Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Conditionally render useEffect fetch React<p>Making a video game clip posting app. I have a controller on the backend that will give me the clips in order of...
72,370,326
C# Sending a JSON object with a list to WebAPI is coming up null<p>I have a class object that contains a list of user emails.</p> <pre><code>public class UserAccount { public string UserName {get; set;} public List&lt;string&gt; UserEmails {get; set;} } </code></pre> <p>When passing a json object in Insomnia to my ...
<p>your classes should be</p> <pre><code> public class Data { public UserAccount UserAccount { get; set; } } public class UserAccount { public string UserName { get; set; } public List&lt;string&gt; UserEmails { get; set; } } </code></pre> <p>and action</p> <pre><code>pu...
C# Sending a JSON object with a list to WebAPI is coming up null
c#|json|asp.net-web-api|postman|insomnia
0
50
1
72,370,686
72,370,686
1
true
2022-05-24T23:02:51.427Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: C# Sending a JSON object with a list to WebAPI is coming up null<p>I have a class object that contains a list of user emails.</p> <pre><code>public class Use...
72,361,165
Reading IR photo sensor using pi and .net<p>I am starting my adventure with IoT and got some blinking led experience behind me. But now I wanted to do some more advanced thing so I figured I try to read infrared signals from remotes. Now everything is based on rPi3.</p> <p>So what I have is:</p> <pre><code>let private ...
<p>Unfortunately, there's no binding in Iot.Device.Bindings (yet) that directly supports IR sensors.</p> <p>So your start is good, I think. You are listening to events that are generated from the IR receiver. The IR communication however, is a digital communication where a signal is transmitted with a few bytes of data...
Reading IR photo sensor using pi and .net
.net|f#|raspberry-pi3|iot
1
50
1
72,374,912
72,374,912
1
true
2022-05-24T10:18:01.923Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Reading IR photo sensor using pi and .net<p>I am starting my adventure with IoT and got some blinking led experience behind me. But now I wanted to do some m...
72,375,217
Perform action on button click<p>As long as you are tapping on the button, the action should be performed. As soon as you release the button, the action that is performed will be removed.</p> <p>I am using a long-press Gesture but it didn't work.</p> <pre><code>let longGesture = UILongPressGestureRecognizer(target: sel...
<p>You need to handle the state</p> <pre><code>@objc func long(_ tap:UILongPressGestureRecognizer) { switch(tap.state) { case .began: // to do case .ended: // to do default: break } } </code></pre>
Perform action on button click
ios|swift
1
50
3
72,375,270
72,375,270
1
true
2022-05-25T09:38:39.737Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Perform action on button click<p>As long as you are tapping on the button, the action should be performed. As soon as you release the button, the action that...
72,370,279
What HTTP Error code to return if my Json is missing a field value?<p>For example, I have JSON like:</p> <pre><code>{ &quot;firstName&quot;:&quot;&quot;, &quot;lastName&quot;:&quot;Gustafson&quot;, &quot;dob&quot;:&quot;1980-09-09T00:00:00.000+00:00&quot; } </code></pre> <p>If all 3 of these were required a...
<blockquote> <p>If all 3 of these were required and given that above Json body is missing value for firstName, what HTTP error code would be considered a good fit to sent to clients from an API?</p> </blockquote> <p>I would normally use <a href="https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-semantics#section...
What HTTP Error code to return if my Json is missing a field value?
rest|http-error
0
50
1
72,376,044
72,376,044
1
true
2022-05-24T22:55:47.133Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What HTTP Error code to return if my Json is missing a field value?<p>For example, I have JSON like:</p> <pre><code>{ &quot;firstName&quot;:&quot;&quot;,...
72,375,705
Finding text from html using BeautifulSoup<p>I have the following .html:</p> <pre><code>&lt;li class=&quot;print text&quot;&gt; &lt;span&gt;&lt;em class=&quot;time&quot;&gt; &lt;div class=&quot;time&quot;&gt;1.29 s&lt;/div&gt; ...
<p>You could go with <code>find(text=True, recursive=False)</code> to get your goal.</p> <h5>Example</h5> <pre><code>from bs4 import BeautifulSoup soup='''&lt;li class=&quot;print text&quot;&gt; &lt;span&gt;&lt;em class=&quot;time&quot;&gt; &lt;div class=&quot;time&quot;&gt;1.29 s&lt;/div&gt; ...
Finding text from html using BeautifulSoup
python|html|web-scraping|beautifulsoup
0
50
2
72,376,079
72,376,079
1
true
2022-05-25T10:12:13.840Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Finding text from html using BeautifulSoup<p>I have the following .html:</p> <pre><code>&lt;li class=&quot;print text&quot;&gt; &...
72,391,647
(JavaScript) removeAttribute didn't remove the Attribute<p>I currently make a tab which the tab content is containing iframe. I want it to every time the tab is clicked, the iframe reload the page.</p> <p>But when I inspected, the source attributes exist in every iframe, and the issues shows up that states: <code>Uncau...
<p>First, I think you were doing the two iframe operations in the wrong place. I've reversed them so the iframe is cleared in <code>removeActive()</code>. Then, you weren't targeting the iframes with your source updates.</p> <p>Otherwise you're doing great. Keep it up!</p> <p><div class="snippet" data-lang="js" data-hi...
(JavaScript) removeAttribute didn't remove the Attribute
javascript|tabs
1
50
1
72,393,350
72,393,350
1
true
2022-05-26T12:13:22.820Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: (JavaScript) removeAttribute didn't remove the Attribute<p>I currently make a tab which the tab content is containing iframe. I want it to every time the tab...
72,793,299
YAML code to create a configmap with a particular file (.js/.sh)<p>What will be the equivalent ConfigMap YAML code for the following command line?</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-html lang-html prett...
<p>There is actually a kubectl command that lets you get the generated yaml for a created config map. In your case:</p> <pre><code>kubectl get configmaps mongo-initdb -o yaml </code></pre>
YAML code to create a configmap with a particular file (.js/.sh)
kubernetes|kubernetes-helm
0
50
3
72,793,365
72,793,365
1
true
2022-06-28T21:22:31.020Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: YAML code to create a configmap with a particular file (.js/.sh)<p>What will be the equivalent ConfigMap YAML code for the following command line?</p> <p><di...
72,793,526
Add a column from a function of 2 other columns in PySpark<p>I have two columns in a data frame <code>df</code> in PySpark:</p> <pre class="lang-none prettyprint-override"><code>| features | center | +----------+----------+ | [0,1,0] | [1.5,2,1]| | [5,7,6] | [10,7,7] | </code></pre> <p>I want to create a function w...
<p>You have truly chosen a difficult topic. In Spark, 95%+ of things can be done without python UDFs. You should always try to find a way not to create a UDF.</p> <p>I've attempted your UDF, I got the same error, and I cannot really tell, why. I think there's something with data types, as you pass Spark array into a fu...
Add a column from a function of 2 other columns in PySpark
dataframe|apache-spark|pyspark|apache-spark-sql|user-defined-functions
0
50
3
72,793,846
72,793,846
1
true
2022-06-28T21:51:27.040Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Add a column from a function of 2 other columns in PySpark<p>I have two columns in a data frame <code>df</code> in PySpark:</p> <pre class="lang-none prettyp...
72,793,407
SwiftUI - I can not change the style of Picker's text on screen<p>I have a picker like this:</p> <pre><code>Picker(languages[currentIndex].name,selection: $currentIndex){ ForEach(0..&lt;languages.count, id: \.self){index in Text(languages[index].name) ...
<p>As a workaround you can use <code>Menu</code> instead of <code>Picker</code>:</p> <pre><code>struct ContentView: View { let languages = [&quot;English&quot;, &quot;German&quot;, &quot;Spanish&quot;] @State private var currentIndex = 0 var body: some View { Menu { Fo...
SwiftUI - I can not change the style of Picker's text on screen
ios|swift|swiftui
0
50
1
72,794,286
72,794,286
1
true
2022-06-28T21:37:37.340Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: SwiftUI - I can not change the style of Picker's text on screen<p>I have a picker like this:</p> <pre><code>Picker(languages[currentIndex].name,selection: $c...
72,787,350
YQ - replace values of subfields of list based on list of values<p>Given a list in YAML, I want to dynamically replace all values of source.targetRevison's based on a input list to an input variable:<br></p> <p>replace_list=[argocd,argocd-projects] <br> replace_to_value=v1.0.0</p> <p>yq version 4.2.x+</p> <p>Input YAML...
<p>you can do this:</p> <pre><code>yq '( .server.additionalApplications[] | select(.name == (&quot;argocd&quot;, &quot;argocd-projects&quot;)) | .source.targetRevision ) |= &quot;v1.0.0&quot;' examples/data1.yaml </code></pre> <p>Explanation: You want to update a selection of the additionalApplicat...
YQ - replace values of subfields of list based on list of values
bash|list|yaml|yq
0
50
1
72,795,815
72,795,815
1
true
2022-06-28T13:30:57.630Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: YQ - replace values of subfields of list based on list of values<p>Given a list in YAML, I want to dynamically replace all values of source.targetRevison's b...
72,795,850
Can anyone help me with a header / title problem in which I must use only HTML and CSS<p><img src="https://i.stack.imgur.com/QDXBb.jpg" alt="ExampleImage" /></p> <p>I'm currently trying to mimic a mockup and I am having trouble designing the top portion of this website. The Lorem Ipsum seems as if its in a container wi...
<p>To give you somewhat idea of how to deal with such requirements. I have added an example. Make sure you change all the font face, font size, spacing, element placement, etc properties as per your requirement.</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div cl...
Can anyone help me with a header / title problem in which I must use only HTML and CSS
html|css|typography
0
50
1
72,795,983
72,795,983
1
true
2022-06-29T04:37:27.237Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can anyone help me with a header / title problem in which I must use only HTML and CSS<p><img src="https://i.stack.imgur.com/QDXBb.jpg" alt="ExampleImage" />...
72,803,744
Using wildcard with Generic method<p>Would like to get some advise on it</p> <p>My class structure is like this</p> <pre><code>public abstract class Base {} public class Derived1 extends Base {} public class Derived2 extends Base {} public class ServiceClass { public String method1(Derived1 derived1) { ret...
<p>Yes, by using an intermediary variable:</p> <pre><code> Function&lt;Derived1, String&gt; function1 = serviceClass::method1; Function&lt;Derived2, String&gt; function2 = serviceClass::method2; Function&lt;? extends Base, String&gt; function = condition ? function1 : function2; </code></pre> <p>That...
Using wildcard with Generic method
java|functional-programming
1
50
2
72,804,004
72,804,004
1
true
2022-06-29T15:07:26.627Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Using wildcard with Generic method<p>Would like to get some advise on it</p> <p>My class structure is like this</p> <pre><code>public abstract class Base {} ...
72,804,149
Dart/Flutter json.decode and multiline value<p>I have json data with multiline. When I use <code>json.decode</code>, I've a error.</p> <pre><code>&quot;FormatException (FormatException: Control character in string ... &quot;count&quot;: &quot;1&quot;, &quot;price&quot;: &quot;5&quot;, &quot;description&quot;: &quot;It...
<p>Not sure if you want to encode or decode.</p> <p>If you'd like to <strong>encode</strong> (create a JSON string out of data), you should make sure that the variable you supply to <code>json.encode</code> is of type <code>Map&lt;String, dynamic&gt;</code>. Also if you want to have multiline strings, you should use tr...
Dart/Flutter json.decode and multiline value
json|flutter|dart
0
50
1
72,804,430
72,804,430
1
true
2022-06-29T15:33:32.860Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Dart/Flutter json.decode and multiline value<p>I have json data with multiline. When I use <code>json.decode</code>, I've a error.</p> <pre><code>&quot;Forma...
72,809,643
R: adding matching vector values from two dataframes in one column<p>I have a data frame which is configured roughly like this:</p> <pre><code>df &lt;- cbind(c('hello', 'yes', 'example'),c(7,8,5),c(0,0,0)) </code></pre> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th style="text-align: left;">w...
<p>This is an &quot;update join&quot;. My favorite way to do it is in <code>dplyr</code>:</p> <pre><code>library(dplyr) df %&gt;% rows_update(rename(df2, count = frequency), by = &quot;words&quot;) </code></pre> <p>In base R you could do the same thing like this:</p> <pre><code>names(df2)[2] = &quot;count2&quot; df = m...
R: adding matching vector values from two dataframes in one column
r|dataframe|vector|match
2
50
2
72,809,823
72,809,823
1
true
2022-06-30T02:14:36.793Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: R: adding matching vector values from two dataframes in one column<p>I have a data frame which is configured roughly like this:</p> <pre><code>df &lt;- cbind...
72,811,850
snowflake variant data insert issue: 'expert level problem'<p>I have a table in snowflake and the structure of the table is like below.</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th style="text-align: left;">Data</th> <th style="text-align: center;">id</th> <th style="text-align: right;">...
<p>As we don't see the whole procedure, I created one based on your question:</p> <pre><code>create or replace table xyz (data variant, id varchar, timestamp varchar ); create or replace procedure test_xyz() returns varchar LANGUAGE JAVASCRIPT as $$ let data = { &quot;a&quot;:&quot;hi&quot;, &quot;...
snowflake variant data insert issue: 'expert level problem'
javascript|node.js|snowflake-cloud-data-platform
0
50
2
72,813,525
72,813,525
1
true
2022-06-30T07:28:13.343Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: snowflake variant data insert issue: 'expert level problem'<p>I have a table in snowflake and the structure of the table is like below.</p> <div class="s-tab...
72,812,481
How to draw a UIView or a UIButton using UIBezierPath<p>I want to draw a UIView or a UIButton like this one which is show in the image. <a href="https://i.stack.imgur.com/AzgSN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AzgSN.png" alt="enter image description here" /></a></p> <p>How it is possib...
<p>To draw that shape, you want to use <code>maskPath1.move(to: pt)</code> and then a series of <code>maskPath1.addLine(to: pt)</code>.</p> <p>You'll need six points:</p> <p><a href="https://i.stack.imgur.com/l1Pyx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/l1Pyx.png" alt="enter image descriptio...
How to draw a UIView or a UIButton using UIBezierPath
ios|swift|uikit|uibezierpath
0
50
1
72,816,404
72,816,404
1
true
2022-06-30T08:20:34.293Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to draw a UIView or a UIButton using UIBezierPath<p>I want to draw a UIView or a UIButton like this one which is show in the image. <a href="https://i.st...
72,807,541
How can I use AppleScript to find disabled menu items?<p>I have an AppleScript script that will find all of the menu items from all of the menu bar menus. I've filtered out each separator, so I have just the commands, and now I'd like to find out how to find out which menu items are disabled. Does anybody know how I co...
<p>In order to get the properties of a menu item, you first need to get a reference to that menu item. You would then need to go through the various menu items and build lists or records of those that meet your criteria, so that the references can be used as needed.</p> <p>From the comments, general-purpose handlers t...
How can I use AppleScript to find disabled menu items?
macos|applescript
-1
50
1
72,820,119
72,820,119
1
true
2022-06-29T20:33:48.773Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I use AppleScript to find disabled menu items?<p>I have an AppleScript script that will find all of the menu items from all of the menu bar menus. I'...
72,818,842
Flutter Convert Switch<p>I am building a website on flutter and want to add functionality to swap between light and dark themes. I have achieved this goal using a switch that swaps between the themes however I want to replace the switch itself with an icon that will swap as the themes swap.</p> <p>I have the following:...
<p>Make sure to have different themes on two modes. You can follow this snippet.</p> <pre class="lang-dart prettyprint-override"><code>class ChangeThemeButtonWidget extends StatelessWidget { const ChangeThemeButtonWidget({Key? key}) : super(key: key); @override Widget build(BuildContext context) { return Ico...
Flutter Convert Switch
flutter|dart|flutter-provider
1
50
1
72,821,445
72,821,445
1
true
2022-06-30T16:02:45.723Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Flutter Convert Switch<p>I am building a website on flutter and want to add functionality to swap between light and dark themes. I have achieved this goal us...
72,820,042
Access DlookUp not working with multiple Criteria<p>The Dlookup Function is Giving me a syntax error I have tried multiple ways but none worked</p> <pre><code>x = DLookup(&quot;Clock_ID&quot;, &quot;User_access&quot;, &quot;Clock = &quot; '&quot; &amp; Me.Clock_ID &amp; _ &amp; &quot; AND Module = '&quot; &amp...
<p>I guess ID is numeric, so try:</p> <pre><code>x = DLookup(&quot;Clock_ID&quot;, &quot;User_access&quot;, &quot;Clock = &quot; &amp; Me.Clock_ID &amp; &quot; AND Module = '&quot; &amp; Me.m_1 &amp; &quot;'&quot;) </code></pre>
Access DlookUp not working with multiple Criteria
vba|ms-access
1
50
1
72,821,661
72,821,661
1
true
2022-06-30T17:48:23.590Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Access DlookUp not working with multiple Criteria<p>The Dlookup Function is Giving me a syntax error I have tried multiple ways but none worked</p> <pre><cod...
72,822,279
Move an object containing a unique_ptr to vector<p>Just wondering if there is a way to move an object holding a unique_ptr into a vector of those objects? Example:</p> <pre><code>class A { public: std::unique_ptr&lt;someData&gt; ptr; }; std::vector&lt;A&gt; objects; A myObject; //move myObject to objects??? </code...
<p>You'll need to do <code>std::move</code>:</p> <pre><code>std::vector&lt;A&gt; objects; A myObject; objects.push_back(std::move(myObject)); </code></pre>
Move an object containing a unique_ptr to vector
c++|pointers|smart-pointers|unique-ptr|noncopyable
1
50
1
72,822,289
72,822,289
1
true
2022-06-30T21:35:07.550Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Move an object containing a unique_ptr to vector<p>Just wondering if there is a way to move an object holding a unique_ptr into a vector of those objects? Ex...
72,821,332
Importing modules from a virtual environment in Python<p>I've recently become interested in virtual environments in Python, in order to keep my code more organized and more portable. For this reason, I did a factory reset on my Raspberry Pi and started from scratch, with only the default Python modules. Beforehand I ha...
<p>You should do the steps in the good order to use the Virtual Environment:</p> <ol> <li>Creating the VENV</li> <li>Source the <code>venv/bin/activate</code></li> <li>Install the required modules to the VENV</li> <li>Call your script</li> <li>Deactivate the VENV</li> </ol> <p>I have tested the <code>mutagen</code> mod...
Importing modules from a virtual environment in Python
python|python-3.x|virtual-environment
2
50
1
72,825,830
72,825,830
1
true
2022-06-30T19:54:05.797Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Importing modules from a virtual environment in Python<p>I've recently become interested in virtual environments in Python, in order to keep my code more org...
72,827,804
My reactJs code prints a value twice in console when using console.log<p>Making my first project in react but getting console printed twice.</p> <pre><code>import axios from 'axios'; export default function App() { const [searchText ,setSearchText]=useState(&quot;&quot;); console.log(searchText); //api key ...
<p>This is caused by the re-rendering of components, React renders each components multiple time, Call console.log inside of useEffect hook and pass the searchText vaiable inside the useEffect dependency array.</p> <p>Example:</p> <pre><code>useEffect(() =&gt; { console.log(searchText); ; }, [searchText]); </code></pr...
My reactJs code prints a value twice in console when using console.log
javascript|reactjs|console
2
50
1
72,827,953
72,827,953
1
true
2022-07-01T10:20:04.180Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: My reactJs code prints a value twice in console when using console.log<p>Making my first project in react but getting console printed twice.</p> <pre><code>i...
72,833,891
Add Credible Intervals to each line<p>I would appreciate your help with the following issue.</p> <p>I am trying to add the 95% Credival Intervals (this is not the same as Confidence Intervals) to a density plot, which is separated by source.</p> <p>The best way to calculate the 95% CI is with the function <code>hdi(x, ...
<p>Adapting <a href="https://stackoverflow.com/a/59472570/12993861">this answer</a> by @ClausWilke to your case you could achieve your result via <code>ggridges:: geom_density_ridges_gradient</code>. Basically I use <code>after_stat</code> and an <code>ifelse</code> to fill only the upper and lower quantiles computed b...
Add Credible Intervals to each line
r|ggplot2|plot|data-visualization|bayesian
0
50
1
72,835,409
72,835,409
1
true
2022-07-01T19:33:00.500Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Add Credible Intervals to each line<p>I would appreciate your help with the following issue.</p> <p>I am trying to add the 95% Credival Intervals (this is no...
72,835,215
firestore query inside of streambuilder for getting additional informations in flutter<p>i have problems with my code. i receive only the data of my first query inside the streambuilder if statement. do i need to use a loop ???</p> <p>With listenStream i receive for example 4 results. 2 of the results have the value in...
<p>Use another <code>StreamBuilder</code> for the second Firestore query.</p>
firestore query inside of streambuilder for getting additional informations in flutter
flutter|google-cloud-firestore|snapshot|stream-builder
0
50
1
72,836,713
72,836,713
1
true
2022-07-01T22:45:46.600Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: firestore query inside of streambuilder for getting additional informations in flutter<p>i have problems with my code. i receive only the data of my first qu...
72,830,680
VSTO Outlook: Get last email address just entered in the "To", "Bc" or "Cc" fields in new, reply or forward windows<p>I am trying to get the last recipient (email address) just introduced into the &quot;To&quot;, &quot;Bc&quot; or &quot;Cc&quot; fields when field loses its focus. How can I achieve this?</p> <p>For exam...
<p>Use <code>MailItem.PropertyChange</code> event. Whenever any recipient is changed (added/deleted), the event handler fires for all 3 (To/CC/BCC) properties, so your won't know which one changed. You'd need to cache the old value first, and when the event fires, compare it with new value.</p> <pre><code>PropertyChang...
VSTO Outlook: Get last email address just entered in the "To", "Bc" or "Cc" fields in new, reply or forward windows
email|outlook|vsto|outlook-addin|office-addins
-1
50
2
72,840,871
72,840,871
1
true
2022-07-01T14:20:50.437Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: VSTO Outlook: Get last email address just entered in the "To", "Bc" or "Cc" fields in new, reply or forward windows<p>I am trying to get the last recipient (...
72,842,631
Discord.JS v13 Search a List for a specific key word<p>I wanted to write a command to check if a specific user is part of a ban list in my server. Unfortunately it always does the stuff in the else loop. I hope you can help.</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="fa...
<p>Since you're looking for a boolean, use <code>Array.some()</code></p> <pre class="lang-js prettyprint-override"><code>const positive = messages.some(msg =&gt; msg.content.includes(check)); </code></pre> <p><code>.filter()</code> is intended for returning a new array</p>
Discord.JS v13 Search a List for a specific key word
javascript|discord|discord.js
1
50
2
72,843,092
72,843,092
1
true
2022-07-02T21:46:43.790Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Discord.JS v13 Search a List for a specific key word<p>I wanted to write a command to check if a specific user is part of a ban list in my server. Unfortunat...
72,845,980
Better, cleaner way of writing this code?<p>I am fairly new to coding and wanted a better (less repetative) way of creating this line of code for my fetch call. I'll add the important parts of the code.</p> <p>HTML</p> <pre><code>&lt;form id= 'selectionForm' action=&quot;#&quot;&gt; &lt;p&gt; ...
<p>Use <code>&lt;p&gt;</code>aragraphs instead of text nodes with many linebreaks inbetween.</p> <p>You can create them easily in a loop:</p> <pre><code>const lines = [ 'The checked element is : '+e.id, data.results[0].title, 'IMDB Rating : ' + data.results[0].imdbRating, 'Year of release : ' + data.re...
Better, cleaner way of writing this code?
javascript|for-loop|fetch-api
0
50
1
72,846,457
72,846,457
1
true
2022-07-03T11:09:14.003Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Better, cleaner way of writing this code?<p>I am fairly new to coding and wanted a better (less repetative) way of creating this line of code for my fetch ca...