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
73,020,017
Treating `NodaTime.LocalDate` as an unsigned value<p>I often find myself working with databases with nullable date fields so other return something along the lines of <code>select coalesce( t.dt, cast( '0001-01-01' as date) ) from t</code> (for sql server) and implicitly treating <code>LocalDate</code> as a unsigned va...
<p><code>LocalDate.Zero</code> doesn't really have any particularly special meaning - it just happens to be where BCE becomes CE. You can easily create your own static property for it though. (I don't remember ever seeing a feature request for this.)</p> <p>As Sweeper said, it's not that <code>LocalDate</code> is &quot...
Treating `NodaTime.LocalDate` as an unsigned value
c#|.net|nodatime
0
62
1
73,027,147
73,027,147
0
true
2022-07-18T09:23:54.723Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Treating `NodaTime.LocalDate` as an unsigned value<p>I often find myself working with databases with nullable date fields so other return something along the...
73,010,023
Should I pass context.Context to underlying DB methods in Go?<p>I use semi-code here just to show my intention of whats going on in code and not complicating things here in the question.</p> <p>I have a <code>main.go</code> file that calls a method that connects to mongoDB database:</p> <pre><code>mStore := store.NewMo...
<p>I reached to an interesting answer to my own question, so I prefer to put here for future users if having the same question in mind.</p> <p>If I pass the SAME context that I have connected to Mongo with to <code>userController</code> and pass it down further to <code>CreateUser</code> function:</p> <pre><code>ctx, c...
Should I pass context.Context to underlying DB methods in Go?
mongodb|go|go-context
0
62
2
73,034,865
73,034,865
0
true
2022-07-17T07:44:17.323Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Should I pass context.Context to underlying DB methods in Go?<p>I use semi-code here just to show my intention of whats going on in code and not complicating...
73,009,852
Unable to login https://dashboard.honeygain.com using cookies<p>I want to login <a href="https://dashboard.honeygain.com/" rel="nofollow noreferrer">https://dashboard.honeygain.com/</a> using the cookies I get from <a href="https://chrome.google.com/webstore/detail/j2team-cookies/okpidcojinmlaakglciglbpcpajaibco/review...
<p><a href="https://dashboard.honeygain.com" rel="nofollow noreferrer">https://dashboard.honeygain.com</a> uses both cookies and localstorage in my browser to identify me.</p> <p><a href="https://i.stack.imgur.com/QxkaQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QxkaQ.png" alt="enter image descr...
Unable to login https://dashboard.honeygain.com using cookies
authentication|cookies
0
62
1
73,048,862
73,048,862
0
true
2022-07-17T07:13:21.680Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Unable to login https://dashboard.honeygain.com using cookies<p>I want to login <a href="https://dashboard.honeygain.com/" rel="nofollow noreferrer">https://...
72,826,671
Witchcraft IO monad?<h2>Background</h2> <p>I have recently been delving into more functional code. My objective right now is to get something similar to the IO Monad (in Haskell, Scala, etc) but in Elixir.</p> <p>To this extent, I understand <a href="https://github.com/witchcrafters/witchcraft" rel="nofollow noreferrer...
<p>There has been quite a lengthy discussion in Elixir's original forum. To summarize:</p> <ul> <li>Using witchcraft I would have to create the monad myself, and then use it.</li> <li>Because of the way said Monad would have to be implemented, Dialyzer would not play well.</li> </ul> <p><a href="https://elixirforum.com...
Witchcraft IO monad?
elixir|monads
0
62
1
73,054,713
73,054,713
0
true
2022-07-01T08:46:17.493Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Witchcraft IO monad?<h2>Background</h2> <p>I have recently been delving into more functional code. My objective right now is to get something similar to the ...
72,795,852
Due to huge images. Can we generalize flow_from_directory method for regression problem (CNN): input image and output is x,y (float)<p>Data is in a CSV file which includes image path and target (x and y). where x and y belong to [-1 to 1] after scale (in keras becasue there are so many image . I can not load all in X_t...
<p>I will write here as the comment section is getting bigger and bigger.</p> <p>You can try to train the model using gradientTape. For details, please check <a href="https://pyimagesearch.com/2020/03/23/using-tensorflow-and-gradienttape-to-train-a-keras-model/" rel="nofollow noreferrer">here</a>. With. that you will h...
Due to huge images. Can we generalize flow_from_directory method for regression problem (CNN): input image and output is x,y (float)
python|conv-neural-network|regression|tf.keras
1
62
2
73,089,915
73,089,915
0
true
2022-06-29T04:37:43.137Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Due to huge images. Can we generalize flow_from_directory method for regression problem (CNN): input image and output is x,y (float)<p>Data is in a CSV file ...
73,030,374
Is there a search algorithm to extract information from a document using Document AI?<p>I can extract all the information I need through a combination of the formFields and pages fields, almost hardcoding where to find the pieces of information I need (<a href="https://i.stack.imgur.com/m2U2f.jpg" rel="nofollow norefer...
<p>There's currently not a built-in way to &quot;search&quot; for specific <code>formField</code> names in the output from the <a href="https://cloud.google.com/document-ai/docs/handle-response#forms_and_tables" rel="nofollow noreferrer">Form Parser</a>. But you can always cycle through all of the formfields, load the ...
Is there a search algorithm to extract information from a document using Document AI?
google-cloud-platform|cloud-document-ai
1
62
1
73,211,873
73,211,873
0
true
2022-07-19T02:08:34.680Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is there a search algorithm to extract information from a document using Document AI?<p>I can extract all the information I need through a combination of the...
72,936,620
how to add classifier to maven assembly jar?<p>I'm using the maven assembly plugin</p> <pre><code>&lt;plugin&gt; &lt;artifactId&gt;maven-assembly-plugin&lt;/artifactId&gt; &lt;version&gt;3.3.0&lt;/version&gt; &lt;executions&gt; &lt;execution&gt; &lt;phase&gt;package&lt;/phase&gt; ...
<p>I opted to use the maven shape plugin</p>
how to add classifier to maven assembly jar?
maven|deployment|jar|maven-assembly-plugin|jar-with-dependencies
0
62
1
73,233,066
73,233,066
0
true
2022-07-11T09:49:52.850Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to add classifier to maven assembly jar?<p>I'm using the maven assembly plugin</p> <pre><code>&lt;plugin&gt; &lt;artifactId&gt;maven-assembly-plugin&...
73,000,648
read multiple root tree file one by one<p>I am a beginner, This is related to assignment work.</p> <p>For one root tree file (here pp1.root), I can use the below code. If I am having 10 root files and I need to read each file one by one to get the statistical parameters.</p> <pre><code>void pbtrue() { TFile *f = n...
<p>Now I can do this using <a href="https://en.cppreference.com/w/cpp/string/basic_string" rel="nofollow noreferrer">std::string</a> and <a href="https://en.cppreference.com/w/cpp/string/basic_string/to_string" rel="nofollow noreferrer">std::to_string</a> to form <code>filename</code> and use its <code>c_str</code> met...
read multiple root tree file one by one
c++|string|ifstream
0
62
1
73,044,227
73,044,227
0
true
2022-07-16T00:13:03.780Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: read multiple root tree file one by one<p>I am a beginner, This is related to assignment work.</p> <p>For one root tree file (here pp1.root), I can use the b...
72,855,687
Geonetwork web interface not running in localhost<p>I followed the steps mentioned <a href="https://geonetwork-opensource.org/manuals/3.10.x/en/install-guide/installing-from-war-file.html" rel="nofollow noreferrer">here</a></p> <blockquote> <pre><code>Download the desired geonetwork.war file from SourceForge. Copy the ...
<p>Since you're instaling version 4, I would advice to check out the relevant documentation <a href="https://geonetwork-opensource.org/manuals/4.0.x/eng/users/install-guide/installing-from-war-file.html" rel="nofollow noreferrer">here</a>. Some additional services, like ElasticSearch, need to be installed for this vers...
Geonetwork web interface not running in localhost
tomcat|http-status-code-404|geonetwork
1
62
1
72,856,733
72,856,733
0
true
2022-07-04T11:01:34.033Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Geonetwork web interface not running in localhost<p>I followed the steps mentioned <a href="https://geonetwork-opensource.org/manuals/3.10.x/en/install-guide...
73,026,517
Web-Scraping Script too long?<p>I've been working on a process to scrape the Game Result column from all of the links listed (each one is unique with random ID #'s).</p> <p>This script is not running? It's fine with less links. I can't seem to get the result for the full list - my backup plan would be to just run it in...
<p>I use CSS selector and select <code>.smtext &gt; a[href^=&quot;/game/&quot;]</code> and it's working. As @OneCricketeer has stated, it takes load time.So I also use a bit load time.</p> <pre><code>from bs4 import BeautifulSoup import requests import time profiles = [] urls = ['https://stats.ncaa.org/player/game_by_...
Web-Scraping Script too long?
python|web-scraping|beautifulsoup|python-requests
1
62
1
73,026,877
73,026,877
0
true
2022-07-18T17:47:48.480Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Web-Scraping Script too long?<p>I've been working on a process to scrape the Game Result column from all of the links listed (each one is unique with random ...
72,906,734
Align a Gradient to center in CSS<p>I want the gradient to be in the center of the page and text to be on that gradient.</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-css lang-css prettyprint-override"><code>#grad...
<p>Considering the '<strong>h1</strong>' tag is not inside any block-level ancestor and '<strong>fixed</strong>' position property given on the '<strong>h1</strong>' tag, the <strong>containing area</strong> of the '<strong>h1</strong>' tag would be established by the <a href="https://developer.mozilla.org/en-US/docs/G...
Align a Gradient to center in CSS
html|css
0
62
1
72,907,176
72,907,176
0
true
2022-07-08T04:44:33.313Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Align a Gradient to center in CSS<p>I want the gradient to be in the center of the page and text to be on that gradient.</p> <p><div class="snippet" data-lan...
72,996,132
How would you normalize and calculate speed for a 2D vector if it was clamped by different speeds in all four directions? (-x, +x, -y, +y)<p>My goal here is to improve the user experience so that the cursor goes where the user would intuitively expect it to when moving the joystick diagonally, whatever that means.</p> ...
<p>three solutions :</p> <ul> <li><p>You can simply multiply each component of the input vector by it's respective speed</p> </li> <li><p>you can divide the vector itself by sqrt(dx^2/hSpeed^2+dy^2/vSpeed^2)</p> </li> <li><p>you can <strong>multiply</strong> the vector itself by sqrt((dx^2+dy^2)/(dx^2/hSpeed^2+dy^2/vSp...
How would you normalize and calculate speed for a 2D vector if it was clamped by different speeds in all four directions? (-x, +x, -y, +y)
math|game-physics
0
62
1
73,014,827
73,014,827
0
true
2022-07-15T15:15:49.817Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How would you normalize and calculate speed for a 2D vector if it was clamped by different speeds in all four directions? (-x, +x, -y, +y)<p>My goal here is ...
72,795,921
Not able to pass returned value from viewB to viewA in SwiftUI<p>So I have a ViewA which returns a value called <code>idd</code> after defining a function <code>addNote()</code> and I wish to use that <code>idd</code> value in ViewB. I'm able to define <code>idd</code> in ViewB as <code>viewA.addNote()</code> however I...
<ol> <li><p><code>viewA</code> is your <code>viewModel</code> for <code>viewB</code>. So the name of <code>viewA</code> should be <code>ViewBViewModel</code>.</p> </li> <li><p><code>class</code>/<code>struct</code> names should start with Capital letters.</p> </li> <li><p>In your <code>viewModel</code> (in this case in...
Not able to pass returned value from viewB to viewA in SwiftUI
swift|xcode|listview|swiftui|swiftui-navigationview
1
62
1
72,796,235
72,796,235
0
true
2022-06-29T04:50:34.393Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Not able to pass returned value from viewB to viewA in SwiftUI<p>So I have a ViewA which returns a value called <code>idd</code> after defining a function <c...
72,863,740
Send multi values ​to an OpenQuery<p>I have the following query in sql server</p> <p>Example:</p> <blockquote> <pre><code>Declare @typeL varchar(max) SET @typeL = 'AA,NF' OPENQUERY(ORACLEPD, 'SELECT * FROM Ledger where typeLedger in (''+@typeL+'')') </code></pre> </blockquote> <p>But it shows me an error since it doe...
<p>I made my own solution. (it worked for me)</p> <pre><code>DECLARE @var VARCHAR(MAX) DECLARE @var2 VARCHAR(MAX) DECLARE @tb as TABLE( VALORES VARCHAR(MAX) ) SET @var = 'AA,NF' SET @var2 = '' INSERT INTO @tb SELECT value FROM string_split(@var,',') WHILE EXISTS(SE...
Send multi values ​to an OpenQuery
sql|sql-server|oracle|oracle-sqldeveloper
0
62
2
72,865,323
72,865,323
0
true
2022-07-05T03:37:30.827Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Send multi values ​to an OpenQuery<p>I have the following query in sql server</p> <p>Example:</p> <blockquote> <pre><code>Declare @typeL varchar(max) SET @t...
72,892,521
HttpClient.PostAsync() method is hanging forever in C# xUnt test<p>I have 600 functional xUnit tests and each of the test is calling a <code>httpClient.GetAsync(apiUrl)</code> and <code>httpClient.PostAsync(apiUrl, data)</code> methods in the middle of the test which will call some external APIs.</p> <p>When I execute ...
<p>When I change the <code>httpClient.PostAsync(apiUrl, data)</code> method as below, it fix the issue. I'm not sure what the difference between two methods.</p> <p>Previous way</p> <pre><code>var response = await httpClient.PostAsync(apiUrl, data); </code></pre> <p>I modified above as below and it fixed the issue.</p>...
HttpClient.PostAsync() method is hanging forever in C# xUnt test
c#|mstest|xunit|dotnet-httpclient|visual-studio-test-runner
1
62
1
72,909,200
72,909,200
0
true
2022-07-07T05:04:58.710Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: HttpClient.PostAsync() method is hanging forever in C# xUnt test<p>I have 600 functional xUnit tests and each of the test is calling a <code>httpClient.GetAs...
73,027,631
How to pipe Rename-Item into Move-Item (powershell)<p>I'm in the process of writing up a PowerShell script that can take a bunch of .TIF images, rename them, and place them in a new folder structure depending on the original file name.</p> <p>For example, a folder containing the file named: ABC-ALL-210316-0001-3001-000...
<ul> <li><p>As <a href="https://stackoverflow.com/users/9196560/olaf">Olaf</a> points out, situationally you may not need <em>both</em> a <a href="https://docs.microsoft.com/powershell/module/microsoft.powershell.management/rename-item" rel="nofollow noreferrer"><code>Rename-Item</code></a> <em>and</em> a <a href="http...
How to pipe Rename-Item into Move-Item (powershell)
powershell|script
1
62
2
73,027,835
73,027,835
0
true
2022-07-18T19:27:02.453Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to pipe Rename-Item into Move-Item (powershell)<p>I'm in the process of writing up a PowerShell script that can take a bunch of .TIF images, rename them,...
72,800,153
merge two xml files xslt 3 based on the value of common id element<pre><code>&lt;breakfast_menu&gt; &lt;food&gt; &lt;name&gt;Belgian Waffles&lt;/name&gt; &lt;id&gt;$5&lt;/id&gt; &lt;description&gt;Two of our famous Belgian Waffles with plenty of real maple syrup&lt;/description&gt; &lt;calories&gt;650&lt;/calories&gt; ...
<p>I would use e.g.</p> <pre><code>&lt;xsl:merge-action&gt; &lt;xsl:copy&gt; &lt;xsl:copy-of select=&quot;current-merge-group('A')/*, current-merge-group('B')/(* except id)&quot;/&gt; &lt;/xsl:copy&gt; &lt;/xsl:merge-action&gt; </code></pre> <p>This obviously assumes you are naming your merge sources, which you ...
merge two xml files xslt 3 based on the value of common id element
xslt-3.0
2
62
1
72,801,599
72,801,599
0
true
2022-06-29T10:52:11.917Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: merge two xml files xslt 3 based on the value of common id element<pre><code>&lt;breakfast_menu&gt; &lt;food&gt; &lt;name&gt;Belgian Waffles&lt;/name&gt; &lt...
72,906,546
Casting back void pointer gives different address<p>I'm doing this callback on linux timer, but I don't know why the address changes when it was converted back on the callback function. Code below</p> <pre><code>typedef void* timer_cb_args; typedef void (*timer_cb)(timer_cb_args); struct cb_wrapper { timer_cb cal...
<p>The problem is here:</p> <pre><code>typedef void* timer_cb_args; typedef void (*timer_cb)(timer_cb_args); </code></pre> <p>You are hiding pointers behind typedef and the only thing achieved by that is making everyone including yourself confused.</p> <p>Therefore you write bugs such as this:</p> <pre><code>evp.sigev_...
Casting back void pointer gives different address
c|timer|posix
0
62
1
72,907,544
72,907,544
0
true
2022-07-08T04:10:52.257Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Casting back void pointer gives different address<p>I'm doing this callback on linux timer, but I don't know why the address changes when it was converted ba...
72,875,599
How to properly use setRowStretch in PyQt5<p>I am trying to use <strong>setRowStretch</strong> to stretch my rows of button vertically inside a <strong>QGridLayout</strong> but for some reasons it doesn't want to work. Interestingly, <strong>setColumnStretch</strong> is working for me, however. I'm learning to use PyQt...
<p>QPushButtons size policy by default are set to take up as much horizontal space as possible. If you want the same to be true vertically then you will need to adjust the buttons size policy.</p> <p>for example</p> <pre><code>btn = qtw.QPushButton('%') policy = btn.sizePolicy() policy.setVerticalPolicy(policy.Policy.M...
How to properly use setRowStretch in PyQt5
python|user-interface|pyqt5
1
62
1
72,876,429
72,876,429
0
true
2022-07-05T21:13:08.713Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to properly use setRowStretch in PyQt5<p>I am trying to use <strong>setRowStretch</strong> to stretch my rows of button vertically inside a <strong>QGrid...
72,942,982
Formula to paste contents from clipboard broken<p>My formula just broken and i dont know why</p> <pre><code>Sub COLAR() Worksheets(&quot;FORMULAS&quot;).Range(&quot;A3:M90&quot;).ClearContents Dim DataObj As MSForms.DataObject Set DataObj = New MSForms.DataObject DataObj.GetFromClipboard SText = DataObj.GetText(1) ...
<p>Solved by specifying that the data in my clipoard comes from an HTML table</p> <pre><code>ActiveSheet.PasteSpecial Format:=&quot;HTML&quot;, Link:=False, DisplayAsIcon:= _ False, NoHTMLFormatting:=True </code></pre> <p>My final code</p> <pre><code>Sub COLAR() Dim DataObj As MSForms.DataObject Set DataObj = ...
Formula to paste contents from clipboard broken
excel|vba
1
62
2
72,967,652
72,967,652
0
true
2022-07-11T18:18:28.980Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Formula to paste contents from clipboard broken<p>My formula just broken and i dont know why</p> <pre><code>Sub COLAR() Worksheets(&quot;FORMULAS&quot;).Ran...
72,803,400
Create a history record in Django for every UPDATE of a class instance<p>I have a model in Django that is used to create an item of stock</p> <pre><code>class Item(models.Model): user = models.ForeignKey(User, on_delete=models.CASCADE, null=True) description = models.ForeignKey(Item, on_delete=models.CASCADE, relat...
<p>You want an <a href="https://martinfowler.com/eaaDev/AuditLog.html" rel="nofollow noreferrer">audit log</a> library.</p> <p>There are a few (I've never been completely satisfied with any of them) but I quite like <a href="https://github.com/jazzband/django-auditlog" rel="nofollow noreferrer">this one</a>.</p> <p>As ...
Create a history record in Django for every UPDATE of a class instance
django|database
0
62
2
72,803,625
72,803,625
0
true
2022-06-29T14:46:59.887Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Create a history record in Django for every UPDATE of a class instance<p>I have a model in Django that is used to create an item of stock</p> <pre><code>clas...
72,859,184
ASP.NET EF with class library<p>I created a class library which is going to have my database model with DB first approach. I am using the Northwind database.</p> <pre><code>public void ConfigureServices(IServiceCollection services) { services.AddDbContext&lt;NorthwindContext&gt;(options =&gt; { ...
<p>Based on your scenario if you would like to implement &quot;database first approach&quot; you could follow the below steps.</p> <p><strong>Database Schema:</strong></p> <p><a href="https://i.stack.imgur.com/MSG6l.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MSG6l.png" alt="enter image descripti...
ASP.NET EF with class library
entity-framework|asp.net-core
0
62
2
72,866,527
72,866,527
0
true
2022-07-04T15:38:21.620Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: ASP.NET EF with class library<p>I created a class library which is going to have my database model with DB first approach. I am using the Northwind database....
72,816,306
I would like to filter pings<p>I would like to filter my pings so that I only see the IP addresses which are not online. I tried to use the findstr but it does not outprint the ip address.</p>
<p>You can use a bit complex construction than Wander Nauta, but you have a room to change things.</p> <p>Put your IPs in <code>C:\tmp\ips.txt</code> splitted with new line like:</p> <pre><code>192.168.1.1 1.1.1.1 1.2.3.4 </code></pre> <p>And start script:</p> <pre><code>Clear-Host $ips = Get-Content &quot;C:\tmp\ips.t...
I would like to filter pings
powershell|batch-file
-4
62
2
72,816,632
72,816,632
0
true
2022-06-30T13:01:48.207Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: I would like to filter pings<p>I would like to filter my pings so that I only see the IP addresses which are not online. I tried to use the findstr but it do...
73,023,279
How to Call multiple functions in one onClick in React?<p>I work on React Project and have a some functions which defines some conditions when render the components on page, but I need to call to all functions again in components when onClick button and render random numbers.</p> <p>example:</p> <pre><code>export defau...
<p>If you want to update your values, you have to cause a render by updating a state, maybe be doing this way</p> <pre><code>export default function App(){ func1(){ // some func //brings random number } func2(){ // some func //brings random number } func3(){ // some func //brings random number } const obj = () =...
How to Call multiple functions in one onClick in React?
javascript|reactjs
1
62
4
73,023,726
73,023,726
0
true
2022-07-18T13:39:41.137Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to Call multiple functions in one onClick in React?<p>I work on React Project and have a some functions which defines some conditions when render the com...
72,819,593
Why I am not able to extract the object using the masked image?<p>Here are two images in the drive, one is masked and another one is real image:</p> <p><a href="https://drive.google.com/drive/folders/1hv3NLQeIHT5Iicgnt74S5qFRG5aJyMLw?usp=sharing" rel="nofollow noreferrer">https://drive.google.com/drive/folders/1hv3NLQe...
<p>your code just needs an additional <code>/255</code>.</p> <pre class="lang-py prettyprint-override"><code>import cv2 import numpy as np img = cv2.imread('im010.jpg') mask = cv2.imread('im010.png') img_foreground = np.array((mask/255)*(img/255)) cv2.imshow('', img_foreground) cv2.waitKey() </code></pre> <p>that's ...
Why I am not able to extract the object using the masked image?
python|opencv|image-processing
0
62
2
72,826,038
72,826,038
0
true
2022-06-30T17:06:12.950Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why I am not able to extract the object using the masked image?<p>Here are two images in the drive, one is masked and another one is real image:</p> <p><a hr...
72,886,696
How to convert Cartesian coordinates epitrochoid graph into polar coordinates in pascalABC?<p>For my student project I need to create pascalABC.NET program that makes Epitrochoid graph in Cartesian and Polar coordinate systems. I made some simple code for Cartesian system and it seems to work pretty well, how can i con...
<p>You cannot build explicit function <code>ro(theta)</code> for epitrochoid.</p> <p>It is possible to make <code>ro(t)</code> and <code>theta(t)</code> for <code>t</code> parameter:</p> <pre><code>ro = sqrt(x^2 + y^2) theta = arctan2(y, x) </code></pre> <p>where <code>x, y</code> are expressions like your <code>r1*(m+...
How to convert Cartesian coordinates epitrochoid graph into polar coordinates in pascalABC?
math|geometry|pascal|polar-coordinates|cartesian-coordinates
1
62
1
72,887,287
72,887,287
0
true
2022-07-06T16:03:05.727Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to convert Cartesian coordinates epitrochoid graph into polar coordinates in pascalABC?<p>For my student project I need to create pascalABC.NET program t...
73,013,526
How to save a json file in documents directory?<p>I want to save my json file in document directory and read it from document directory in iOS. I've seen only tutorial for string or image, but if I want to save a json I don't know how.</p>
<p>The typical way to create JSON data is to use a JSONEncoder:</p> <pre><code>let encoder = JSONEncoder() encoder.outputFormatting = .prettyPrinted let data = try encoder.encode(yourJsonObject) </code></pre> <p>That gives you a <code>Data</code> object in the variable <code>data</code>. As others have said, saving a ...
How to save a json file in documents directory?
ios|json|swift|xcode
-3
62
1
73,015,127
73,015,127
0
true
2022-07-17T16:29:32.247Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to save a json file in documents directory?<p>I want to save my json file in document directory and read it from document directory in iOS. I've seen onl...
72,992,803
Extra trailing closure passed in call error while using DynamoDB with Swift<p>I was trying to use DynamoDB with swift for a MacOS application. The problem is that, even when copying the function suggested by the AWS documentation (<a href="https://docs.aws.amazon.com/sdk-for-swift/latest/developer-guide/examples-ddb-it...
<p>The documentation on the provided link is outdated. The newer version of the dependency is already using async requests.</p> <pre><code>func getDynamoDbItem(dynamoDbClient: DynamoDbClient, nameOfTable: String, keyName: String, keyVal: String) async { ...
Extra trailing closure passed in call error while using DynamoDB with Swift
swift|amazon-web-services|amazon-dynamodb
0
62
1
72,993,457
72,993,457
0
true
2022-07-15T10:45:29.933Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Extra trailing closure passed in call error while using DynamoDB with Swift<p>I was trying to use DynamoDB with swift for a MacOS application. The problem is...
72,866,065
Can we add optional chaining in .classlist for null checking in jquery?<p>can we use optional chaining, i.e &quot;?.&quot; for null checking ...</p> <pre><code>$(.class)?.get(0)?.classList.add('hidden); </code></pre> <p>because am, getting errors like &quot;Cannot read properties of undefined( reading 'classList') when...
<p>The best way to use is to use like this:</p> <pre><code>$('.class').get(0).addClass('hidden') </code></pre>
Can we add optional chaining in .classlist for null checking in jquery?
javascript|html|jquery|ecmascript-6|frontend
-1
62
2
72,873,245
72,873,245
0
true
2022-07-05T08:12:00.633Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can we add optional chaining in .classlist for null checking in jquery?<p>can we use optional chaining, i.e &quot;?.&quot; for null checking ...</p> <pre><co...
72,923,786
How would one go about appending all values attached to a variable to one list?<p>I have some code which grabs prices and other data from major reselling websites using bs4, then appends it to a JSON format. I want to append all the prices to one list, so I can average them and find the average retail price.</p> <p>Unf...
<p>Assuming you iterat a <code>ResultSet</code> with products, simply look for the price and append it to a <code>list</code>:</p> <pre><code>data = [] for item in soup.select('.s-item__wrapper'): data.append( re.sub(r'[^\d.]', '', item.find('span', {'class': 's-item__price'}).text) if item.find('sp...
How would one go about appending all values attached to a variable to one list?
python|list|web-scraping|beautifulsoup|python-jsons
0
62
2
72,924,443
72,924,443
0
true
2022-07-09T18:34:31.760Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How would one go about appending all values attached to a variable to one list?<p>I have some code which grabs prices and other data from major reselling web...
72,994,001
How to fix error: list index out of range?<p>I cant solve this problem. I really need help</p> <p>here is my code: <a href="https://dpaste.org/PqpYE#L33" rel="nofollow noreferrer">https://dpaste.org/PqpYE#L33</a></p> <p>here is the error that I am having:</p> <pre><code>File &quot;test.py&quot;, line 30, in &lt;module&...
<p>Shift <code>a+=1</code> to end of <code>loop</code>. Python indexing start with 0.</p>
How to fix error: list index out of range?
python|parsing|beautifulsoup|python-requests
-1
62
2
72,994,322
72,994,322
0
true
2022-07-15T12:27:35.027Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to fix error: list index out of range?<p>I cant solve this problem. I really need help</p> <p>here is my code: <a href="https://dpaste.org/PqpYE#L33" rel...
72,817,782
Is there way to create a swagger doc for latest version api?<p>I use dotnet tool called &quot;swagger&quot; to create a swagger json file that contains API spec for specific version. Command be like: <code>swagger tofile --serializeasv2 --output rest-api.json C:\Service.dll v1</code></p> <p>As you can see I have to pas...
<p>Thanks every one for help. I have found a solution.</p> <p>The main goal is to avoid changing the console command when new version API appears. I am talking about the last part <code>v1</code>. If v2 doc appears, I have to pass it to the command.</p> <p>Now I can pass <code>latest</code> value to the command and get...
Is there way to create a swagger doc for latest version api?
c#|.net-core|swagger
0
62
2
72,826,147
72,826,147
0
true
2022-06-30T14:44:29.600Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is there way to create a swagger doc for latest version api?<p>I use dotnet tool called &quot;swagger&quot; to create a swagger json file that contains API s...
72,768,808
NumberFormatException in Kotlin (IntelliJ)<p>Here is what I am trying to do, I want the user to enter whatever number and it should be displayed, but I am getting this error. import java.util.*</p> <p>This is my code</p> <pre><code>fun main(){ print(&quot;Enter your age&quot;) var age = readLine()!!.toInt() print(age) ...
<p>You are writing a space in front of the 40 as indicated by the error &quot; 40&quot;.</p> <p>A solution could be is to trim all leading and trailing whitespaces from the readLine, like this:</p> <pre><code>var age = readLine()!!.trim().toInt() </code></pre>
NumberFormatException in Kotlin (IntelliJ)
kotlin|variables|intellij-idea|nullpointerexception|integer
0
62
1
72,768,937
72,768,937
1
true
2022-06-27T08:04:47.877Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: NumberFormatException in Kotlin (IntelliJ)<p>Here is what I am trying to do, I want the user to enter whatever number and it should be displayed, but I am ge...
72,770,261
Where clause in JSONata<p>Is there anyway to extract value according to id in an array using JSOnata expression. I wan't to access Status acccroding to specific tag in following array? As an example Status of id_tag equals&quot;B4A63CDF&quot;.</p> <pre><code>[{&quot;Status&quot;:&quot;Expired&quot;,&quot;id&quot;:1,&qu...
<p>Yeah, this is an example where JSONata is very comfortable to use, you need to filter your array by the id_tag field and then just get the prop you want from the matching item:</p> <pre><code>$[id_tag=&quot;B4A63CDF&quot;].Status </code></pre> <p>Feel free to play with my solution here: <a href="https://stedi.link/i...
Where clause in JSONata
json|jsonata
0
62
1
72,770,396
72,770,396
1
true
2022-06-27T10:03:38.970Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Where clause in JSONata<p>Is there anyway to extract value according to id in an array using JSOnata expression. I wan't to access Status acccroding to speci...
72,779,240
Get array length and push into each object<p>I have a function</p> <pre><code>const output = {} sites.forEach(obj=&gt;{ const ids = obj.ids if(ids &amp;&amp; ids.length&gt;0){ ids.forEach(id=&gt;{ if(!output[id]){ output[id] = [] } output[id].push(obj....
<p>Use nested objects in the output, and give it a <code>length</code> property that you increment when you push onto the array.</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...
Get array length and push into each object
javascript|arrays|ecmascript-6|foreach
0
62
2
72,779,307
72,779,307
1
true
2022-06-27T23:25:41.723Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Get array length and push into each object<p>I have a function</p> <pre><code>const output = {} sites.forEach(obj=&gt;{ const ids = obj.ids if(ids &a...
72,779,819
during creation of pandas DataFrame ValueError: Buffer has wrong number of dimensions (expected 1, got 2)<p>I am trying to get pandas to read specific column values from an excel file, and allow me to manipulate specific individual elements within the specific column values by reading all the values into a numpy array....
<p>Remove the <code>sheet_name=None</code> from your code.</p> <pre><code>cols= 'A, AO, BB, BC' df= pd.read_excel(path_to_excel, usecols=cols) f1= pd.DataFrame(df, index=[0]) df1.to_numpy() </code></pre> <p>The default value for argument <code>sheet_name</code> is <code>Sheet1</code>, not <code>None</code>. If you use...
during creation of pandas DataFrame ValueError: Buffer has wrong number of dimensions (expected 1, got 2)
python|pandas|dataframe
0
62
1
72,779,876
72,779,876
1
true
2022-06-28T01:33:10.510Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: during creation of pandas DataFrame ValueError: Buffer has wrong number of dimensions (expected 1, got 2)<p>I am trying to get pandas to read specific column...
72,779,825
Getting column "B" not found, while running the SQL query to create the table in the h2 db in the Springboot application<p>I am working on a spring-boot application. Where I have to run a set of SQL queries (&quot;written for the MySQL DB&quot;) to create the tables when the application starts. These queries are workin...
<p>Bit literals <code>b'something'</code> are MySQL-specific feature.</p> <p>In your particular case you need to replace <code>b'1'</code> with <code>TRUE</code> and <code>b'0'</code> with <code>FALSE</code>, both MySQL and H2 accept these standard literals.</p> <hr /> <p>It isn't related to you question, but you may w...
Getting column "B" not found, while running the SQL query to create the table in the h2 db in the Springboot application
spring-boot|h2|h2db
0
62
1
72,779,910
72,779,910
1
true
2022-06-28T01:34:27.113Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Getting column "B" not found, while running the SQL query to create the table in the h2 db in the Springboot application<p>I am working on a spring-boot appl...
72,780,039
how to read a file from a local directory from python code in a docker container?<p>I have tried to containerize my python code , this is working, building the docker image, running the container and invoking the python code in my app.py file. next, i want to be able to upload the sample.txt file that my python code re...
<p>When you <code>docker run</code>, you can <a href="https://docs.docker.com/storage/bind-mounts/" rel="nofollow noreferrer">(bind) mount</a> folders/files on the host as folders/files on the container:</p> <pre class="lang-bash prettyprint-override"><code>docker run \ --interactive --tty --rm \ --volume=/path/to/host...
how to read a file from a local directory from python code in a docker container?
python|pandas|docker
0
62
2
72,780,272
72,780,272
1
true
2022-06-28T02:13:20.767Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to read a file from a local directory from python code in a docker container?<p>I have tried to containerize my python code , this is working, building t...
72,782,445
Format string to datetime in Pandas without zero padding, AM/PM and UTC<p>My csv file contains the date and time values like below. I want to convert this to a datetime format in pandas but I keep getting errors.<br /> I then want to convert it to a 24 hour format with zero padding and without the mention UTC.</p> <p>I...
<p>You can use <a href="https://docs.python.org/3/library/datetime.html#strftime-and-strptime-behavior" rel="nofollow noreferrer"><code>%m/%d/%Y %H:%M</code></a>:</p> <pre><code>pd.to_datetime(df['date'], dayfirst=False).dt.strftime('%m/%d/%Y %H:%M') </code></pre> <p>output:</p> <pre><code>0 10/12/2021 10:25 1 09...
Format string to datetime in Pandas without zero padding, AM/PM and UTC
python|pandas|datetime
1
62
1
72,782,468
72,782,468
1
true
2022-06-28T07:38:26.213Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Format string to datetime in Pandas without zero padding, AM/PM and UTC<p>My csv file contains the date and time values like below. I want to convert this to...
72,783,948
Compare current element in one list to next element in another list<p>I have two equally long lists representing the start and end frames of an event. They look something like this:</p> <pre><code>START END 111 113 118 133 145 186 </code></pre> <p>The next element of the START list is always go...
<p>Is this that you're looking for ? You can compare start[i] with end[i-1] ?</p> <pre><code>start = [111,118, 145] end = [113, 133, 186] for i in range(1, len(start)): print(start[i] - end[i-1]) </code></pre>
Compare current element in one list to next element in another list
python|list|numpy
2
62
5
72,784,038
72,784,038
1
true
2022-06-28T09:28:43.730Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Compare current element in one list to next element in another list<p>I have two equally long lists representing the start and end frames of an event. They l...
72,785,233
Update one object of an array using spread operator not working<p>I want to update one object from an array. This is my current working code which is updating the object inside the array</p> <pre><code>var equipment = this.equipments.find((e) =&gt; e.id === this.currentItem.id); // this property is getting updated suc...
<blockquote> <p>Could be because the spread operator totally creates a new object and does not update the existing object?</p> </blockquote> <p>Yes, you need to return a new array and replace one element, it can be done using <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Arra...
Update one object of an array using spread operator not working
javascript|angular|typescript
1
62
1
72,785,279
72,785,279
1
true
2022-06-28T10:59:24.690Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Update one object of an array using spread operator not working<p>I want to update one object from an array. This is my current working code which is updatin...
72,783,279
How to convert a numpy array waveform into a wav file-like object?<p>I want to convert a numpy array waveform into a wav-like object so that I can upload it to S3 without having to save the waveform to file locally. Imagine I have a numpy array waveform, <code>y</code>,</p> <pre><code>y, sr = librosa.load('something.wa...
<p>You can try like this:</p> <pre><code>import io from scipy.io.wavfile import write import boto3 bytes_wav = bytes() wav_object = io.BytesIO(bytes_wav) write(wav_object, sr, y) # y is your numpy array s3 = boto3.resource('s3') bucket = s3.Bucket('mybucket') bucket.upload_fileobj(wav_object, 'something.wav') </co...
How to convert a numpy array waveform into a wav file-like object?
python|numpy|boto3|wav|wave
0
62
1
72,787,329
72,787,329
1
true
2022-06-28T08:39:47.720Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to convert a numpy array waveform into a wav file-like object?<p>I want to convert a numpy array waveform into a wav-like object so that I can upload it ...
72,785,126
Javascript/Typescript/React hexadecimal to binary convertion before write a file in Android/iOS<p>all. I've an issue that I cannot understand why it happens.</p> <p>I have to download a file that is stored in hex, so I have to read it in hex, convert it in bin and then write it on an Android/iOS device.</p> <p>To reach...
<blockquote> <p>If I do a console.log(content) in viewFile function, the conten is correct.</p> </blockquote> <p>I don't think so. A string in JavaScript is a sequence of UTF-16 chars, that is, a sequence of 2/4/8byte sequences, each one containing a char.</p> <p>If you need to write a binary file, you should write bin...
Javascript/Typescript/React hexadecimal to binary convertion before write a file in Android/iOS
javascript|reactjs|typescript|hex|bin
0
62
1
72,788,146
72,788,146
1
true
2022-06-28T10:51:08.370Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Javascript/Typescript/React hexadecimal to binary convertion before write a file in Android/iOS<p>all. I've an issue that I cannot understand why it happens....
72,784,847
Our Wear OS app not listed on the Google Play<p>So we have an issue with our Wear OS app. Recently we got an email from Google that our app is removed from the Play Store because of quote:</p> <blockquote> <p>your app is not compatible with Watch/Wear OS devices due to a conflict in your app’s manifest with the followi...
<p>I don't know the definitive answer, but are you sure you need the two location uses-feature manifest entries?</p> <p>See <a href="https://stackoverflow.com/a/39603347/1542667">https://stackoverflow.com/a/39603347/1542667</a></p> <p>Is there some device you want to filter out, rather than assuming most Wear OS device...
Our Wear OS app not listed on the Google Play
android|wear-os|android-wear-3.0
1
62
1
72,789,566
72,789,566
1
true
2022-06-28T10:31:23.250Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Our Wear OS app not listed on the Google Play<p>So we have an issue with our Wear OS app. Recently we got an email from Google that our app is removed from t...
72,293,368
Here.com Route API - V8 - State Mileage<p>We're trying to migrate from routes v7 to routes v8. Using v8, how can we get a breakdown of miles per US State?</p> <p>In version 7.2 we could do</p> <p><a href="https://route.ls.hereapi.com/routing/7.2/calculateroute.json?apiKey=API_KEY&amp;mode=fastest;truck&amp;excludecount...
<p>v7: summaryByCountry<br /> v8: Not present. If spans are requested with spans=countryCode,length, then information about the distance in each country can be retrieved. No plans to support in any other manner. Response in v8 contains :</p> <pre><code>spans&quot;: [ { &quot;...
Here.com Route API - V8 - State Mileage
here-api
0
62
1
73,553,680
73,553,680
0
true
2022-05-18T17:11:38.503Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Here.com Route API - V8 - State Mileage<p>We're trying to migrate from routes v7 to routes v8. Using v8, how can we get a breakdown of miles per US State?</p...
72,912,621
Optimizely CMS 12- How to customize admin pages?<p>I'm using optimizely CMS 12 and I need to add a new menu item as a new tab after &quot;Display Option&quot; for My Settings Page</p> <p>I need to add a new tab after Display Option</p> <p><a href="https://i.stack.imgur.com/FOQc0.png" rel="nofollow noreferrer"><img src=...
<p>I have checked this with Optimizely, they mentioned that this is not possible to do in CMS 12.</p>
Optimizely CMS 12- How to customize admin pages?
c#|.net|content-management-system|episerver|optimizely
3
62
1
73,727,541
73,727,541
0
true
2022-07-08T14:06:06.577Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Optimizely CMS 12- How to customize admin pages?<p>I'm using optimizely CMS 12 and I need to add a new menu item as a new tab after &quot;Display Option&quot...
72,963,737
How to rotate kms encryption key for Client-Side Field Level Encryption in Mongo?<p>We are currently using Client-Side Field Encryption in mongo. We have a requirement to rotate the encryption keys every year. But the documentation only provides ways of rotating using the general mongo encryption and not the encryption...
<p>For reference, to rotate the data key: <a href="https://www.mongodb.com/docs/upcoming/reference/method/KeyVault.rewrapManyDataKey/" rel="nofollow noreferrer">https://www.mongodb.com/docs/upcoming/reference/method/KeyVault.rewrapManyDataKey/</a></p>
How to rotate kms encryption key for Client-Side Field Level Encryption in Mongo?
mongodb|encryption
0
62
1
73,746,160
73,746,160
0
true
2022-07-13T09:14:53.863Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to rotate kms encryption key for Client-Side Field Level Encryption in Mongo?<p>We are currently using Client-Side Field Encryption in mongo. We have a r...
72,244,934
Creating employee in Xero PHP SDK<p>I have copied the sample code from the Xero developers site but keep getting an error with the DateOfBirth here is the code</p> <pre><code>&lt;?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure OAuth2 access token for authorization: OAuth2 $config = XeroAPI\XeroPHP\Co...
<p>Passing and array of employees like this worked for me.</p> <pre><code>[{ &quot;FirstName&quot;: &quot;Joe&quot;, &quot;LastName&quot;: &quot;Baba&quot;, &quot;DateOfBirth&quot;: &quot;1998-09-01&quot;, &quot;HomeAddress&quot;: { &quot;AddressLine1&quot;: &quot;123 Main St&quot;, ...
Creating employee in Xero PHP SDK
php|json|xero-api
0
62
3
73,266,435
73,266,435
0
true
2022-05-15T01:21:11.820Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Creating employee in Xero PHP SDK<p>I have copied the sample code from the Xero developers site but keep getting an error with the DateOfBirth here is the co...
72,238,989
Find the nth character of an increasing sequence<p>Recently i saw a competitive coding question, the bruteforce approach doesn't meet the time complexity, Is there any other solution for this,</p> <p>Question:</p> <p>An expanding sequence is give which starts with 'a',we should replace each character in the following w...
<p>The solution to problems like this is never to actually generate all the strings.</p> <p>Here's a fast solution that descends directly through the tree of substitutions:</p> <pre class="lang-py prettyprint-override"><code>dictionary={ 'a':['a','b'], 'b':['c','d'], 'c':['c','d'], 'd':['a','b'] } def ...
Find the nth character of an increasing sequence
python|algorithm|math|data-structures|logic
1
62
1
72,240,649
72,240,649
0
true
2022-05-14T09:39:20.077Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Find the nth character of an increasing sequence<p>Recently i saw a competitive coding question, the bruteforce approach doesn't meet the time complexity, Is...
72,243,193
Rails App Breaks with 404 Error when Last.fm API Call Returns Nothing<p>I wonder if anyone can help, and if the issue is specific to Last.fm (perhaps not the greatest of APIs).</p> <p>I've built an album search feature into my app that takes two parameters - album and artist. Now, this returns an album just fine if th...
<p>From what I understood, you are using <code>open-uri</code> to reach this service. If you want to <code>rescue</code> an exception in this process you can try something like this:</p> <pre class="lang-rb prettyprint-override"><code>def get_album(artist, album) album = ERB::Util.url_encode(album) artist = ERB::Ut...
Rails App Breaks with 404 Error when Last.fm API Call Returns Nothing
ruby-on-rails|ruby|api|http-status-code-404
0
62
1
72,247,905
72,247,905
0
true
2022-05-14T19:10:18.487Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Rails App Breaks with 404 Error when Last.fm API Call Returns Nothing<p>I wonder if anyone can help, and if the issue is specific to Last.fm (perhaps not the...
72,247,595
Discord commands error: Command cannot be found<p>I'm trying to make a leveling feature to my discord bot but I'm facing some issues. Here's the code. Comes with an error when I type <code>!xp</code> it comes with this, not sure how to fix.</p> <pre><code>Ignoring exception in command None: discord.ext.commands.errors....
<p>You're creating both a <code>commands.Bot</code> and <code>discord.Client</code>. You don't want to do this; <code>Bot</code> is already a subclass of the generic client and can do everything it needs to do. Only make one, such as</p> <pre class="lang-py prettyprint-override"><code>bot = commands.Bot(command_prefix=...
Discord commands error: Command cannot be found
discord|pycharm|discord.py
0
62
1
72,250,475
72,250,475
0
true
2022-05-15T10:55:37.003Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Discord commands error: Command cannot be found<p>I'm trying to make a leveling feature to my discord bot but I'm facing some issues. Here's the code. Comes ...
72,252,502
findById returns all fields except one that references another document<p>When I use findById on my model, it returns all fields except the one that references another document.</p> <p>This is the document on the database (<a href="https://i.stack.imgur.com/X5qrh.png" rel="nofollow noreferrer">MongoDB Document</a>):</p...
<p>You should explicitly <code>populate</code> the referenced field when running your query:</p> <pre><code>const video = await Videos.findById(_id).populate('author').exec() </code></pre> <p>You can read more about query population on the official <a href="https://mongoosejs.com/docs/populate.html" rel="nofollow noref...
findById returns all fields except one that references another document
node.js|mongodb|mongoose
1
62
2
72,255,528
72,255,528
0
true
2022-05-15T21:59:53.203Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: findById returns all fields except one that references another document<p>When I use findById on my model, it returns all fields except the one that referenc...
72,257,662
Unable to stub an exported function with Sinon<p>I need to test the following <code>createFacebookAdVideoFromUrl()</code> that consumes a <code>retryAsyncCall</code> that I'd like to stub with Sinon :</p> <pre><code>async function createFacebookAdVideoFromUrl(accountId, videoUrl, title, facebookToken = FACEBOOK_TOKEN, ...
<p>I fixed it by changing the way to import in my SUT :</p> <pre><code>// from const { retryAsyncCall } = require('../../../helpers/retry-async'); // to const retry = require('../../../helpers/retry-async'); </code></pre> <p>and in my test file :</p> <pre><code>// from import * as retryAsyncCallModule from '../../../...
Unable to stub an exported function with Sinon
node.js|mocking|mocha.js|sinon|stub
0
62
1
72,260,708
72,260,708
0
true
2022-05-16T10:21:16.130Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Unable to stub an exported function with Sinon<p>I need to test the following <code>createFacebookAdVideoFromUrl()</code> that consumes a <code>retryAsyncCal...
72,261,492
Pasting Data for samples based on their Test and ID<p>I have a data sheet with Sample IDs, Test type, and Test results all in three separate columns(A,B,C).<br /> Some samples IDs are listed multiple times, as they all receive different tests.<br /> The three columns of Sample IDs, Test Type, and Test Results are on Sh...
<h2>A Basic VBA Pivot</h2> <pre class="lang-vb prettyprint-override"><code>Sub BasicPivot() ' s - Source (read from) Const sName As String = &quot;Raw Data&quot; Const sFirstCellAddress As String = &quot;A1&quot; Const srCol As Long = 1 Const scCol As Long = 2 Const svCol As Long = 3 ' ...
Pasting Data for samples based on their Test and ID
excel|vba
1
62
1
72,265,638
72,265,638
0
true
2022-05-16T15:11:59.250Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Pasting Data for samples based on their Test and ID<p>I have a data sheet with Sample IDs, Test type, and Test results all in three separate columns(A,B,C).<...
72,271,558
use fstream to read and write in the same time<p>I am learning how to read and write from file . There is a problem that when I try to write (--something in the file letter for example--) after reading or read after writing in the file using <code>fstream</code> <br>something wrong is happening. I tried to just writ...
<p>Look at this answer: <a href="https://stackoverflow.com/a/17567454/11829247">https://stackoverflow.com/a/17567454/11829247</a> it explains the error you are experiencing.</p> <p>Short version: Input and output is buffered and interleaving reads and writes only work if you force buffer updates in between.</p> <p>This...
use fstream to read and write in the same time
c++|fstream
0
62
1
72,272,860
72,272,860
0
true
2022-05-17T09:35:13.313Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: use fstream to read and write in the same time<p>I am learning how to read and write from file . There is a problem that when I try to write (--something in...
72,277,032
Can't activate virtual environment - created with built-in python module venv while having Conda installed on my computer<p>I created a python virtual environment using this command:</p> <pre><code>$ python -m venv panda </code></pre> <p>It has been created successfully but when I try to activate the environment using:...
<p>You may want to take a look at this question: <a href="https://stackoverflow.com/questions/13122137/how-to-source-virtualenv-activate-in-a-bash-script">How to source virtualenv activate in a Bash script</a>. It may help with activating environments in bash.</p> <p><code>. ./panda/scripts/activate</code> should activ...
Can't activate virtual environment - created with built-in python module venv while having Conda installed on my computer
python|anaconda|conda|python-venv
0
62
1
72,277,441
72,277,441
0
true
2022-05-17T15:44:08.663Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can't activate virtual environment - created with built-in python module venv while having Conda installed on my computer<p>I created a python virtual enviro...
72,290,269
How do I correctly destruct a derived object that was constructed using placement new<p>Say we have a C++ program with this sort of class inheritance:</p> <pre><code>class A { public: virtual ~A() {/* ... */} }; class B : public A { public: virtual ~B() {/* ... */} }; class C : public A { public: virtual ~C(...
<p>Run this and it may help a little:</p> <pre><code>#include &lt;iostream&gt; class A { public: virtual ~A() { std::cout &lt;&lt; &quot;A\n&quot;; } }; class B : public A { public: virtual ~B() { std::cout &lt;&lt; &quot;B\n&quot;; } }; class C : public A { public: virtual ~C() { std::cout &lt;&lt; &quo...
How do I correctly destruct a derived object that was constructed using placement new
c++|embedded
0
62
1
72,290,397
72,290,397
0
true
2022-05-18T13:37:20.317Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I correctly destruct a derived object that was constructed using placement new<p>Say we have a C++ program with this sort of class inheritance:</p> <p...
72,294,373
Add new child element using xsl 3.0<p>I need to transform following xml as <strong>Expected Output</strong> using xsl 3.0 or xsl 2.0. Need to add new element called <code>&lt;key&gt; &lt;/key&gt;</code> for each <code>&lt;row&gt;</code> element by combining its <strong>legacyID</strong> and <strong>company</strong>.</p...
<p>You could do it like this :</p> <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt; &lt;xsl:stylesheet xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot; version=&quot;1.0&quot;&gt; &lt;xsl:output method=&quot;xml&quot; indent=&quot;yes&quot;/&gt; &lt;xsl:template match=&quo...
Add new child element using xsl 3.0
xml|xslt|xslt-2.0
0
62
2
72,294,908
72,294,908
0
true
2022-05-18T18:36:08.083Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Add new child element using xsl 3.0<p>I need to transform following xml as <strong>Expected Output</strong> using xsl 3.0 or xsl 2.0. Need to add new element...
72,316,796
Is there any way to get two different results with single query based on condition?<p>I am trying to get two different results from single query but the problem is both conditions get applied on last query.</p> <p>for example</p> <pre><code>$getUser = User::join('role_user','role_user.user_id','users.id') -&gt;...
<p>you need to clone Builder object to reuse it</p> <pre class="lang-php prettyprint-override"><code>$selectFields = [ 'users.id', 'users.name', 'users.email', 'users.identity_status', 'users.email_verified_at', 'role_user.role_id' ]; /** @var Illuminate\Database\Eloquent\Builder */ $getUser = User::jo...
Is there any way to get two different results with single query based on condition?
php|mysql|laravel|backend
1
62
4
72,316,961
72,316,961
0
true
2022-05-20T09:44:00.260Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is there any way to get two different results with single query based on condition?<p>I am trying to get two different results from single query but the prob...
72,312,332
JMeter: how to send formatted text via SMPT sampler<p>Is there a way to send a formatted text with links via JMeter SMTP sampler?</p> <p><strong>Scenario</strong>: I need to send an email, where one of the words e.g. My &quot;Instagram&quot; will have a link to my instagram page.</p> <p><strong>Option 1</strong>: Creat...
<p>I don't think you can customize the SMTP Sampler messages this way. You will need to either compose the message in an email application, save it to <a href="https://en.wikipedia.org/wiki/Email#Filename_extensions" rel="nofollow noreferrer">.eml file</a> and send this .eml or if you want to build the message content ...
JMeter: how to send formatted text via SMPT sampler
google-api|jmeter|smtp|gmail
0
62
1
72,320,201
72,320,201
0
true
2022-05-20T00:22:41.610Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: JMeter: how to send formatted text via SMPT sampler<p>Is there a way to send a formatted text with links via JMeter SMTP sampler?</p> <p><strong>Scenario</st...
72,328,075
Django get_language_info_list in template is empty<p>I am making a website where the user can decide to view the website in either English or Dutch. I would like to do this with a dropdown menu, and for this I have added the following:</p> <p><code>settings.py</code>:</p> <pre class="lang-py prettyprint-override"><code...
<p>I forgot to add the <code>django.template.context_processors.i18n</code> context processor in <code>settings.py</code></p>
Django get_language_info_list in template is empty
python-3.x|django
0
62
1
72,328,150
72,328,150
0
true
2022-05-21T08:55:20.090Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Django get_language_info_list in template is empty<p>I am making a website where the user can decide to view the website in either English or Dutch. I would ...
72,329,622
Console app not posting to minimalistic ASP.NET Core API<p>I have a solution with two projects in Visual Studio 2022:</p> <ul> <li>A console app</li> <li>A minimalistic API created using ASP.NET Core Web API</li> </ul> <p>The API has a simplistic model as follows:</p> <pre><code>class Todo // This is the model { pu...
<p>It seems that specifying the header is important while interacting with a JSON-based API. There appear to be two ways of doing this while working with <code>System.Net.Http</code></p> <ol> <li>Set globally using something like:</li> </ol> <pre><code>client.DefaultRequestHeaders.Accept.Add( new MediaTypeWithQ...
Console app not posting to minimalistic ASP.NET Core API
c#|asp.net-core-webapi
0
62
1
72,330,096
72,330,096
0
true
2022-05-21T12:38:33.760Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Console app not posting to minimalistic ASP.NET Core API<p>I have a solution with two projects in Visual Studio 2022:</p> <ul> <li>A console app</li> <li>A m...
72,333,115
How do you make a table without column names using package "gt"<p>I'm new to the R package &quot;gt&quot; and would like to create a periodic table. I found some code online to do this, but the code generates a table with row and column names, which I don't want. I was able to get rid of the row names, but can't remove...
<p>We may use <code>column_labels.hidden = TRUE</code></p> <pre><code>library(dplyr) library(gt) elements %&gt;% select(-rowname) %&gt;% gt() %&gt;% tab_options(column_labels.hidden = TRUE) </code></pre> <p>-output</p> <p><a href="https://i.stack.imgur.com/J4QwL.png" rel="nofollow noreferrer"><img src="https://...
How do you make a table without column names using package "gt"
r|gt
1
62
1
72,333,153
72,333,153
0
true
2022-05-21T20:46:55.217Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do you make a table without column names using package "gt"<p>I'm new to the R package &quot;gt&quot; and would like to create a periodic table. I found ...
72,324,132
Elasticsearch nested aggregations return duplicate value<p>This is data:</p> <pre><code>{ &quot;search_product_sku&quot; : &quot;FD0044S&quot;, &quot;price&quot; : 500.00, &quot;car_detail&quot; : [ { &quot;car_brand&quot; : &quot;TOYOTA&quot;, &quot;specification&quot; : &...
<p>I don't know how your mapping is but I tested it like this and it worked.</p> <p>Mapping</p> <pre><code>PUT idx_nested { &quot;mappings&quot;: { &quot;properties&quot;: { &quot;search_product_sku&quot;: { &quot;type&quot;: &quot;text&quot; }, &quot;price&quot;: { &quot;type&qu...
Elasticsearch nested aggregations return duplicate value
elasticsearch
0
62
1
72,334,447
72,334,447
0
true
2022-05-20T19:47:48.650Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Elasticsearch nested aggregations return duplicate value<p>This is data:</p> <pre><code>{ &quot;search_product_sku&quot; : &quot;FD0044S&quot;, &quot;pri...
72,339,132
Problems with buttons / grid in HTML/CSS<p>i have problems with the setup of the buttons. I'm unsure if i need a grid system or not? I want it to look like this example:</p> <p><img src="https://i.stack.imgur.com/bKFZQ.png" alt="example of how i want it" /></p> <p>No code yet as i am unsure of where to start, and what ...
<p>You can use with flex, justify-content, align-items like example below:</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-css lang-css prettyprint-override"><code>.wrapped { display: flex; flex-direction: column;...
Problems with buttons / grid in HTML/CSS
html|css|button|bootstrap-4|grid
0
62
2
72,339,704
72,339,704
0
true
2022-05-22T15:54:17.783Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Problems with buttons / grid in HTML/CSS<p>i have problems with the setup of the buttons. I'm unsure if i need a grid system or not? I want it to look like t...
72,343,453
Parsing yaml file format in python<p>I have yaml file in this format. I have chunks of data start with &quot;- Buffer: 0&quot;. Need to store that chunks in dictionary and process the data.</p> <pre><code>- {MinimumRequiredVersion: 1.2.1} - baran - afc90a - [Device 0050, Device 0051, Device 0052, Device 0054, Device 00...
<p><code>data</code> is a list (its elements specified by <code>-</code> in YAML). A list containing the dictionaries you seem to be interested in are thus in <code>data[5]</code> — you can see it is another list by another level of <code>-</code> items. Specifically, <code>data[5][0]</code> is a dictionary (specified ...
Parsing yaml file format in python
python-3.x|list|dictionary|yaml|pyyaml
0
62
1
72,343,584
72,343,584
0
true
2022-05-23T05:01:09.373Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Parsing yaml file format in python<p>I have yaml file in this format. I have chunks of data start with &quot;- Buffer: 0&quot;. Need to store that chunks in ...
72,348,135
How can I blur background image without affecting parents?<p>I want to blur <em>only</em> my background image whilst keeping the parents unaffected.</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-css lang-css prett...
<p>Added to divs with class .background and .foreground .background div has filter:blur attribute and .foreground div has backdrop-filter: blur attribute.</p> <p>Check if this works for you.</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <...
How can I blur background image without affecting parents?
html|css
-2
62
2
72,348,487
72,348,487
0
true
2022-05-23T11:54:41.920Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I blur background image without affecting parents?<p>I want to blur <em>only</em> my background image whilst keeping the parents unaffected.</p> <p><...
72,349,350
Change Dataset in Python<p>I have a dataset like this</p> <pre><code>index data data_list label A i love pyhton. ['i love python.', [1,0] pyhton very useful. 'python very useful.'] B i like tea. tea ['i like tea.','tea [0,...
<p>What you want is something called, explode function.Which basically expands, the interable and creates a base index to which grouped by element row. Just do the following line of code.</p> <pre><code>df.explode(['data_list','label']) </code></pre>
Change Dataset in Python
python|dataframe|dataset|python-dataset
1
62
2
72,349,394
72,349,394
0
true
2022-05-23T13:23:39.137Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Change Dataset in Python<p>I have a dataset like this</p> <pre><code>index data data_list label A i love pyhton. ...
72,355,311
I have been trying to deal with this issue for a while now, I am a newbie in shell programming, can anyone help me out?<p>(EDITED)</p> <p>I have the following code:</p> <pre><code>#!/bin/bash exec 3&lt; lista.csv read -u 3 header nota1=0 id1=0 nota2=0 id2=0 nota3=0 id3=0 g=1 while [ &quot;$g&quot; -eq 1 ] do g=0 while ...
<p>Assuming you only need to the 3 highest lines, you can try this <code>head</code> and <code>sort</code></p> <pre><code>$ head -3 &lt;(sort -t',' -nrk6 input_file) 1,Ion,Andrada,1003,A,8 2,Simion,Raluca,1005,A,7 4,Mihailescu,Georgina,1002,A,6 </code></pre>
I have been trying to deal with this issue for a while now, I am a newbie in shell programming, can anyone help me out?
bash|shell
-1
62
1
72,360,910
72,360,910
0
true
2022-05-23T22:12:01.097Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: I have been trying to deal with this issue for a while now, I am a newbie in shell programming, can anyone help me out?<p>(EDITED)</p> <p>I have the followin...
72,355,324
Pass varible with slash into nginx<p>nginx rewiting resolve slash in variable. How to do with nginx to pass a content parameter a slash (/) ? ex: /1524/Ri/Hr/p2 (Ri/Hr is the parameter)</p> <p>So THX</p>
<p>Depending on your PHP backend, if it isn't something that relies no the <code>REQUEST_URI</code> FastCGI variable only (making any kind of rewrite rules senseless, it is the <code>REQUEST_URI</code> that should be tweaked instead in that case), you can try to use the non-normalized <a href="https://nginx.org/en/docs...
Pass varible with slash into nginx
nginx|url|parameters|special-characters|slash
0
62
1
72,363,199
72,363,199
0
true
2022-05-23T22:13:20.507Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Pass varible with slash into nginx<p>nginx rewiting resolve slash in variable. How to do with nginx to pass a content parameter a slash (/) ? ex: /1524/Ri/Hr...
72,366,388
Insert Nan into specific positions in a vector<p>I have two vectors called A and B: A is a list of numbers and B is a list that indicates the order that the numbers of A should be arranged.</p> <p>I would like to create a vector C, where the numbers of vector A are arranged according to the positions laid out in vector...
<p>short answer using numpy and avoiding &quot;for&quot;</p> <pre><code>import numpy as np A = np.array([5, 10, 55, 3, 10]) B = np.array([1, 3, 4, 6, 9]) #C = [5, nan, 10, 55, nan, 3, nan, nan, 10] c = np.ones(B[-1])*np.NaN #create array of nans with desired length c[B-1] = A #assing values (remember indices in pytho...
Insert Nan into specific positions in a vector
python|list|vector|indexing|nan
0
62
2
72,366,568
72,366,568
0
true
2022-05-24T16:29:31.470Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Insert Nan into specific positions in a vector<p>I have two vectors called A and B: A is a list of numbers and B is a list that indicates the order that the ...
72,367,494
Problems with the library<p>I am working on my app and since a few days I cannot compile my code anymore. Do you have an idea why all the library are red and how I can fix this?</p> <p>Thank you so much for your expertise and hope to hear from you soon.</p> <p>Thanks</p> <p>Martin</p> <p><a href="https://i.stack.imgur....
<p>run <code>flutter clean</code> &amp; then run <code>flutter pub get</code></p>
Problems with the library
flutter|dart|import|compiler-errors|fatal-error
0
62
1
72,367,723
72,367,723
0
true
2022-05-24T18:03:00.563Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Problems with the library<p>I am working on my app and since a few days I cannot compile my code anymore. Do you have an idea why all the library are red and...
72,368,672
Is there a way to display the first two results of each unique id?<p>I work in healthcare. In a Postgres database, we have a table member IDs and dates. I'm trying to pull the latest two dates for each member ID.</p> <p>Simplified sample data:</p> <pre><code>A 1 B 1 B 2 C 1 C 5 C 7 D 1 D 2 D 3 D 4 </code></pre> <p>Desi...
<ul> <li>I get a strong feeling this is for a homework assignment and would recommend that you look into partitioning and specifically rank() function by yourself first before looking at my solution.</li> <li>Moreover, you have not specified how you received the initial result you provided, so I'll have to assume you j...
Is there a way to display the first two results of each unique id?
sql|postgresql|grouping|greatest-n-per-group
0
62
1
72,368,978
72,368,978
0
true
2022-05-24T19:46:32.540Z
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 display the first two results of each unique id?<p>I work in healthcare. In a Postgres database, we have a table member IDs and dates. I'm ...
72,370,308
placing images on a pygame grid<p>The red and blue sides would each have their tiles replaced by an image (not one image overlapping them all, but one image pasted onto each tile). I'm not really sure how to go about it, and any help would be appreciated!</p> <p><a href="https://i.stack.imgur.com/AkLHl.png" rel="nofoll...
<p>Under <code>def create_board_surf():</code> where you draw rectangles for each tile, replace the <code>pygame.draw.rect</code> with <code>board_surf.blit(IMAGE_SURFACE, ((margin + TILESIZE) * column + margin, (margin + TILESIZE) * row + margin))</code> to put an image where the tile rectangle would of been.</p> <p>Y...
placing images on a pygame grid
python|image|pygame
0
62
1
72,370,532
72,370,532
0
true
2022-05-24T23:00:35.190Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: placing images on a pygame grid<p>The red and blue sides would each have their tiles replaced by an image (not one image overlapping them all, but one image ...
72,355,026
Why I can't add more than one Object to the JPanel?<p>When I add to the GameScreen more than one Object of class Duck only one appears on the screen. When I add Duck outside constructor in GameScreen class I have many Object of Duck but then the mouseClicked method doesn't work on Duck.</p>
<p>Take a look at <a href="https://docs.oracle.com/javase/tutorial/uiswing/layout/border.html" rel="nofollow noreferrer">How to Use BorderLayout</a>. <code>BorderLayout</code> will only present the last component added to any single position.</p> <p>Having said that, I don't think this is the direction you really want ...
Why I can't add more than one Object to the JPanel?
java|swing|jpanel|paintcomponent
0
62
1
72,370,771
72,370,771
0
true
2022-05-23T21:35:46.740Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why I can't add more than one Object to the JPanel?<p>When I add to the GameScreen more than one Object of class Duck only one appears on the screen. When I ...
72,371,367
Why I have two different results? (Math) (Javascript vs Python)<p>Why different output?</p> <p>I tried to resolve this problem and I can't with javascript only using python, what is wrong is '%' different in javascript?</p> <p>I use '%' to get last 10 digits from the result.</p> <p>Javascript:</p> <p><div class="snippe...
<p>You are simply playing with too big numbers for <code>number</code> primitive.<br /> Fortunately, there is a solution.</p> <p>To understand it correctly, nothing is best than reading the documentation about <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt" rel="nofollo...
Why I have two different results? (Math) (Javascript vs Python)
javascript
-1
62
1
72,371,875
72,371,875
0
true
2022-05-25T02:27:02.110Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why I have two different results? (Math) (Javascript vs Python)<p>Why different output?</p> <p>I tried to resolve this problem and I can't with javascript on...
72,345,539
Microsoft Purview - can it be used to monitor firewall rules across databases?<p>I have been looking for a solution, preferably native, to monitor changes to firewall rules across multiple Azure SQL databases hosted on different Azure SQL servers. While Azure Policy seemed to fit the bill initially, it later turned out...
<p>Azure Functions coupled with logic apps turned out to be a good solution for this. The logic app which gets triggered based on an activity log alert in turn activates an Azure Function which uses a PowerShell script to maintain only the approved set of firewall rules on an SQL Server. Yes, this does not go inside th...
Microsoft Purview - can it be used to monitor firewall rules across databases?
azure|azure-sql-database|azure-sql-server|azure-policy|azure-purview
-2
62
2
72,373,035
72,373,035
0
true
2022-05-23T08:36:39.113Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Microsoft Purview - can it be used to monitor firewall rules across databases?<p>I have been looking for a solution, preferably native, to monitor changes to...
72,302,963
ReactJS: axios POST with recursive function<p><strong>CreateFolder.js</strong></p> <p>Hi!! I'm trying loop an js tree object to create a folder for the childs elements with de Egnyte API.</p> <p>I think I have posed the problem wrong.</p> <p>My recursive funcion is cheking if the parent have childs, if this true, loop ...
<p>I solved my problem with the setTimeout with an index, because my function was executing the whole thing after 3 seconds, and with this index, add more time to every item, and executes each item 3 seconds after the previous one</p> <p>My function after:</p> <pre><code>folders.map((id) =&gt; { setTimeout(() =&gt;...
ReactJS: axios POST with recursive function
reactjs|post|async-await|axios|settimeout
0
62
2
72,374,060
72,374,060
0
true
2022-05-19T10:31:21.767Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: ReactJS: axios POST with recursive function<p><strong>CreateFolder.js</strong></p> <p>Hi!! I'm trying loop an js tree object to create a folder for the child...
72,378,107
Infinite loop rerender react<p>I have faced the problem of infinite rerender after checkColor is true I setIsCorrect to true and let the child component call handleCorrectAnswer to setIsCorrect to false after resetting the Clock Why I got an infinite loop?</p> <p>This is main component on update function I receive data...
<p>Move this to useEffect:</p> <pre><code>if (checkColor(colorFromUser, gameColor)) { setIsCorrect(true); } </code></pre> <p>It should be</p> <pre><code>import { Typography } from '@mui/material'; import React, { useEffect, useState } from 'react'; import CountdownTimer from './CountdownTimer'; import Color...
Infinite loop rerender react
javascript|reactjs|firebase|react-hooks|infinite-loop
0
62
1
72,378,714
72,378,714
0
true
2022-05-25T12:57:39.287Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Infinite loop rerender react<p>I have faced the problem of infinite rerender after checkColor is true I setIsCorrect to true and let the child component call...
72,381,989
Python 3.10 - Issue with detecting variable type (begginer)<p>Good afternoon everyone.</p> <p>First of all I am a total beginer in coding and Python itself. To be honest I am not even sure is that a proper place to ask such a 'newbie' question.</p> <p>But to the point.</p> <p>During the online course I was asked to wri...
<p>Extending on ex4's answer, you should use <code>.isdigit()</code> to check if the input is numeric, however where this is a game I assume you don't just want the game to end using a <code>break</code> when the player enters a bad input and you'd rather have them guess again.</p> <p>Try the following segment. It take...
Python 3.10 - Issue with detecting variable type (begginer)
python|python-3.x
0
62
3
72,382,248
72,382,248
0
true
2022-05-25T17:31:12.473Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python 3.10 - Issue with detecting variable type (begginer)<p>Good afternoon everyone.</p> <p>First of all I am a total beginer in coding and Python itself. ...
72,382,797
How to handle abbreviated year pattern (yy) in Mule 4<p>Input:</p> <pre><code>{ &quot;date&quot;: &quot;01-JAN-70&quot; } </code></pre> <p>Expected Output:</p> <pre><code>{ &quot;date&quot;: &quot;1970-01-01&quot; } </code></pre> <p>appreciate your input</p>
<p>This is an answer that doesn't use string operations, which is not a good practice for dates handling. The function replaceCentury() let's you replace the century of a date with another one.</p> <pre class="lang-js prettyprint-override"><code>%dw 2.0 output application/json import * from dw::core::Dates fun centuryF...
How to handle abbreviated year pattern (yy) in Mule 4
mule|dataweave|mule4
0
62
2
72,385,324
72,385,324
0
true
2022-05-25T18:49:23.567Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to handle abbreviated year pattern (yy) in Mule 4<p>Input:</p> <pre><code>{ &quot;date&quot;: &quot;01-JAN-70&quot; } </code></pre> <p>Expected Output:...
72,389,690
Time Complexity of Subsets problem solution<p>I would like to verify the space and time complexity of my solution to <a href="https://leetcode.com/problems/subsets/" rel="nofollow noreferrer">subsets</a> problem on leetcode. The space complexity is O(N) due to stack space. The time complexity is O(2^N) as the work on e...
<p>I figured out why it's 2^N times N.</p> <p>For <code>subsetsHelper()</code>, at <code>i</code>th level, the number of subsets is <code>2^(i-1)</code>. And the size of each subsetList in it is <code>O(N)</code>. As I double the size of each sub subsetList (from <code>list</code> to <code>listCopy</code> in code) in ...
Time Complexity of Subsets problem solution
algorithm|time-complexity
0
62
1
72,390,203
72,390,203
0
true
2022-05-26T09:32:55.187Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Time Complexity of Subsets problem solution<p>I would like to verify the space and time complexity of my solution to <a href="https://leetcode.com/problems/s...
72,384,049
How to get db information using Spring JdbcTemplate and plain SQL (Micronaut)<p>I am trying to create a web application using Micronaut and need to get information from travelLog table using Spring JdbcTemplate and plain SQL. I was using this tutorial <a href="https://www.greggbolinger.com/posts/using-springs-jdbctempl...
<p>To create and query case sensitive table, columns etc, names must be quoted like this:</p> <pre><code>SELECT * FROM &quot;travelLog&quot; </code></pre> <p>For liquibase settings check this answer <a href="https://stackoverflow.com/a/60654633/1854103">https://stackoverflow.com/a/60654633/1854103</a></p> <p>Also pleas...
How to get db information using Spring JdbcTemplate and plain SQL (Micronaut)
spring|spring-data|micronaut|micronaut-data
0
62
1
72,390,327
72,390,327
0
true
2022-05-25T20:53:03.683Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to get db information using Spring JdbcTemplate and plain SQL (Micronaut)<p>I am trying to create a web application using Micronaut and need to get infor...
72,381,997
How to unlock a tomcat user in Lockout Realm using program<p>How shall I unblock a specific user using a program? Should I need to create any configuration files for doing this? Please guide me with the steps. I didn't find any proper documentation for unblocking a user on our own. Thanks in Advance</p>
<p>I'm not sure if there's a way to do it programmatically, but I do know <em>for certain</em> that you can browse to the LockOutRealm with JMX and put in a user account and unlock it. At minimum if nothing else works, you could programmatically invoke the JMX bean and unlock the account.</p> <p>If you can find a way t...
How to unlock a tomcat user in Lockout Realm using program
tomcat|realm|tomcat7|tomcat8|tomcat9
2
62
1
72,393,276
72,393,276
0
true
2022-05-25T17:32:07.213Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to unlock a tomcat user in Lockout Realm using program<p>How shall I unblock a specific user using a program? Should I need to create any configuration f...
72,396,321
Load npz file complains about "ModuleNotFoundError"<p>I am saving some data to a npz file and then load it. But when I try to access a part of it, depending on where I run the loading script, it complains about ModuleNotFoundError (and the module name is a file where the data was saved was using, but are not required t...
<p>The trigger_times saved uses a class of IntEnum for the elements at its dictionary, so I guess that it might be making it dependent due to pickle (I have no idea how it works on the background). Now before saving I change the element of the dictionary from the class enum to a string, and now it works.</p> <p>My conc...
Load npz file complains about "ModuleNotFoundError"
python|numpy|load|modulenotfounderror|npz-file
0
62
1
72,397,202
72,397,202
0
true
2022-05-26T18:17:05.090Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Load npz file complains about "ModuleNotFoundError"<p>I am saving some data to a npz file and then load it. But when I try to access a part of it, depending ...
72,397,600
Deserializing JSON into C# Product ID with Shopify API<p>Hi I am trying to deserialize this json. And my application does not do it for me.</p> <p>i am using c#</p> <p>any suggestion? thanks</p> <p>this way i try to deserialize</p> <pre><code> var deserialize = resultado.Content.ReadAsStringAsync().Result; ...
<p>I can see that you are using a wrong class to deserialize json, should be</p> <pre><code>var data=JsonConvert.DeserializeObject&lt;Data&gt;(json); </code></pre> <p>main classes (I highly recommend you to use a Pascal style for property names)</p> <pre><code> public partial class Data { [JsonProperty(&...
Deserializing JSON into C# Product ID with Shopify API
c#|json|shopify|deserialization
-1
62
2
72,398,613
72,398,613
0
true
2022-05-26T20:18:06.160Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Deserializing JSON into C# Product ID with Shopify API<p>Hi I am trying to deserialize this json. And my application does not do it for me.</p> <p>i am using...
72,370,374
Thingsboard rule chain: How to decompress telemetry?<p>I am trying to use thingsboard to allow users to request log files from devices. When requested, the devices send the log files to my TB server as telemetry. First, the logs are compressed with gzip and then base64 encoded. I want to have the rule chain decompres...
<p>We send it to S3 and then have a link to it available on the TB gui - the user can request a log file(s) on the UX and then a few minutes later can click on the logfile and it downloads to their computer/device as a zip file. Device is linux based.</p>
Thingsboard rule chain: How to decompress telemetry?
thingsboard
0
62
1
72,403,085
72,403,085
0
true
2022-05-24T23:11:23.113Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Thingsboard rule chain: How to decompress telemetry?<p>I am trying to use thingsboard to allow users to request log files from devices. When requested, the ...
72,393,953
How to insert a tag in a Tkinter ScrolledText so that the user can type in their chosen style<p>I'm kinda new to Python and I'm running into a hitch that I just can't seem to find an answer for. I've got a program with multiple tkinter.Entry and tkinter.ScrolledText elements spread across multiple tabs in a tkinter.Not...
<p>Sure enough, changing this program to use Qt instead of Tkinter made all my text formatting dreams come true. The long and short of is is that for each of the Tkinter ScrolledText widgets, I used Qt's QTextEdit widgets instead. That enabled me to connect these functions to each of the bold, italic, and underline but...
How to insert a tag in a Tkinter ScrolledText so that the user can type in their chosen style
python|tkinter|tags
1
62
1
72,413,010
72,413,010
0
true
2022-05-26T15:04:45.223Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to insert a tag in a Tkinter ScrolledText so that the user can type in their chosen style<p>I'm kinda new to Python and I'm running into a hitch that I j...
72,385,178
Using non-English characters in post content causes fatal error - Wordpress<p>I have a freshly installed clean Wordpress. No plugins or custom themes. Whenever I try to create a new post the website shows a fatal error every time I have non-English characters in the content field no matter if it's hieroglyphs, Cyrillic...
<p>Switching to PHP 8 fixed the problem. Which is weird considering Wordpress requires PHP 7.4 or higher in <a href="https://wordpress.org/about/requirements/" rel="nofollow noreferrer">their requirements section</a> and I was using PHP 7.4 before. Case closed.</p>
Using non-English characters in post content causes fatal error - Wordpress
wordpress
1
62
1
72,448,921
72,448,921
0
true
2022-05-25T23:38:09.903Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Using non-English characters in post content causes fatal error - Wordpress<p>I have a freshly installed clean Wordpress. No plugins or custom themes. Whenev...
72,387,864
Python TypeError: bad operand type for unary -: 'str'<p>I have converted the data to integers and adding parentheses but it's not work</p> <p>I tried to write Tkinter for the first time. Forgive me</p> <p>This is a calculator for calculating the quadratic equation of one variable, which uses the graphical interface wri...
<p>thanks to acw1668's comment, I wrote the wrong expression for variable a c = int(entry_b.get()) should be c = int(entry_c.get())</p>
Python TypeError: bad operand type for unary -: 'str'
python-3.x|tkinter
0
62
1
72,469,647
72,469,647
0
true
2022-05-26T06:51:45.827Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python TypeError: bad operand type for unary -: 'str'<p>I have converted the data to integers and adding parentheses but it's not work</p> <p>I tried to writ...
72,382,580
Cannot set service data inside subscribe in Angular<p>I want to set shared service data inside subscribe method my page structure is <a href="https://i.stack.imgur.com/cvj3R.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cvj3R.png" alt="enter image description here" /></a></p> <p>i have to access da...
<p><code>BehaviourSubject</code> must be initialized with a starting value.</p> <p>In your code you are starting with empty strings for <code>title</code> and <code>logo</code>, so, if you subscribe to it in any component before calling <code>setData</code> (which makes the get call), the new subscriber will get that i...
Cannot set service data inside subscribe in Angular
angular|typescript
0
62
1
72,382,945
72,382,945
0
true
2022-05-25T18:27:49.890Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Cannot set service data inside subscribe in Angular<p>I want to set shared service data inside subscribe method my page structure is <a href="https://i.stack...
72,342,680
MongoDB - Group and Find Top N with condition<p>Consider this test collection, in which an airport is identified by <code>AirportID</code>:</p> <pre><code>[ { AirportID:&quot;1001&quot;, delayMinutes :&quot;15.0&quot; }, { AirportID:&quot;1004&quot;, delayMinutes :&quot;3.0&quot; }, { AirportID:&quot;1001&q...
<p><strong>As the requirement is clarified</strong>,</p> <p>You need to filter the document <strong>first</strong> with <code>delayMinutes</code> field greater than (<code>$gt</code>) 10.</p> <p>Make sure you convert the <code>delayMinutes</code> to <code>double</code> before comparing.</p> <pre><code>db.collection.agg...
MongoDB - Group and Find Top N with condition
mongodb|mongodb-query|aggregation-framework
0
62
1
72,342,703
72,342,703
0
true
2022-05-23T02:26:17.700Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: MongoDB - Group and Find Top N with condition<p>Consider this test collection, in which an airport is identified by <code>AirportID</code>:</p> <pre><code>[ ...
72,339,720
Sizing the Canvas widget with other widgets on the GUI<p>I'm creating a GUI that has a spreadsheet-like interface which is wrapped with entry method to allow the person that uses the program to enter it as if it is on a spreadsheet. This allows me much greater control over all the data and manipulate it for data analys...
<p>Since <code>ExcelTable</code> is the internal frame inside <code>canvas</code> and is already put inside <code>canvas</code> using <code>canvas.create_window(...)</code>, so you should not call <code>t1.grid(...)</code> inside <code>StartApp.__init__()</code>.</p> <p>Also you set the <code>scrollregion</code> of <co...
Sizing the Canvas widget with other widgets on the GUI
python|user-interface|tkinter
0
62
1
72,441,356
72,441,356
0
true
2022-05-22T17:11:34.787Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Sizing the Canvas widget with other widgets on the GUI<p>I'm creating a GUI that has a spreadsheet-like interface which is wrapped with entry method to allow...
72,307,739
C# Custom Class(server user) in WCF service not working in client(but struct work)(problem)<p>//I have wcf service is hosted by the console application. <a href="https://i.stack.imgur.com/C1cYc.png" rel="nofollow noreferrer">console app</a></p> <pre><code> using System.ServiceModel; using System.Text; using System.T...
<p>Ok,i find my problem App.config file, base addres</p> <pre><code> &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&gt; &lt;configuration&gt; &lt;startup&gt; &lt;supportedRuntime version=&quot;v4.0&quot; sku=&quot;.NETFramework,Version=v4.6.1&quot; /&gt; &lt;/startup&gt; &lt;sy...
C# Custom Class(server user) in WCF service not working in client(but struct work)(problem)
c#|winforms|wcf
-1
62
1
72,325,656
72,325,656
0
true
2022-05-19T16:03:51.063Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: C# Custom Class(server user) in WCF service not working in client(but struct work)(problem)<p>//I have wcf service is hosted by the console application. <a h...
72,284,791
To deduct amount starting with the smallest until amount is exhausted<p>I have a SQL table that looks like this</p> <pre><code>CREATE TABLE #Temp_Supply ( Supplier_Name Varchar(30), Invoice_Number Varchar(20), Amount Money ) INSERT INTO #Temp_Supply (Supplier_Name, Invoice_Number, Amount) SELECT 'Su...
<p>use window function <code>sum() over (partition by ... order by ...)</code> to get the cumulative sum of <code>Amount</code>. Use <code>CASE</code> expression to conditionally check for <code>Deduction_Amount</code> against the cumulative sum amount to determine the balance amount</p> <pre><code>select d.Supplier_N...
To deduct amount starting with the smallest until amount is exhausted
sql|sql-server
0
62
1
72,286,285
72,286,285
0
true
2022-05-18T07:24:07.097Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: To deduct amount starting with the smallest until amount is exhausted<p>I have a SQL table that looks like this</p> <pre><code>CREATE TABLE #Temp_Supply ( ...
72,365,327
Using purrr::possibly() to catch non-positive definite matrix<p>I am doing a stratified analysis of a mixed effect model using <strong>nlme</strong>'s <code>lme</code> function and thus employing <strong>purrr</strong>'s <code>map</code> function. At times, the number of observations is too small and I get errors from ...
<p><code>possibly</code> takes a function as input. We can do</p> <pre><code>lme2 &lt;- purrr::possibly(lme, otherwise = NA) set.seed(423) fm2 &lt;- lme2(distance ~ age + Sex, data = Orthodont[sample(108, 3), ], random = ~ 1) fm2 [1] NA </code></pre>
Using purrr::possibly() to catch non-positive definite matrix
r|purrr|nlme
1
62
1
72,365,359
72,365,359
0
true
2022-05-24T15:10:17.497Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Using purrr::possibly() to catch non-positive definite matrix<p>I am doing a stratified analysis of a mixed effect model using <strong>nlme</strong>'s <code>...
72,346,354
Given Two async functions, which function runs first?<pre><code>const [counter, setCounter] = useState(0) </code></pre> <p>Let's say I have two async functions func1 and func2. Both functions are asynchronous and update the counter state. func1 runs before func2.</p> <pre><code>async function func1() { ....extra co...
<blockquote> <p>Is it guaranteed that when <code>func2</code>'s <code>useState</code> runs, the Counter's state is updated by <code>func1</code>?</p> </blockquote> <p>No, not at all.</p> <blockquote> <p>If not, what should I do to make sure that <code>func2</code>'s use State runs only after <code>func1</code>'s <code>...
Given Two async functions, which function runs first?
javascript|node.js|reactjs
-2
62
2
72,346,443
72,346,443
0
true
2022-05-23T09:38:51.747Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Given Two async functions, which function runs first?<pre><code>const [counter, setCounter] = useState(0) </code></pre> <p>Let's say I have two async functio...
72,307,674
Which executable is run by DOS/CMD if multiple results are returned by 'where'?<p>I'm running Win10, with Cygwin, Git for Windows and Ubuntu WSL installed.<br> Running these commands in DOS and Powershell returns the following results:</p> <pre class="lang-bash prettyprint-override"><code># DOS C:\&gt;where grep C:\cyg...
<p><sup><strong>Terminology</strong> aside: I assume you mean <strong><a href="https://en.wikipedia.org/wiki/Cmd.exe" rel="nofollow noreferrer"><code>cmd.exe</code></a></strong> aka the <strong>Command Prompt</strong>, the command shell of modern Windows versions, not the <em>long-obsolete <strong><a href="https://en.w...
Which executable is run by DOS/CMD if multiple results are returned by 'where'?
windows|powershell|cmd
1
62
1
72,310,937
72,310,937
0
true
2022-05-19T15:58:25.850Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Which executable is run by DOS/CMD if multiple results are returned by 'where'?<p>I'm running Win10, with Cygwin, Git for Windows and Ubuntu WSL installed.<b...
72,245,476
Transmitting MIDI Message from Ruby to Pure Data over OSC<p>I'd like to transmit a MIDI message from an USB Midi Device, where the MIDI data is captured via Ruby/libusb, to Pure Data by using OSC.</p> <p>The reason why I need this construction is that the USB MIDI interface is integrated into a USB control surface and ...
<p>You can get the individual items of a list with the unpack object. For a list of four floats use <code>[unpack f f f f]</code>. Also look for into the helpfiles of <code>[netreceive]</code>, <code>[oscparse</code>], <code>[oscformat]</code></p>
Transmitting MIDI Message from Ruby to Pure Data over OSC
ruby|osc|puredata
1
62
1
72,285,044
72,285,044
0
true
2022-05-15T04:16:41.703Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Transmitting MIDI Message from Ruby to Pure Data over OSC<p>I'd like to transmit a MIDI message from an USB Midi Device, where the MIDI data is captured via ...
72,310,197
Count how many posts came out after the last post ActiveRecord<p>I have the following question in ActiveRecord.</p> <p>Model and Example Fields</p> <pre><code>Post [ title:string content:string color:string ] </code></pre> <p>Imagine that my model receives recurring posts, but sometimes a specific post comes with a &qu...
<p>While both of the proposed solutions will work they require instantiating a <code>Post</code> object which is unnecessary in my opinion instead we can make this a single query like so</p> <pre><code>class Post &lt; ApplicationRecord scope :posts_since, -&gt;(color) { where(arel_table[:created_at].gt( ...
Count how many posts came out after the last post ActiveRecord
ruby-on-rails|ruby|activerecord
0
62
3
72,322,646
72,322,646
0
true
2022-05-19T19:34:54.543Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Count how many posts came out after the last post ActiveRecord<p>I have the following question in ActiveRecord.</p> <p>Model and Example Fields</p> <pre><cod...