question_id int64 37.6M 73.2M | input_text stringlengths 88 52.4k | output_text stringlengths 37 35.6k | title stringlengths 15 150 | tags stringlengths 1 107 | q_score int64 -19 397 | view_count int64 3 879k | answer_count int64 1 21 | accepted_answer_id int64 37.6M 73.8M | answer_id int64 37.6M 73.8M | a_score int64 -5 1.29k | is_accepted bool 1
class | creation_date stringlengths 20 24 | input_text_instruct stringlengths 251 52.6k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
72,341,635 | having trouble utilizing hypothesis tests<p>I need to " calculate the probability
that a team had a relative skill level
less than the Bulls in years 1996-1998.
Assuming that the relative skill of
teams is Normally distributed, calculate
this probability"</p>
<p>I feel like I understand the concept but
cannot... | <p>I'm not sure you are using the test correct here.</p>
<p>I think what you want to do is that the total_mean (of all teams), with the standard deviation of of that, and compare that to the mean of the Bulls.</p>
<pre><code>#find mean relative skill of the bulls
mean_elo_your_team = your_team_df['elo_n'].mean()
fin_p... | having trouble utilizing hypothesis tests | python|pandas | 0 | 49 | 1 | 72,348,629 | 72,348,629 | 0 | true | 2022-05-22T22:13:21.383Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
having trouble utilizing hypothesis tests<p>I need to " calculate the probability
that a team had a relative skill level
less than the Bulls in years 19... |
72,352,520 | how to add space in commands? discord.js<p>I want my command to include a space, for example</p>
<p><code>$ sudo faq mod</code> (note the space)</p>
<p>But that doesn't seem to work, and I usually have to just do</p>
<p><code>faq_mod</code> instead.</p>
<p>This is my code, but spaces don't work.</p>
<p><div class="snip... | <p>You can't include spaces when checking for commands because you are "splitting" the string by spaces when you define args.</p>
<p>The line</p>
<pre class="lang-js prettyprint-override"><code>const args = message.content.slice(prefix.length).split(/ +/)
</code></pre>
<p>Will remove the prefix and split the ... | how to add space in commands? discord.js | javascript|node.js|discord|discord.js | 0 | 49 | 1 | 72,352,688 | 72,352,688 | 0 | true | 2022-05-23T17:21:16.437Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to add space in commands? discord.js<p>I want my command to include a space, for example</p>
<p><code>$ sudo faq mod</code> (note the space)</p>
<p>But t... |
72,355,730 | margin: auto center paragraph appears off center<p>i am working on a simple site and i need to center a paragraph aligned with the header as in the screenshot below -</p>
<p><a href="https://i.stack.imgur.com/90fwH.png" rel="nofollow noreferrer">ideal alignment</a></p>
<p>however, trying all of absolute, flex and margi... | <p>As you mentioned this is caused by the way the paragraph is wrapping.</p>
<p>To solve the spaces at the end of the paragraph I would suggest:</p>
<p><strong>Solution 1:</strong></p>
<p>Adjust the width of <code>.desc-wrapper</code> until it fits the last character. So in the example case you provided a width of 291p... | margin: auto center paragraph appears off center | html|css|ios|width | 0 | 49 | 2 | 72,355,860 | 72,355,860 | 0 | true | 2022-05-23T23:24:53.570Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
margin: auto center paragraph appears off center<p>i am working on a simple site and i need to center a paragraph aligned with the header as in the screensho... |
72,356,733 | Trying to skip empty tags beautifulsoup AttributeError: 'NoneType' object has no attribute 'text'<p>I'm trying to read a page with python and print each element for the ratings. I've got a <code>AttributeError: 'NoneType' object has no attribute 'text'</code> error and I don't understand how to fix it.</p>
<p>Here is m... | <p>You can simply check for "NoneType" before printing .text</p>
<pre><code>rating = movie.find('td', class_='ratingColumn imdbRating').strong
if rating:
print(rating.text)
else:
print("no rating")
</code></pre> | Trying to skip empty tags beautifulsoup AttributeError: 'NoneType' object has no attribute 'text' | python|html|beautifulsoup | -2 | 49 | 1 | 72,356,786 | 72,356,786 | 0 | true | 2022-05-24T02:55:31.583Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Trying to skip empty tags beautifulsoup AttributeError: 'NoneType' object has no attribute 'text'<p>I'm trying to read a page with python and print each elem... |
72,350,681 | Sql query - SCCM rba "GrantedOperations"<p>Hello fellow sccm admin,</p>
<p>I wanted to make a report in ssrs to quickly find what permissions a group or user have in sccm.
It's also for the purpose to put it in excel format and documentation</p>
<p>After some work here are a simple query:</p>
<pre><code>select RoleName... | <p>If I understand you correctly you want to check the GrantedOperations for which Operations are set.</p>
<p>In this case this is not simply a sum (although it is) but the Operations are each chosen as powers of two (Read is 2^0, Write 2^1, Create 2^10) which means if you view the GrantedOperations in binary form, eac... | Sql query - SCCM rba "GrantedOperations" | sql|sccm | 0 | 49 | 1 | 72,358,789 | 72,358,789 | 0 | true | 2022-05-23T14:58:23.127Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Sql query - SCCM rba "GrantedOperations"<p>Hello fellow sccm admin,</p>
<p>I wanted to make a report in ssrs to quickly find what permissions a group or user... |
72,361,551 | Timer *args, **kwargs in while gets null after first iteration<p>I've done a repeating timer that doesn't work, the first iteration works but then it says args and kwargs is NoneType even though it worked the first time:</p>
<pre><code>'NoneType' object is not callable
</code></pre>
<p>The timer.py:</p>
<pre><code>from... | <p>You need to call it like this:</p>
<pre class="lang-py prettyprint-override"><code>from timer import repeat_timer
timer = repeat_timer(delay, process_multiple_files, filter_json_path)
timer.run()
</code></pre>
<p><code>process_multiple_files</code> is the function you want the timer to call, and <code>filter_json_p... | Timer *args, **kwargs in while gets null after first iteration | python|python-3.x|timer | 1 | 49 | 1 | 72,362,624 | 72,362,624 | 0 | true | 2022-05-24T10:48:04.553Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Timer *args, **kwargs in while gets null after first iteration<p>I've done a repeating timer that doesn't work, the first iteration works but then it says ar... |
72,342,513 | Unable to set session in RSpec<p>Here is the file I am trying to test</p>
<pre><code>module Cesid
module Access
def cesid_signout
return unless session_logged
# Method to modify the cookie
set_cookie
end
def session_logged
session[:cesid_logged]
end
end
end
</code><... | <p>I don't have all the context in your use case.</p>
<p>But it is clear that you don't have access to <code>session</code> into your cached variable <code>access</code> since <code>session</code> is not an instance variable.</p>
<p>So I suggest two things:</p>
<ul>
<li>First, make sure that you can initiate your <code... | Unable to set session in RSpec | ruby-on-rails|ruby|rspec | 0 | 49 | 1 | 72,363,124 | 72,363,124 | 0 | true | 2022-05-23T01:51:31.187Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Unable to set session in RSpec<p>Here is the file I am trying to test</p>
<pre><code>module Cesid
module Access
def cesid_signout
return unless s... |
72,368,153 | How can I display an HTML button using the return from a javascript function?<p>I trying to have my function return HTML button tags that will be displayed on the page like so:</p>
<p><a href="https://i.stack.imgur.com/0gQ3d.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0gQ3d.png" alt="enter image ... | <p>React purposefully makes <a href="https://reactjs.org/docs/dom-elements.html#dangerouslysetinnerhtml" rel="nofollow noreferrer">injecting HTML strings cumbersome</a> to try and steer you towards <a href="https://reactjs.org/docs/thinking-in-react.html" rel="nofollow noreferrer">"thinking in React."</a></p>... | How can I display an HTML button using the return from a javascript function? | javascript|html|reactjs | 0 | 49 | 1 | 72,368,576 | 72,368,576 | 0 | true | 2022-05-24T18:59:42.953Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I display an HTML button using the return from a javascript function?<p>I trying to have my function return HTML button tags that will be displayed o... |
72,363,046 | Wix toolset - hide/show controls - why both are needed?<p>I saw many examples like this:</p>
<pre><code><Control Id="contorlId" Type="CheckBox" property="PROP1" CheckBoxValue="1">
<Condition Action="hide">A</Condition>
<Condition Actio... | <p>Reasonable question. The answer is here in your question:</p>
<blockquote>
<p>(In most/all cases the 'hide' condition is the NOT of the 'show' condition.</p>
</blockquote>
<p>If you assume the answer is "most" (and not "all") then the current design supports the case when the conditions are diffe... | Wix toolset - hide/show controls - why both are needed? | wix | 0 | 49 | 1 | 72,370,142 | 72,370,142 | 0 | true | 2022-05-24T12:39:08.250Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Wix toolset - hide/show controls - why both are needed?<p>I saw many examples like this:</p>
<pre><code><Control Id="contorlId" Type="Check... |
72,379,489 | Create a new array from current Airtable array<p>How can I get this old array:</p>
<pre><code>[
{
"_table": {
"_base": {
"_airtable": {},
"_id": "appDxGpKPJl3Exjs2"
},
"id": null,
... | <p>The objects that you want in your array just correspond to the "fields" key in the "old" array. So you can just map the array:</p>
<pre><code>const oldArray = JSON.parse(json);
const newArray = oldArray.map(entry => entry.fields);
</code></pre>
<p>And turn it back to JSON if needed.</p> | Create a new array from current Airtable array | javascript | -1 | 49 | 2 | 72,379,615 | 72,379,615 | 0 | true | 2022-05-25T14:27:15.457Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Create a new array from current Airtable array<p>How can I get this old array:</p>
<pre><code>[
{
"_table": {
"_base&q... |
72,378,316 | Create a single CSV per partition with Spark<p>I have a ~10GB dataframe that should be written as a bunch of CSV files, one per partition.</p>
<p>The CSVs should be partitioned by 3 fields: "system", "date_month" and "customer".</p>
<p>Inside each folder exactly one CSV file should be writ... | <p><code>sort()</code> (and also <code>orderBy()</code>) triggers a shuffle because it sorts the whole dataframe, to sort within the partition you should use the aptly named <code>sortWithinPartitions</code>.</p>
<pre><code> mydataframe.
repartition($"system", $"date_month", $"customer&q... | Create a single CSV per partition with Spark | apache-spark | 0 | 49 | 1 | 72,381,178 | 72,381,178 | 0 | true | 2022-05-25T13:12:44.550Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Create a single CSV per partition with Spark<p>I have a ~10GB dataframe that should be written as a bunch of CSV files, one per partition.</p>
<p>The CSVs sh... |
72,386,026 | If i wil change background colour of input type check box is checked use CSS only? it is possible or not?<p><strong>change background colour type one line css only</strong></p>
<pre><code><input type="checkbox" class="HP">
</code></pre> | <p>I doubt this could work, some sort of JavaScript would be needed for this to work.</p> | If i wil change background colour of input type check box is checked use CSS only? it is possible or not? | html|css | 1 | 49 | 2 | 72,386,116 | 72,386,116 | 0 | true | 2022-05-26T02:24:02.760Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
If i wil change background colour of input type check box is checked use CSS only? it is possible or not?<p><strong>change background colour type one line cs... |
72,386,892 | Getting error of not a single group function in aggregated function<pre><code>CREATE TABLE test1 (
e_id NUMBER(1),
e_ques_id NUMBER(10)
);
INSERT INTO test1 VALUES(1,3);
INSERT INTO test1 VALUES(1,4);
CREATE TABLE test_ref (
code NUMBER(1),
c_value VARCHAR2(20)
);
INSERT INTO test_ref VAL... | <p>This is how you can use Max() OVER() though I don't understand what you want to do, but maybe this can help...</p>
<pre><code>WITH
test1 AS
(
SELECT 1 "E_ID", 3 "E_QUES_ID" FROM DUAL UNION ALL
SELECT 1 "E_ID", 4 "E_QUES_ID" FROM DUAL UNION ... | Getting error of not a single group function in aggregated function | sql|oracle | 0 | 49 | 3 | 72,388,947 | 72,388,947 | 0 | true | 2022-05-26T05:00:51.420Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Getting error of not a single group function in aggregated function<pre><code>CREATE TABLE test1 (
e_id NUMBER(1),
e_ques_id NUMBER(10)
);
IN... |
72,372,840 | Is it possible to get the viewport information from Autodesk Forge (ACC/BIM360) API response?<p>I'm working on an implementation (like Autodesk extension DropeMeExtension) that places tags on the 2D drawing screen belonging to the rvt file.</p>
<p>The location of the pin seems related to the viewport, so before loading... | <p>This type of information is included in a JSON structure called "AEC Model Data" that is generated by the Forge Model Derivative service for selected design formats. You'll find it in the Model Derivative manifest with <code>"role": "Autodesk.AEC.ModelData"</code>, and you can fetch and... | Is it possible to get the viewport information from Autodesk Forge (ACC/BIM360) API response? | autodesk-forge|autodesk-viewer|autodesk-construction-cloud | 0 | 49 | 1 | 72,392,019 | 72,392,019 | 0 | true | 2022-05-25T06:29:32.203Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is it possible to get the viewport information from Autodesk Forge (ACC/BIM360) API response?<p>I'm working on an implementation (like Autodesk extension Dro... |
72,389,826 | WCF (Can't add Quartz in WCF Project)<p>(As I'm new to WCF)
I want to add Quartz in Windows Communication Foundation (WCF) project.
And I also wants to know that which file or method execute first after run the application.</p> | <p>Instead of using Quartz, I used C# Timer.
The Timer class in C# represents a Timer control that executes a code block at a specified interval of time repeatedly.</p>
<p>//Timer Class</p>
<pre><code>public class FileJob
{
private System.Timers.Timer ProcessTimer;
public void Start()
{
try
... | WCF (Can't add Quartz in WCF Project) | c#|wcf|quartz.net | 0 | 49 | 1 | 72,393,114 | 72,393,114 | 0 | true | 2022-05-26T09:44:32.100Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
WCF (Can't add Quartz in WCF Project)<p>(As I'm new to WCF)
I want to add Quartz in Windows Communication Foundation (WCF) project.
And I also wants to know ... |
72,396,594 | How to convert floating-point in for-loop to integer in C, for correct calculation<p>I'm trying to understand C better. In an exercise I had to find out what is wrong about the following code example.</p>
<pre><code>#include <stdio.h>
int main() {
int count;
float sum;
float i;
sum = 0, count = ... | <pre><code>#include <stdio.h>
int main() {
int count;
float sum;
int i;
sum = 0, count = 0;
for (i = 100000; i <= 100004; i++) {
sum += i;
count++;
}
printf("Sum: %f, Count: %d\n", sum/100, count);
return 0;
}
</code></pre> | How to convert floating-point in for-loop to integer in C, for correct calculation | c|floating-point | 0 | 49 | 1 | 72,396,863 | 72,396,863 | 0 | true | 2022-05-26T18:44:13.653Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to convert floating-point in for-loop to integer in C, for correct calculation<p>I'm trying to understand C better. In an exercise I had to find out what... |
72,378,873 | Docusign OAuth 2.0 for Native C# Winform Application without using their dll<p>I am having one C# winform application and using authentication for Docusign. How to get access token using OAuth 2.0 in winform application without referring their dlls, using only with HttpWebRequest?</p> | <p>First - you'd need to pick a flow. ACG or JWT (<a href="https://developers.docusign.com/platform/auth/choose/" rel="nofollow noreferrer">https://developers.docusign.com/platform/auth/choose/</a>)</p>
<p>Once you grant consent for your app - you would need to replicate what the DLLs do, i.e., call the <code>/oauth/to... | Docusign OAuth 2.0 for Native C# Winform Application without using their dll | c#|winforms|docusignapi | 0 | 49 | 1 | 72,401,214 | 72,401,214 | 0 | true | 2022-05-25T13:49:11.320Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Docusign OAuth 2.0 for Native C# Winform Application without using their dll<p>I am having one C# winform application and using authentication for Docusign. ... |
72,375,374 | Navigate one collection view controller to another collection view controller?<p>I am trying to navigate one collection view controller to another collection view controller,Because I want to show my images one collection view to another collection view by using navigation. Is there any possibility to do that?
Please h... | <p>I did by my own... here I am attaching my code 1st I created struct</p>
<pre><code>import Foundation
struct City {
var image:String = ""
var name:String = ""
init(image: String, name: String){
self.image = image
self.name = name
}
}
</code></pre>
<p>after that... | Navigate one collection view controller to another collection view controller? | swift|uinavigationcontroller|storyboard | 0 | 49 | 1 | 72,401,619 | 72,401,619 | 0 | true | 2022-05-25T09:48:15.977Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Navigate one collection view controller to another collection view controller?<p>I am trying to navigate one collection view controller to another collection... |
72,401,053 | what happend re-define setInterval to variable in useEffect hook?<p>I want to know what happened if I define setInterval function repeatedly to same variable in react hook useEffect.</p>
<p>I checked variable have new setInterval id value every defining.
But I wonder is there instance remained in memory about previous ... | <blockquote>
<p>What happens if I assign repeatedly to same variable?</p>
</blockquote>
<p>It's not the <em>same</em> variable. It's creating a fresh new <code>timer</code> variable every time the effect runs. They're all independent.</p>
<blockquote>
<p>But I wonder is there instance remained in memory about previous ... | what happend re-define setInterval to variable in useEffect hook? | javascript|reactjs|setinterval|use-effect | 1 | 49 | 1 | 72,402,732 | 72,402,732 | 0 | true | 2022-05-27T05:57:51.967Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
what happend re-define setInterval to variable in useEffect hook?<p>I want to know what happened if I define setInterval function repeatedly to same variable... |
72,345,716 | Django manage.py commands generate error in Cronjob<p>Whenever I'm running a manage.py command (e.g. migrate, runserver) everything is fine.
I'm using the following Cronjob command:</p>
<pre><code>* * * * * python3 /home/ec2-user/Project/manage.py migrate
</code></pre>
<p>However, whenever I'm scheduling a manage.py co... | <p>Unfortunately, I haven't been able to find the origin of the issue. However, downgrading my Django version to 2.0 does resolve the issue, because this version of Django doesn't verify the SQLite3 version.</p> | Django manage.py commands generate error in Cronjob | python|django|cron | 0 | 49 | 1 | 72,405,347 | 72,405,347 | 0 | true | 2022-05-23T08:50:33.627Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Django manage.py commands generate error in Cronjob<p>Whenever I'm running a manage.py command (e.g. migrate, runserver) everything is fine.
I'm using the fo... |
72,377,527 | Python Package Artifactory Pull Replication Problem: Artifactory pulling from Azure Artefacts is not working<p>I want to setup a replication on an Artifactory Python repository that pulls Python packages from an Azure Artefacts Python repository.</p>
<p>When I set up the replication and test it I get following error me... | <p>According to Artifactory support replication only works between Artifactory instances and not between Artifactory and something else.</p> | Python Package Artifactory Pull Replication Problem: Artifactory pulling from Azure Artefacts is not working | python|artifactory|azure-artifacts | 0 | 49 | 1 | 72,405,392 | 72,405,392 | 0 | true | 2022-05-25T12:19:18.580Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python Package Artifactory Pull Replication Problem: Artifactory pulling from Azure Artefacts is not working<p>I want to setup a replication on an Artifactor... |
72,297,140 | Angular E2E tests - Protractor-Cucumber-Framework creating hundreds of strange cache files<p>In an <code>Angular</code> project, we're using the <code>Protractor-Cucumber-Framework</code> for our <code>E2E tests</code>. After running all my E2E tests, not only does it update a <code>results.json</code> and <code>result... | <p>I've disabled these files being created on every test run by commenting out a line <code>'--disk-cache-dir=null',</code> in the <code>chromeOptions</code> property of <code>protractor.conf.js</code>:</p>
<pre><code>chromeOptions: {
prefs: {
'plugins.always_open_pdf_externally': true,
download: {
dire... | Angular E2E tests - Protractor-Cucumber-Framework creating hundreds of strange cache files | angular|typescript|selenium|protractor|cucumber | 0 | 49 | 1 | 72,439,400 | 72,439,400 | 0 | true | 2022-05-18T23:47:57.950Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Angular E2E tests - Protractor-Cucumber-Framework creating hundreds of strange cache files<p>In an <code>Angular</code> project, we're using the <code>Protra... |
72,332,939 | Importing xslt stylesheet with relative path<p>I have XSLT file that uses xsl:import element to load some common templates.
I would like to use it in ?xml-stylesheet declaration to convert some XML into HTML (make it readable for user).</p>
<p>The problem is that the the server used for hosting xsl file will depend on ... | <p>I think I may have left out some important parts that changes this question a little bit.
I experimented with few implementations and I think I mixed the standard xml-stylesheet with js one.</p>
<p>The final version was using xslt transformation through js XSLTProcessor.
The stylesheet was loaded with fetch -> xm... | Importing xslt stylesheet with relative path | xml|xslt | 0 | 49 | 1 | 72,475,013 | 72,475,013 | 0 | true | 2022-05-21T20:18:31.460Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Importing xslt stylesheet with relative path<p>I have XSLT file that uses xsl:import element to load some common templates.
I would like to use it in ?xml-st... |
72,382,017 | Cannot download files in .Net 6<p>I have an MVC .Net Core 2.1 application. It has an action that generates a .csv file and returns it to download. Now, as this .Net version is not supported, I created a new application with .NET 6, and moved there my controllers, views etc. from the old application. Now for some reason... | <p>I posted this question elsewhere, and got an answer here:</p>
<p><a href="https://docs.microsoft.com/en-us/answers/questions/874470/cannot-download-files-in-net-6.html" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/answers/questions/874470/cannot-download-files-in-net-6.html</a></p>
<p>I just needed to ... | Cannot download files in .Net 6 | model-view-controller|.net-6.0 | 0 | 49 | 1 | 72,477,490 | 72,477,490 | 0 | true | 2022-05-25T17:34:17.143Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Cannot download files in .Net 6<p>I have an MVC .Net Core 2.1 application. It has an action that generates a .csv file and returns it to download. Now, as th... |
72,379,051 | Freeze when open action Blueprism<p>I am currently working with Blueprism 7.0.1</p>
<p>Every time i am trying to create a process using action Blueprism freez for several seconds
I've trying the followin solution</p>
<p><a href="https://i.stack.imgur.com/zE9Wr.png" rel="nofollow noreferrer"><img src="https://i.stack.im... | <p>You can see an answer about this question in this post :</p>
<p><a href="https://community.blueprism.com/discussion/freeze-when-open-action-blueprism?reply-inline=586a7b6f-0b6f-45b1-80a7-01db310fbe00" rel="nofollow noreferrer">https://community.blueprism.com/discussion/freeze-when-open-action-blueprism?reply-inline=... | Freeze when open action Blueprism | rpa|blueprism | 0 | 49 | 1 | 72,490,728 | 72,490,728 | 0 | true | 2022-05-25T13:59:22.537Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Freeze when open action Blueprism<p>I am currently working with Blueprism 7.0.1</p>
<p>Every time i am trying to create a process using action Blueprism free... |
72,373,537 | Print alternatively one element from the last and one from the first (JavaScript)<p>Print alternatively one element from the last and one from the first (JavaScript)</p>
<p><em>input</em>
1, 3, 6, 3, 2, 8</p>
<p><em>output:</em>
8, 1, 2, 3, 3, 6</p> | <p>You can use the below approach</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>var array = [];
var size = prompt('Enter Array Size'); //Maximum Array size
for(var i=0; i<... | Print alternatively one element from the last and one from the first (JavaScript) | javascript|arrays|sorting|numbers|logic | -1 | 49 | 2 | 72,373,717 | 72,373,717 | 0 | true | 2022-05-25T07:31:10.567Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Print alternatively one element from the last and one from the first (JavaScript)<p>Print alternatively one element from the last and one from the first (Ja... |
72,401,285 | Powershell - Set the "LastWriteTime" Property so that it's different for each file in a folder<p>I'm trying to change the "LastWriteTime" property on multiple files so that they are different using a random number. I have made a test folder with a few .txt files I'm trying to change the property on.</p>
<p>Th... | <p>I tested your script on Powershell7 and it's throwing an error for one file out of three. The interesting part is that dates are getting changed as expected for all. Could be a bug with this module.</p>
<p>Another point is that this error is not there if we use <code>For each</code>, instead of <code>For</code>.</p>... | Powershell - Set the "LastWriteTime" Property so that it's different for each file in a folder | powershell | 0 | 49 | 1 | 72,401,599 | 72,401,599 | 0 | true | 2022-05-27T06:25:29.357Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Powershell - Set the "LastWriteTime" Property so that it's different for each file in a folder<p>I'm trying to change the "LastWriteTime" property ... |
72,292,907 | Filter data in pandas by a string date<p>I have a DataFrame that looks like this:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>Date</th>
<th>Parameter</th>
</tr>
</thead>
<tbody>
<tr>
<td>2010-01-02</td>
<td>some value</td>
</tr>
<tr>
<td>2010-01-03</td>
<td>some value</td>
</tr>
<tr>
<t... | <p><code>DataFrame.query</code> expects you to reference column names; <code>df.query('Date < limit_date')</code> is trying to query rows where the value in the <code>'Date'</code> column is less than the value in the <code>'limit_date'</code> column. (How would it know <code>'Date'</code> is a column but <code>limi... | Filter data in pandas by a string date | python|pandas|dataframe|bigdata | 0 | 49 | 1 | 72,293,037 | 72,293,037 | 0 | true | 2022-05-18T16:32:59.520Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Filter data in pandas by a string date<p>I have a DataFrame that looks like this:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<t... |
72,353,566 | When should I use REQ_OP_FLUSH in a kernel blockdev driver? (Do REQ_OP_FLUSH bio's flush dirty RAID controller caches?)<p>When should I use REQ_OP_FLUSH in my kernel blockdev driver, and what is the expected behavior of the hardware that receives the REQ_OP_FLUSH (or equivalent SCSI cmd)?</p>
<p>In the Linux kernel, wh... | <p>Christoph Hellwig on the linux-block mailing list said:</p>
<blockquote>
<p>Devices with power fail
protection will advertise that (using VWC flag in NVMe for example) and [the Linux kernel] will never send flushes.</p>
</blockquote>
<p>Keith Busch at kernel.org:</p>
<blockquote>
<p>You can check the queue attribute... | When should I use REQ_OP_FLUSH in a kernel blockdev driver? (Do REQ_OP_FLUSH bio's flush dirty RAID controller caches?) | linux-kernel|kernel|disk|scsi|block-device | 2 | 49 | 1 | 72,370,972 | 72,370,972 | 0 | true | 2022-05-23T18:55:29.423Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
When should I use REQ_OP_FLUSH in a kernel blockdev driver? (Do REQ_OP_FLUSH bio's flush dirty RAID controller caches?)<p>When should I use REQ_OP_FLUSH in m... |
72,344,214 | PHP file_exists not working (multiple execution in same browser)<p>I'm trying to understand why this script doesn't work, when I execute script simultaneously in same browser or browser tab, second script do not see the created file "/tmp/monkey.tmp" (php7.4-fpm + nginx, default config, opcache enabled)</p>
<... | <p>Php can be tricky, when debugging with browsers because they most likely cache the php page, tho that is not the wanted bahaviour.</p>
<p>My guess is the browser or webserver cached the site and that is why you don't see the change.
But on the other Browser that didn't cache does.</p>
<p>That also explains why you s... | PHP file_exists not working (multiple execution in same browser) | php|file-exists | 0 | 49 | 1 | 72,344,578 | 72,344,578 | 0 | true | 2022-05-23T06:43:35.817Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
PHP file_exists not working (multiple execution in same browser)<p>I'm trying to understand why this script doesn't work, when I execute script simultaneousl... |
72,263,192 | Pandas SettingWithCopyWarning with np.where<p>I have a pandas data frame that has a column containing a bunch of correlations (all float values). I'm trying to create another column to categorise these correlations into three distinct categories (high/medium/low). I do this using np.where:</p>
<pre><code>df['Category']... | <p>Most likely your <em>df</em> has been created as a <strong>view</strong> of another DataFrame,
e.g.:</p>
<pre><code>data = pd.DataFrame({'Correlation': np.arange(0, 1.3, 0.1)}) # Your "initial" DataFrame
df = data.iloc[0:11]
</code></pre>
<p>Now <em>df</em> holds some fragment of <em>data</em>, but it use... | Pandas SettingWithCopyWarning with np.where | python|pandas|dataframe|numpy | 0 | 49 | 1 | 72,268,566 | 72,268,566 | 0 | true | 2022-05-16T17:20:43.763Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pandas SettingWithCopyWarning with np.where<p>I have a pandas data frame that has a column containing a bunch of correlations (all float values). I'm trying ... |
72,398,049 | Element.setAttribute only reflects on console<p>I'm really new to Web Development. While experimenting with a little JavaScript in HTML, I tried to change the content of an element. When I execute the code below, I get "Updated Content" in the console which is the desired outcome. However, the content inside ... | <p>I'm still not certain what all you're looking to update, but have a look at this. I didn't change anything in your html. I'm creating an on click binding for the #rex link, and it updates several things... my comments are below. I'm also using only jquery syntax. What you posted is kind of a mix and match of jqu... | Element.setAttribute only reflects on console | javascript|html|jquery|bootstrap-5 | 0 | 49 | 2 | 72,398,299 | 72,398,299 | 0 | true | 2022-05-26T21:12:07.773Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Element.setAttribute only reflects on console<p>I'm really new to Web Development. While experimenting with a little JavaScript in HTML, I tried to change th... |
72,273,282 | Make ID and another column into PK<p>I have a <code>Stack</code> which has many <code>StackRequiredParameter</code>.</p>
<p>The <code>StackRequiredParameter</code> is identified by its name but multiple stacks can have parameters of the same name. Therefore the PK is a composite of its name and the id of the stack whic... | <p>The problem is both foreign key and references should contain equal columns</p>
<pre class="lang-golang prettyprint-override"><code>type Stack struct {
gorm.Model
Name string `gorm:"unique"`
RequiredParameters []StackRequiredParameter `gorm:"many2many:requir... | Make ID and another column into PK | go|go-gorm | 0 | 49 | 1 | 72,274,581 | 72,274,581 | 0 | true | 2022-05-17T11:31:04.233Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Make ID and another column into PK<p>I have a <code>Stack</code> which has many <code>StackRequiredParameter</code>.</p>
<p>The <code>StackRequiredParameter<... |
72,321,081 | vue v-bind:class return invalid value<p>I am writing an application at vue and I am getting incorrect behavior, in particular my line :class=require ? 'require' : '' returns the string 'require' even when the value of require is false, what is the problem?</p>
<pre class="lang-html prettyprint-override"><code><templ... | <p>I spent 3 hours on this before writing the question on StackOverflow. As soon as I published the question, after a few minutes I realized that I have a require function in the global area, which is needed for example for images</p>
<pre><code><img :src="require('./img.png')" />
</code></pre>
<p>this ... | vue v-bind:class return invalid value | javascript|vue.js | 0 | 49 | 2 | 72,321,297 | 72,321,297 | 0 | true | 2022-05-20T15:01:10.260Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
vue v-bind:class return invalid value<p>I am writing an application at vue and I am getting incorrect behavior, in particular my line :class=require ? 'requi... |
72,382,296 | How add a str in for bucle<p>I have this but I want that the output were 'so' and not 'os'</p>
<pre><code>endstring = ''
for s in range(5):
endstring += "s\n"
endstring += "o"
print(endstring)
</code></pre>
<p>output:</p>
<pre><code>s
os
os
os
os
o
</code></pre>
<p>How I can do that?</p>
<p>... | <p>Use this instead:</p>
<pre class="lang-py prettyprint-override"><code>endstring = ''
endstring1 = 's'
for s in range(5):
endstring += "o"
endstring += "\ns"
if "so" in endstring:
endstring1 += f"\nso"
print(endstring1 + "\no")
</code></pre>
<p>It ... | How add a str in for bucle | python | -1 | 49 | 1 | 72,382,334 | 72,382,334 | 0 | true | 2022-05-25T18:01:23.133Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How add a str in for bucle<p>I have this but I want that the output were 'so' and not 'os'</p>
<pre><code>endstring = ''
for s in range(5):
endstring += ... |
72,354,702 | (Flask) Why doesn't the Jinja block in my HTML get all the table entries passed from a SQLAlchemy query?<p>I'm trying to send table entries to display on HTML using Jinja through a returned SQLAlchemy query result from a route function with a specific constraint (second paragraph) but there's only one entry that makes ... | <p>Final solution:</p>
<pre><code>@app.route('/<int:product_id>/product_details', methods=['GET'])
def product_details(product_id):
orders = []
order_list = Order.query.all()
product = Products.query.filter_by(product_id=product_id).first()
for order_to_process in order_list:
product_list ... | (Flask) Why doesn't the Jinja block in my HTML get all the table entries passed from a SQLAlchemy query? | python|sqlite|sqlalchemy|jinja2|flask-sqlalchemy | 0 | 49 | 3 | 72,383,867 | 72,383,867 | 0 | true | 2022-05-23T20:53:34.007Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
(Flask) Why doesn't the Jinja block in my HTML get all the table entries passed from a SQLAlchemy query?<p>I'm trying to send table entries to display on HTM... |
72,329,072 | How to make Index & Match functions on GG Sheets match blank cells?<p>I have one table of data (A) with data values, and a second table (B) which serves as a key that categorises/groups those entries into categories.</p>
<p>I am trying to write a cell formula that will list the category that corresponds to the data val... | <p>use ifna like:</p>
<pre><code>=IFNA(INDEX(D2:D13, MATCH(A2:A13, E2:E13, 0)))
</code></pre>
<hr />
<h2>update:</h2>
<pre><code>=INDEX(IF(A2:A13="",,IFERROR(INDEX(D2:D13,MATCH(A2:A13,E2:E13,0)),"Other")))
</code></pre> | How to make Index & Match functions on GG Sheets match blank cells? | if-statement|google-sheets|indexing|match|nested-if | 1 | 49 | 1 | 72,329,098 | 72,329,098 | 0 | true | 2022-05-21T11:19:51.280Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to make Index & Match functions on GG Sheets match blank cells?<p>I have one table of data (A) with data values, and a second table (B) which serves as a... |
72,323,280 | SQL Server 2012 string functions<p>I have a field that can vary in length of the format CxxRyyy where x and y are numeric. I want to choose xx and yyy. For instance, if the field value is C1R12, then I want to get 1 and 12. if I use substring and charindex then I have to use a length, but I would like to use a position... | <p>If these are cell references and will always be in the form <code>C{1-5 digits}R{1-5 digits}</code> you can do this:</p>
<pre><code>DECLARE @t TABLE(Original varchar(32));
INSERT @t(Original) VALUES ('C14R4535'),('C1R12'),('C57R123');
;WITH src AS
(
SELECT Original, c = REPLACE(REPLACE(Original,'C',''),'R','.') ... | SQL Server 2012 string functions | sql|sql-server-2012 | 0 | 49 | 4 | 72,323,567 | 72,323,567 | 0 | true | 2022-05-20T18:19:30.610Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SQL Server 2012 string functions<p>I have a field that can vary in length of the format CxxRyyy where x and y are numeric. I want to choose xx and yyy. For i... |
72,277,061 | How do you split lists according to numerical order of values?<p>I am trying to dynamically split a list of numbers into separate vectord where they are in order.</p>
<p>Let’s say there are some vectord of numbers</p>
<pre><code>Numbers_set1 <- c(53,54,55,56,58,59)
Numbers_set2 <- c(52,57)
</code></pre>
<p>I wan... | <p>You can use <code>split</code> with <code>lapply</code>:</p>
<pre class="lang-r prettyprint-override"><code>Numbers_set1 <- c(53,54,55,56,58,59)
Numbers_set2 <- c(52,57)
lapply(list(Numbers_set1, Numbers_set2), \(x) split(x, cumsum(c(1, diff(x) != 1))))
</code></pre>
<p>If you want to replicate the names as w... | How do you split lists according to numerical order of values? | r|list|split | 0 | 49 | 2 | 72,277,134 | 72,277,134 | 0 | true | 2022-05-17T15:46:20.910Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do you split lists according to numerical order of values?<p>I am trying to dynamically split a list of numbers into separate vectord where they are in o... |
72,318,350 | Check multiple interfaces at one time<pre><code>#!/bin/bash
if /sbin/ethtool eth0 | grep -q "Link detected: yes"; then
echo "The Link is up and online on $(hostname) as on $(date)" |
mail -s "Network: Link is up" user@gmail.com
else
echo "Link Detected = NO, Please check... | <p>Standard rule: use <code>for</code>-loop to repeate it many times but for different values.</p>
<hr />
<p>In <code>Bash</code> it could look like this:</p>
<pre><code>#!/bin/bash
text=""
correct=0
error=0
for DEV in eth0 eth1 eth2;
do
if /sbin/ethtool $DEV | grep -q "Link detected: yes"; then... | Check multiple interfaces at one time | python|shell|networking|script | -2 | 49 | 1 | 72,319,687 | 72,319,687 | 0 | true | 2022-05-20T11:39:53.247Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Check multiple interfaces at one time<pre><code>#!/bin/bash
if /sbin/ethtool eth0 | grep -q "Link detected: yes"; then
echo "The Link is ... |
72,377,241 | how to print log_in and log_out time from one table without any user id and count of "on" in sql<p>I have this i/p table</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>event_time</th>
<th>status</th>
</tr>
</thead>
<tbody>
<tr>
<td>10:01</td>
<td>on</td>
</tr>
<tr>
<td>10:02</td>
<td>on</t... | <p>In Oracle, you can use <code>MATCH_RECOGNIZE</code> to do row-by-row processing:</p>
<pre class="lang-sql prettyprint-override"><code>SELECT *
FROM table_name
MATCH_RECOGNIZE(
ORDER BY event_time
MEASURES
FIRST(event_time) AS login_time,
LAST(event_time) AS logout_time,
COUNT(on_status... | how to print log_in and log_out time from one table without any user id and count of "on" in sql | mysql|sql|oracle | 0 | 49 | 1 | 72,377,366 | 72,377,366 | 0 | true | 2022-05-25T11:59:46.290Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to print log_in and log_out time from one table without any user id and count of "on" in sql<p>I have this i/p table</p>
<div class="s-table-container">
... |
72,283,262 | How to remove two object at the same time using command line from an Arraylist<p>I have one list now.
I want to remove two object when I used command line.</p>
<pre><code> Ex)
javac Main.java
java Main 2 3
a v i
</code></pre>
<p>I try changed code .I can not do that.
Please help me.</p>
<p><strong>Condit... | <p>Try the following code. Your code only takes ONE argument args[0]. Instead I used a for loop to iterate all given arguments. However, this will not work in the way you are thinking, because the index is shifted when an item is removed.</p>
<pre><code>public static void main(String[] args) {
String[] s = {&qu... | How to remove two object at the same time using command line from an Arraylist | java|arrays | -3 | 49 | 1 | 72,283,338 | 72,283,338 | 0 | true | 2022-05-18T04:34:13.693Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to remove two object at the same time using command line from an Arraylist<p>I have one list now.
I want to remove two object when I used command line.</... |
72,273,310 | rolling three day average in sql server<p>I want to find three day average of values. Expected output:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>dt</th>
<th>amt</th>
<th>running_avg</th>
</tr>
</thead>
<tbody>
<tr>
<td>2022-05-1</td>
<td>100</td>
<td>0</td>
</tr>
<tr>
<td>2022-05-2</t... | <p>It seems you need a <code>ROWS/RANGE</code> argument in the windowed <code>AVG()</code>:</p>
<p>Data:</p>
<pre><code>SELECT *
INTO trans
FROM (VALUES
(CONVERT(date, '20220501'), 100),
(CONVERT(date, '20220502'), 150),
(CONVERT(date, '20220503'), 50),
(CONVERT(date, '20220514'), 250),
(CONVERT(date, '2... | rolling three day average in sql server | sql|sql-server | 1 | 49 | 1 | 72,273,600 | 72,273,600 | 0 | true | 2022-05-17T11:33:05.553Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
rolling three day average in sql server<p>I want to find three day average of values. Expected output:</p>
<div class="s-table-container">
<table class="s-ta... |
72,303,402 | How can I add an IP address in a AWS CLI with out exporting<p>I am running below command to ingress in aws-cli, it is working fine if I provide an IP address, but I want it to know the IP and pass it.
I was trying something like below but it is not helping</p>
<pre><code>aws ec2 authorize-security-group-ingress --group... | <p>Use <code>-s</code> with <code>curl</code>.</p>
<p>Try this:</p>
<pre><code>aws ec2 authorize-security-group-ingress --group-id sg-123456778 --protocol tcp --port 22 --cidr $(echo "$(curl -s https://checkip.amazonaws.com)/32") --profile xyzzy
</code></pre> | How can I add an IP address in a AWS CLI with out exporting | linux|amazon-web-services|unix|aws-cli | 0 | 49 | 1 | 72,303,673 | 72,303,673 | 0 | true | 2022-05-19T11:02:52.613Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I add an IP address in a AWS CLI with out exporting<p>I am running below command to ingress in aws-cli, it is working fine if I provide an IP address... |
72,357,176 | Sequelize ERRCONNREFUSED to mysql db in docker compose<p>When booting up my api/app/db in docker compose the api is unable to connect to the mysql container.</p>
<p>docker-compose.yml</p>
<pre><code>version: "3.8"
services:
web:
build:
context: ./frontend
dockerfile: Docker... | <p>You are trying to connect to <code>localhost</code></p>
<p>By using localhost it will try to reach to container's localhost</p>
<p>You should use instead the name of the service <code>db</code></p>
<p>Since compose will create by default a bridge network. Your <strong>API</strong> container will be able to resolve t... | Sequelize ERRCONNREFUSED to mysql db in docker compose | mysql|docker|docker-compose|sequelize.js | 1 | 49 | 1 | 72,357,646 | 72,357,646 | 0 | true | 2022-05-24T04:20:19.177Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Sequelize ERRCONNREFUSED to mysql db in docker compose<p>When booting up my api/app/db in docker compose the api is unable to connect to the mysql container.... |
72,361,553 | How to check any pipe separated data is empty<p>I am trying to implement this but not getting</p>
<p>I have below data in file</p>
<pre><code>A|B|C|D
AX | GH | H
FG |HJJK |
| GHJ |
AG |
</code></pre>
<p>I need to check like line should have data in between pipe</p>
<p><strong>Expected output</strong></p>
<pre><code... | <pre><code>A|B|C|D
AX | GH | H
FG |HJJK |
| GHJ |
AG |
</code></pre>
<p>———————————————————————</p>
<pre><code>{m,g}awk '$-_=sprintf("Line %5.f : %s proper data",
NR, (!_)< NF ? "No" : "as")' \
FS='(^|[|])[ \t]*[|]|[|][ \t]*$'
</code></p... | How to check any pipe separated data is empty | shell|unix|awk|text-processing | 2 | 49 | 3 | 72,361,771 | 72,361,771 | 0 | true | 2022-05-24T10:48:15.823Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to check any pipe separated data is empty<p>I am trying to implement this but not getting</p>
<p>I have below data in file</p>
<pre><code>A|B|C|D
AX | GH... |
72,313,797 | Unable to sketch vertical and horizontal lines around selected dataframe columns published in Gsheet using Python<p>As per discussion on <a href="https://stackoverflow.com/q/72023417/6293211">Python dataframe to Google Sheet: Freeze rows and sketch vertical lines around a sets of columns</a> , I have been able to use t... | <p>Unfortunately, although I'm not sure whether I could correctly understand your question, from your provided question, I understood your goal as follows.</p>
<ol>
<li><p>About <code>As can be seen in the attached photo, the lines dont extend all the way to the column AE, but rather stop at Z (see red lines in photo).... | Unable to sketch vertical and horizontal lines around selected dataframe columns published in Gsheet using Python | python|pandas|dataframe|google-sheets|google-sheets-api | 1 | 49 | 1 | 72,342,347 | 72,342,347 | 0 | true | 2022-05-20T05:04:22.703Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Unable to sketch vertical and horizontal lines around selected dataframe columns published in Gsheet using Python<p>As per discussion on <a href="https://sta... |
72,334,154 | Android recyclerview does not show any data<p>I'm using a template and I replaced the placeholder data with a Retrofit 2 request that parses a JSON file of the data from an URL and puts it into an object list. I ran into a problem where my retrofit call gets executed and returns items = 0 at first, then the code execut... | <p>Your method is asynchronous, so the code in <code>onResponse</code> runs in the future, after your <code>getTaskData</code> method has already returned an empty list. You would need to modify your program flow to accommodate this.</p>
<p>Here is an example of how you could define your own custom callback to handle t... | Android recyclerview does not show any data | java|android|android-recyclerview|retrofit2|android-adapter | 0 | 49 | 1 | 72,334,281 | 72,334,281 | 0 | true | 2022-05-22T01:04:57.783Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Android recyclerview does not show any data<p>I'm using a template and I replaced the placeholder data with a Retrofit 2 request that parses a JSON file of t... |
72,244,839 | how to stop a func from running and return a value after one minute?<p>I would like to call a func and stop it from running after one minute, returning a value.
i have a code that looks similar to that:</p>
<pre><code>def foo(txt):
best_value=-1
for word in txt:
if value(word)>best_value:
bes... | <p>If you want to decouple the timing code from the business logic and to keep the overhead to a minimum, an easy way is to use a global variable in the code to tell it when to stop running:</p>
<pre><code>time_out = False
def foo(txt):
best_value=-1
for word in txt:
if value(word)>best_value:
... | how to stop a func from running and return a value after one minute? | python|python-3.x|time|return-value|break | 2 | 49 | 2 | 72,244,933 | 72,244,933 | 1 | true | 2022-05-15T00:57:29Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to stop a func from running and return a value after one minute?<p>I would like to call a func and stop it from running after one minute, returning a val... |
72,247,506 | Filtering dataframes in pandas, how to chain multiple filters?<p>I have a function which filters my data, like so:</p>
<pre><code>def get_gappers(data):
data = pd.read_csv(data)
open = data['open']
df = data[(data['change'] >= 10)]
df = df[(open <= 15)]
df = df[(open >= 1)]
display(df)... | <pre><code>df = data[(data['change'] >= 10) & (open <= 15) & (open >= 1)]
</code></pre>
<p>or using <code>pandas.DataFrame.query</code>:</p>
<pre><code>df = data.query("1 <= open <= 15 and change >= 10")
</code></pre> | Filtering dataframes in pandas, how to chain multiple filters? | python|pandas | 0 | 49 | 1 | 72,247,644 | 72,247,644 | 1 | true | 2022-05-15T10:40:12.473Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Filtering dataframes in pandas, how to chain multiple filters?<p>I have a function which filters my data, like so:</p>
<pre><code>def get_gappers(data):
... |
72,249,295 | Designing most efficient algorithm for the problem with dynamic programming approach<p>Assume that you are in exam and you have 120 minutes but you can't solve the questions because you have a limited time. For example, the points and time to be needed to complete the question is below.</p>
<p><a href="https://i.stack.... | <p>In your question, each question has a weight (the amount of time it needs) and a value (the points it awards). There is a constraint on the total time (or weight) and you need to maximise the points (or value).</p>
<p>This becomes analogous to the <a href="https://www.geeksforgeeks.org/0-1-knapsack-problem-dp-10/" r... | Designing most efficient algorithm for the problem with dynamic programming approach | java|algorithm|dynamic-programming | -1 | 49 | 1 | 72,249,432 | 72,249,432 | 1 | true | 2022-05-15T14:41:56.027Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Designing most efficient algorithm for the problem with dynamic programming approach<p>Assume that you are in exam and you have 120 minutes but you can't sol... |
72,250,797 | Block.Tile Positions () is unavailable due to its security level<p>I have TilePositions() component and when i tried change it from private to public i'm generic new error which is:
"Accessibility inconsistency, the return type "IEnumerable " is less accessible than the "Block.TilePositions ()"... | <p>Change private to public for access from out object.</p>
<pre><code> public IEnumerable<Position> TilePositions() //here is error
{
foreach (Position p in Tiles[rotationState])
{
yield return new Position(p.Row + offset.Row, p.Column + offset.Column);
}
}
<... | Block.Tile Positions () is unavailable due to its security level | c#|.net|wpf|class | 0 | 49 | 1 | 72,250,966 | 72,250,966 | 1 | true | 2022-05-15T17:49:16.370Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Block.Tile Positions () is unavailable due to its security level<p>I have TilePositions() component and when i tried change it from private to public i'm gen... |
72,258,278 | Catch dll function that does not return<p>i do have to use a .dll library in order to have access to hardware i want to control.</p>
<p>The problem is, that some functions of that dll sometimes do not return. They seem to be stuck in an infinite loop or something.</p>
<p>My idea was to run the function calls in a diffe... | <p>Isolating the DLL in its own thread does not really help a lot, but the idea makes sense. It might be better to isolate the DLL in its own helper process. You would then terminate the entire helper process.</p>
<p>This is by necessity not a clean exit. That is inherent in the problem. You don't know how the DLL corr... | Catch dll function that does not return | c++|multithreading|exception|dll|infinite-loop | 1 | 49 | 1 | 72,259,561 | 72,259,561 | 1 | true | 2022-05-16T11:11:25.050Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Catch dll function that does not return<p>i do have to use a .dll library in order to have access to hardware i want to control.</p>
<p>The problem is, that ... |
72,269,167 | How can I get localStorage key name that based on what I input in form<p>I'm trying to make a blog thumbnail and blog content with blog content input.</p>
<p>I have blog input form and the thumbnail on the same page, here's the code for the page:</p>
<p><div class="snippet" data-lang="js" data-hide="true" data-console=... | <p>You have a link to navigate in each blog item:</p>
<pre><code><a href="blog-detail.html" onclick="renderBlog(event)" id='${blogs[i].title} action="blog-detail.html"'>
<p>${blogs[i].title}</p>
</a>
</code></pre>
<p><code>onclick</code> run your <code>renderBlo... | How can I get localStorage key name that based on what I input in form | javascript|html | 0 | 49 | 1 | 72,269,458 | 72,269,458 | 1 | true | 2022-05-17T06:35:12.633Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I get localStorage key name that based on what I input in form<p>I'm trying to make a blog thumbnail and blog content with blog content input.</p>
<p... |
72,269,285 | Typescript best practice for "Types of parameters 'X' and 'X' are incompatible"<p>I have a question in typescript and want to know the best way in this situation</p>
<p><a href="https://www.typescriptlang.org/play?#code/PTAEHUFMBsGMHsC2lQBd5oBYoCoE8AHSAZVgCcBLA1UABWgEM8BzM%20AVwDsATAGiwoBnUENANQAd0gAjQRVSQAUCEmYKsTKGYU... | <p>I am not sure that's what you're looking for, but this should solve your issue:</p>
<pre><code>interface Params {
name: string;
age: number;
}
interface Option {
callback: (params: Params | Params[]) => void
}
const optionError:Option = {
callback:(params: Params | Params[]) => {
if (!Array.isAr... | Typescript best practice for "Types of parameters 'X' and 'X' are incompatible" | typescript | 0 | 49 | 3 | 72,269,475 | 72,269,475 | 1 | true | 2022-05-17T06:47:39.637Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Typescript best practice for "Types of parameters 'X' and 'X' are incompatible"<p>I have a question in typescript and want to know the best way in this situa... |
72,273,122 | Random search grid not displaying scoring metric<p>I want to do a grid search of some few hyperparameters through a XGBClassifier of a binary class, but whenever i run it the score value (<code>roc_auc</code>) is not being display. I read in other question that this can be related to some error in model training but i ... | <p>The results of the evaluations for each fold are stored in the <code>RandomizedSearchCV</code> instance after fitting. Access them using the <code>cv_results_</code> attribute:</p>
<pre><code># Access CV validation scores.
print(random_search.cv_results_)
</code></pre>
<p>Note that you can also access the best estim... | Random search grid not displaying scoring metric | python|scikit-learn|xgboost|grid-search | 1 | 49 | 1 | 72,273,280 | 72,273,280 | 1 | true | 2022-05-17T11:19:06.753Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Random search grid not displaying scoring metric<p>I want to do a grid search of some few hyperparameters through a XGBClassifier of a binary class, but when... |
72,282,624 | How to use TypeScript w/ a library with no definition file?<p>So I’m trying to use the <code>pino-clf</code> library in my <code>koa</code> TS project.</p>
<p>I keep getting this when I try to compile:</p>
<pre class="lang-sh prettyprint-override"><code>TSError: ⨯ Unable to compile TypeScript:
src/modules/logger/index.... | <p>So there are two ways this can be accomplished.</p>
<p>Solution One: Probably the easiest</p>
<p>You can just use require ex: <code>const pinoClf = require("pinoClf")</code> - the down-side is that dot reference or intellisense isn't available but if you know the methods you want to use its no biggie.</p>
... | How to use TypeScript w/ a library with no definition file? | javascript|typescript|import | 0 | 49 | 1 | 72,282,932 | 72,282,932 | 1 | true | 2022-05-18T02:35:56.757Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to use TypeScript w/ a library with no definition file?<p>So I’m trying to use the <code>pino-clf</code> library in my <code>koa</code> TS project.</p>
<... |
72,283,334 | pvlib for read surfrad dataset has issue<p>In order to access <a href="https://gml.noaa.gov/grad/surfrad/" rel="nofollow noreferrer">SURFRAD</a> irradiance data, I am running the following python command using the <a href="https://pvlib-python.readthedocs.io/" rel="nofollow noreferrer">pvlib library</a>:</p>
<pre><code... | <p>The filename argument passed to the pvlib SURFRAD reader function can either be a local path or a link to a specific file on the SURFRAD FTP server.</p>
<p>To get data from the Boulder station for January 1st 2020, the correct filename would be:</p>
<pre><code>filename = 'ftp://aftp.cmdl.noaa.gov/data/radiation/surf... | pvlib for read surfrad dataset has issue | pvlib | 0 | 49 | 1 | 72,285,311 | 72,285,311 | 1 | true | 2022-05-18T04:46:08.243Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
pvlib for read surfrad dataset has issue<p>In order to access <a href="https://gml.noaa.gov/grad/surfrad/" rel="nofollow noreferrer">SURFRAD</a> irradiance d... |
72,288,810 | (SQL)How to Get absence "day" from date under 1-31 column using PIVOT<p>I have a table abs_details that give data like follows -</p>
<pre><code>PERSON_NUMBER ABS_DATE ABS_TYPE_NAME ABS_DAYS
1010 01-01-2022 PTO 1
1010 06-01-202... | <p>Create a column which has all the dates, and pivot up using <code>pivot</code> function in oracle.</p>
<pre><code>SELECT *
FROM
(
SELECT PERSON_NUMBER,
EXTRACT(DAY FROM TO_DATE(ABS_DATE)) AS DAY_X,
ABS_TYPE_NAME,
ABS_DAYS
FROM TABLE
-- Add additional filter here which yo... | (SQL)How to Get absence "day" from date under 1-31 column using PIVOT | sql|oracle|oracle-sqldeveloper|bi-publisher | 0 | 49 | 1 | 72,290,262 | 72,290,262 | 1 | true | 2022-05-18T11:59:38.003Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
(SQL)How to Get absence "day" from date under 1-31 column using PIVOT<p>I have a table abs_details that give data like follows -</p>
<pre><code>PERSON_NUMBER... |
72,266,256 | Regression in first differences with packages `plm` and `broom`<p>I'm estimating a linear regression in first-differences straight out of the textbook:</p>
<ul>
<li>James H. Stock and Mark W. Watson, Introduction to Econometrics, Pearson, 4th Edition.</li>
<li>Christoph Hanck, Martin Arnold, Alexander Gerber, and Marti... | <p>This is due to a misunderstanding or non-special casing the first-difference (FD) panel model in <code>broom::augment_columns</code>: the function assumes the residuals of the FD model have the same length as the predicted values.</p>
<p>More concretly, this line: <code>ret$.resid <- residuals0(x)</code> (<a href... | Regression in first differences with packages `plm` and `broom` | panel-data|plm|broom | 0 | 49 | 1 | 72,294,844 | 72,294,844 | 1 | true | 2022-05-16T22:26:34.543Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Regression in first differences with packages `plm` and `broom`<p>I'm estimating a linear regression in first-differences straight out of the textbook:</p>
<... |
72,264,693 | Routing problem after upgrading from LTS 8 to LTS 9 (RealURL -> Core routing)<p>After migrating our site from version 8 LTS to version 9 LTS, I have some configuration problems with the routing.</p>
<p>With RealURL we use the fixedPostVars, 'noMatch' => 'bypass'.</p>
<p>For example with this URL</p>
<pre><code>http:... | <p><code>fullName</code> has a too huge value space to be there without <code>requirements</code>/<code>aspects</code>. That will produce <code>?cHash</code>.</p>
<p>In your case (string), you can use the <code>PersistedAliasMapper</code> or write a custom aspect.</p>
<p><code>uid</code> will need <code>requirements</c... | Routing problem after upgrading from LTS 8 to LTS 9 (RealURL -> Core routing) | typo3|typo3-9.x|realurl|symfony-routing | 0 | 49 | 1 | 72,300,478 | 72,300,478 | 1 | true | 2022-05-16T19:34:44.737Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Routing problem after upgrading from LTS 8 to LTS 9 (RealURL -> Core routing)<p>After migrating our site from version 8 LTS to version 9 LTS, I have some con... |
72,302,654 | Chain Completable and a Single RxJava + Retrofit<p>In My repository, I have two API calls that should be done sequentially.</p>
<ol>
<li>First API call returns Completable -> If this API call fails, we should not proceed further, if it succeeds we should continue with the second API call</li>
<li>Second API call ret... | <p>Use <code>andThen</code></p>
<pre class="lang-java prettyprint-override"><code>activate(id)
.andThen(
fetchAd(id)
.onErrorReturnItem(SummaryAd())
)
</code></pre> | Chain Completable and a Single RxJava + Retrofit | android|kotlin|retrofit|rx-java | 0 | 49 | 2 | 72,302,817 | 72,302,817 | 1 | true | 2022-05-19T10:08:52.010Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Chain Completable and a Single RxJava + Retrofit<p>In My repository, I have two API calls that should be done sequentially.</p>
<ol>
<li>First API call retur... |
72,307,132 | Convert duration string into seconds integer<p>I want to turn strings that represent durations into their duration in seconds as an integer.</p>
<p>All of the strings are formatted in the following way:</p>
<pre><code>hh:mm:ss
</code></pre>
<p>I was working with substrings, which I cast to integers and then multiplied ... | <p>Try using <a href="https://prestodb.io/docs/current/functions/datetime.html#mysql-date-functions" rel="nofollow noreferrer"><code>date_parse</code></a>, cast to time and use <a href="https://prestodb.io/docs/current/functions/datetime.html#date_diff" rel="nofollow noreferrer"><code>date_diff</code></a> with required... | Convert duration string into seconds integer | sql|amazon-athena|presto | 0 | 49 | 1 | 72,307,451 | 72,307,451 | 1 | true | 2022-05-19T15:19:10.380Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Convert duration string into seconds integer<p>I want to turn strings that represent durations into their duration in seconds as an integer.</p>
<p>All of th... |
72,312,663 | How to mock an dependency when passed as an argument?<p>We created a common class where a RestTemplate is passed as a parameter. This rest template is used to facilitate:</p>
<ul>
<li>postForEntity</li>
<li>exchange</li>
</ul>
<p>However, since it is not Autowired in the common class, I am not able to create unit tests... | <p>I'm not sure what you are trying to achieve. If you want to test your <code>RestService</code> you should be able to do something like this:</p>
<pre class="lang-java prettyprint-override"><code> @Test
void test() {
RestTemplate templateMock = mock(RestTemplate.class);
RestService.invoke(templ... | How to mock an dependency when passed as an argument? | java|spring-boot|mockito | 1 | 49 | 1 | 72,313,287 | 72,313,287 | 1 | true | 2022-05-20T01:30:45.887Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to mock an dependency when passed as an argument?<p>We created a common class where a RestTemplate is passed as a parameter. This rest template is used t... |
72,316,439 | R subset dataframe based on timestamp (1 value per hour)<p>I'm new to R and currently struggling with the following problem.</p>
<p>My dataframe looks like this (note that there are more columns and rows):</p>
<p><a href="https://i.stack.imgur.com/68lHC.png" rel="nofollow noreferrer">transform_data_test</a></p>
<p>My g... | <p>Maybe <code>distinct</code> helps?</p>
<pre><code>library(lubridate)
library(dplyr)
transform_data_test %>%
mutate(Date = ymd_hms(date), dt = as_date(date), hr = hour(date)) %>%
group_by(burst) %>%
distinct(dt, hr, .keep_all = T)
</code></pre> | R subset dataframe based on timestamp (1 value per hour) | r|dataframe|filter|timestamp|subset | 1 | 49 | 1 | 72,316,763 | 72,316,763 | 1 | true | 2022-05-20T09:16:21.923Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
R subset dataframe based on timestamp (1 value per hour)<p>I'm new to R and currently struggling with the following problem.</p>
<p>My dataframe looks like t... |
72,318,607 | [cx_Freeze Q]: How to build MSI from non-standard build directory?<p>I'm trying to get my build-process to build from a non-standard build directory.
Project stored in <code>c:\users\user\onedrive\dev\project</code>. And these are my build-options in setup.py:</p>
<pre><code>build_options = {
'packages': ["pyf... | <p>Try to set the build directory in the <code>build</code> options as well and to use the <code>bdist_dir</code> option of the <code>bdist_msi</code> options:</p>
<pre class="lang-py prettyprint-override"><code>build_dir = f"c:/Temp/{DESCRIPTION.replace(' ','_')}-build" # or whatever you like
bdist_dir = bu... | [cx_Freeze Q]: How to build MSI from non-standard build directory? | python-3.x|cx-freeze | 1 | 49 | 1 | 72,320,171 | 72,320,171 | 1 | true | 2022-05-20T12:01:58.890Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
[cx_Freeze Q]: How to build MSI from non-standard build directory?<p>I'm trying to get my build-process to build from a non-standard build directory.
Project... |
72,319,616 | How can I simply request axios.all using loop with array of strings in React?<p>Please check my code first.</p>
<pre class="lang-js prettyprint-override"><code>const arr = ['liver', 'heart', 'brain']
const url1 = `www.hospital.com/diseaseName?liver`
const url2 = `www.hospital.com/diseaseName?heart`
const url3 = `www.h... | <p>You can do something like this.</p>
<pre><code>const URL = 'www.hospital.com/diseaseName';
const arr = ['liver', 'heart', 'brain'];
const requests = arr.map((a) => {
return axios.get(URL + '?' + a);
});
const fetchData = () => {
axios.all( requests )
.then(axios.spread((...response) => {
const res... | How can I simply request axios.all using loop with array of strings in React? | javascript|reactjs|loops|axios|array.prototype.map | 0 | 49 | 1 | 72,320,456 | 72,320,456 | 1 | true | 2022-05-20T13:19:12.897Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I simply request axios.all using loop with array of strings in React?<p>Please check my code first.</p>
<pre class="lang-js prettyprint-override"><co... |
72,320,382 | Perforce stream - can you exclude a directory but include specific files in that directory?<p>I have a Perforce stream where I am excluding certain binary folders, as in
exclude Binaries/Win64/...</p>
<p>But there are a couple of files in that directory that I do want in the stream. Is there a way to list exceptions to... | <p>You can always override a more general rule with a more specific one:</p>
<pre><code>share ...
exclude Binaries/Win64/...
share Binaries/Win64/foo
share Binaries/Win64/bar
</code></pre> | Perforce stream - can you exclude a directory but include specific files in that directory? | perforce|perforce-stream | 0 | 49 | 1 | 72,320,542 | 72,320,542 | 1 | true | 2022-05-20T14:14:23.810Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Perforce stream - can you exclude a directory but include specific files in that directory?<p>I have a Perforce stream where I am excluding certain binary fo... |
72,319,156 | How to implement BlocTest function?<p>I'm trying to implement blocTesting for my flutter app starting with authentication feature. Below are the Authentication and login related files required for this. I'd really appreciate if someone could show me on how I can implement blocTesting based on my code because I've been ... | <p>you have to change a lot of thinks.
First of all you need to add the repository/ies to your bloc constructor to inject the mocks.</p>
<pre><code>class AuthenticationBloc extends Bloc<AuthenticationEvent, AuthenticationState> {
late final AuthenticationRepository authenticationRepository;
final SettingsRepo... | How to implement BlocTest function? | flutter|flutter-bloc | 0 | 49 | 1 | 72,321,342 | 72,321,342 | 1 | true | 2022-05-20T12:45:22.110Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to implement BlocTest function?<p>I'm trying to implement blocTesting for my flutter app starting with authentication feature. Below are the Authenticati... |
72,324,919 | Swift UI - I can't figure out why this button won't print the action I set<p>Ive been trying to figure out why my button won't perform the action I set it to. Any help would be appreciated!</p>
<p>The code works by sending in an action as input. I used another stack overflow linked in the code to get it but I cant quit... | <p>You've set the button action only in the preview code.</p>
<p>But it's a print, and prints from previews don't get channeled to the Xcode's console.</p>
<p>Define the action in the actual UI of your app and run it, you should see the result of the <code>print</code> call in the console.</p> | Swift UI - I can't figure out why this button won't print the action I set | ios|swift|button|swiftui | 0 | 49 | 1 | 72,325,041 | 72,325,041 | 1 | true | 2022-05-20T21:24:36.087Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Swift UI - I can't figure out why this button won't print the action I set<p>Ive been trying to figure out why my button won't perform the action I set it to... |
72,325,575 | Setting a value to a parameter in the Constructor (C#)<p>Hello i was just wondering if this is valid</p>
<pre><code> public test( string name, double kpiScore, bool isPrivate = false)
{
this.name = name;
this.kpiScore = score;
this.isPrivate = isPrivate;
}
</code></p... | <p>There is a big difference between</p>
<pre><code>public test( string name, double score, bool isPrivate = false)
{
this.name = name;
this.kpiScore = score;
this.isPrivate = isPrivate;
}
</code></pre>
<p>and</p>
<pre><code>public test( string name, double score)
{
this.name = name;
this.kpiScore = scor... | Setting a value to a parameter in the Constructor (C#) | c# | -1 | 49 | 1 | 72,325,621 | 72,325,621 | 1 | true | 2022-05-20T23:23:30.017Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Setting a value to a parameter in the Constructor (C#)<p>Hello i was just wondering if this is valid</p>
<pre><code> public test( string name, double kpiS... |
72,326,489 | Put Margin in Div<p>I have a doubt . When I'm trying put margin in the second div. Why element all element include his father take this margin ? I just want the child div to have the margin and be separated from the parent container. Thanks everybody!</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-co... | <p>This is due to the margin overlap problem of static positioned elements. This could be fixed by adding <code>position: relative;</code> to the parent element and <code>position: absolute</code> to the child element.</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
... | Put Margin in Div | html|css | 2 | 49 | 2 | 72,326,596 | 72,326,596 | 1 | true | 2022-05-21T03:41:29.700Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Put Margin in Div<p>I have a doubt . When I'm trying put margin in the second div. Why element all element include his father take this margin ? I just want ... |
72,326,579 | How to fix 302 redirect Scrapy?<p>I am trying to scrape <a href="https://howlongtobeat.com" rel="nofollow noreferrer">https://howlongtobeat.com</a>, but I keep getting 302 redirects. I found that the website is using ajax from the network monitor.</p>
<p>My code:</p>
<pre><code>class HltbSpider(scrapy.Spider):
name... | <p>Try setting a refer to your request headers: <code>"referer": "https://howlongtobeat.com/"</code></p> | How to fix 302 redirect Scrapy? | python|scrapy | 1 | 49 | 1 | 72,326,695 | 72,326,695 | 1 | true | 2022-05-21T04:07:03.813Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to fix 302 redirect Scrapy?<p>I am trying to scrape <a href="https://howlongtobeat.com" rel="nofollow noreferrer">https://howlongtobeat.com</a>, but I ke... |
72,335,569 | Phaser 3: Make object movement on the slope<p>I am trying following with this post:</p>
<p><a href="https://cedarcantab.wixsite.com/website-1/post/phaser-coding-tips1-2-revisited-part-1-creating-a-game-like-tanks---worms" rel="nofollow noreferrer">https://cedarcantab.wixsite.com/website-1/post/phaser-coding-tips1-2-rev... | <p>As I remenmber for your earlier question, I assume you are using <code>arcade</code> physics, with that in mind, <strong>the answer is</strong>, it is <em>"impossible"</em> to move on slopes, <em><strong>except</strong></em> you want to do excessive calculation or so.</p>
<p>The best option is, if you swit... | Phaser 3: Make object movement on the slope | typescript|move|phaser-framework | 1 | 49 | 1 | 72,335,842 | 72,335,842 | 1 | true | 2022-05-22T07:21:20.753Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Phaser 3: Make object movement on the slope<p>I am trying following with this post:</p>
<p><a href="https://cedarcantab.wixsite.com/website-1/post/phaser-cod... |
72,342,429 | How to return file path instead of file contents in a bash function?<p>I have a bash function within a sub shell that downloads a file from an s3 bucket and stores it within a json file:</p>
<pre><code>download_file(){(
fileName="$(mktemp)__trigger.json"
aws_response="$(aws s3api get-object --version... | <p>Please refer to <a href="https://stackoverflow.com/questions/3236871/how-to-return-a-string-value-from-a-bash-function">How to return a string value from a Bash function</a> for other suggestions on how to tackle. The easiest way to handle this is just use <code>fileName</code> somewhere else in your script. It wi... | How to return file path instead of file contents in a bash function? | bash | 0 | 49 | 1 | 72,343,099 | 72,343,099 | 1 | true | 2022-05-23T01:29:38.453Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to return file path instead of file contents in a bash function?<p>I have a bash function within a sub shell that downloads a file from an s3 bucket and ... |
72,324,186 | Ignite Communication SPI support for IPv6<p>I have read in multiple locations about Ignite having potential issues with IPv6 and we have been seeing similar communication issues within our Kubernetes setup with Ignite, where the communications spi seems to randomly fail.</p>
<p>The Ignite <a href="https://ignite.apache... | <p>The problem is that in many networks, IPv6 is <em>enabled</em> but not <em>configured</em>, meaning that Ignite can see the address and tries to use it, but no data is routed.</p>
<p>If your IPv6 network is correctly configured and all the nodes can "see" each other, then it should work.</p> | Ignite Communication SPI support for IPv6 | java|ignite|ipv6|ipv4 | 1 | 49 | 1 | 72,346,210 | 72,346,210 | 1 | true | 2022-05-20T19:53:07.920Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Ignite Communication SPI support for IPv6<p>I have read in multiple locations about Ignite having potential issues with IPv6 and we have been seeing similar ... |
72,347,845 | SQL SUM of Maximum Values with Group By<p>I have a table having the following structure.</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th style="text-align: left;">Fruit</th>
<th style="text-align: left;">Color</th>
<th style="text-align: left;">Origin</th>
<th style="text-align: left;">Popu... | <pre><code>CREATE TABLE Fruit (
Fruit varchar(8) NOT NULL,
Color varchar(8) NOT NULL,
Origin varchar(2) NULL,
Popularity int NOT NULL,
Price int NOT NULL,
-- What is the PK?
)
INSERT INTO Fruit (Fruit, Color, Origin, Popularity, Price)
VALUES
('Apple', 'Red', 'IN', 100, 100),
... | SQL SUM of Maximum Values with Group By | sql|sql-server | 0 | 49 | 2 | 72,349,426 | 72,349,426 | 1 | true | 2022-05-23T11:33:25.853Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SQL SUM of Maximum Values with Group By<p>I have a table having the following structure.</p>
<div class="s-table-container">
<table class="s-table">
<thead>
... |
72,353,690 | React input field mirrors the data from previous input<p>I am trying to build a small recipe app. One feature of the app is saving user recipes, including <em>ingredient/qty/measurement</em>.</p>
<p>I need to wrap up the inputted ingredients into an array of objects to send to server but right now my <code>setIngredien... | <p><strong>Classical object reference issue.</strong></p>
<p>Use the below code it will work fine.</p>
<p>Previously, you pass the same <code>init</code> object for multiple rows,
which is why you got that result. Instead of doing that, when the user clicks 'add' button then add a new Object to your state which is deri... | React input field mirrors the data from previous input | reactjs | 1 | 49 | 2 | 72,354,362 | 72,354,362 | 1 | true | 2022-05-23T19:08:19.580Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
React input field mirrors the data from previous input<p>I am trying to build a small recipe app. One feature of the app is saving user recipes, including <e... |
72,350,875 | Postman - access URLs from collection in a scrip<p>I want to chain some requests in order to always have an up to date variable containing a JWT for access.</p>
<p>Now i am new to scripting in Postman, i figured this can be done in pre-request scripts. There i can access (global / environment) variables, but i wonder c... | <p>I don't <em>think</em> it's supported in Postman the way that you're thinking, it's a feature that's been an ask for a long time:</p>
<p><a href="https://github.com/postmanlabs/postman-app-support/issues/4193" rel="nofollow noreferrer">https://github.com/postmanlabs/postman-app-support/issues/4193</a></p>
<p>You'll ... | Postman - access URLs from collection in a scrip | postman|postman-pre-request-script | 0 | 49 | 1 | 72,354,473 | 72,354,473 | 1 | true | 2022-05-23T15:11:00.527Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Postman - access URLs from collection in a scrip<p>I want to chain some requests in order to always have an up to date variable containing a JWT for access.<... |
72,359,466 | I want to find the index/ or position of the word that my program found to be the longest in the string<p>This is my code, I am taking input from user, I want to find out the index/ or position of the longest word in the string the user is typing. I can't seem to figure this out!
Wherever I try to find help, I get inde... | <p>You can find the index of the word you've found like this:</p>
<pre><code>int indexOfWord = line.IndexOf(word, StringComparison.CurrentCulture);
</code></pre>
<p>So if the word is the first word, <code>indexOfWord</code> will be 0. If it's "William" in "Hello William", then it will be 6, etc.</p>... | I want to find the index/ or position of the word that my program found to be the longest in the string | c#|string | 0 | 49 | 4 | 72,359,633 | 72,359,633 | 1 | true | 2022-05-24T08:17:51.173Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I want to find the index/ or position of the word that my program found to be the longest in the string<p>This is my code, I am taking input from user, I wan... |
72,361,556 | Conditional rendering an input inside a map<p>I have a list of task which inside have another task(subTask).
I use a map to list all the tasks and have a button to add more subtasks to that task.
The input button is supposed to be invisible unless the button is pressed.
The problem is that I used the useState hook to c... | <p>Try using array</p>
<pre><code>const Task = () => {
const [openTask, setOpenTask] = useState([]);
const openTaskHandler = (id) => {
setOpenTask([id])
}
return task.map((item, index) => {
return (
<div>
<button onClick={() => openTaskHandler(item... | Conditional rendering an input inside a map | javascript|reactjs | 0 | 49 | 2 | 72,361,658 | 72,361,658 | 1 | true | 2022-05-24T10:48:27.540Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Conditional rendering an input inside a map<p>I have a list of task which inside have another task(subTask).
I use a map to list all the tasks and have a but... |
72,361,391 | Unable to send the data form Collection to Another View Controller<p>I am new to swift . I am trying to send the data from collection view to another view controller when user click the collection view cell. But the problem is when I click the cell it not going to next view controller with label and image properties in... | <p>in your <code>func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath)</code> add the following line</p>
<pre><code>detailVC.photoviewModel = viewModel
</code></pre> | Unable to send the data form Collection to Another View Controller | swift|uicollectionview|uicollectionviewcell|viewcontroller | 1 | 49 | 1 | 72,362,646 | 72,362,646 | 1 | true | 2022-05-24T10:35:25.297Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Unable to send the data form Collection to Another View Controller<p>I am new to swift . I am trying to send the data from collection view to another view co... |
72,365,807 | CASE expressions using values from different rows<p>I have below table</p>
<pre><code>WITH TMP AS (
SELECT 'XX' AS AGG, 50 AS VALUE, 0 AS MONTH
UNION ALL
SELECT 'XX' AS AGG, 150 AS VALUE, 1 AS MONTH
UNION ALL
SELECT 'XX' AS AGG, 300 AS VALUE, 2 AS MONTH
UNION ALL
SELECT 'YY' AS AGG, 25 AS VALUE, 0 AS MONTH
UNION ALL
SE... | <p>Pivot (conditionally aggregate) your data, and then return the value you need based on your expression:</p>
<pre class="lang-sql prettyprint-override"><code>WITH TMP AS
(SELECT 'XX' AS AGG,
50 AS VALUE,
0 AS MONTH
UNION ALL
SELECT 'XX' AS AGG,
150 AS VALUE,
... | CASE expressions using values from different rows | sql|sql-server|case | 0 | 49 | 1 | 72,365,897 | 72,365,897 | 1 | true | 2022-05-24T15:44:39.783Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
CASE expressions using values from different rows<p>I have below table</p>
<pre><code>WITH TMP AS (
SELECT 'XX' AS AGG, 50 AS VALUE, 0 AS MONTH
UNION ALL
SEL... |
72,359,784 | Adjust binwidth size for faceted dotplot with free y axis<p>I would like to adjust the <code>binwidth</code> of a faceted <code>geom_dotplot</code> while keeping the dot sizes the same.</p>
<p>Using the default <code>binwidth</code> (1/30 of the data range), I get the following plot:</p>
<pre><code>library(ggplot2)
df... | <p>One option to achieve your desired result would be via multiple <code>geom_dotplot</code>s which allows to set the binwidth for each facet separately. This however requires some manual work to compute the <code>binwidth</code>s so that the dots are the same size for each facet:</p>
<pre class="lang-r prettyprint-ove... | Adjust binwidth size for faceted dotplot with free y axis | ggplot2|facet-wrap | 0 | 49 | 1 | 72,366,580 | 72,366,580 | 1 | true | 2022-05-24T08:42:27.903Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Adjust binwidth size for faceted dotplot with free y axis<p>I would like to adjust the <code>binwidth</code> of a faceted <code>geom_dotplot</code> while kee... |
72,367,646 | Since when is users not a supported controller name?<p>I have been working with rails here for a little bit and this is the first time I have run into this issue I am getting this error in the top of the terminal '/users' is not a supported controller name. This can lead to potential routing problems. See <a href="http... | <p>The issue lies with the <code>/</code> present in the mapping for the paths. The mapping must be of the form <code>Controller#Action</code> as specified in the Ruby on Rails guides - <a href="https://guides.rubyonrails.org/routing.html#specifying-a-controller-to-use" rel="nofollow noreferrer">https://guides.rubyonra... | Since when is users not a supported controller name? | ruby-on-rails|routes|schema | 0 | 49 | 1 | 72,374,334 | 72,374,334 | 1 | true | 2022-05-24T18:15:52.770Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Since when is users not a supported controller name?<p>I have been working with rails here for a little bit and this is the first time I have run into this i... |
72,374,659 | How to catch unhashed paths using hashed location strategy?<p>I've had troubles solving this. We're using <strong>HashLocationStrategy</strong> in our application and for some cases we will not be changing this. But I have to catch certain paths containing a series of numbers like this:</p>
<pre><code>www.someurl.com/1... | <p>I think your best bet is to check the location and redirect before you bootstrap your angular application:</p>
<pre class="lang-js prettyprint-override"><code>... imports
//check if path is a number /1234
if (location.pathname.match(/^\/\d+$/)) {
//add a hash in front of the pathname
location.replace('/#' + loc... | How to catch unhashed paths using hashed location strategy? | angular|server|hash-location-strategy | 1 | 49 | 1 | 72,375,288 | 72,375,288 | 1 | true | 2022-05-25T08:58:12.990Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to catch unhashed paths using hashed location strategy?<p>I've had troubles solving this. We're using <strong>HashLocationStrategy</strong> in our applic... |
72,370,884 | gtk4/rust failed assertion when removing EditableLabel from ListView<p>In the following gtk4 code, I'm trying to remove an <code>EditableLabel</code> from display by deleting the cooresponding <code>StringObject</code> . This is supposed to happen after editing is complete as specified by the <code>connect_editing_no... | <p>Removing the item from its parent when it is still processing some events sometimes causes issues.</p>
<p>The easy fix is to do the removing in a deferred function. In C that would be done with <code>g_idle_add()</code> that is a hassle to use correctly. But in Rust it is super-easy:</p>
<pre><code>gtk::glib::source... | gtk4/rust failed assertion when removing EditableLabel from ListView | listview|rust|gtk|gtk4 | 0 | 49 | 1 | 72,379,214 | 72,379,214 | 1 | true | 2022-05-25T00:45:17.553Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
gtk4/rust failed assertion when removing EditableLabel from ListView<p>In the following gtk4 code, I'm trying to remove an <code>EditableLabel</code> from di... |
72,381,465 | x-labels rendered twice on matplotlib plot<p>I have a plot that uses 9 labels on the x-axis. However, because I have split up the plot into two axes, it seems that it requires 18 labels (hence the added list of empty strings) instead for some reason.</p>
<p>This seems to make the x-labels be rendered twice, making them... | <p>Because you are using <code>sharex=True</code>, the second time you plot the boxplot you will create another 9 ticks that are added to the axis (which is in common between <code>ax1</code> and <code>ax2</code>). The solution in your case is to turn off <code>sharex</code> (the axis will be aligned anyway) and set th... | x-labels rendered twice on matplotlib plot | python|matplotlib|plot|rendering | 0 | 49 | 1 | 72,382,754 | 72,382,754 | 1 | true | 2022-05-25T16:41:46.050Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
x-labels rendered twice on matplotlib plot<p>I have a plot that uses 9 labels on the x-axis. However, because I have split up the plot into two axes, it seem... |
72,387,815 | DiagrammeR How to change plot background<p>folowing code produces an simple diagram, how can I change background of whole graph to red, but keep background of nodes to B30668?</p>
<pre><code>grViz(
diagram =
"digraph flowchart {
# define node aesthetics
graph [fillcolor = red]
node [... | <p>You can use <code>bgcolor</code> to set a background in <code>DiagrammeR</code> like this:</p>
<pre><code>library(DiagrammeR)
grViz(
diagram =
"digraph flowchart {
# define node aesthetics
graph [fillcolor = red]
node [fontname = Helvetica, shape = rectangle, fontcolor = black, ar... | DiagrammeR How to change plot background | r | 0 | 49 | 1 | 72,388,523 | 72,388,523 | 1 | true | 2022-05-26T06:46:43.473Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
DiagrammeR How to change plot background<p>folowing code produces an simple diagram, how can I change background of whole graph to red, but keep background o... |
72,391,996 | C99 compound literal passed to function parameter and returned by the same function<p>I want to convert a uuid to hex string in C99 and pass it to a log function which uses printf format under the hood. I want to avoid the separate allocation of local variable because if the log is disabled then the preprocessor remove... | <p>The macro <code>UUID_64_TO_STRING</code> expands to a function call to <code>uuid_64_to_string</code> passing a pointer to a compound literal <code>(char[UID_64_STR_MAX_SIZE]){ 0 }</code> whose scope is the enclosing block in the <code>main()</code> function.</p>
<p>The function <code>uuid_64_to_string</code> return... | C99 compound literal passed to function parameter and returned by the same function | c|c99|compound-literals | 1 | 49 | 1 | 72,392,595 | 72,392,595 | 1 | true | 2022-05-26T12:41:46.543Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
C99 compound literal passed to function parameter and returned by the same function<p>I want to convert a uuid to hex string in C99 and pass it to a log func... |
72,392,254 | How to rightly join broken line from Opencv lines function<p>I am trying to replicate what I have on the <strong>example image</strong> using the opencv lines function. I have been able to draw the lines on the target image but the lines are broken,</p>
<p>I want to align the broken lines so that they can appears as th... | <p>Each set of points are unique to the corresponding images.</p>
<p>I have shown how to obtain the visualizations for the first image using <code>MatchedPoints1</code>:</p>
<pre><code>MatchedPoints1 = [(89.6214953271028,368.64953271028),
(39.3785046728971,384.200934579439),
(109.957943925234,532.53738317757),
(685.359... | How to rightly join broken line from Opencv lines function | python|opencv|image-processing | 0 | 49 | 1 | 72,392,681 | 72,392,681 | 1 | true | 2022-05-26T13:01:53.383Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to rightly join broken line from Opencv lines function<p>I am trying to replicate what I have on the <strong>example image</strong> using the opencv line... |
72,792,237 | How to add form validation in svelte<p>I am a svelte and js newbie. I'm trying to add validation to my forms which I've been using to send the data to firebase but I'm getting a very hard time to do so. I am taking a name and a email. I don't want to mask the email or anything special just if there's empty values going... | <p>Actually its quite easy you can do it using plain js logic, no need to think about its svelte based or anything else.
Make a function in your script</p>
<pre><code>function validation_check(userName, userMail) {
if (userName === "") {
return false;
} else if (userMail === "") {
... | How to add form validation in svelte | javascript | 0 | 49 | 2 | 72,792,885 | 72,792,885 | 1 | true | 2022-06-28T19:36:38.210Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to add form validation in svelte<p>I am a svelte and js newbie. I'm trying to add validation to my forms which I've been using to send the data to fireba... |
72,798,603 | Java - Check if any of the words is contained in the text<p>I was trying to implement a method which checks whether a list of words is contained in a text. The problem is I cannot use the contains method because I just want the word to be detected (if the word is 'car' then with the string 'cars' the method should retu... | <pre><code>import java.util.regex.Pattern;
public class Main {
public static void main(String[] args) {
String[] goodWords = { "good", "word" };
String goodWordsUnionPatternStr = "(" + String.join("|", goodWords) + ")";
Pattern strContainsGo... | Java - Check if any of the words is contained in the text | java|string-matching | 0 | 49 | 2 | 72,799,175 | 72,799,175 | 1 | true | 2022-06-29T09:00:17.013Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Java - Check if any of the words is contained in the text<p>I was trying to implement a method which checks whether a list of words is contained in a text. T... |
72,800,656 | Interrupt handler won't work on two similar machines<p>I register an interrupt handler for my keyboard via a kernel module, the code works well on my virtualbox Linux guest <code>Light Ubuntu 20.04 5.13.0-51-generic</code>, the interrupt handler work as intended. However, when the same code is being run on my host oper... | <p>Note the "PC" is the original IBM PC from 1987, and its successors. Copies of the original PC copied the hardware, of course, so that the software would still work. And later editions also had to copy the hardware, so that the software would still work.</p>
<p>In these computers, the keyboard port was conn... | Interrupt handler won't work on two similar machines | c|linux-kernel|interrupt | 0 | 49 | 1 | 72,801,054 | 72,801,054 | 1 | true | 2022-06-29T11:29:33.890Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Interrupt handler won't work on two similar machines<p>I register an interrupt handler for my keyboard via a kernel module, the code works well on my virtual... |
72,804,707 | LINQ Group By Year to Form a Tree View<p>I am trying to create a tree view that would essentially break down like so:</p>
<pre><code>- Year
- Month
- Related Item
</code></pre>
<p>So we might have the Year 2022, that has several related items within the several months.</p>
<p>I have created the following model:</... | <p>If I understood your question correctly, then you need to flatten the inner list and then group by months again.</p>
<pre><code>var groups = TheResponse.Details
.GroupBy(d => Int32.Parse(d.NodeYear))
.Select(d => new
{
... | LINQ Group By Year to Form a Tree View | c#|linq|treeview | 0 | 49 | 1 | 72,805,267 | 72,805,267 | 1 | true | 2022-06-29T16:14:32.427Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
LINQ Group By Year to Form a Tree View<p>I am trying to create a tree view that would essentially break down like so:</p>
<pre><code>- Year
- Month
- R... |
72,799,840 | Is there an algorithm that clips and redistributes values in an array subject to constraints?<p>I have an array <code>x</code> of real values <code>x_i</code>. Some of these values are above a threshold constant <code>c</code> and so the values above <code>c</code> need to be clipped, and the clipped amount redistribut... | <p>So, a high-level model can look like:</p>
<pre><code>min sum(|x[i]-x0[i]|)
x[i] <= c
sum(x[i]) = 0
sum(|x(i)|) <= g
</code></pre>
<p>Some code to test this out:</p>
<pre><code>import cvxpy as cv
import numpy as np
n = 20
c = 7 # x <= c
g = 80 # sum(abs(x)) <= g
x0 = np.random.default_rng(123).uniform(... | Is there an algorithm that clips and redistributes values in an array subject to constraints? | mathematical-optimization|greedy | 0 | 49 | 1 | 72,806,204 | 72,806,204 | 1 | true | 2022-06-29T10:29:09.980Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is there an algorithm that clips and redistributes values in an array subject to constraints?<p>I have an array <code>x</code> of real values <code>x_i</code... |
72,306,721 | Java Observable setChanged() method issues<p>We have an application that works fine most of the time, but every now and then we get a bug. We are using the java observable library. During debugging, I have noticed the issue seems to lie with the observable method <code>setChanged()</code>. When it is being executed, it... | <p>As Erickson suggested, creating a thread dump led to the realisation that a thread deadlock was occuring.</p> | Java Observable setChanged() method issues | java|multithreading|observable | 0 | 49 | 1 | 72,807,618 | 72,807,618 | 1 | true | 2022-05-19T14:49:41.010Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Java Observable setChanged() method issues<p>We have an application that works fine most of the time, but every now and then we get a bug. We are using the j... |
72,809,878 | Pandas filter data to multiple excel files<p>I have dataframe like as below</p>
<pre><code>import numpy as np
import pandas as pd
from numpy.random import default_rng
rng = default_rng(100)
cdf = pd.DataFrame({'Id':[1,2,3,4,5],
'customer': rng.choice(list('ACD'),size=(5)),
'region'... | <p>Your code works fine but you can try 2 other solutions: change the engine using <code>engine='openpyxl'</code> or use <code>cdf.to_excel</code>:</p>
<pre><code>for cust, v in cdf.groupby(['customer']):
v.to_excel(f"{cust}.xlsx", sheet_name=f"{cust}")
</code></pre> | Pandas filter data to multiple excel files | python|pandas|dataframe|pandas-groupby|xlsxwriter | 1 | 49 | 1 | 72,810,222 | 72,810,222 | 1 | true | 2022-06-30T03:03:33.247Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pandas filter data to multiple excel files<p>I have dataframe like as below</p>
<pre><code>import numpy as np
import pandas as pd
from numpy.random import de... |
72,814,968 | Tensorflow data.Dataset.map and memory storage<p>I have a dataset of images that is too large to store on memory. What I plan to do is loading pairs of the paths to the images and corresponding labels as my dataset, then use a generator function during training to convert only the paths in my batch to images before fee... | <p>The key thing to understand here is that <code>tf.data.Dataset</code> objects are generally "lazy" in that elements are only processed as needed (in a batched Dataset, elements == batches). When iterating over a dataset, this usually means that only the next requested element is prepared and then returned.... | Tensorflow data.Dataset.map and memory storage | tensorflow | -1 | 49 | 1 | 72,815,990 | 72,815,990 | 1 | true | 2022-06-30T11:26:30.760Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Tensorflow data.Dataset.map and memory storage<p>I have a dataset of images that is too large to store on memory. What I plan to do is loading pairs of the p... |
72,809,382 | SQL select with three tables<p>Hi guys I'm new with databases and I'm trying to make a query where I join 3 tables. I could make it and I want to clean up the result. I want to know how can I delete the column "pin" from users table and maybe some "ids" columns.</p>
<pre><code>Select * from "wi... | <p>You need to specify which columns you really need in your output. At the moment you are using
<br><code>SELECT *</code> which outputs all columns of all joined tables.</p>
<p>Here is what it should look like:</p>
<pre><code>SELECT holiday, products.description, users.pin FROM "wish-list"
JOIN products ON &... | SQL select with three tables | sql|postgresql | 0 | 49 | 1 | 72,817,480 | 72,817,480 | 1 | true | 2022-06-30T01:25:24.897Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SQL select with three tables<p>Hi guys I'm new with databases and I'm trying to make a query where I join 3 tables. I could make it and I want to clean up th... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.