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,937,781
Python: Colorize a row by clicking a button<p>I'm trying to colorize a specific row in the output when I click on the &quot;Sortiert&quot; button&quot;. Is there any quick way to include this into my code? Another option would be that clicking the button deletes the entire row. I haven't found a solution for tkinter fo...
<p>You can simply use a list to store those <code>Text</code> boxes in a row and pass this list to a function associated to the button of the corresponding row. Then you can go through the list inside the function to change the background color of those <code>Text</code> boxes:</p> <pre class="lang-py prettyprint-overr...
Python: Colorize a row by clicking a button
python|pandas|tkinter
0
52
1
72,939,982
72,939,982
0
true
2022-07-11T11:23:40.110Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python: Colorize a row by clicking a button<p>I'm trying to colorize a specific row in the output when I click on the &quot;Sortiert&quot; button&quot;. Is t...
72,851,671
Xamarin iOS Program: HealthKit User Permission Dialog not Shown<p>I follow the tutorial <a href="https://docs.microsoft.com/en-us/xamarin/ios/platform/healthkit" rel="nofollow noreferrer">here</a> (Code from Git Code repo <a href="https://github.com/xamarin/ios-samples/tree/main/ios8/IntroToHealthKit" rel="nofollow nor...
<p>I found my problem is: at Project Options-&gt;iOS Bundle signing, I need to configure both the platform of iPhoneSimulator and the platform of iPhone (select the dropdown menu to configure both). Both the signing identity and provisioning profile can't be automatic. The custom Entitlements needs to include Entitleme...
Xamarin iOS Program: HealthKit User Permission Dialog not Shown
c#|xamarin|permissions|healthkit|ios-permissions
0
52
1
72,943,593
72,943,593
0
true
2022-07-04T04:03:54.420Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Xamarin iOS Program: HealthKit User Permission Dialog not Shown<p>I follow the tutorial <a href="https://docs.microsoft.com/en-us/xamarin/ios/platform/health...
72,947,955
Flutter, change Icon state with boolean from one widget to another<p>I have two widgets. First is the ParticipantScreen() that displays the second widget in GridView.builder() - ParticipantCard(). Both widgets have mic icons to mute participants. When I mute local participant I click mic icon on ParticipantScreen(), an...
<p>You can use callback function(can be typedef) for this like</p> <pre class="lang-dart prettyprint-override"><code>final Function(bool isMuted) onChanged; </code></pre> <p>Play with this widget</p> <pre class="lang-dart prettyprint-override"><code>class ParentWidget extends StatefulWidget { const ParentWidget({Key?...
Flutter, change Icon state with boolean from one widget to another
android|flutter|widget
0
52
1
72,949,226
72,949,226
0
true
2022-07-12T06:34:22.763Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Flutter, change Icon state with boolean from one widget to another<p>I have two widgets. First is the ParticipantScreen() that displays the second widget in ...
72,956,849
Get value from clipboard & incorporate it into a cell value<p>The code below assigns contents of clipboard to a variable S. (When running Debug.Print it shows up) Then I am trying to incorporate the clipboard contents into a cell value along with a certain phrase and current date.</p> <p>Result I'm seeking for cell F77...
<p>Here's how I made it work:</p> <p>In Worksheet</p> <pre><code>Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean) If Not Application.Intersect(Target, Range(&quot;F775&quot;)) Is Nothing Then Call readClipboard End If ' If Not Application.Intersect(Target, Range(&quot;b1:u8&quot;)) I...
Get value from clipboard & incorporate it into a cell value
excel|vba
0
52
2
72,958,190
72,958,190
0
true
2022-07-12T18:26:32.670Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Get value from clipboard & incorporate it into a cell value<p>The code below assigns contents of clipboard to a variable S. (When running Debug.Print it show...
72,957,391
Reading dynamic value for *jhiHasAnyAuthority<p>I am new to Angular and jhipster stack, we are building an angular - spring-boot project with jhipster stack. For rendering the menu items in the Nav Bar we are using '*<strong>jhiHasAnyAuthority</strong>' in the navbar.component.html like below:</p> <pre><code>&lt;li *jh...
<p>Not sure what you mean by &quot;dynamically&quot; but you can inject <code>AccountService</code> into the constructor of your component and use its functions and in particular <code>hasAnyAuthority()</code>. This is what the directive uses. Look at its definition in <code>src/main/webapp/app/core/auth/account.servic...
Reading dynamic value for *jhiHasAnyAuthority
angular|jhipster|angular-directive
0
52
2
72,958,292
72,958,292
0
true
2022-07-12T19:22:34.460Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Reading dynamic value for *jhiHasAnyAuthority<p>I am new to Angular and jhipster stack, we are building an angular - spring-boot project with jhipster stack....
72,957,178
C++ intel_driver.hpp C1083 Cannot open include file: 'atlstr.h':No such file or directory (compiling source file main.cpp) I can't build the release<p>I would like to build this kdmapper project but unfortunately I can't because with 'altstr.h' has an issue in the attachment can you see the details: <a href="https://im...
<p>Just install the MFC package in Visual Studio. <a href="https://docs.microsoft.com/en-us/cpp/mfc/mfc-and-atl?view=msvc-170" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/cpp/mfc/mfc-and-atl?view=msvc-170</a></p>
C++ intel_driver.hpp C1083 Cannot open include file: 'atlstr.h':No such file or directory (compiling source file main.cpp) I can't build the release
c++
-2
52
1
72,959,794
72,959,794
0
true
2022-07-12T18:59:19.630Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: C++ intel_driver.hpp C1083 Cannot open include file: 'atlstr.h':No such file or directory (compiling source file main.cpp) I can't build the release<p>I woul...
72,950,881
Running an external function within Pandas Dataframe to speed up processing loops<p>Good Day Peeps,</p> <p>I currently have 2 data frames, &quot;Locations&quot; and &quot;Pokestops&quot;, both containing a list of coordinates. The goal with these 2 data frames, is to cluster points from &quot;Pokestops&quot; that are w...
<p>I don't fully understand your code, but from your text there are a few things you can do to speed this up. I think the most beneficial thing to do is to vectorize your distance calculations, because looping to every combination takes forever. So i stole the calculation from <a href="https://stackoverflow.com/a/29546...
Running an external function within Pandas Dataframe to speed up processing loops
python|arrays|pandas|dataframe|for-loop
0
52
2
72,962,745
72,962,745
0
true
2022-07-12T10:31:46.870Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Running an external function within Pandas Dataframe to speed up processing loops<p>Good Day Peeps,</p> <p>I currently have 2 data frames, &quot;Locations&qu...
72,960,105
"error: Your local changes to the following files would be overwritten by checkout" on file outside of my repository - what can I do?<p>I have a github repo that I somehow horked up from Mac that I can no longer switch branches in.</p> <p>My .NET 6.0 ASP.NET web site project uses NLog, which is a logging package config...
<p>As you've just seen, these kinds of &quot;funny&quot; paths—which work just fine on Linux and macOS in general—create all kinds of headaches for Windows users. (Before the macOS users point and laugh, we might note that storing two different files, one named <code>s</code> <code>c</code> <code>h</code> <code>o</cod...
"error: Your local changes to the following files would be overwritten by checkout" on file outside of my repository - what can I do?
git|git-checkout
1
52
2
72,963,214
72,963,214
0
true
2022-07-13T01:58:57.477Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: "error: Your local changes to the following files would be overwritten by checkout" on file outside of my repository - what can I do?<p>I have a github repo ...
72,965,113
ValueError: cannot reindex from a duplicate axis in explode<p>I am trying to expand the dataframe from one row to multiple rows based on two columns.</p> <p>Following is the snapshot of the actual data.</p> <pre><code>initial_row_index Date Product_ID No_of_items 1 202...
<p>Try this:</p> <pre><code>df.explode(['Product_ID', 'No_of_items']) &gt; initial_row_index Date Product_ID No_of_items 0 1 2021-07-11 A13N 3 0 1 2021-07-11 A4BE 5 0 1 2021-07-11 5GH$ 1 1 2 2021-07-12 A13N 7 1 2 2021-07-12 X9HE 2 1 2 2021-07-12 7H3T 4 2 3 202...
ValueError: cannot reindex from a duplicate axis in explode
python|pandas|pandas-explode
0
52
1
72,965,780
72,965,780
0
true
2022-07-13T10:54:57.927Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: ValueError: cannot reindex from a duplicate axis in explode<p>I am trying to expand the dataframe from one row to multiple rows based on two columns.</p> <p>...
72,904,907
Difference of code result using step by step with the vs debugger and running normally Python<p>Hello I try to get some data from a web page with selenium. But some weird things happen that I doesn't understand. When I run my programm step by step with the debugger it works but running normaly it doesn't. I haven't see...
<p>Thanks for your responses and sorry for not being clear enough. I finally succeeded to address my issue. The problem was that when i ran my code normally the webpage wasn't loading fast enough as a consequence my program was not able to get the element it needed because the webpage was not loaded though when i uses ...
Difference of code result using step by step with the vs debugger and running normally Python
python|selenium|visual-studio-code
0
52
1
72,967,130
72,967,130
0
true
2022-07-07T22:33:28.550Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Difference of code result using step by step with the vs debugger and running normally Python<p>Hello I try to get some data from a web page with selenium. B...
72,968,219
Convert promises to callbacks<p>This sounds like weird requirements since it's only with the purpose of learning Promise.</p> <p>I started to use Promise before callback hell... so writing promise is easier and more natural. However I heard promise solved the callback hell issue, so I am trying to convert the following...
<p>It's an admirable idea to learn this way, but the other thing to learn is that, just like programing, experimentation requires precision.</p> <p>Turn your experiment into a &quot;controlled experiment&quot; by being precise about what's standardized between the functions in each style (trial), and what changes betwe...
Convert promises to callbacks
javascript|promise|callback
0
52
1
72,968,682
72,968,682
0
true
2022-07-13T14:43:55.110Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Convert promises to callbacks<p>This sounds like weird requirements since it's only with the purpose of learning Promise.</p> <p>I started to use Promise bef...
72,974,101
Max + Left + Find/Lookup Function?<p>I'm trying to make a formula that will find the maximum value in a column using the left function, but only for cells which contain a serial date value matching today's serial date value.</p> <p><a href="https://i.stack.imgur.com/aYgrJ.png" rel="nofollow noreferrer">Formatting of th...
<p>This is the way I understood your question:</p> <p>(in cell B1 is the formula from your link)</p> <p><a href="https://i.stack.imgur.com/Lknq0.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Lknq0.jpg" alt="enter image description here" /></a></p> <p>This is the formula (cell C1):</p> <pre><code>=L...
Max + Left + Find/Lookup Function?
excel|excel-formula
0
52
1
72,975,087
72,975,087
0
true
2022-07-14T00:52:54.223Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Max + Left + Find/Lookup Function?<p>I'm trying to make a formula that will find the maximum value in a column using the left function, but only for cells wh...
72,935,642
DI broken in .NET6?<p>I'm doing something completely normal - registering Insight.Database autointerfaces in WebApi DI.</p> <p>Here's the code -</p> <pre><code>var dataString = builder.Configuration.GetConnectionString(&quot;DefaultConnection&quot;); SqlInsightDbProvider.RegisterProvider(); var connection = new SqlCon...
<p>Inevitably, the problem turned out to be between keyboard and chair.</p> <p>I was attempting to structure my returns from the database using Insight's <code>[Recordset]</code> attributes like so...</p> <pre><code>[Recordset(1, typeof(UserClaim), GroupBy = nameof(UserClaim.UserId), Into=nameof(ApplicationUser.UserCla...
DI broken in .NET6?
.net-6.0|webapi|insight.database
0
52
1
72,977,873
72,977,873
0
true
2022-07-11T08:25:52.473Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: DI broken in .NET6?<p>I'm doing something completely normal - registering Insight.Database autointerfaces in WebApi DI.</p> <p>Here's the code -</p> <pre><co...
72,980,172
Filtering array data with multiple conditions with ES6<p>I'm using an es6 filter function that takes in both search string and value from state hook that should allow the user to search data by a string, and then apply a filter property <code>a11yType</code> as well. I can filter the data by <code>a11yType</code> alone...
<p>I'm not sure I fully understand the goal you want to achieve, but I think you've made a logical error.<br /> First, you used the <em>or</em> operator in your statement. It checks whether at least one of the conditions is true. So you first check if the f[0] includes the searchString and if it doesn't it proceeds to ...
Filtering array data with multiple conditions with ES6
javascript|arrays|filter|ecmascript-6|react-hooks
1
52
2
72,980,854
72,980,854
0
true
2022-07-14T12:02:48.217Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Filtering array data with multiple conditions with ES6<p>I'm using an es6 filter function that takes in both search string and value from state hook that sho...
72,980,521
Getting message in ibmmq Node.js<p>I'm using ibmmq module <a href="https://github.com/ibm-messaging/mq-mqi-nodejs" rel="nofollow noreferrer">https://github.com/ibm-messaging/mq-mqi-nodejs</a></p> <p>I need to get an xml message from a queue and than make an xsl-transformation. I put messages to the queue with JMeter an...
<p>That message has the headers created by a JMS application. There are various ways of dealing with it. You can</p> <ul> <li>Have the sending app disable sending that structure (setting the <a href="https://www.ibm.com/docs/en/ibm-mq/9.3?topic=mjmomm-exchanging-messages-between-jms-application-traditional-mq-applicati...
Getting message in ibmmq Node.js
node.js|jmeter|jms|ibm-mq
0
52
1
72,982,048
72,982,048
0
true
2022-07-14T12:28:30.680Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Getting message in ibmmq Node.js<p>I'm using ibmmq module <a href="https://github.com/ibm-messaging/mq-mqi-nodejs" rel="nofollow noreferrer">https://github.c...
72,982,838
Migrate SQL Server Database to Oracle using SQL Developer on same system not work<p>I have a SQL Server database with name test3 that have 1 table with name A that have 1 column with 5 rows, I want migrate to Oracle but it gives an error before I enter Oracle password as shown as.</p> <p><a href="https://i.stack.imgur....
<p>Most common reason I've seen the Migration Repository from being created correctly no newer instances of Oracle is that the user associated with the schema lacks QUOTA on the user's default tablespace.</p> <p>Try something like this :</p> <pre><code>ALTER USER X QUOTA UNLIMITED ON Y </code></pre> <p>Where X is the U...
Migrate SQL Server Database to Oracle using SQL Developer on same system not work
oracle|oracle-sqldeveloper
0
52
1
72,986,547
72,986,547
0
true
2022-07-14T15:13:13.680Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Migrate SQL Server Database to Oracle using SQL Developer on same system not work<p>I have a SQL Server database with name test3 that have 1 table with name ...
72,986,826
Filtering and counting values of array of objects Javascript<p>I have an array of objects that looks like this:</p> <pre><code>[{ date: &quot;07-14-2022&quot;, report: [{ vehicles: [{ id: &quot;uid&quot;, status: &quot;active&quot;, type: &quot;car&quot; }, { id: &quot;uid&quot;, ...
<p><code>filter</code> first then use <code>reduce</code> to group. This is a trick I've learned from <a href="https://stackoverflow.com/a/40774906/3807365">this answer</a></p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet...
Filtering and counting values of array of objects Javascript
javascript|angular|typescript
-4
52
2
72,986,917
72,986,917
0
true
2022-07-14T21:26:44.783Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Filtering and counting values of array of objects Javascript<p>I have an array of objects that looks like this:</p> <pre><code>[{ date: &quot;07-14-2022&quot...
72,977,274
How to make bootstrap pagination work in VueJS 2<p>My website looks like this:</p> <p><strong>Jobs.vue:</strong></p> <pre><code> &lt;div id=&quot;jobs&quot; class=&quot;job-item&quot; v-for=&quot;(item, index) in showJobs&quot; :key=&quot;index&quot; &gt; ...
<p>The behaviour of the <strong>b-pagination</strong> component is very simple - it takes a number of records (<em>rows</em>) and the number of records that should be displayed (<em>perPage</em>) and creates a component with an appropriate number of pages. The <em>currentPage</em> variable tells you on which page you s...
How to make bootstrap pagination work in VueJS 2
javascript|vue.js|vuejs2|vuejs3|bootstrap-vue
0
52
1
72,989,572
72,989,572
0
true
2022-07-14T08:11:22.757Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to make bootstrap pagination work in VueJS 2<p>My website looks like this:</p> <p><strong>Jobs.vue:</strong></p> <pre><code> &lt;div id=...
72,987,257
How to modify the width of v-text-field in a d-flex in vue?<p>I'm new to vue and I have two v-text-field in a flexbox. They are taking all available space of a line side by side. However, I wanna make them smaller. I have tried add a style to modify the width but it doesn't work. I guess the style is overwritten? Here ...
<p>Just change width with max-width it will work</p> <pre><code>.textbox { max-width: 30px ; } </code></pre> <p><a href="https://codepen.io/nilesh9836/pen/ExENGGN" rel="nofollow noreferrer">here</a> is the link of codepen</p>
How to modify the width of v-text-field in a d-flex in vue?
html|css|vue.js|vue-component|vuetify.js
0
52
1
72,993,235
72,993,235
0
true
2022-07-14T22:27:42.127Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to modify the width of v-text-field in a d-flex in vue?<p>I'm new to vue and I have two v-text-field in a flexbox. They are taking all available space of...
72,935,895
Can I use the camera of my IPhone on my Apple-Watch to scan a QR-Code (eg. for login) in SwiftUi<p>I want to simplify the login on my Apple-Watch-App by scanning a QR-code. The only problem is I can't really find any documentation on how to use the <strong>Iphone camera</strong> when programming an <strong>Apple-Watch-...
<p>The QR code would need to open the companion app on the phone and then the phone would pass the login details to the watch app via WCSession. So in Order to use the camera, you always need a companion app, a watch-only app is not able to access the camera. Thanks to @Paulw11</p>
Can I use the camera of my IPhone on my Apple-Watch to scan a QR-Code (eg. for login) in SwiftUi
ios|swift|swiftui|apple-watch
2
52
1
72,994,557
72,994,557
0
true
2022-07-11T08:50:31.933Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can I use the camera of my IPhone on my Apple-Watch to scan a QR-Code (eg. for login) in SwiftUi<p>I want to simplify the login on my Apple-Watch-App by scan...
72,994,812
How to unsubscribe messaging/voice webhook to stop receiving events occurred in a number?<p>In Twilio, after we register a webhook URL in an active number, we'll be able to get event notifications whenever events occour in the registered number depending on the type of webhook we registered (Voice/SMS).</p> <p>The regi...
<p>The same API, <a href="https://www.twilio.com/docs/phone-numbers/api/incomingphonenumber-resource" rel="nofollow noreferrer">incomingPhoneResource</a>, would be used do the same. You should be able to create, read, update and delete the configured webhooks for voice and SMS phone number configurations this way.</p>
How to unsubscribe messaging/voice webhook to stop receiving events occurred in a number?
twilio
0
52
1
72,995,642
72,995,642
0
true
2022-07-15T13:31:03.903Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to unsubscribe messaging/voice webhook to stop receiving events occurred in a number?<p>In Twilio, after we register a webhook URL in an active number, w...
72,996,915
grep for pods and select each result and pass a command in loop<p>I have few pods running in my kubernetes cluster. I am developing a shell script and I want to grep for few pods and want to select each pod from the grep result to execute a command. Lets say I grep few pods by command :</p> <pre><code>kubectl get pods ...
<p>Get pods name and then use &quot;for&quot; to execute command in each pod</p> <pre><code>#!/bin/bash pods=$(kubectl get pods | awk '{print $2}' | grep -i test) for i in $pods do kubectl exec -it $i -- echo &quot;test&quot; done </code></pre>
grep for pods and select each result and pass a command in loop
shell|kubernetes|awk|grep
-1
52
3
72,997,099
72,997,099
0
true
2022-07-15T16:17:22.790Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: grep for pods and select each result and pass a command in loop<p>I have few pods running in my kubernetes cluster. I am developing a shell script and I want...
72,998,213
Grab information from inside the form using web scraping - python 3<p>I'm creating a project using web scraping , I'm having trouble extracting information from an Iframe form, when I try to extract the values ​​of the name , position and company field.</p> <p>Code I'm testing:</p> <pre><code>replay = browser.switch_to...
<p>This could be optional:</p> <pre><code>browser.switch_to.frame(By.ID,&quot;content210835787_ifr&quot;) </code></pre> <p>Mandatory</p> <pre><code>elem=browser.find_element(By.XPATH,&quot;//body[@id='tinymce']/div&quot;) print(elem.text) </code></pre> <p>Without a url to verify off I'm not too sure but switch to your ...
Grab information from inside the form using web scraping - python 3
python|html|selenium|web-scripting
0
52
2
73,001,503
73,001,503
0
true
2022-07-15T18:20:35.017Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Grab information from inside the form using web scraping - python 3<p>I'm creating a project using web scraping , I'm having trouble extracting information f...
73,002,027
React MUI focusVisible ripple animation on hover<p>I rather like the focus animation on buttons (e.g., when tabbing through them). I'd like to apply the same animation on hover as well.</p> <p>It looks like this, but pulsating:</p> <p><a href="https://i.stack.imgur.com/RJt6K.png" rel="nofollow noreferrer"><img src="htt...
<p>One of the Button props is <code>touchRippleRef</code>, which exposes a <code>pulsate()</code> function. I wrapped the <code>Button</code> component, and got the pulsing-ripple-animation on hover working:</p> <pre><code>function LinkButton(props: ButtonProps) { const touchRippleRef = useRef&lt;TouchRippleActions&...
React MUI focusVisible ripple animation on hover
material-ui
0
52
1
73,002,028
73,002,028
0
true
2022-07-16T06:30:21.677Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: React MUI focusVisible ripple animation on hover<p>I rather like the focus animation on buttons (e.g., when tabbing through them). I'd like to apply the same...
73,009,076
ReactJS Authenticated Navigation<p>I have used react-router-dom for Navigation..but My Problem is without authentication also Dashboard Screen is being visible for mili seconds.</p> <p><strong>App.js</strong></p> <pre><code> &lt;Route index path=&quot;/&quot; element={&lt;ProtectedRoute&gt;&lt;Dashboard /&gt;&lt;/Prote...
<p>The issue is that your <code>ProtectedRoute</code> component doesn't wait for the authentication status to be confirmed. In other words, the default <code>user</code> state masks one of either the authenticated or unauthenticated status.</p> <p>It should conditionally render a loading indicator while <code>onAuthSta...
ReactJS Authenticated Navigation
javascript|reactjs|firebase|react-router-dom
1
52
1
73,009,202
73,009,202
0
true
2022-07-17T03:31:44.813Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: ReactJS Authenticated Navigation<p>I have used react-router-dom for Navigation..but My Problem is without authentication also Dashboard Screen is being visib...
73,009,535
async issues regarding model import using promises and three.js<p>Im having a problem resolving a promise.</p> <p>on load my script has a promise that i wish to resolve when a function that contains 3D file imports finishes importing.</p> <p>the problem im facing is how to make the promises resolve() execute when a mod...
<p>You should make a promise that resolves when the load callback is called. In other words, you should <em>promisify</em> <code>.load()</code>:</p> <pre><code>const promiseGLTFLoad = url =&gt; new Promise(resolve =&gt; new GLTFLoader_js_1.GLTFLoader().load(url, resolve)); </code></pre> <p>With this function you ca...
async issues regarding model import using promises and three.js
javascript|promise|three.js
0
52
1
73,009,838
73,009,838
0
true
2022-07-17T05:51:23.420Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: async issues regarding model import using promises and three.js<p>Im having a problem resolving a promise.</p> <p>on load my script has a promise that i wish...
73,012,081
How to make a screen with Tabs and TabBarViews both scrollable in flutter?<p>I've been trying to add SingleChildScrollView to my code so that the whole page including Tabs and TabBarViews are scrolled together.</p> <blockquote> <p>RenderFlex children have non-zero flex but incoming height constraints are unbounded Hori...
<p>You can use <code>NestedScrollView</code>. It is better to use <code>ListView.builder</code> or <code>CustomScrollView</code> instead of using <code>SingleChildScrollView</code> on <code>StyleGrid</code></p> <pre class="lang-dart prettyprint-override"><code>class StyleScreen extends StatefulWidget { const StyleScr...
How to make a screen with Tabs and TabBarViews both scrollable in flutter?
flutter|dart|tabs|flutter-layout|singlechildscrollview
1
52
2
73,012,543
73,012,543
0
true
2022-07-17T13:12:17.450Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to make a screen with Tabs and TabBarViews both scrollable in flutter?<p>I've been trying to add SingleChildScrollView to my code so that the whole page ...
73,006,714
Cannot retrieve data from API in production mode (Works in dev mode) using Express + Reactjs<p>I'm a beginner trying to build a full-stack application using Express for the server-side and reactjs for the frontend. Basically, I want to call an API, retrieve the JSON-format data, and use that data on the frontend side.<...
<p>I managed to find a solution for this. So, to get the API call working in production,</p> <p>following are the two changes I made.</p> <ol> <li>In <code>server.js</code></li> </ol> <p>Had to change the cors() part like this</p> <pre><code>app.use(cors({ origin: &quot;*&quot;, credentials: true })); </code></pre> <ol...
Cannot retrieve data from API in production mode (Works in dev mode) using Express + Reactjs
reactjs|express|axios|production-environment|vercel
0
52
1
73,013,721
73,013,721
0
true
2022-07-16T18:26:22.200Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Cannot retrieve data from API in production mode (Works in dev mode) using Express + Reactjs<p>I'm a beginner trying to build a full-stack application using ...
73,014,541
Expected ',' but got identifier<p>I am new in solidity and General with coding. i use this : Truffle v5.5.21 (core: 5.5.21) ,Ganache v7.2.0,Solidity v0.5.16 (solc-js) Node v12.22.12,Web3.js v1.7.4.</p> <p>I took this error and i cant fix it. I checked more interesting information's about my project but the problem is p...
<p>Lets see your code:</p> <pre><code>cur = state(cur).func(uint c); </code></pre> <p>You are defining the input variable inside the function parameter, you can't do that, try the following:</p> <pre><code>byte c; // remember to set the value you see fit. cur = state(cur).func(c); </code></pre> <p>I suggest you also ch...
Expected ',' but got identifier
solidity
0
52
1
73,016,137
73,016,137
0
true
2022-07-17T18:56:29.573Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Expected ',' but got identifier<p>I am new in solidity and General with coding. i use this : Truffle v5.5.21 (core: 5.5.21) ,Ganache v7.2.0,Solidity v0.5.16 ...
73,016,104
Flexbox: growing div with flex-basis: 0px expands too far when there's lots of content inside it<p>Consider the following HTML (<a href="https://jsfiddle.net/35aokrez/144/" rel="nofollow noreferrer">JSFiddle</a>):</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div ...
<p>First of all, you can remove the <code>flex</code> property and you will still get the same result. I am also removing the properties that won't affect the result as well:</p> <p><div class="snippet" data-lang="js" data-hide="true" data-console="true" data-babel="false"> <div class="snippet-code snippet-currently-hi...
Flexbox: growing div with flex-basis: 0px expands too far when there's lots of content inside it
html|css|flexbox
1
52
2
73,016,292
73,016,292
0
true
2022-07-17T23:44:56.207Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Flexbox: growing div with flex-basis: 0px expands too far when there's lots of content inside it<p>Consider the following HTML (<a href="https://jsfiddle.net...
73,014,349
Is there a way to draw pieces of the image on 2d canvas without transparent parts?<p>I would like to draw <strong><a href="https://i.stack.imgur.com/FR1tk.png" rel="nofollow noreferrer">this</a></strong> image on canvas without the transparent parts. The principle of my rendering is that I crop small images from a larg...
<p>The best is to prepare your asset correctly, so here that would mean having only the 3 unique sprites in your atlas:</p> <p><a href="https://i.stack.imgur.com/k9DH3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/k9DH3.png" alt="OP's atlas without the transparent slots" /></a></p> <p>Then you can ...
Is there a way to draw pieces of the image on 2d canvas without transparent parts?
javascript|arrays|bitmap|html5-canvas|crop
0
52
1
73,020,288
73,020,288
0
true
2022-07-17T18:29:51.600Z
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 draw pieces of the image on 2d canvas without transparent parts?<p>I would like to draw <strong><a href="https://i.stack.imgur.com/FR1tk.pn...
73,020,242
Is it possible to reference a foreign key in an database to another database?<p>I understand that it is possible in <code>MySQL</code>, but I can not figure out how to reference a foreign key in one <code>sqlite</code> database to another <code>SQLite</code> database.</p> <p>Below is an example that I attempted to repl...
<p>When talking about foreign keys, SQLite's built-in foreign key constraints do not work across databases. But you can make cross database calls:</p> <pre class="lang-sql prettyprint-override"><code>attach 'database1.db' as db1; attach 'database2.db' as db2; </code></pre> <pre class="lang-sql prettyprint-override"><co...
Is it possible to reference a foreign key in an database to another database?
laravel|sqlite|laravel-9
0
52
1
73,020,351
73,020,351
0
true
2022-07-18T09:43:26.330Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is it possible to reference a foreign key in an database to another database?<p>I understand that it is possible in <code>MySQL</code>, but I can not figure ...
73,018,961
Show or hide table rows based on text value in Blazor<p>I have table like:</p> <pre><code>&lt;input type=&quot;search&quot; class=&quot;form-control&quot; id=&quot;search&quot; @bind-value=&quot;@search&quot; /&gt; &lt;table class=&quot;table table-striped table-borderless&quot;&gt; &lt;thead&gt; &lt;tr&gt...
<p>Filter the list with a <code>linq</code> <code>Where</code> clause.</p> <pre><code>@foreach (var row in list.Where(a =&gt; a.Visible)) { ... } </code></pre>
Show or hide table rows based on text value in Blazor
blazor
0
52
2
73,021,485
73,021,485
0
true
2022-07-18T07:54:17.643Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Show or hide table rows based on text value in Blazor<p>I have table like:</p> <pre><code>&lt;input type=&quot;search&quot; class=&quot;form-control&quot; id...
72,995,693
How to put custom Gradle plugins on an another projects build classpath?<p>I have a published gradle plugin which looks something like this:</p> <pre><code>|__root | | | | | |__java | | |__SomeJavaClass.java | | |__SomeJavaClass2.java | | | |__kotlin | |__MyPluginClass.kts | ...
<p>Finnaly figured out. I didn't create plugins from build-logic, left them as kotlin files. Since it is a separate gradle project, i can just build the project and point project A's classpath to the produced jar file like</p> <pre><code>buildscript { dependencies { classpath(files(&quot;path.to.the.jar&quo...
How to put custom Gradle plugins on an another projects build classpath?
java|kotlin|gradle
0
52
2
73,022,427
73,022,427
0
true
2022-07-15T14:39:22.230Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to put custom Gradle plugins on an another projects build classpath?<p>I have a published gradle plugin which looks something like this:</p> <pre><code>|...
73,016,493
Cannot run 'npm run dev' after install laravel-mix-workbox<p>I got an error when running 'npm run dev' after installing laravel-mix-workbox.</p> <p>Here's the error</p> <p><a href="https://i.stack.imgur.com/0fhXK.jpg" rel="nofollow noreferrer">enter image description here</a></p> <blockquote> <p><code>[webpack-cli] Err...
<p>run and rebuild</p> <pre><code>npm i growly --save </code></pre>
Cannot run 'npm run dev' after install laravel-mix-workbox
laravel|laravel-mix|workbox|workbox-webpack-plugin
0
52
1
73,023,276
73,023,276
0
true
2022-07-18T01:26:54.160Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Cannot run 'npm run dev' after install laravel-mix-workbox<p>I got an error when running 'npm run dev' after installing laravel-mix-workbox.</p> <p>Here's th...
73,028,621
Spotify Api returning undefined object when trying to get playlist tracks with axios<pre><code>import axios from &quot;axios&quot;; </code></pre> <p>import React, {useState, useEffect} from &quot;react&quot;; export default function Dashboard({token}) {</p> <pre><code>const [playlist_id, setPlaylistId] = useState([]); ...
<p><code>axios.get</code> returns a <a href="https://github.com/axios/axios#response-schema" rel="nofollow noreferrer"><code>Response</code> object</a>. That object doesn't have <code>tracks</code> property.</p> <p>You probably wanted to do:</p> <pre><code>const {data: tracks} = axios.get(/* url */) </code></pre>
Spotify Api returning undefined object when trying to get playlist tracks with axios
javascript|reactjs|api|axios|spotify
-3
52
1
73,028,679
73,028,679
0
true
2022-07-18T21:04:20.723Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Spotify Api returning undefined object when trying to get playlist tracks with axios<pre><code>import axios from &quot;axios&quot;; </code></pre> <p>import R...
73,022,948
setting rpi-gpio pin on high after running a python script<p>I'm building a photogrametry setup with raspberry pi and stepper motor. The python script runs fine, but i got a problem with setting a pin to high after the script ran through.</p> <p>The stepper driver has an enable input, which diasables the motor with hig...
<p>To make my comment an answer:</p> <p>Gpiozero only resets the pins it touches, so if you don't initialize or touch pin 26 with gpiozero (i.e. replace <code>step_en.off()</code> with <code>pigs w 26 0</code> and don't even initialize step_en), it shouldn't also reset the pin:</p> <pre><code>import os import time imp...
setting rpi-gpio pin on high after running a python script
python|raspberry-pi|subprocess|gpio
0
52
1
73,032,716
73,032,716
0
true
2022-07-18T13:17:37.397Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: setting rpi-gpio pin on high after running a python script<p>I'm building a photogrametry setup with raspberry pi and stepper motor. The python script runs f...
73,014,198
Django Rest Framework doesn't correctly changes requests text to json<p>I got below code:</p> <pre><code>from django.contrib.auth import authenticate from django.views.decorators.csrf import csrf_exempt from rest_framework.authtoken.models import Token from rest_framework.decorators import api_view, permission_classes ...
<p>You have to settings the default parsers for rest-framework.</p> <p>This will help: <a href="https://www.django-rest-framework.org/api-guide/parsers/" rel="nofollow noreferrer">Parsers</a></p>
Django Rest Framework doesn't correctly changes requests text to json
python|django|django-rest-framework
0
52
1
73,033,865
73,033,865
0
true
2022-07-17T18:06:06.883Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Django Rest Framework doesn't correctly changes requests text to json<p>I got below code:</p> <pre><code>from django.contrib.auth import authenticate from dj...
73,027,696
Clarifai-node-js api import error while using it reactjs<p><img src="https://i.stack.imgur.com/ioOkr.png" alt="import" /></p> <p>and</p> <p><img src="https://i.stack.imgur.com/tty2V.png" alt="error" /></p> <p>Hi. I attach 2 pictures. <strong>There I am having an issue while importing Clarifai-nodejs-grpc.</strong> Plea...
<ul> <li>It seems like this issue has been reported here already: <a href="https://github.com/Clarifai/clarifai-nodejs-grpc/issues/25" rel="nofollow noreferrer">https://github.com/Clarifai/clarifai-nodejs-grpc/issues/25</a></li> <li>While I get someone to take on look on Clarifai's end, please use simple REST calls: <a...
Clarifai-node-js api import error while using it reactjs
javascript|reactjs|react-hooks|jsx|clarifai
0
52
1
73,034,043
73,034,043
0
true
2022-07-18T19:34:33.197Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Clarifai-node-js api import error while using it reactjs<p><img src="https://i.stack.imgur.com/ioOkr.png" alt="import" /></p> <p>and</p> <p><img src="https:/...
72,963,437
Kotlin: setTheme not changing the theme colors (transparent)<p>How to change the theme by programmatically?</p> <ol> <li>Style</li> </ol> <pre class="lang-xml prettyprint-override"><code>&lt;resources&gt; &lt;style name=&quot;Pet.Theme.Transparent&quot; parent=&quot;AppTheme.NoBar&quot;&gt; &lt;item name=&q...
<blockquote> <p>It's not best but work for me.</p> </blockquote> <p>I fix it with create another activity that support for transparent or not transparent.</p> <ul> <li>ActivityA (Transparent using AndroidManifest.xml)</li> <li>ActivityB (Not Transparent using AndroidManifest.xml)</li> </ul> <p>Both activity <strong>rep...
Kotlin: setTheme not changing the theme colors (transparent)
android|kotlin|themes
0
52
2
73,034,449
73,034,449
0
true
2022-07-13T08:51:58.533Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Kotlin: setTheme not changing the theme colors (transparent)<p>How to change the theme by programmatically?</p> <ol> <li>Style</li> </ol> <pre class="lang-xm...
72,901,268
COleDateTimeSpan dates difference returns incorrect value sometimes<p>I am using the following code to find the difference between two dates basically one is current system date and another server date. I am getting different values at different times, hence I changed the format to only include dates and not datetimes....
<p>Hello I was able to solve it by getting the date, month and year separately from COleDateTime class and getting the difference manually. Thanks for all the help.</p>
COleDateTimeSpan dates difference returns incorrect value sometimes
c++|visual-studio-2010|mfc|coledatetime
0
52
1
73,047,016
73,047,016
0
true
2022-07-07T16:23:37.507Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: COleDateTimeSpan dates difference returns incorrect value sometimes<p>I am using the following code to find the difference between two dates basically one is...
72,946,508
Unable to authenticate in Jhipster<p>I'm create an application using Jhipster stack and development on Windows 10, here is application config</p> <pre><code>application { config { baseName xxx applicationType monolith packageName com.xxx authenticationType jwt prodDatabaseType mysql devDatabas...
<p>I found the solution, in the configurations, tomcat has been excluded, I remove that line and change undertow to tomcat then it's work. Thanks!</p>
Unable to authenticate in Jhipster
java|spring|spring-boot|jhipster
0
52
1
73,052,389
73,052,389
0
true
2022-07-12T02:44:25.327Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Unable to authenticate in Jhipster<p>I'm create an application using Jhipster stack and development on Windows 10, here is application config</p> <pre><code>...
72,913,336
Scipy interpolate Univariatespline for time series data<p>I have a dataframe of the format below. I need to smooth the value column using univariate splines. For the purpose I am trying to use the scipy interpolate univariate spline function. I converted the datetime column of the dataframe below to datetime64 type.</p...
<p>You can convert your data from datetime to the timestamp given in seconds (or any other resolution you want) using the code from <a href="https://stackoverflow.com/a/40881958/9702190">this answer</a>.</p> <p>So I replaced line 8 in your code accordingly:</p> <pre><code>x = df.datetime.values.astype(np.int64) // 10 *...
Scipy interpolate Univariatespline for time series data
python|time-series|spline
0
52
1
73,063,718
73,063,718
0
true
2022-07-08T14:59:36.343Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Scipy interpolate Univariatespline for time series data<p>I have a dataframe of the format below. I need to smooth the value column using univariate splines....
72,973,333
Where does PostgresSql localtime come from?<p>I've inherited a PostgreSQL database backup that was created with a version around 9.3. During the restore I'm getting the following error: &quot;[archiver (db)] could not execute query: ERROR: invalid value for parameter &quot;TimeZone&quot;: &quot;localtime&quot;. The er...
<p>I'm sure there's a more elegant solution, but the simple solution was just to copy one of the files in the timezone directory and rename to localtime.</p>
Where does PostgresSql localtime come from?
postgresql|postgresql-9.3
0
52
2
73,092,357
73,092,357
0
true
2022-07-13T22:32:08.993Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Where does PostgresSql localtime come from?<p>I've inherited a PostgreSQL database backup that was created with a version around 9.3. During the restore I'm ...
73,010,636
How to save media files to Heroku local storage with Django?<p>Im having a Django REST app with React for client. Im recording a file with React and sending in to Django. When i save it i modify it with ffmpeg and save it again in the same folder with a new name, the ffmpeg command looks like this:</p> <p><code>os.syst...
<p>I was using two dynos, one guinicorn and second celery. It appears that every dyno in heroku is using its own file system, so you can't save files on one dyno and open them by another.</p>
How to save media files to Heroku local storage with Django?
python|django|heroku|ffmpeg
0
52
1
73,111,892
73,111,892
0
true
2022-07-17T09:25:09.767Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to save media files to Heroku local storage with Django?<p>Im having a Django REST app with React for client. Im recording a file with React and sending ...
72,952,485
Failing to get actual file path from storage in android<p>I have been trying to upload a file to a server using a multi-part API. To do this, I am firing an implicit intent so that the user can select a file from the device's storage. In <code>onActivityResult</code>, I do the following steps:</p> <ol> <li>Get <code>Ur...
<p>Thanks to @momvart and <a href="https://stackoverflow.com/a/60538917/3876954">https://stackoverflow.com/a/60538917/3876954</a></p> <p>I was able to solve this problem. Here's the answer:</p> <pre><code>public class FileSelectionUtils { public static void copyStream(InputStream source, OutputStream target) throws IO...
Failing to get actual file path from storage in android
android
0
52
1
73,233,237
73,233,237
0
true
2022-07-12T12:39:50.573Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Failing to get actual file path from storage in android<p>I have been trying to upload a file to a server using a multi-part API. To do this, I am firing an ...
72,967,876
Creating a Dashboard of Claims based on date in Python/Pandas<p>I currently have df1 and df2 below:</p> <p><strong>df1:</strong></p> <pre><code>df1 = [('2021-04-29', 'MN02') , ('2021-04-30', 'MN02'), ('2021-05-01', 'MN02'), ('2021-05-02', 'MN02'), ('2021-05-03', 'MN02'), ...
<pre><code>def setter(series): res = series.value_counts().reset_index().replace('NA', np.nan).dropna() res['Date'] = pd.to_datetime(res['index']) return res.drop(columns='index') approved = setter(df.Approved) processed = setter(df.Processed) data = pd.merge(approved, processed, on='Date', how='outer').fil...
Creating a Dashboard of Claims based on date in Python/Pandas
python|pandas
-1
52
1
72,968,884
72,968,884
0
true
2022-07-13T14:18:59.950Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Creating a Dashboard of Claims based on date in Python/Pandas<p>I currently have df1 and df2 below:</p> <p><strong>df1:</strong></p> <pre><code>df1 = [('2021...
72,970,974
How to create a countDuplicates method recursively in Java<p>I am writing a method that counts the number of duplicates in an array. I understand how to write it using a for loop, but I need to write it recursively.</p> <pre><code>public static int countDuplicates(String[] input) { //needs to be recursive int c...
<p>I believe someone have missed to call <code>Arrays.sort(input);</code> and comparison <code>input[i] == input[i + 1]</code> is not correct in case of <code>java.lang.String</code>.</p> <p>correct iterative:</p> <pre class="lang-java prettyprint-override"><code> public static int countDuplicatesIterative(String[] ...
How to create a countDuplicates method recursively in Java
java|recursion
-3
52
3
72,971,201
72,971,201
0
true
2022-07-13T18:24:51.220Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to create a countDuplicates method recursively in Java<p>I am writing a method that counts the number of duplicates in an array. I understand how to writ...
72,879,058
Python Tkinter; Creating multiple labels without declaring each one individually. Is there a way to put this in a for loop?<p>To be more specific, I need to create 45 different labels that I can control the bg color of individually based on the user input. The project is a lottery, and each correct number the user gets...
<p>Some few corrections to my code</p> <pre><code>labels = {} # Create a dictionary for i in range(45): labels[f'lbl_lotoNumberTip{i+1}'] = Label(lotto, text=f&quot;i+1&quot;, bg='green') </code></pre> <p>The code above will create the labels to access the labels use.</p> <pre><code>labels[lbl_lotoNumberTip1] # wher...
Python Tkinter; Creating multiple labels without declaring each one individually. Is there a way to put this in a for loop?
python|tkinter|label
0
52
2
72,880,965
72,880,965
0
true
2022-07-06T06:53:08.307Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python Tkinter; Creating multiple labels without declaring each one individually. Is there a way to put this in a for loop?<p>To be more specific, I need to ...
72,894,435
Function name for square brackets creating list<p>Apologies for the simple question - I've spent a while trying to answer it.</p> <p>When <code>[]</code> is used for indexing, Python calls the function <code>__getitem__</code>. What function does Python call when <code>[]</code> is used to create a list?</p>
<p>Basically, Python is an interpreter and these brackets are interpreted, without any function or whatever. <code>__getitem__</code> just pushes variable into raw interpreter.</p>
Function name for square brackets creating list
python
0
52
1
72,895,236
72,895,236
0
true
2022-07-07T08:15:36.440Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Function name for square brackets creating list<p>Apologies for the simple question - I've spent a while trying to answer it.</p> <p>When <code>[]</code> is ...
72,817,516
Properly using QMAKE_POST_LINK in Qt project file<p>When adding commands to QMAKE_POST_LINK using += operator should I need to add a semicolon?</p> <p>For example,</p> <pre><code>QMAKE_POST_LINK += mv somefile1.dat /some_location1; # semicolon QMAKE_POST_LINK += mv somefile2.dat /some_location2 ... </code></pre> <p>Wit...
<p>You should add <code>$$escape_expand(\n\t)</code> at the end of the each command.</p> <p>Some examples (just took from my real app):</p> <pre><code>QMAKE_POST_LINK += &quot;cp -f $$OUT_PWD/$$DESTDIR/crashreporter.app/Contents/MacOS/crashreporter $$MACX_APP_MACOS_DIR&quot; $$escape_expand(\n\t) QMAKE_POST_LINK += &qu...
Properly using QMAKE_POST_LINK in Qt project file
c++|linux|qt|qt5|qmake
0
52
1
72,876,509
72,876,509
0
true
2022-06-30T14:24:08.873Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Properly using QMAKE_POST_LINK in Qt project file<p>When adding commands to QMAKE_POST_LINK using += operator should I need to add a semicolon?</p> <p>For ex...
72,940,934
Bad Request when setting CURLOPT_POSTFIELDS in PHP cURL<p>PHP VERSION: 8.1</p> <p>I am getting a 400 Bad Request error when using Cloudflare Stream via PHP cURL, but only if CURLOPT_POSTFIELDS is set.</p> <p>My code:</p> <pre class="lang-php prettyprint-override"><code>$tokench = curl_init(); curl_setopt($tokench, CURL...
<p>I fixed it on my own. I had to JSON encode the POSTFIELDS because the Content Type was application/json. CODE EXAMPLE:</p> <pre class="lang-php prettyprint-override"><code>$tokench = curl_init(); curl_setopt($tokench, CURLOPT_URL, &quot;https://api.cloudflare.com/client/v4/accounts/&quot;.getenv(&quot;CLOUDFLARE_ACC...
Bad Request when setting CURLOPT_POSTFIELDS in PHP cURL
php|curl|php-curl
0
52
1
72,941,032
72,941,032
0
true
2022-07-11T15:23:52.340Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Bad Request when setting CURLOPT_POSTFIELDS in PHP cURL<p>PHP VERSION: 8.1</p> <p>I am getting a 400 Bad Request error when using Cloudflare Stream via PHP c...
72,822,982
How to make a toggle on several elements?<p>I have in my beacon <code>&lt;div class=&quot;post&quot;&gt;</code></p> <p>another beacon <code>&lt;p class=&quot;compteur&quot;&gt;&lt;/p&gt;</code></p> <p>which is intended to be incremented to find out if the user likes (clicks) it or decrements it if the user likes (click...
<p>well here I was able to solve my problem and thank you to everyone who kindly helped me</p> <p>I went through creating a new object for the assigned to each recovered div only the js file changed.</p> <p>Here's my code. <div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <di...
How to make a toggle on several elements?
javascript|web
-1
52
1
72,832,956
72,832,956
0
true
2022-06-30T23:26:02.893Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to make a toggle on several elements?<p>I have in my beacon <code>&lt;div class=&quot;post&quot;&gt;</code></p> <p>another beacon <code>&lt;p class=&quot...
72,784,610
How to invoke all option values from select with cypress/javascript?<p>i am trying to get all <code>values</code> under <code>select tag</code> in order to have an array. This is my code:</p> <pre><code>cy.get('[data-tab-name-prefix=&quot;selectedFonds[0]]') .scrollIntoView() .should('be.visible') .find('[name=&q...
<p><code>.invoke('attr', 'value')</code> is causing the problem, it changes the array of options to a single value.</p> <p>Move the <code>attr()</code> call inside the <code>.then()</code>.</p> <pre class="lang-js prettyprint-override"><code>const expectedValues = ['First value', 'Second value', 'Third value', 'Fourth ...
How to invoke all option values from select with cypress/javascript?
javascript|jquery|arrays|automated-tests|cypress
1
52
2
72,793,075
72,793,075
0
true
2022-06-28T10:14:54.397Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to invoke all option values from select with cypress/javascript?<p>i am trying to get all <code>values</code> under <code>select tag</code> in order to h...
72,795,858
Multiple API calling one after another in Axios in React<p>I need to call <code>http://sample.com</code> multiple times depending on the number of <code>data</code>. After that I also need to call <code>http://sample2.com</code> multiple times after calling <code>http://sample.com</code> since the response from <code>h...
<p>To run the API calls in parallel and wait for all those to complete, you need change the code to following</p> <pre><code>if (isCall2 &amp;&amp; responses) { await Promise.all(responses.map(async ({ code }, index) =&gt; { await getAxiosService().post(&quot;http://sample2.com&quot;, { ...
Multiple API calling one after another in Axios in React
reactjs|ecmascript-6|axios
0
52
1
72,796,007
72,796,007
0
true
2022-06-29T04:40:03.930Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Multiple API calling one after another in Axios in React<p>I need to call <code>http://sample.com</code> multiple times depending on the number of <code>data...
72,845,559
Integrating Google jib with yGuard<p>Is there a way to obfuscate exploded/packaged output of jib-maven-plugin with yGuard (or some other obfuscator)?</p> <p>I can think of a way using other tools such as exec-maven-plugin + jib cli.</p> <p>Another possible way can be to devise a 3rd party jib-extension or even fork/hac...
<p>I managed to figure it out myself.</p> <p>Here is my exec-maven-plug + jib cli solution for anyone out there.</p> <p>To test paste it, adapt it to your environment, and run <code>mvn clean package -P local</code>.</p> <p>This <code>pom.xml</code> is from a multi-module setup, so you may have to refactor or omit the ...
Integrating Google jib with yGuard
java|jib|yguard|maven-jib
0
52
1
72,856,176
72,856,176
0
true
2022-07-03T10:01:09.930Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Integrating Google jib with yGuard<p>Is there a way to obfuscate exploded/packaged output of jib-maven-plugin with yGuard (or some other obfuscator)?</p> <p>...
72,854,137
Is there a way to progressively subtract the quantity of same item on different cells and keep track of it?<p>I try to better explain the problem using this screenshot as example:</p> <p><a href="https://i.stack.imgur.com/TpwtL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TpwtL.png" alt="example" ...
<p>put this in the code for the sheet (not a module)</p> <pre><code>Private Sub Worksheet_Change(ByVal Target As Range) ' Dim ws As Worksheet Set ws = ThisWorkbook.Worksheets(&quot;Reference&quot;) Application.EnableEvents = True 'restrict to users entering data in column B and only one ce...
Is there a way to progressively subtract the quantity of same item on different cells and keep track of it?
excel|vba|excel-formula
0
52
1
72,855,630
72,855,630
0
true
2022-07-04T08:57:42.577Z
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 progressively subtract the quantity of same item on different cells and keep track of it?<p>I try to better explain the problem using this ...
72,901,121
Concatenate a range of cells with a comma and replace empty cell with 0<p>I benefited a lot from this post</p> <p><a href="https://stackoverflow.com/questions/41125877/concatenate-a-range-of-cells-with-a-comma">Concatenate a range of cells with a comma</a></p> <p>On top of concatenating, is it possible for me to replac...
<p>Start with</p> <pre><code>arrayformula(if(isblank(A1:C3),0,A1:C3)) </code></pre> <p>and use concatenate or other functions you need from there</p> <pre><code>concatenate(arrayformula(if(isblank(A1:C3),0,A1:C3)&amp;&quot;,&quot;)) </code></pre> <p>gives 1,0,4, for example</p>
Concatenate a range of cells with a comma and replace empty cell with 0
google-sheets|google-sheets-formula
0
52
2
72,902,147
72,902,147
0
true
2022-07-07T16:12:51.150Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Concatenate a range of cells with a comma and replace empty cell with 0<p>I benefited a lot from this post</p> <p><a href="https://stackoverflow.com/question...
72,899,295
Calculating sleep duration (before and after midnight) in Google Sheets<p>I am trying to calculate the total number of minutes spent in bed overnight by inputting the time entered bed (e.g. 9pm) and time exited bed (e.g. 6am). Using those example inputs, the answer should be 9hours, or 540minutes (9*60). Instead, my fo...
<p>Drop the <code>abs</code>.</p> <pre><code>C2-B2 </code></pre> <p>already assumes next day when <code>C2&lt;B2</code> as shown here: <a href="https://i.stack.imgur.com/t7vcQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/t7vcQ.png" alt="" /></a></p> <p><em>The reason it works is that Google Sheet ...
Calculating sleep duration (before and after midnight) in Google Sheets
google-sheets
0
52
1
72,904,800
72,904,800
0
true
2022-07-07T14:07:11.847Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Calculating sleep duration (before and after midnight) in Google Sheets<p>I am trying to calculate the total number of minutes spent in bed overnight by inpu...
72,951,226
Plotting X and Y variable based on grouping data by variable in separate columns<p>I'm fairly new to the Matlab community and need help with a particular plotting task! Any assistance would be greatly appreciated.</p> <p>I've been tasked with creating an automated process that produces numerous 2d line graphs, using X ...
<p>One approach is to combine all of the data (old and new) into a single table, then find the unique IDs and loop over them. For each ID you can identify the relevant rows and plot them.</p> <p>Note that the <code>table2array</code> usage in your current code makes your life harder, tables are nice because you can ind...
Plotting X and Y variable based on grouping data by variable in separate columns
matlab|data-visualization|matlab-figure|data-manipulation
3
52
1
72,953,036
72,953,036
0
true
2022-07-12T10:59:40.207Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Plotting X and Y variable based on grouping data by variable in separate columns<p>I'm fairly new to the Matlab community and need help with a particular plo...
72,799,803
Multiple widgets used the same GlobalKey in an extracted method textformfield widget<p>Having extracted my textformfield widget in method so as to minimize my code, I am trying to include a key in my form widget but I do not know how to use it for each form fields.</p> <p>This is the code:</p> <pre><code>class login ex...
<p>what you need to do is</p> <pre><code>Form( key: _signUpFormKey, Column( children: [ buildTextField( &quot;xpresschop&quot;, &quot;Name&quot;, true, false, false), buildTextField(&quot;example@gmail.com&quot;, &quot;email&quot;, false, false, true), buildTextField(&quot;......&quot;, &quo...
Multiple widgets used the same GlobalKey in an extracted method textformfield widget
flutter|forms|widget
0
52
1
72,801,144
72,801,144
0
true
2022-06-29T10:26:05.287Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Multiple widgets used the same GlobalKey in an extracted method textformfield widget<p>Having extracted my textformfield widget in method so as to minimize m...
72,869,275
Discord permissions fields in PHP<p>I have to check permissions for each guild of the current logged in user.</p> <p>I tried this but it does not works because PHP convert string to int, and if it is too large, it will not be the right number.</p> <pre class="lang-php prettyprint-override"><code>/* Deprecated: Implicit...
<p>It is possible to make bitwise operations on big integers using <a href="https://www.php.net/manual/en/book.gmp.php" rel="nofollow noreferrer">GMP</a> (<a href="https://www.tutorialspoint.com/php/php_functions_gmp_and.htm" rel="nofollow noreferrer">gmp_and</a>).</p> <p>Instead of doing:</p> <pre class="lang-php pret...
Discord permissions fields in PHP
php|discord|permissions|bitwise-operators|bitwise-and
0
52
1
72,870,798
72,870,798
0
true
2022-07-05T12:15:23.807Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Discord permissions fields in PHP<p>I have to check permissions for each guild of the current logged in user.</p> <p>I tried this but it does not works becau...
72,887,838
Python does not find the dwTime attribute of the Structure class<p>Here my code:</p> <pre><code>from ctypes import byref, c_uint, c_ulong, sizeof, Structure, windll import ctypes import random import sys import time import win32api class LASTINPUTINFO(Structure): &quot;&quot;&quot;Мы импортировали необходимые мод...
<p>There are a bunch of critical errors in your code (besides the wrong indentation - which I consider a formatting issue):</p> <ul> <li><p>According to <a href="https://docs.python.org/library/ctypes.html#structures-and-unions" rel="nofollow noreferrer">[Python.Docs]: ctypes - Structures and unions</a> (<strong>emphas...
Python does not find the dwTime attribute of the Structure class
python|pywin32
0
52
1
72,890,088
72,890,088
0
true
2022-07-06T17:42:21.087Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python does not find the dwTime attribute of the Structure class<p>Here my code:</p> <pre><code>from ctypes import byref, c_uint, c_ulong, sizeof, Structure,...
72,972,428
How to delete all lines that contain a number lower than given value from a text file?<p>I'm trying to remove every line from a file that has any number below the value of -2000. I'm quite new to python and it's most likely that I don't understand the <code>re</code> module, nor am I sure about the method I am using.</...
<p>You can use a regex like <code>r'-[2-9]\d{3,}'</code> that should match -2000 or lower.</p> <blockquote> <p><strong>Explanation</strong>: match <code>-</code> for negative and a number between <code>2-9</code>, followed by any <code>3</code> or more digits.</p> </blockquote> <p>Why use regex? It's actually faster th...
How to delete all lines that contain a number lower than given value from a text file?
python|python-re
0
52
2
72,972,493
72,972,493
0
true
2022-07-13T20:43:00.603Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to delete all lines that contain a number lower than given value from a text file?<p>I'm trying to remove every line from a file that has any number belo...
72,862,163
Content of directory messes with how the code runs even though there's no reference of it<p>So I spent 2 hours trying to narrow down the cause of my code not working and I think it might just be something weird. Here's the exact example code I have and I can't minimize it further (yes, bar does literally nothing) :</p>...
<p>The issue was the presence of a file called &quot;libstdc++-6.dll&quot; in my project directory. I have no memories of why it's here because I copied all libraries from another project but if anyone does the same mistake, here's your solution.</p> <p>Edit : I found out about why I had this in my files : it's because...
Content of directory messes with how the code runs even though there's no reference of it
c++|multithreading
-3
52
1
72,872,786
72,872,786
0
true
2022-07-04T21:27:12.277Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Content of directory messes with how the code runs even though there's no reference of it<p>So I spent 2 hours trying to narrow down the cause of my code not...
72,279,396
How would you set up a tensorflow cluster of multipe TPUv2-8 (tpu-vm)?<p>I have two tpu-vms (v2-8) running on GCE with software version <em>tpu-vm-tf-2.8.0</em>. I would like to perform distributed deep learning with tensorflow using both vms, i.e with a total of 2x8 = 16 cores.</p> <p>For distributed learning on 8 cor...
<p><a href="https://www.tensorflow.org/api_docs/python/tf/distribute/TPUStrategy" rel="nofollow noreferrer">tf.distribute.TPUStrategy</a> will work for both TPU device (v2-8, v3-8) and TPU Pod slice (v2-32, v3-32, v2-64, ...). Valid pod slice configurations don't include v2-16, but they include v4-16.</p> <p>If you wan...
How would you set up a tensorflow cluster of multipe TPUv2-8 (tpu-vm)?
tensorflow|google-compute-engine|cluster-computing|tpu
1
52
1
73,178,871
73,178,871
0
true
2022-05-17T19:02:45.527Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How would you set up a tensorflow cluster of multipe TPUv2-8 (tpu-vm)?<p>I have two tpu-vms (v2-8) running on GCE with software version <em>tpu-vm-tf-2.8.0</...
72,986,583
What is the difference between asynchronous and multithreading when we consider only one core<p>A thread is a certain set of instructions to be executed.</p> <p>A function is a certain set of instructions to be executed.</p> <p>With one (let's call it worker) worker per core, for a single core we have only 1 worker.</p...
<p>I think that your are looking for the difference between two ways of achieving concurrency: OS threads and <a href="https://en.wikipedia.org/wiki/Green_threads" rel="nofollow noreferrer">virtual threads</a> (also called <em>green threads</em>).</p> <p>OS threads are managed and scheduled by the OS. They provide conc...
What is the difference between asynchronous and multithreading when we consider only one core
c#|multithreading|asynchronous|async-await|concurrency
2
52
1
73,027,399
73,027,399
0
true
2022-07-14T20:56:57.897Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What is the difference between asynchronous and multithreading when we consider only one core<p>A thread is a certain set of instructions to be executed.</p>...
73,018,720
Cant change Xamarin.ComboBox Background Color<p>i want help with a custom combobox, i found combobox on github but its custom item and i made this my own custom item and changed some preferences but i cant change background color its still white i tried everything i think. Im changed stacklayout to frame and added some...
<p>Github using; Visual property is on material but its making background color to white and cant change need set visual property to default.</p> <pre><code> &lt;cb:ComboBox //Changed visual to default //github usage is Visual = &quot;Mat...
Cant change Xamarin.ComboBox Background Color
xamarin|xamarin.forms
0
52
1
73,020,083
73,020,083
0
true
2022-07-18T07:33:28.463Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Cant change Xamarin.ComboBox Background Color<p>i want help with a custom combobox, i found combobox on github but its custom item and i made this my own cus...
72,786,596
Extract the first complete address from string<p>I am unsure how to tell a regular expression in Python to stop after finding the first match.</p> <p>Apparently you can tell regex to be lazy, <a href="https://stackoverflow.com/questions/38400595/regex-stop-after-first-match">RegEx - stop after first match</a> , I tried...
<p>You could make the pattern a bit more specific for the digits and the trailing characters, and match at least a single digit using a case insensitive match:</p> <pre><code>^([A-ZÄäÖöÜüß.\s-]+?)\s*(\d+(?:[/-]\d+)?(?:[A-Z](?:-[A-Z])?)?)\b </code></pre> <p><strong>Explanation</strong></p> <ul> <li><code>^</code> Start ...
Extract the first complete address from string
python|regex
0
52
2
72,786,720
72,786,720
0
true
2022-06-28T12:38:57.653Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Extract the first complete address from string<p>I am unsure how to tell a regular expression in Python to stop after finding the first match.</p> <p>Apparen...
72,816,374
When using httpmock in Rust, can one mock server handle multiple paths?<p>I'm testing the engine's register and poll(health check at regular intervals) behavior by making a mock server that replaces the admin server.</p> <pre><code>let admin_mock_server = admin_server.mock(|when, then| { when.path(&quot;/regist...
<p>If you look a the doc here: <a href="https://docs.rs/httpmock/latest/httpmock/struct.MockServer.html" rel="nofollow noreferrer">https://docs.rs/httpmock/latest/httpmock/struct.MockServer.html</a></p> <p>you can see that the <code>mock</code>function returns a Mock object on the mock server. By this, i guess you can ...
When using httpmock in Rust, can one mock server handle multiple paths?
rust|http-mock
0
52
1
72,818,026
72,818,026
0
true
2022-06-30T13:07:08.343Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: When using httpmock in Rust, can one mock server handle multiple paths?<p>I'm testing the engine's register and poll(health check at regular intervals) behav...
72,780,775
How to inject a service to a Job and setup IOC container configuration?<p>I set up a <code>Job</code> in which I injected a service from <code>servicecollection</code>. The problem is that this job (Execute method) could not be run although before injecting any services, it was working properly. <br><br>I think the pro...
<p>Quartz comes with two built-in alternatives for job factory which can be configured via either calling <code>UseMicrosoftDependencyInjectionJobFactory</code> or <code>UseMicrosoftDependencyInjectionScopedJobFactory</code> (deprecated).<br><br> For using Microsoft dependency <code>UseMicrosoftDependencyInjectionJobFa...
How to inject a service to a Job and setup IOC container configuration?
c#|.net-core|quartz-scheduler|jobs
0
52
1
72,781,995
72,781,995
0
true
2022-06-28T04:33:01.370Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to inject a service to a Job and setup IOC container configuration?<p>I set up a <code>Job</code> in which I injected a service from <code>servicecollect...
73,009,364
Select input is not showing value when using map function<p>Im trying material ui select but it is not working as i would like to. it is not showing the default value when i use the map function but it does when using the traditional way.</p> <p>*** The way which is working ***</p> <pre><code>&lt;Select i...
<p>The value being assigned to the MenuItem needs to match the value you set for the defaultValue prop on the select.</p> <p>eg: [{name:&quot;United Kingdom&quot;}] . &quot;United Kingdom&quot; should be the defaultValue</p> <pre><code> &lt;Select id=&quot;standard-select-categories&quot; def...
Select input is not showing value when using map function
javascript|reactjs|typescript|material-ui
0
52
1
73,009,584
73,009,584
0
true
2022-07-17T05:01:48.587Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Select input is not showing value when using map function<p>Im trying material ui select but it is not working as i would like to. it is not showing the defa...
73,025,592
Puppeteer abort file download to disk - how to implement it?<p>Good day to everyone. I have a very simple code that downloads a file to a hard drive. It works flawlessly. Goes to the site, clicks on the link to which the file is linked, then the baruser saves this file to the default path. <strong>But there are times w...
<p>Instead of clicking on the link, you could get file path and fetch file with stream.</p> <pre><code>const https = require('https'); let stream function abortStream() { if (stream) { stream.abort(); } } // ... your code const filePath = await page.$eval('#download', file =&gt; file.href); const url = 'htt...
Puppeteer abort file download to disk - how to implement it?
node.js|puppeteer
0
52
1
73,072,311
73,072,311
0
true
2022-07-18T16:24:16.720Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Puppeteer abort file download to disk - how to implement it?<p>Good day to everyone. I have a very simple code that downloads a file to a hard drive. It work...
72,925,132
tk.Text: Offsetting bgstipple<p>The script below will create an <code>xbm</code> file that is just a vertical line positioned at either the left, right or center of the <code>xbm</code>. When the <code>xbm</code> is used for <code>bgstipple</code> everything is offset by half of a character width, but without wrap! If ...
<p>Your <code>xbm</code> maker is backwards in logic. Assuming we had a width of 8 (to keep it simple) a line on the left would repeat this: <code>00000001</code>. Unfortunately, it isn't that simple when trying to make a line ride the edge of text. Firstly, you have to determine the window offset with <code>master.win...
tk.Text: Offsetting bgstipple
python-3.x|tkinter
0
52
1
72,925,438
72,925,438
0
true
2022-07-09T22:59:10.817Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: tk.Text: Offsetting bgstipple<p>The script below will create an <code>xbm</code> file that is just a vertical line positioned at either the left, right or ce...
72,794,129
Generate possible solutions to image captcha from a list of each class with confidence<p>I have a YOLOV5 model that uses object detection to solve captchas. It returns a list in the format:</p> <pre><code>&lt;object-class&gt; &lt;x&gt; &lt;y&gt; &lt;width&gt; &lt;height&gt; &lt;confidence&gt; </code></pre> <p>and for e...
<p>First you can convert data to dictionary</p> <pre><code>{'0.443182': ['7l'], '0.534091': ['4l'], '0.238636': ['5l'], '0.659091': ['9l', '0l']} </code></pre> <p>Next get only values</p> <pre><code>[['7l'], ['4l'], ['5l'], ['9l', '0l']] </code></pre> <p>And finally use <code>itertools.product(['7l'], ['4l'], ['5l'], [...
Generate possible solutions to image captcha from a list of each class with confidence
python|artificial-intelligence|captcha|yolov5
1
52
1
72,801,588
72,801,588
0
true
2022-06-28T23:14:55.010Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Generate possible solutions to image captcha from a list of each class with confidence<p>I have a YOLOV5 model that uses object detection to solve captchas. ...
72,910,498
seaborn relplot x values adjustment<p>I have two parameters from panda's dataframe, <code>bmi</code> and <code>heart_disease</code>. I want to show them with <code>relplot</code>, it shows information that other plots lose. I used this simple code:</p> <pre><code>facetObj = sns.relplot(x=&quot;heart_disease&quot;, y=&q...
<p>This is because your <code>heart_disease</code> column is integer. To change, you can do one of the following:</p> <ol> <li>Change the heart_disease column to string <strong>before</strong> plotting (before sns.relplot)</li> </ol> <pre><code>data['heart_disease'] = data['heart_disease'].astype(str) </code></pre> <ol...
seaborn relplot x values adjustment
python|plot|seaborn
0
52
1
72,910,866
72,910,866
0
true
2022-07-08T11:06:58.290Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: seaborn relplot x values adjustment<p>I have two parameters from panda's dataframe, <code>bmi</code> and <code>heart_disease</code>. I want to show them with...
73,015,383
Extracting values of a dictionary which is in a list<p><a href="https://i.stack.imgur.com/1lGVl.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1lGVl.jpg" alt="enter image description here" /></a>Please see the attached picture of what I am trying to achieve.</p> <p>I just want the output as showing ...
<p>So you have a list of dictionaries and only want to print <code>subdomain</code> is that correct? Then it's simple:</p> <pre><code>for d in dict_list: # Let's say &quot;dict_list&quot; is the list you're working on print(f&quot;{d['subdomain']}:{d['ports']}&quot;) </code></pre> <p>As others have pointed out do n...
Extracting values of a dictionary which is in a list
python|list|dictionary|pycharm
-2
52
1
73,015,571
73,015,571
0
true
2022-07-17T21:10:45.787Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Extracting values of a dictionary which is in a list<p><a href="https://i.stack.imgur.com/1lGVl.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgu...
72,782,142
How can I return the latest child of a parent table in SQL<p>I have a parent table &quot;A&quot; looking like</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>Main</th> <th>Status</th> <th>Reference</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>0</td> <td>AA</td> </tr> <tr> <td>2</td> <td>...
<p>You can create a <code>CTE</code> (Common Table Expression) and generate a <code>RANK</code> per <code>Main</code> using <code>PARTITION BY</code> and ordering them by <code>Timestamp</code> descending. If this <code>Rank</code> equals 1, it means it's the latest record for that <code>Main</code>.</p> <p>It might so...
How can I return the latest child of a parent table in SQL
sql|parent-child
1
52
2
72,782,254
72,782,254
0
true
2022-06-28T07:14:24.663Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I return the latest child of a parent table in SQL<p>I have a parent table &quot;A&quot; looking like</p> <div class="s-table-container"> <table clas...
72,927,647
Allow user to register using code in laravel<p>please I am trying to allow users to register with a coupon code, if coupon code is invalid dont register user, but when I tried it users are been registered even though the code is already used or invalid</p> <p>I am using this package for the code <a href="https://github...
<p>You are already registering the user before checking if the coupon is valid. Move this line after the validation.</p> <pre><code>$user-&gt;redeemCouponOr($request-&gt;code, function ($e) { //handle the different exceptions here if not valid. }); $user = User::create([ 'username' =&gt; $request-&gt;us...
Allow user to register using code in laravel
laravel|laravel-9
0
52
3
72,928,689
72,928,689
0
true
2022-07-10T10:00:52.830Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Allow user to register using code in laravel<p>please I am trying to allow users to register with a coupon code, if coupon code is invalid dont register user...
72,817,763
Div wont move into place<p>im trying to move 2 divs vertically into place and they wont move down. ive tried a couple things like adding top and bottom to the #btnL1 &amp; #btnL2, but they dont do anything. when i try to set the position of them to absolute, they arent visible anymore, but still there. here's the link ...
<p>They are not visible because the <code>width</code> attribute is missing. With this it should have the effect you are looking for:</p> <pre><code>#btnL1 { height: 15%; background: darkcyan; border-radius: 5px; transform: rotate(45deg); width: 50px; position: absolute; top: 20px; } #btnL2 { heigh...
Div wont move into place
javascript|html|css
0
52
1
72,818,318
72,818,318
0
true
2022-06-30T14:43:01.440Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Div wont move into place<p>im trying to move 2 divs vertically into place and they wont move down. ive tried a couple things like adding top and bottom to th...
72,958,902
query: how to set an image and text to accupy the same space in an <li> element<p>I'm working on a gallery page with a few images.</p> <p>I've decided to contain my images in an <code>&lt;li&gt;</code> element. html:</p> <pre><code>&lt;div class=&quot;gallery-container&quot;&gt; &lt;ul class=&quot;gallery&quot;...
<p>If you don't want to use <code>position</code> property then this can be done with <code>display: grid</code> by making it's children occupy the same row -- this is easier for paint calculations than positioning an element as well</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-...
query: how to set an image and text to accupy the same space in an <li> element
html|css
0
52
2
72,959,104
72,959,104
0
true
2022-07-12T22:11:31.733Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: query: how to set an image and text to accupy the same space in an <li> element<p>I'm working on a gallery page with a few images.</p> <p>I've decided to con...
72,889,499
How to group similar numbers with ranges/conditions and merge IDs using dataframes?<p>Please, I have a dataframe that is listed in ascending order. My goal is to average similar numbers (numbers that are within 10% of each other in ‘both directions’) and concate their ‘Bell’ name together. For example, the image shows ...
<p>Assuming you really want to check in both directions that the consecutive values are within 10%, you need to compute two Series with <code>pct_change</code>. Then use it to <code>groupby.agg</code>:</p> <pre><code>#df = df.sort_values(by='Size') for non-consecutive grouping m1 = df['Size'].pct_change().abs().gt(0.1...
How to group similar numbers with ranges/conditions and merge IDs using dataframes?
python|pandas|numpy|sorting|iteration
1
52
1
72,889,738
72,889,738
0
true
2022-07-06T20:27:17.230Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to group similar numbers with ranges/conditions and merge IDs using dataframes?<p>Please, I have a dataframe that is listed in ascending order. My goal i...
72,822,741
JavaScript - Ordering an array of objects with a chunk size / repeating pattern<p>I have some JSON (returned from a DB query, sample below) that I'm trying to figure out how I can order in a very specific manner:</p> <pre><code>+────────────────+─────────────────+─────────────────+ | Desired order | Not acceptable | ...
<p>Finally figured this out, using a triple loop.</p> <pre><code> const numSteps = 3 const chunkSize = numSteps * numSteps var processedData = [] for (let i = 0; i &lt; productionArray.length; i += chunkSize) { var c = i for (let x = 0; x &lt; numSteps; x++) { for (let y = 0; y &lt; chunkSiz...
JavaScript - Ordering an array of objects with a chunk size / repeating pattern
javascript|arrays|json|sorting|javascript-objects
0
52
1
72,833,646
72,833,646
0
true
2022-06-30T22:44:56.140Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: JavaScript - Ordering an array of objects with a chunk size / repeating pattern<p>I have some JSON (returned from a DB query, sample below) that I'm trying t...
72,945,358
How to find element by unique xpath that has same class<p>Im try to found a unique xpath for this element with same class</p> <p>the first xpath that i need:</p> <pre><code>//*[@id=&quot;view_container&quot;]/div/div/div[2]/div/div[1]/div/form/span/section/div/div/div/div/div[1]/div/span/div[1]/div/div[1]/div </code></...
<pre><code>//div[contains(@class, 'zJKIV') and @data-value='1'] </code></pre>
How to find element by unique xpath that has same class
python|selenium|xpath
-1
52
1
72,945,740
72,945,740
0
true
2022-07-11T22:41:38.623Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to find element by unique xpath that has same class<p>Im try to found a unique xpath for this element with same class</p> <p>the first xpath that i need:...
72,829,167
How can i convert this SAS code in to SQL Query?<pre><code>data GC_OUT.ABCD_2; set GC_OUT.TEST; index_first_non_zero = verify(ASSIGNED_EMPLOYEE_CD,&quot;0&quot;); ASSIGNED_EMPLOYEE_CD_1 = substr(ASSIGNED_EMPLOYEE_CD, index_first_non_zero); run; </code></pre>
<p>A direct translation would be something like this:</p> <pre><code>proc sql; create table GC_OUT.ABCD_2 as select * , verify(ASSIGNED_EMPLOYEE_CD,&quot;0&quot;) as index_first_non_zero , substr(ASSIGNED_EMPLOYEE_CD,calculated index_first_non_zero) as ASSIGNED_EMPLOYEE_CD_1 from GC_OUT.TES...
How can i convert this SAS code in to SQL Query?
sql|sas
-1
52
1
72,829,423
72,829,423
0
true
2022-07-01T12:19:30.507Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can i convert this SAS code in to SQL Query?<pre><code>data GC_OUT.ABCD_2; set GC_OUT.TEST; index_first_non_zero = verify(ASSIGNED_EMPLOYEE_CD,...
72,962,822
How to check if a field (multiple occurrence in XML) is having a value from the predefined set of values using Xpath<p>I have an XML where I am trying to check following conditions -</p> <ol> <li><p>If Count of E1KNVVM segments &gt; 0 then do the following, else set false.</p> </li> <li><p>If KTOKD = Z002|Z004 - Set fa...
<p>Thanks for clarifying your question!</p> <p>It's hard to give a proper answer if you don't provide a well-formed XML document as sample input. Nevertheless I'm going to attempt to provide an answer, but bear in mind that because I didn't have a sample input, I wasn't able to actually test any suggestions we provide,...
How to check if a field (multiple occurrence in XML) is having a value from the predefined set of values using Xpath
xpath|xpath-2.0
0
52
1
72,976,560
72,976,560
0
true
2022-07-13T08:02:35.933Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to check if a field (multiple occurrence in XML) is having a value from the predefined set of values using Xpath<p>I have an XML where I am trying to che...
73,016,875
Can't add another event notification to an S3 that already had one<p>I have an S3 bucket that already has an existing event notification to <strong>SQS</strong>,it looks like below:</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>Name</th> <th>Event type</th> <th>Filters</th> <th>Destinatio...
<p><strong>Target queue of existing event notif has invalid access policy</strong></p> <p>The destination of the existing event notif is a queue, and the queue uses an <strong>invalid</strong> policy. This might have caused an issue on the validation on AWS side which was triggered when I tried adding a new event notif...
Can't add another event notification to an S3 that already had one
amazon-web-services|amazon-s3|aws-lambda
0
52
1
73,017,741
73,017,741
0
true
2022-07-18T02:56:50.770Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can't add another event notification to an S3 that already had one<p>I have an S3 bucket that already has an existing event notification to <strong>SQS</stro...
73,013,711
BehaviorSubject change 1 property in array of objects not reflecting on UI<p>I have the following code, this is just a simple select one and select all. The problem is if I click select all, then I unclick one item, this still works fine, the select all checkbox is unchecked automatically and the single item is also un...
<p>Your issue is because you didnt call <code>.next()</code> on your <code>this.selected$</code> BehaviorSubject. <code>async</code> pipe subscribes to your BehaviorSubject and returns the latest value it has emitted. And due to you didnt emit any - changing property in the array was not tracked.</p> <p>Here is a worki...
BehaviorSubject change 1 property in array of objects not reflecting on UI
angular|behaviorsubject
-1
52
1
73,013,936
73,013,936
0
true
2022-07-17T16:55:21.193Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: BehaviorSubject change 1 property in array of objects not reflecting on UI<p>I have the following code, this is just a simple select one and select all. The ...
72,859,353
Problem with Java semaphores (tryAcquire)<p>I'm trying to produce the AAB AAB sequence with this code:</p> <pre><code>private static Semaphore semA = new Semaphore(2); private static Semaphore semB = new Semaphore(0); public static void main(String[] args) { while(true) { new P1A().start(); new P2B...
<p>This is primarily an explanation of your issue and an approach of analysis - but I did see what you are attempting and added a simple fix.</p> <p>It might be best to use a table as you walk through the logic. Note that the order of execution of <code>P1A</code> and <code>P2B</code> may vary and so this is one seque...
Problem with Java semaphores (tryAcquire)
java|multithreading|parallel-processing|semaphore
-1
52
1
72,861,878
72,861,878
0
true
2022-07-04T15:54:32.530Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Problem with Java semaphores (tryAcquire)<p>I'm trying to produce the AAB AAB sequence with this code:</p> <pre><code>private static Semaphore semA = new Sem...
72,907,121
How to build a Linked_list_builder function in C<p>I am learning about linked list, I want to make a function which creates a linked list, after that I want to make a for loop which will print our linked list at main function. I tried this:</p> <pre><code>#include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; typedef stru...
<p>You have two problems:</p> <p>As pointed out by @WhozCraig:</p> <p>You are reserving space for all nodes at once, if that were possible, you would have no need to create a list (with its handicap of memory fragmentation and also needing an extra pointer to point to the next node) and in that case it would be enough ...
How to build a Linked_list_builder function in C
c
0
52
1
72,907,461
72,907,461
0
true
2022-07-08T05:45:17.823Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to build a Linked_list_builder function in C<p>I am learning about linked list, I want to make a function which creates a linked list, after that I want ...
72,902,652
With pure JavaScript, hide an element based on swatch active class and data-swatch-option?<p>I'm trying to show a file upload button only for one of the swatch options named 'Custom Logo' in the test product page <a href="https://shop.packedwithpurpose.gifts/products/copy-add-a-custom-logo?variant=40215066116156" rel="...
<p>This should work for you</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override"><code>const el = document.querySelectorAll('.type') const input = document.getElementsByClassName('upload...
With pure JavaScript, hide an element based on swatch active class and data-swatch-option?
javascript|html|jquery|frontend|shopify
0
52
1
72,907,703
72,907,703
0
true
2022-07-07T18:29:55.980Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: With pure JavaScript, hide an element based on swatch active class and data-swatch-option?<p>I'm trying to show a file upload button only for one of the swat...
72,987,004
How can I be more efficient with my numpy array usage?<p>For context I was solving the day 6 problem from the 2021 Advent of Code, and wanted to try using numpy arrays over python lists since from my current understanding they should be faster. But ran into an issue, my solution prints the correct answer but takes ages...
<p>Numpy arrays are fast due to operations being done in parallel (vectorized). For using looping they might well be slower than a list. So unless your operation can be expressed in a parallel manner (vectorized) you probably won't have any benefit when using a looping/iterative operation on a np array versus the sam...
How can I be more efficient with my numpy array usage?
python|numpy|indexing|memory-management
0
52
3
72,987,044
72,987,044
0
true
2022-07-14T21:51:57.687Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I be more efficient with my numpy array usage?<p>For context I was solving the day 6 problem from the 2021 Advent of Code, and wanted to try using nu...
72,929,065
Jest + Puppeteer end to end test strange problem<p>I am trying to make an e2e test for user to register new account and delete it afterwards. Everything works as expected. Puppeteer creates an account and deletes it successfully, but one of the tests show up as failed in the end without any data about it. Here is the s...
<p>I did run the test with <code>HEADLESS=false</code> mode and noticed an error log on the browser console. When I fixed it the problem solved.</p> <p>Edit: The issue is that because there was an error with some React component Pupeteer was showing successful test as failed. When I fixed the problem with the React tes...
Jest + Puppeteer end to end test strange problem
jestjs|puppeteer|e2e-testing
1
52
1
73,203,408
73,203,408
0
true
2022-07-10T14:01:25.687Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Jest + Puppeteer end to end test strange problem<p>I am trying to make an e2e test for user to register new account and delete it afterwards. Everything work...
72,976,305
How to repeat a part of a formula in Excel?<p>I have the following formula <code>=(((C3*B3%)+(C4*B4%))*100)/C1</code>: instead of repeat the part <code>((C3*B3%)+(C4*B4%))</code> for every next cells (e.g: <code>((C3*B3%)+(C4*B4%)+(C5*B5%)+(C6*B6%))</code> ), is there a way to write this for a range of indexes?</p>
<p><code>=100*SUMPRODUCT(C3:C999999,B3:B999999%)/C1</code></p>
How to repeat a part of a formula in Excel?
excel|excel-formula
0
52
1
72,976,913
72,976,913
0
true
2022-07-14T06:48:12.400Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to repeat a part of a formula in Excel?<p>I have the following formula <code>=(((C3*B3%)+(C4*B4%))*100)/C1</code>: instead of repeat the part <code>((C3*...
72,783,888
Copy content from cell in a row to adjacent right-hand cell in R<p>I have a data frame that looks like this:</p> <pre><code> df &lt;- data.frame(col1=c(NA, NA), col2=c(&quot;arroz&quot;, &quot;unit&quot;), col3=c(NA, &quot;area&quot;), col4=c(&quot;arveja&quot;, &qu...
<p>You can <code>apply</code> the <code>na.locf0</code> on all rows using the following code:</p> <pre><code>library(zoo) setNames(data.frame(t(apply(df, 1, na.locf0))), colnames(df)) </code></pre> <p>Output:</p> <pre><code> col1 col2 col3 col4 col5 col6 col7 1 &lt;NA&gt; arroz arroz arveja arveja frejol fre...
Copy content from cell in a row to adjacent right-hand cell in R
r|string|dataframe
1
52
4
72,783,987
72,783,987
0
true
2022-06-28T09:24:38.293Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Copy content from cell in a row to adjacent right-hand cell in R<p>I have a data frame that looks like this:</p> <pre><code> df &lt;- data.frame(col1=c(NA, N...
72,957,979
Filter date as older than value in another dataframe<p>I have a Spark SQL dataframe consisting of observations for people with a survey date, as follows:</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>person_id</th> <th>survey_date</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>2022-03-11...
<p>First, <code>join</code>, then <code>filter</code>. Don't use &gt;= &lt;= &lt; &gt; inside join conditions, because it is a performance drag. Use those <em>only</em> if you can't escape it.</p> <pre class="lang-py prettyprint-override"><code>df = (df_trans .join(df_survey, &quot;person_id&quot;) .filter(&quo...
Filter date as older than value in another dataframe
dataframe|apache-spark|date|pyspark|filter
1
52
2
72,977,443
72,977,443
0
true
2022-07-12T20:22:32.873Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Filter date as older than value in another dataframe<p>I have a Spark SQL dataframe consisting of observations for people with a survey date, as follows:</p>...
72,946,924
Is there a built-in function in Python that allows you to check the number of items that are already sorted in an array?<h1>Problem description</h1> <p>I am attempting to define a function that counts the maximum number of items in an array that are already sorted based on any given array. For example, <code>[1, 2, 3]<...
<p>The question is either about:</p> <ol> <li>Finding the longest increasing subsequence, or</li> <li>Finding how many elements are already in sorted order</li> </ol> <p><strong>Code for 1</strong></p> <pre><code>def longest_increasing_sequence(arr): ' Finds longest increasing subsequence ' n = len(arr) #...
Is there a built-in function in Python that allows you to check the number of items that are already sorted in an array?
python|python-3.x|sorting
-2
52
1
72,947,061
72,947,061
0
true
2022-07-12T04:06:59.643Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is there a built-in function in Python that allows you to check the number of items that are already sorted in an array?<h1>Problem description</h1> <p>I am ...
72,949,054
Pointer line trail<p>So I'm tyring to create a specific pointer trail effect. I'm pasting the code that I'm taking as an example below. The problem is that the trail is dotted, but I'm trying to make a line. I'm trying to recreate the trail that you can see on this site: [1]: <a href="https://argor-heraeus.com/" rel=...
<p>So I changed this in the given code:</p> <pre><code>x += (nextDot.x - dot.x) * **0.05**; y += (nextDot.y - dot.y) * **0.05**; </code></pre> <p>And added more dots, 80, to be precise.</p> <p>I also added a more smooth transition with this CSS rules</p> <pre><code>-webkit-transition:90ms; transition:90ms; pointer-even...
Pointer line trail
javascript
0
52
1
72,952,473
72,952,473
0
true
2022-07-12T08:14:59.053Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Pointer line trail<p>So I'm tyring to create a specific pointer trail effect. I'm pasting the code that I'm taking as an example below. The problem is that t...
73,011,624
Python Dictionary Key Error when Adding to Nested Dictionary<p>I'm trying to make a sort-of-chart of a subway map into a more useful graph which can be fed into my Dijkstra Algorithm code.</p> <p>My goal is to get something like this <code>[['station a', 'station b', '1', 'V7'], ['station a', 'station c', '1', 'N8']]</...
<p>You don't actually create the nested dicts that you want.</p> <p>You should create them like this: <code>newdata[station] = {&lt;key&gt;:&lt;str&gt;}</code></p> <p>Then the code looks like this:</p> <pre class="lang-py prettyprint-override"><code>newdata = {} for station in stations: for section in data: ...
Python Dictionary Key Error when Adding to Nested Dictionary
python|python-3.x|dictionary|syntax|keyerror
0
52
1
73,011,721
73,011,721
0
true
2022-07-17T12:06:28.710Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python Dictionary Key Error when Adding to Nested Dictionary<p>I'm trying to make a sort-of-chart of a subway map into a more useful graph which can be fed i...
72,903,245
Convert a time calculation to time in HH:MM<p>I am looking to create a calculation in SQL Server that will display the time difference in <code>HH_MM</code> from a <code>time</code> column.</p> <p>For example, the difference in hours and minutes between</p> <pre><code>5:45 PM - 3:30 PM = 2:15 (desired output) </code></...
<p>Assuming the columns are <code>datetime</code>, use the <code>format</code> function to <em>format</em> the time value:</p> <pre><code>select format(cast(cals_end_time - cals_start_time as time), N'h\:mm') from (values (cast('2022-07-07 15:30:00' as datetime), cast('2022-07-07 17:45:00' as datetime)) ) as tests(...
Convert a time calculation to time in HH:MM
sql-server|formatting|difference|minutes
0
52
2
72,903,781
72,903,781
0
true
2022-07-07T19:27:19.653Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Convert a time calculation to time in HH:MM<p>I am looking to create a calculation in SQL Server that will display the time difference in <code>HH_MM</code> ...