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,390,067 | Strange boolean value in Python Exception<p>Recently I came across a strange part of code in one of the repositories I use for work. In this part, an exception is raised with a boolean value:</p>
<pre><code>if current_run_row_count == 0:
raise InconsistentData(
"0 rows found", False,
... | <p>It is probably second option - "this False just does nothing and appears to be a part of the error message". I will accept <a href="https://stackoverflow.com/users/476/deceze">@deceze</a> answer:</p>
<blockquote>
<p>It means whatever the author wants it to mean. It has no influence on the exception as such... | Strange boolean value in Python Exception | python|exception | 0 | 53 | 1 | 72,432,000 | 72,432,000 | 0 | true | 2022-05-26T10:03:48.290Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Strange boolean value in Python Exception<p>Recently I came across a strange part of code in one of the repositories I use for work. In this part, an excepti... |
72,273,317 | How to compare two rows of a table<p>I have a sample table with input as shown. In actual it has large amounts of data. The input and output as shown:</p>
<pre><code> I/P- O/P-
|ID | Role | Status | |ID | Role | Status | Final |
|:-:|:----:|:------... | <p>You can do an exists check. And tis coud be written in different ways depending on your backend which you didn't specify:</p>
<pre><code>select Id, Role, Status,
case when exists (select * from myTable t2
where t1.Id = t2.Id
and t1.Role = t2.Role
and t2... | How to compare two rows of a table | sql | 0 | 53 | 1 | 72,273,471 | 72,273,471 | 0 | true | 2022-05-17T11:33:27.623Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to compare two rows of a table<p>I have a sample table with input as shown. In actual it has large amounts of data. The input and output as shown:</p>
<p... |
72,311,631 | Difference between Rendering by import and normal in react js<p>I have developed my own website and have errors using react hook.
The errors are like below.</p>
<blockquote>
<p>Uncaught Error: Invalid hook call. Hooks can only be called inside of
the body of a function component. This could happen for one of the
follow... | <p>I fixed the error. The problem is not because of code but because of <code>node_modules</code>. I remove <code>package-lock.json</code> and <code>node_modules</code> and reinstall it. And it works now.</p> | Difference between Rendering by import and normal in react js | reactjs | 0 | 53 | 2 | 72,317,601 | 72,317,601 | 0 | true | 2022-05-19T22:17:07.063Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Difference between Rendering by import and normal in react js<p>I have developed my own website and have errors using react hook.
The errors are like below.<... |
72,379,825 | Typescript error TS2420 with class implementing its interface template parameter<p>The following Typescript:</p>
<pre><code>interface IBase
{
f():void;
}
class CBase<T extends IBase> implements T
{
f():void
{
//logic here
}
}
</code></pre>
<p>is giving me an error:</p>
<blockquote>
<p>Cla... | <p>I got away with the following:</p>
<pre><code>interface IBase
{
f():void;
}
class CBase implements IBase
{
f():void
{
//Logic here
}
}
</code></pre>
<p>And then the specializations:</p>
<pre><code>interface IFoo extends IBase{}
class CFoo extends CBase implements IFoo{}
</code></pre>
<p>So w... | Typescript error TS2420 with class implementing its interface template parameter | typescript | 0 | 53 | 1 | 72,465,468 | 72,465,468 | 0 | true | 2022-05-25T14:47:58.323Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Typescript error TS2420 with class implementing its interface template parameter<p>The following Typescript:</p>
<pre><code>interface IBase
{
f():void;
}... |
72,373,715 | How can I bind a List<T> to relevant text boxes on a form?<p>I have the following classes:</p>
<pre><code>public class TemplateTestLine
{
public int Id { get; set; }
public string Description { get; set; }
public string Hyperlink { get; set; }
public int NumOfReadings { get; set; }
... | <p>To close this question, @Jimi's solution in the comments worked great:</p>
<p><em>"It's simple enough to bind a Property of one of the objects in the list to the Text Property of the related TextBox"</em></p>
<p><code>[TextBox].DataBindings.Add("Text", [TemplateTestLine Instance].Readings.Single(... | How can I bind a List<T> to relevant text boxes on a form? | c#|winforms|user-interface|data-binding|binding | 0 | 53 | 1 | 72,460,035 | 72,460,035 | 0 | true | 2022-05-25T07:44:02.907Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I bind a List<T> to relevant text boxes on a form?<p>I have the following classes:</p>
<pre><code>public class TemplateTestLine
{
public ... |
72,283,504 | Display a Circle with Dynamic Children<p>I'm creating a dynamic array display using a circle as a layout. Each element of the array will take the same portion of space inside the circle. If there are 3 elements in the array, 100% of the circle needs to be filled up in 3 equal spaces. I have made it work up to the point... | <p>I was able to solve my issue by applying the right combination of skewY and rotation values based on the length of the array. Basically, skewY values drastically change depending on the number of elements to be displayed. Below is the table I came up with:</p>
<div class="s-table-container">
<table class="s-table">
... | Display a Circle with Dynamic Children | javascript|html|css|arrays|reactjs | 0 | 53 | 1 | 72,298,994 | 72,298,994 | 0 | true | 2022-05-18T05:13:50.990Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Display a Circle with Dynamic Children<p>I'm creating a dynamic array display using a circle as a layout. Each element of the array will take the same portio... |
72,295,125 | Can i do a calculation in two text boxes and get the result in an other one<p>i am new to programming and i am programming my first project and i want to know can i do a calculation in two text boxes and get the result to another one
And thank you guys</p>
<p>Here is my code:</p>
<pre><code>from Tkinter import *
import... | <p>As newbie tutorial. Try this;</p>
<pre><code>from tkinter import *
root = Tk()
root.title("Sum Two Numbers With GUI Using Python Source Code")
width = 400
height = 280
screen_width = root.winfo_screenwidth()
screen_height = root.winfo_screenheight()
x = (screen_width/2) - (width/2)
y = (screen_height/2) -... | Can i do a calculation in two text boxes and get the result in an other one | python|tkinter|calculator | 0 | 53 | 1 | 72,295,365 | 72,295,365 | 0 | true | 2022-05-18T19:44:28.990Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Can i do a calculation in two text boxes and get the result in an other one<p>i am new to programming and i am programming my first project and i want to kno... |
72,328,900 | C for loop suddenly stops<p>I'm trying to read distance between two nodes in a Graph and store it in an array but the loop doesn't work as expected. It suddenly stops.</p>
<pre class="lang-none prettyprint-override"><code>Output:
Edge Number: 4
Enter distance between two nodes, Example: A B 10
A C 3
A B 2
C B 2
...Pr... | <p>Just rewrite this call of <code>scanf</code></p>
<pre><code>scanf("%c %c %d", &node1, &node2, &temp);
^^^
</code></pre>
<p>like</p>
<pre><code>scanf( " %c %c %d", &node1, &node2, &temp);
^^^
</code></pre>
<p>The leading space in the format string allows to ski... | C for loop suddenly stops | arrays|c|loops|char|scanf | 0 | 53 | 1 | 72,328,946 | 72,328,946 | 0 | true | 2022-05-21T10:55:19.153Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
C for loop suddenly stops<p>I'm trying to read distance between two nodes in a Graph and store it in an array but the loop doesn't work as expected. It sudde... |
72,362,755 | Django celery .delay() in requests get stucked<p>I have a project running on 3 different environments, on 2 environments it works on production for some reason stopped working (was working before).</p>
<p>The code is pretty simple I have a view which runs a task in delay and should return immediately some message to th... | <p>I actually found out by chance that there is a bug in the connection to Redis in the celery library or somewhere around there and you actually do not get back any error when credentials are wrong while accessing Redis. Someone on the server deleted the credential env variables so the App was not able to connect to R... | Django celery .delay() in requests get stucked | python|django|redis|celery | 0 | 53 | 1 | 72,434,235 | 72,434,235 | 0 | true | 2022-05-24T12:17:50.997Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Django celery .delay() in requests get stucked<p>I have a project running on 3 different environments, on 2 environments it works on production for some reas... |
72,275,778 | Python module functions to use variables from global env<p>I'm relatively new to Python and am trying to both do something and learn more about how Python works.</p>
<p>I am coming up empty with google, in part I think because I don't know how to correctly describe what I'm trying to do.</p>
<p>My goal is to load a fun... | <p>In Python, using global variables is not really recommended and mostly considered as bad practice, unless you absolutely have to use them.</p>
<p>In your case, just implement parameter passing. Your first example works, because it's all defined in a single file, but it's still not recommended to do it without param... | Python module functions to use variables from global env | python|module|arguments | 0 | 53 | 2 | 72,276,078 | 72,276,078 | 0 | true | 2022-05-17T14:24:12.167Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python module functions to use variables from global env<p>I'm relatively new to Python and am trying to both do something and learn more about how Python wo... |
72,317,935 | While Deleting Repeated Headers<p>Using the below code to delete the repeated headers from combined into one excel but getting error.</p>
<pre><code> Application.Goto DestSh.Cells(1)
' AutoFit the column width in the summary sheet.
DestSh.Columns.AutoFit
With Application
.ScreenUpdating = True
... | <p>Please add "on error resume next" before using SpecialCells method and after using use "on error GoTo 0"</p> | While Deleting Repeated Headers | excel|vba | 0 | 53 | 2 | 72,318,176 | 72,318,176 | 0 | true | 2022-05-20T11:07:42.410Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
While Deleting Repeated Headers<p>Using the below code to delete the repeated headers from combined into one excel but getting error.</p>
<pre><code> Applic... |
72,288,968 | Transforming my File Type Extension from my backend in Angular?<p>So I have a project where I have to build a CMS system in which users can upload their files and can see the details with it. However, the datat output I get from my database is quite complicated for regular users i.e.: image/png, application/pdf etc. Fr... | <p>I highly doubt that there is lack of information on pipes. But basically pipe is a function like any other javascript function except it's executed each time binded propeties change (assuming it is a pure pipe - which it should be).</p>
<p>For a simple demo, let's assume <code>item.type</code> is the content type <c... | Transforming my File Type Extension from my backend in Angular? | php|angular|laravel | 0 | 53 | 1 | 72,289,188 | 72,289,188 | 0 | true | 2022-05-18T12:12:42.113Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Transforming my File Type Extension from my backend in Angular?<p>So I have a project where I have to build a CMS system in which users can upload their file... |
72,389,422 | how to Convert “unknown format” strings to time in Python<p>i'm trying to change the column of "Start time" format to Time format only but when i used the below code i found the below error message "Unknown string format: Annual"</p>
<p><a href="https://i.stack.imgur.com/KcEcx.jpg" rel="nofollow nor... | <p>You have to filter rows and get only rows with date - and later use only these rows</p>
<p>like</p>
<pre><code>mask = (FP_sheet['Date'] != "Off day")
FP_sheet['Date'][mask] = pd.to_datetime(FP_sheet['Date'][mask]).dt.date
</code></pre>
<p>For more filters you can use <code>&</code> as <code>"and&... | how to Convert “unknown format” strings to time in Python | python|python-3.x|pandas|dataframe | -2 | 53 | 1 | 72,391,521 | 72,391,521 | 0 | true | 2022-05-26T09:11:58.773Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to Convert “unknown format” strings to time in Python<p>i'm trying to change the column of "Start time" format to Time format only but when i u... |
72,393,573 | Optimised EmEditor macro to populate column based on another column for a large file<p>I’ve got a really large file, circa 10m rows, in which I’m trying to populate a column based on conditions on another column via a jsee macro. While it is quite quick for small files, it does take some time for the large file.</p>
<p... | <p>I wrote a <strong>JavaScript for EmEditor</strong> macro for you. You might need to set the correct numbers in the first 2 lines for <em>iColReference</em> and <em>iColGroupSize</em>.</p>
<pre><code>iColReference = 1; // the column index of "Reference"
iColGroupSize = 2; // the column index of "Gr... | Optimised EmEditor macro to populate column based on another column for a large file | performance|emeditor | 0 | 53 | 1 | 72,393,859 | 72,393,859 | 0 | true | 2022-05-26T14:37:35.773Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Optimised EmEditor macro to populate column based on another column for a large file<p>I’ve got a really large file, circa 10m rows, in which I’m trying to p... |
72,401,480 | An error while changing text with javascript<p>I'm using google recaptcha with my django project. But it is not English. So I want to change its writing with javascript.</p>
<p><strong>html</strong></p>
<pre><code>{% extends 'base.html' %}
{% block content %}
<div class="form-body">
<div class=&q... | <p>The problem is, that no element can be found by the following statement.</p>
<pre><code>document.querySelector('recaptcha-anchor-label')
</code></pre>
<p>In case <code>recaptcha-anchor-label</code> is an <code>id</code>, you should use a <code>#</code> in front of it.</p>
<pre><code>document.querySelector('#recaptch... | An error while changing text with javascript | javascript|jquery|django|recaptcha | 0 | 53 | 3 | 72,401,531 | 72,401,531 | 0 | true | 2022-05-27T06:47:07.443Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
An error while changing text with javascript<p>I'm using google recaptcha with my django project. But it is not English. So I want to change its writing with... |
72,383,430 | How to use Provider Package for Map<String, ModelClass><p>when i use 'Late' with Map<String, CartModel> _items;
the lateinitialization error removes.
but if the list is empty then the lateinitialization error appear.</p>
<pre><code> import 'package:flutter/material.dart';
import 'package:shop1/model/cart_item... | <p>Instead of late initialization, you can initialize it in its declaration:</p>
<pre class="lang-dart prettyprint-override"><code>class ShopProvider extends ChangeNotifier {
Map<String, CartItem> _items = [];
// omitted
}
</code></pre>
<p>You can also initialize it in the constructor, either via a passed ar... | How to use Provider Package for Map<String, ModelClass> | flutter|dart|flutter-dependencies | 0 | 53 | 1 | 72,383,868 | 72,383,868 | 0 | true | 2022-05-25T19:51:59.870Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to use Provider Package for Map<String, ModelClass><p>when i use 'Late' with Map<String, CartModel> _items;
the lateinitialization error removes.
b... |
72,301,626 | Mocking a class instance affects the static instance initialization<p>I run into an issue that, if I mock a class instance, then a static instance in the same class is not initialized correctly.</p>
<p>I have a real example of third party code with relevant to the question lines:</p>
<pre class="lang-java prettyprint-o... | <p>It seems that <code>Schema.class</code> loads the class <code>Schema</code> but doesn't initialize it. So when <code>Mockito.mock</code> is called to create the proxy object, the class is initialized, but constructing <code>Schema</code> for static final <code>instance</code> is not done properly for some reason. I ... | Mocking a class instance affects the static instance initialization | java|unit-testing|mockito | 0 | 53 | 1 | 72,302,922 | 72,302,922 | 0 | true | 2022-05-19T09:03:44.610Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Mocking a class instance affects the static instance initialization<p>I run into an issue that, if I mock a class instance, then a static instance in the sam... |
72,309,171 | When I use outlet in accordion, axios request in useEffect keeps executing<p>Because my outlet is placed in the accordion body of react-bootstrap,
So when I enter the sub-route, the useEffect content of the sub-route is always executed. until the body of the accordion is fully opened,Wondering if there is a way to fix ... | <h1>Issue</h1>
<p>Trying to render multiple <code>Outlet</code> components in the mapped accordion bodies is a problem. <code>ReposList</code> as the parent route's component should only render a single <code>Outlet</code> for nested children routes. There's only the single <code>"/user/:username/repos/:repo"... | When I use outlet in accordion, axios request in useEffect keeps executing | reactjs|axios|react-router|react-bootstrap | 1 | 53 | 1 | 72,309,311 | 72,309,311 | 0 | true | 2022-05-19T18:00:16.173Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
When I use outlet in accordion, axios request in useEffect keeps executing<p>Because my outlet is placed in the accordion body of react-bootstrap,
So when I ... |
72,379,919 | Why doesn't my Cloud Function trigger receive the ID on create?<p>I am following the code in this wiki page: <a href="https://firebase.google.com/docs/functions/firestore-events" rel="nofollow noreferrer">https://firebase.google.com/docs/functions/firestore-events</a> and have deployed the following code to a cloud fun... | <p>I managed to find my id by logging the entire context :) It is actually in the params object but as context.params.<strong>pushId</strong></p> | Why doesn't my Cloud Function trigger receive the ID on create? | javascript|firebase|google-cloud-platform|google-cloud-firestore|google-cloud-functions | 0 | 53 | 1 | 72,393,255 | 72,393,255 | 0 | true | 2022-05-25T14:54:27.363Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why doesn't my Cloud Function trigger receive the ID on create?<p>I am following the code in this wiki page: <a href="https://firebase.google.com/docs/functi... |
72,284,019 | How to paragraph of text in label Kivy and Python3?<p>I need to make a presentation with Python3. I know the basics of Kivy and I am pretty good with Python. I just wanted know how to put lots of text in one label, for example: a whole paragraph of text. I have tried it by just putting the text in the label But this ha... | <p>text_size should work</p>
<p>.kv</p>
<pre><code>Box:
<Box@BoxLayout>:
Label:
text: "Tāne Mahuta is one of the six kids that were born to Papatūānuku and Ranginui. Tāne is an vital character in the Māori culture because his job is to maintain the greenery and life on the earth. ... | How to paragraph of text in label Kivy and Python3? | python-3.x|text|kivy | 0 | 53 | 2 | 72,284,227 | 72,284,227 | 0 | true | 2022-05-18T06:15:25.397Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to paragraph of text in label Kivy and Python3?<p>I need to make a presentation with Python3. I know the basics of Kivy and I am pretty good with Python.... |
72,275,319 | Content spinning - Python<p>I have created an input that allows me to make a list of sentences (list) and an input that includes a dictionary with multiple values (dict).
The elements of the list and the dictionary vary according to the elements entered by the user</p>
<p>I try to get the script to produce a list of se... | <p>You don't need the <code>dict</code>, you can just use <a href="https://docs.python.org/3/library/re.html#re.sub" rel="nofollow noreferrer"><code>re.sub</code></a> with a callback function to look for those <code>{...}</code> regions and replace those with one of the alternatives:</p>
<pre><code>>>> text = ... | Content spinning - Python | python|python-3.x|list|dictionary | 0 | 53 | 1 | 72,275,454 | 72,275,454 | 0 | true | 2022-05-17T13:55:12.107Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Content spinning - Python<p>I have created an input that allows me to make a list of sentences (list) and an input that includes a dictionary with multiple v... |
72,396,629 | grep/sed/awk parsing text file to print multiple rows after a pattern matches and convert to one row<p>I am wanting to use grep/awk/sed to parse a text file containing various descriptions of several genes. I would like each row to represent a gene description.</p>
<p>Right now I am wanting to extract the Automated and... | <p>A few small changes to OP's current <code>awk</code> code:</p>
<pre><code>awk '
/Concise description:/ { flag=1; pfx="" }
/Automated description/ { flag=0; print "" } # close out current printf line out output
flag { printf "%s%s",pfx,$0; pfx=" &q... | grep/sed/awk parsing text file to print multiple rows after a pattern matches and convert to one row | linux|bash|awk|sed|grep | 0 | 53 | 2 | 72,396,786 | 72,396,786 | 0 | true | 2022-05-26T18:48:15.683Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
grep/sed/awk parsing text file to print multiple rows after a pattern matches and convert to one row<p>I am wanting to use grep/awk/sed to parse a text file ... |
72,374,086 | D3 append data to div when region on map is clicked<p>I'm quite new to D3, so please bear with my limited understanding. However, I'm glad for any feedback.</p>
<p>My goal is to draw a map based on a json file, and when a user clicks on a particular region, information over that region stored in the json is carried ove... | <p>Your <code>.text</code> functions access the wrong variable. You need to read the data from <code>i</code>, not <code>d</code>:</p>
<pre><code>.on("click", function(d,i) {
d3.select("#infobox")
.select("#gname")
.text(function (d) { return "Ausgewählte Gemeinde: " ... | D3 append data to div when region on map is clicked | javascript|d3.js | 0 | 53 | 1 | 72,376,535 | 72,376,535 | 0 | true | 2022-05-25T08:12:27.220Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
D3 append data to div when region on map is clicked<p>I'm quite new to D3, so please bear with my limited understanding. However, I'm glad for any feedback.<... |
72,259,338 | Change color after revealing text in javascript<p>I want to reach some specific results with my code but I can't find what I am doing wrong. It would be very helpful if you could correct me.</p>
<p>So I have made these rows that you can click and open. The orange rows open and the title becomes blue. I want the opposit... | <p>First you defined style like this:</p>
<pre><code>.active, .accordion:hover {
background-color: #ffffff;
color: #F7A600;
}
</code></pre>
<p>A little later you wrote this:</p>
<pre><code>.active, .accordion2:hover {
background-color: #ffffff;
color: #009ACB;
}
</code></pre>
<p>Basically you are styling the <c... | Change color after revealing text in javascript | javascript|html | 0 | 53 | 2 | 72,259,987 | 72,259,987 | 0 | true | 2022-05-16T12:38:27.150Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Change color after revealing text in javascript<p>I want to reach some specific results with my code but I can't find what I am doing wrong. It would be very... |
72,291,478 | Using Python to copy contents of multiple files and paste in a main file<p>I'll start by mentioning that I've no knowledge in Python but read online that it could help me with my situation.</p>
<p>I'd like to do a few things using (I believe?) a Python script.
I have a bunch of .yml files that I want to transfer the co... | <p>I'm just starting out in Python too so this was a great opportunity to see if my newly learned skills work!</p>
<p>I think you want to use the os.walk function to go through all of the files and folders in the directory.</p>
<p>This code should work - it assumes your files are stored in a folder called "Folder&... | Using Python to copy contents of multiple files and paste in a main file | python-3.x|list | 0 | 53 | 1 | 72,292,440 | 72,292,440 | 0 | true | 2022-05-18T14:54:37.190Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Using Python to copy contents of multiple files and paste in a main file<p>I'll start by mentioning that I've no knowledge in Python but read online that it ... |
72,238,018 | state is not getting updated for a new user in react native<p>My app has a test sheet, if a user passes the test he is shown a passing screen and then the state is saved using asyncstorage. But the problem here is, let's say i have user A and user B and user A is currently logged in, he passed the test and the app show... | <p>I think this is the problem:</p>
<pre class="lang-js prettyprint-override"><code>const key = auth().currentUser.uid + "hasPassed"
export const hasPassed = async () => {
return AsyncStorage.getItem(key).then(result => result != null ? JSON.parse(result) : undefined).catch(e => console.log(e)... | state is not getting updated for a new user in react native | javascript|react-native|use-effect|use-state|asyncstorage | 0 | 53 | 2 | 72,239,134 | 72,239,134 | 1 | true | 2022-05-14T06:59:27.670Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
state is not getting updated for a new user in react native<p>My app has a test sheet, if a user passes the test he is shown a passing screen and then the st... |
72,240,915 | How do I calculate the percentage (counted non-numerical values) in Pandas?<p>Basically, I have the columns <code>date</code> and <code>intensity</code> which I have grouped by date this way:</p>
<p><code>intensity = dataframe_scraped.groupby(["date","intensity"]).count()['sentiment']</code>
which y... | <p>I think this should work:</p>
<pre><code>df.value_counts(subset=["date", "intensity"]) / df.value_counts(subset=["date"])
</code></pre>
<p>This counts the number of each value in the group, divided by the total number in the date group (so this would be negative's 33 / sum of 2021-01, f... | How do I calculate the percentage (counted non-numerical values) in Pandas? | python|pandas | 0 | 53 | 1 | 72,241,089 | 72,241,089 | 1 | true | 2022-05-14T13:58:48.770Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I calculate the percentage (counted non-numerical values) in Pandas?<p>Basically, I have the columns <code>date</code> and <code>intensity</code> whic... |
72,241,232 | Variation: Find the object with the highest value in Javascript<p>In <a href="https://stackoverflow.com/questions/4020796/finding-the-max-value-of-an-attribute-in-an-array-of-objects">Finding the max value of an attribute in an array of objects</a> there are many (great) answers that report the highest value in an arra... | <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>const obj={Intent:{FileComplaint:0,UndermineGovernment:0.45,UnsubscribeMe:.995,TrackRefund:.001,AskSwitchAccount:0}};
// Get the en... | Variation: Find the object with the highest value in Javascript | javascript|arrays|json|max | -2 | 53 | 1 | 72,241,401 | 72,241,401 | 1 | true | 2022-05-14T14:40:26.710Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Variation: Find the object with the highest value in Javascript<p>In <a href="https://stackoverflow.com/questions/4020796/finding-the-max-value-of-an-attribu... |
72,242,382 | (Anrdoid) How to prepopulate the Room database<p><a href="https://i.stack.imgur.com/a8Bfx.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/a8Bfx.jpg" alt="enter image description here" /></a></p>
<p>I made a screen like the current image.</p>
<p>Data such as <code>A, B, C..</code> are currently being ... | <blockquote>
<p>In this case, I do not know what In-memory means, so I am not using it.</p>
</blockquote>
<p>In-Memory will be a database that is not persistent, that is the database is created using in memory rather than as a file, at some time it will be deleted. You probably do not want an in-memory database.</p>
<... | (Anrdoid) How to prepopulate the Room database | android|android-room | 1 | 53 | 1 | 72,243,922 | 72,243,922 | 1 | true | 2022-05-14T17:04:48.577Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
(Anrdoid) How to prepopulate the Room database<p><a href="https://i.stack.imgur.com/a8Bfx.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/... |
72,247,580 | useEffect keep rendering workaround<p>I have a small problem. I want to call 4 APIs when the component start rendering so I used use effect for that so I loop my array which has 4 items and at each item I call an API, and each API save the result in selector called <code>filtersCount</code>. The problem is when filters... | <p>you can use a <code>Ref</code> for this :</p>
<pre><code>const firstRender =useRef(false)
useEffect(() => {
if(firstRender.current == false){
exploreItemTypes.map((item) => {
fetchCounts(item);
});
firstRender.current = true
}
}, [exploreItemTypes, fetchCounts]);
</code><... | useEffect keep rendering workaround | reactjs|react-native | 1 | 53 | 2 | 72,247,669 | 72,247,669 | 1 | true | 2022-05-15T10:52:36.967Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
useEffect keep rendering workaround<p>I have a small problem. I want to call 4 APIs when the component start rendering so I used use effect for that so I loo... |
72,247,559 | Grouping data by multiply nested keys<p>I have some input data:</p>
<pre><code>data = [('15.05.2022 12:36', 46879, 'Clinton Bill', '555-55-55', 'USA, White House', 'Cond', 'id_1', '56', 10),
('15.05.2022 12:36', 46879, 'Clinton Bill', '555-55-55', 'USA, White House', 'Cond', 'id_1', '56', 1),
('15.05.20... | <p>I think you can group your data by unique ids and then calculate the product sum. Based on this output you can easily create your structure.</p>
<pre><code>import collections
output_data = dict()
for date, user_id, user_name, user_phone, user_address, product_name, product_id, product_price, product_count in data:
... | Grouping data by multiply nested keys | python-3.x|algorithm|sorting|chatbot | 0 | 53 | 3 | 72,248,045 | 72,248,045 | 1 | true | 2022-05-15T10:49:38.313Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Grouping data by multiply nested keys<p>I have some input data:</p>
<pre><code>data = [('15.05.2022 12:36', 46879, 'Clinton Bill', '555-55-55', 'USA, White H... |
72,241,176 | how to bind to `MouseArea`'s `onDragChanged`?<p>Qt Creator suggests that the <code>onDragChanged</code> slot exists in <code>MouseArea</code>.</p>
<pre><code> MouseArea {
id: mouseArea
...
onDragChanged: console.log('Drag changed')
}
</code></pre>
<p>But at runtime it fails with:</p>
<blo... | <p>The proper way would be:</p>
<pre><code>drag.onActiveChanged: console.log("Drag active:", drag.active)
</code></pre>
<p>This is because <code>drag</code> is a group of properties (under the hood it's a QObject or alike), so you need to reference that group first.</p>
<p>Your initial attempt doesn't work be... | how to bind to `MouseArea`'s `onDragChanged`? | qt|qml|qt-quick | 0 | 53 | 2 | 72,255,256 | 72,255,256 | 1 | true | 2022-05-14T14:34:41.733Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to bind to `MouseArea`'s `onDragChanged`?<p>Qt Creator suggests that the <code>onDragChanged</code> slot exists in <code>MouseArea</code>.</p>
<pre><code... |
72,256,826 | Iterate through list in nested list - Python<p>I have a long list with nested lists with each list consisting of multiple xy-coordinates.
In short, my lists looks like this</p>
<pre><code>MyList = [ [ [1, 2], [1, 2] ], [ [1, 2], [1, 2] ], [ [1, 2], [1, 2] ]...]]]
</code></pre>
<p>I would like to extract all the "1... | <p>Try this:</p>
<pre><code>flatlist = [el for lst1 in MyList for lst2 in lst1 for el in lst2]
number1, number2 = flatlist[0::2], flatlist[1::2]
</code></pre>
<p>First you flat the list, and then you split it into two lists with alternating elements.</p> | Iterate through list in nested list - Python | python|list|loops|nested | 0 | 53 | 3 | 72,256,925 | 72,256,925 | 1 | true | 2022-05-16T09:17:32.370Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Iterate through list in nested list - Python<p>I have a long list with nested lists with each list consisting of multiple xy-coordinates.
In short, my lists ... |
72,262,660 | Is there a way to run a loop for the pingouin.anova analysis?<p>I am sure this is simple but I am still learning python. I need help figuring out how to iterate over columns in a pandas dataframe and run the pingouin analysis for each. As of now, I can run</p>
<pre><code>pg.anova(data=df, dv='variable1', between='Group... | <p>The results from anova are pandas Dataframes, so it's easy to append these into a single DataFrame, you only have to create a new variable to identify each dependent variable:</p>
<pre class="lang-py prettyprint-override"><code>import pingouin as pg
import pandas as pd
# load data
df = pg.read_dataset('mixed_anova'... | Is there a way to run a loop for the pingouin.anova analysis? | python|pandas|anova|pingouin | 0 | 53 | 1 | 72,263,170 | 72,263,170 | 1 | true | 2022-05-16T16:38:16.843Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is there a way to run a loop for the pingouin.anova analysis?<p>I am sure this is simple but I am still learning python. I need help figuring out how to iter... |
72,255,091 | Enabling Fields on Sales Order Screen<p>I need to enable fields on the Sales Order screen when the Status of the Sales Order is Completed.</p>
<p>I found a few other posts with solutions on older versions of Acumatica where you need to also change things in the Automation steps but in Version 21.207 Automation steps ha... | <p>Two steps, override in workflow and in row selected. This one is for CustomerRefNbr</p>
<pre><code> public override void Configure(PXScreenConfiguration configuration)
{
var context = configuration.GetScreenConfigurationContext<SOOrderEntry, SOOrder>();
context.UpdateScreenConfigurationF... | Enabling Fields on Sales Order Screen | acumatica | 0 | 53 | 1 | 72,264,150 | 72,264,150 | 1 | true | 2022-05-16T06:48:23.617Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Enabling Fields on Sales Order Screen<p>I need to enable fields on the Sales Order screen when the Status of the Sales Order is Completed.</p>
<p>I found a f... |
72,269,012 | Threadsafe with ConcurrentHashMap<p>I have an issue on which I need to run <code>.register</code> at most one time on a multi-threaded env, so i tried to use ConcurrentHashMap but seems like its not thread-safe or I'm using it correctly</p>
<pre class="lang-scala prettyprint-override"><code>object NonFunctionalMetrics ... | <p>You could use <code>computeIfAbsent</code> on the underlying Java ConcurrentHashMap. But <code>getOrElseUpdate</code> on a ConcurrentMap returned by <code>.asScala</code> will use the non-concurrent implementation of mutable Map in Scala.</p> | Threadsafe with ConcurrentHashMap | java|multithreading|scala | 0 | 53 | 1 | 72,269,132 | 72,269,132 | 1 | true | 2022-05-17T06:18:41.620Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Threadsafe with ConcurrentHashMap<p>I have an issue on which I need to run <code>.register</code> at most one time on a multi-threaded env, so i tried to use... |
72,270,481 | Get all Spring integration channel names at startup - Initializing Spring Integration Metrics at startup<p>Unfortunately Spring Integration metrics are registered when they are first used.</p>
<p><a href="https://stackoverflow.com/a/63619360/13657000">https://stackoverflow.com/a/63619360/13657000</a></p>
<p>this means ... | <p>I'm not sure why you need names of channels since the story is really about calling a <code>MessageChannel.send()</code>, so you perhaps just need an <code>ApplicationContext.getBeansOfType(MessageChannel.class)</code>. Pay attention though, that sending a message to the channel will trigger not only metrics registr... | Get all Spring integration channel names at startup - Initializing Spring Integration Metrics at startup | java|spring-integration|prometheus|spring-integration-dsl | 0 | 53 | 1 | 72,275,263 | 72,275,263 | 1 | true | 2022-05-17T08:18:50.237Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Get all Spring integration channel names at startup - Initializing Spring Integration Metrics at startup<p>Unfortunately Spring Integration metrics are regis... |
72,273,090 | How to convert a date in columns to date serial number in Excel?<p>Assume you have a list of dates and times (24 hours) in several columns, and want to convert them to the Excel date serial number: is there a function to do this? (In this way, the dates and times can be represented on a time scale in a graph.)</p>
<div... | <p>Assuming your data start in the first row</p>
<pre><code>=DATE(A1,B1,C1)+TIME(D1,E1,0)
</code></pre> | How to convert a date in columns to date serial number in Excel? | excel|datetime|excel-formula | 0 | 53 | 2 | 72,276,239 | 72,276,239 | 1 | true | 2022-05-17T11:16:42.167Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to convert a date in columns to date serial number in Excel?<p>Assume you have a list of dates and times (24 hours) in several columns, and want to conve... |
72,278,036 | Laravel / PHP / MySQL - why is one column stored with a null value despite being provided a value via the Eloquent model?<p>odd one here. I have a table with a number of columns (unusual, eh?) and am creating a row via an Eloquent model in Laravel (v9). Here is a snippet of the code</p>
<pre><code> while ($i <... | <p>You also have to add that property to the <code>$fillable</code> array of the Modelclass.</p>
<pre class="lang-php prettyprint-override"><code>// app/Models/MyItem.php
protected $fillable = ['my_property_room_id'];
</code></pre>
<p>Alternatively, you can just do:</p>
<pre class="lang-php prettyprint-override"><code... | Laravel / PHP / MySQL - why is one column stored with a null value despite being provided a value via the Eloquent model? | php|mysql|laravel | 0 | 53 | 1 | 72,278,308 | 72,278,308 | 1 | true | 2022-05-17T17:01:50.303Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Laravel / PHP / MySQL - why is one column stored with a null value despite being provided a value via the Eloquent model?<p>odd one here. I have a table with... |
72,277,778 | How do you index two value in JSON arrays?<p>I am trying to find an array index of two matching values. I have my Groovy script below that is giving me the index of WhenWeighed and that works. Returns the correct Index. The part I am having difficulty figuring out is adding OpSeq to the indexing criteria.</p>
<p>What I... | <p>If you know that <code>WeightEstimatesInq</code> is always going to be the key for the list of items, you can do something like this:</p>
<pre><code>json["WeightEstimatesInq"].findIndexOf {
it["WhenWeighed"] == "BH" && it["OpSeq"] == "30"
}
</code></pre>
<... | How do you index two value in JSON arrays? | json|groovy | 0 | 53 | 1 | 72,282,260 | 72,282,260 | 1 | true | 2022-05-17T16:40:48.170Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do you index two value in JSON arrays?<p>I am trying to find an array index of two matching values. I have my Groovy script below that is giving me the i... |
72,282,162 | How to create a custom grouped / hashed PLINQ partitioner or parallel query<p>I am trying to process a list of file paths in parallel using PLINQ.
I have to process all files with the same name, excluding extension, in the same thread, as that thread may be renaming file extensions, causing issues if done from differen... | <p>I think that you are close at solving your problem. The <code>GroupBy</code> operator will emit groups of paths that have the same key. So you just have to do a <code>foreach</code> loop inside the <code>ForAll</code> lambda, and process the paths that have the same key one by one:</p>
<pre><code>pathList
.Group... | How to create a custom grouped / hashed PLINQ partitioner or parallel query | c#|.net-core|plinq | 2 | 53 | 1 | 72,283,586 | 72,283,586 | 1 | true | 2022-05-18T00:58:20.493Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to create a custom grouped / hashed PLINQ partitioner or parallel query<p>I am trying to process a list of file paths in parallel using PLINQ.
I have to ... |
72,284,295 | How to get first key for every data dictionary in a loop<p>Let's say I have this</p>
<pre><code>test= {"Default":{"test_data":{"data":"test"}},
"Test":{"abc_data":{"data":"test"}},
"Default":{"zxy_data":{&q... | <p>Given:</p>
<pre><code>test = {
"Default": ["blue", "white"],
"Test": ["pink", "brown"],
"Master": ["pink", "brown"]
}
</code></pre>
<p>If you want to access both <code>keys</code> and <code>values</code>:</p>
<pre><... | How to get first key for every data dictionary in a loop | python | 1 | 53 | 2 | 72,284,467 | 72,284,467 | 1 | true | 2022-05-18T06:42:13.580Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to get first key for every data dictionary in a loop<p>Let's say I have this</p>
<pre><code>test= {"Default":{"test_data":{"data... |
72,286,426 | ObjectBox, how to drop-everything migration on conflicts?<p>In my case saved data can be cleaned without fear in case of model changes, there is a better way to do this ?</p>
<pre><code>private val dataSource = try {
MyObjectBox.builder().androidContext(context).build().boxFor(XXXX::class)
} catch (e: Exception) {
... | <p>This approach is a bit hacky, but why not!? I mean, if you don't care about loosing existing data...</p>
<p>Two possible refinements I can suggest:</p>
<ul>
<li><code>boxFor()</code> should be outside the <code>try</code> because any error here would be unrelated to model changes.</li>
<li>Instead of <code>Exception... | ObjectBox, how to drop-everything migration on conflicts? | android|objectbox|objectbox-android|objectbox-java | 2 | 53 | 1 | 72,288,054 | 72,288,054 | 1 | true | 2022-05-18T09:20:07.993Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
ObjectBox, how to drop-everything migration on conflicts?<p>In my case saved data can be cleaned without fear in case of model changes, there is a better way... |
72,288,871 | C99 shorthand for operations on fields of a single struct variable?<p>Let's say I have this simple program:</p>
<pre><code>#include <stdio.h>
typedef struct foo {
int bar;
int baz;
double qux;
} foo_t;
foo_t my_foo = {
.bar = 0,
.baz = 0,
.qux = 0,
};
int main() {
my_foo.bar = 100;
my_foo.baz =... | <p>C has no such syntax. You need to specify the struct variable followed by the member name.</p>
<p>The closest you can come to this is to create pointers to each member and work with those.</p>
<pre><code>int *bar = &foo.bar;
int *baz = &foo.baz;
double *qux = &foo.qux;
*bar = 100;
*baz = *bar/2 + 4;
*qu... | C99 shorthand for operations on fields of a single struct variable? | c|struct | 0 | 53 | 2 | 72,288,937 | 72,288,937 | 1 | true | 2022-05-18T12:04:59.230Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
C99 shorthand for operations on fields of a single struct variable?<p>Let's say I have this simple program:</p>
<pre><code>#include <stdio.h>
typedef ... |
72,290,729 | Fast checking for encrypted values by X509Certificate2<p>I have <strong>many</strong> different string values in a collection.</p>
<p>Some values were encrypted by <code>X509Certificate2</code>. All other values are numbers, non encrypted strings, dates, etc.</p>
<p>My goal to filter possible candidates for decryption.... | <p>Ciphertext of any modern cipher is binary. If the ciphertext is in a string I would expect that it has been encoded using base 64 (or a dialect) or hexadecimals. Once you've decoded that it should be exactly be the key size if direct RSA encryption has been used. If a hybrid cryptosystem has been used then it should... | Fast checking for encrypted values by X509Certificate2 | c#|.net|cryptography | 1 | 53 | 1 | 72,291,694 | 72,291,694 | 1 | true | 2022-05-18T14:08:29.413Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Fast checking for encrypted values by X509Certificate2<p>I have <strong>many</strong> different string values in a collection.</p>
<p>Some values were encryp... |
72,292,406 | Reducing an array with nested objects<p>I have a array sorted by "src" and "target" as the following :</p>
<pre><code>var sortedArr = [
{
"orig": {
"src": "A",
"target": "B",
"connection": "apple"
},
... | <p>You can use <code>Array.prototype.reduce()</code> to handle your array (remove duplicates and connect them by <code>connectionArr</code> prop), see Code Snippet:</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... | Reducing an array with nested objects | javascript | -1 | 53 | 2 | 72,294,617 | 72,294,617 | 1 | true | 2022-05-18T15:54:58.160Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Reducing an array with nested objects<p>I have a array sorted by "src" and "target" as the following :</p>
<pre><code>var sortedArr = [
... |
72,293,862 | How can we write two ngClass in one div?<p>Can we add two ng-class in one div?
If so then how to write it.
How can we write this together?</p>
<p>Thank you in advance.</p>
<pre><code><div [ngClass]={'white-background': policy number.length <=0}
[ngClass]="getSomeClass()">
</code></pre> | <p>You can do this</p>
<pre><code><div [ngClass]="{'class1': getClass1(), 'class2': getClass2()}">
</div>
</code></pre>
<p>With <code>getClass1()</code> and <code>getClass2()</code> returning <code>true</code> or <code>false</code> to conditionally apply class1, class2.</p> | How can we write two ngClass in one div? | angular|ng-class|angular-ng-class | -1 | 53 | 2 | 72,294,647 | 72,294,647 | 1 | true | 2022-05-18T17:53:33.323Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can we write two ngClass in one div?<p>Can we add two ng-class in one div?
If so then how to write it.
How can we write this together?</p>
<p>Thank you i... |
72,296,663 | rock paper scissors want to make the icons unclickable after you hit a score of 5<p>i have a Rock Paper Scissors game and whenever I or the computer hits 5 it reloads but I want it so you can't play any more so that the score doesn't go up after you hit 5 now if you hit 5 it will say you lost or you won and after 5 sec... | <p>You can add a function which checks score on every move so that it would reset the game if it's already over. Just put it at the beginning of the <code>game</code> function so that it reinitializes the game if necessary</p>
<pre><code>function resetIfOver(){
if(userScore >= 5 || computerScore >= 5){
... | rock paper scissors want to make the icons unclickable after you hit a score of 5 | javascript|html|css | 0 | 53 | 1 | 72,296,733 | 72,296,733 | 1 | true | 2022-05-18T22:27:07.263Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
rock paper scissors want to make the icons unclickable after you hit a score of 5<p>i have a Rock Paper Scissors game and whenever I or the computer hits 5 i... |
72,298,786 | Need to generate a new string in javascript<p>I'm trying to solve a question to create a new compressed string. Each character has a count next to it and I was supposed to come with up a new string in alphabetical order followed by the total count of that character within the string.</p>
<p>For eg:</p>
<p>Input: "... | <p>You could <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce" rel="nofollow noreferrer"><code>reduce()</code></a> everything to a single "counter" object, and then use <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objec... | Need to generate a new string in javascript | javascript|string | 1 | 53 | 2 | 72,298,883 | 72,298,883 | 1 | true | 2022-05-19T04:50:13.027Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Need to generate a new string in javascript<p>I'm trying to solve a question to create a new compressed string. Each character has a count next to it and I w... |
72,299,497 | Can someone please explain me this code from ReactJS?<p>can anyone please explain me this code? I am not able to understand as in what's happening here.</p>
<pre><code>const cartReducer = (state, action) => {
if (action.type === "ADD") {
const updatedTotalAmount =
state.totalAmount + action.ite... | <p>I have added some comments to your code I hope this makes the code a bit more understandable.</p>
<pre class="lang-js prettyprint-override"><code>const cartReducer = (state, action) => {
// Adding an Item to Cart
if (action.type === "ADD") {
// Calculated Cart Total: existing Total + (new Item P... | Can someone please explain me this code from ReactJS? | reactjs|reduce|shopping-cart | 3 | 53 | 3 | 72,300,078 | 72,300,078 | 1 | true | 2022-05-19T06:18:54.483Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Can someone please explain me this code from ReactJS?<p>can anyone please explain me this code? I am not able to understand as in what's happening here.</p>
... |
72,297,658 | Converting WCF Web service calls from callback-based async method to awaitable task<p>I am converting over an old Silverlight application that used callback-based WCF Web Services over to OpenSilver that is using awaitable task based WCF Web Services. I am trying to figure out how to handle the error conditions. Here... | <blockquote>
<p>What happened to e.Cancelled, e.Error, and e.Result?</p>
</blockquote>
<h3><code>e.Cancelled</code></h3>
<p>If you have an async method (in your case the <code>cmc.getSlideImageAsync</code>) then this can be cancelled through a <a href="https://docs.microsoft.com/en-us/dotnet/api/system.threading.cancel... | Converting WCF Web service calls from callback-based async method to awaitable task | c#|asynchronous|task-parallel-library|wcf-ria-services|c#-5.0 | 1 | 53 | 1 | 72,300,432 | 72,300,432 | 1 | true | 2022-05-19T01:27:22.207Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Converting WCF Web service calls from callback-based async method to awaitable task<p>I am converting over an old Silverlight application that used callback-... |
72,300,765 | What does volumes do in docker-compose<p>I am currently learning Docker. I am stucked at the idea of volumes. I assume that they made to store the data whenever we restart the container etc., but i do not understand what happens if we don't provide the ":" for the source:target.
Example:</p>
<pre><code>- &quo... | <p>It is an anonymous volume. It is managed by docker like a named volume, but it doesn't have a real name, only a GUID. Likewise, it's similar to the one you get when you use the <a href="https://docs.docker.com/engine/reference/builder/#volume" rel="nofollow noreferrer">VOLUME</a> instruction in your Dockerfile witho... | What does volumes do in docker-compose | docker | 0 | 53 | 1 | 72,300,893 | 72,300,893 | 1 | true | 2022-05-19T07:59:47.327Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What does volumes do in docker-compose<p>I am currently learning Docker. I am stucked at the idea of volumes. I assume that they made to store the data whene... |
72,288,757 | Make exception when replacing diacritics with regular characters<p>Trying to make an exception to all characters that have been converted to regular letters.</p>
<p><code>txtValue.normalize('NFD').replace(/[\u0300-\u036f]/g, '');</code></p>
<p>As you can see, I replace all the special characters for normal letters, but... | <p>The only simple way I see is not optimized but do the job properly :</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>const text = "Çééé éÇé àç" // test this string
.replac... | Make exception when replacing diacritics with regular characters | javascript|unicode|diacritics | 1 | 53 | 1 | 72,302,819 | 72,302,819 | 1 | true | 2022-05-18T11:56:06.373Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Make exception when replacing diacritics with regular characters<p>Trying to make an exception to all characters that have been converted to regular letters.... |
72,302,615 | Swift variable conditional initialization: var with default value or let?<p>In case of a variable that never mutates after initialization, does having a <code>var</code> cause a performance hit? There are situations where it's simpler to write</p>
<pre><code>var value = 0
if conditions {
value = 1
}
</code></pre>
<... | <p>You can check it yourself, using a compiler explorer such as godbolt.</p>
<p><a href="https://godbolt.org/z/dcrz79z1j" rel="nofollow noreferrer">Compiled assembly from both methods</a> is essentially identical, the jumps are just in different places, so there should be no performance difference whatsoever.</p>
<p>Th... | Swift variable conditional initialization: var with default value or let? | swift|performance | 0 | 53 | 1 | 72,303,231 | 72,303,231 | 1 | true | 2022-05-19T10:05:59.490Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Swift variable conditional initialization: var with default value or let?<p>In case of a variable that never mutates after initialization, does having a <cod... |
72,304,179 | Correct way to setup a model for a form with different input text<p>I'm trying to setup a model for a form but I'm struggling to understand how I should set the models for capturing the proper information that I want.
(info: I'm user webApp with RazorPages)</p>
<p>I want to achieve this, with every "comment" ... | <p>I think that the simplest way to represent a table is to use a model that has a List of objects, where the object has all the properties of the table.</p>
<pre><code>public class TableModel
{
List<Row> rows { get; set; }
...
...
}
</code></pre>
<p>the TableModel in addition can have other propertie... | Correct way to setup a model for a form with different input text | c#|asp.net-core|razor-pages | 0 | 53 | 1 | 72,305,384 | 72,305,384 | 1 | true | 2022-05-19T11:59:51.930Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Correct way to setup a model for a form with different input text<p>I'm trying to setup a model for a form but I'm struggling to understand how I should set ... |
72,305,725 | Getting all SQL Server database records older than X days<p>I am working on a query to delete records from the websiteTestLocation table (where websiteSnapshotStartTime is older than X days).</p>
<p>The (truncated) table structures look like this:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>... | <p>Break down your query bit by bit.</p>
<p>On the face of it this bit looks fine</p>
<pre><code>select * FROM [dbo].websiteTestLocation wtl
LEFT JOIN [dbo].website w ON w.websiteRecordId = wtl.websiteRecordId
</code></pre>
<p>But that next JOIN is all over the place. It looks like you are trying to limit a LEFT OUTER ... | Getting all SQL Server database records older than X days | sql|sql-server|tsql | 0 | 53 | 1 | 72,306,185 | 72,306,185 | 1 | true | 2022-05-19T13:46:13.703Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Getting all SQL Server database records older than X days<p>I am working on a query to delete records from the websiteTestLocation table (where websiteSnapsh... |
72,308,346 | Looking for a match for a String (display calculator)<p>I am making a calculator in Java. The problem is that I am trying to find a match that, given a string, takes only the second operand (operations can be <code>+</code>, <code>-</code>, <code>*</code> and <code>/</code>).</p>
<p>Example strings inputs:</p>
<pre><co... | <p>As I have already provided within the comments section of your post the following will split out the values(s) you want:</p>
<pre><code>System.out.println("21 + 574".split("\\s*(\\+|\\-|\\*|\\/)\\s*")[1]);
</code></pre>
<p>This is only good for unsigned (positive) numbers since the minus (-) is a... | Looking for a match for a String (display calculator) | java|string|split | 1 | 53 | 1 | 72,312,541 | 72,312,541 | 1 | true | 2022-05-19T16:51:22.877Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Looking for a match for a String (display calculator)<p>I am making a calculator in Java. The problem is that I am trying to find a match that, given a strin... |
72,312,759 | insert element in a list after every 2 element<p>I have this code:</p>
<pre><code>l = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0]
def add(l, n):
lret = l.copy()
i = n
while i <= len(lret):
lret.insert(i, 0.0)
i += (n+1)
return lret
lret = add(l,2)
print(lret)
</code></pre>
<p>Is a way to make the <... | <p>You can use <code>zip()</code> to build tuples that contain <code>n</code> elements from the original list with an added element, and then use <code>chain.from_iterable()</code> to flatten those tuples into the final list:</p>
<pre class="lang-py prettyprint-override"><code>from itertools import repeat, chain
def ad... | insert element in a list after every 2 element | python|list|insert | 0 | 53 | 3 | 72,312,807 | 72,312,807 | 1 | true | 2022-05-20T01:50:50.167Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
insert element in a list after every 2 element<p>I have this code:</p>
<pre><code>l = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0]
def add(l, n):
lret = l.copy()
... |
72,312,714 | Is the `_ansible_parent_role_name` variable name reserved in Ansible?<p>When I try to use <code>_ansible_parent_role_name</code> as a variable name (with the <code>set_fact</code> module), I get the following error message:</p>
<pre><code>ERROR! invalid parameter specified for action 'set_fact': '_ansible_parent_role_n... | <p>Everything starting with <code>_ansible_</code> or <code>ansible_</code> should be considered reserved, and <code>_ansible</code> is reserved for internal variables that are never set by the user. No modules can be called with parameters starting with <code>_ansible_</code>: <a href="https://github.com/ansible/ansib... | Is the `_ansible_parent_role_name` variable name reserved in Ansible? | ansible | 0 | 53 | 1 | 72,312,995 | 72,312,995 | 1 | true | 2022-05-20T01:40:57.290Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is the `_ansible_parent_role_name` variable name reserved in Ansible?<p>When I try to use <code>_ansible_parent_role_name</code> as a variable name (with the... |
72,315,101 | Model for Direct Collocation Method<p>I am interested in using the Direct Collocation Method to generate a walking trajectory for a 2D 7-link biped robot (torso, left and right upper leg, lower leg and foot).<br />
Specifically,</p>
<ul>
<li>input : torque to each joint</li>
<li>state : position of waist and angle of e... | <p>I have a number of relevant examples in my course notes. I would recommend the compass gait limit cycle exercise from the chapter on <a href="https://underactuated.csail.mit.edu/contact.html" rel="nofollow noreferrer">planning through contact</a> (which uses a URDF to specify the dynamics), or the SLIP model exampl... | Model for Direct Collocation Method | drake | 0 | 53 | 1 | 72,316,329 | 72,316,329 | 1 | true | 2022-05-20T07:30:21.043Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Model for Direct Collocation Method<p>I am interested in using the Direct Collocation Method to generate a walking trajectory for a 2D 7-link biped robot (to... |
72,314,742 | Elegant way to plot average loss of many trains in tensorflow<p>I am running many iterations of a train so I can smooth out the loss curves. I would like an elegant way to average all the losses from <code>history.history['loss']</code> but haven't found an easy way to do it. Here's a minimal example:</p>
<pre><code>im... | <p>You could simply do:</p>
<pre><code>import numpy as np
import matplotlib.pyplot as plt
losses = [h.history['loss'] for h in all_trains]
mean_loss = np.mean(losses, axis=0)
std = np.std(losses, axis=0)
plt.errorbar(range(len(mean_loss)), mean_loss, yerr=std, capsize=5, marker='o')
plt.title('Average loss per epoch ... | Elegant way to plot average loss of many trains in tensorflow | python|tensorflow | 1 | 53 | 1 | 72,318,438 | 72,318,438 | 1 | true | 2022-05-20T06:53:48.493Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Elegant way to plot average loss of many trains in tensorflow<p>I am running many iterations of a train so I can smooth out the loss curves. I would like an ... |
72,326,916 | How do I make a react app that preserves the data on refresh<p>I've built a simple expense tracker app on react like such</p>
<p>How do I now make it such that the <code>expenselog</code> object avoids reverting back to the default state on refreshing but preserves the new expenses that were added by the client</p>
<pr... | <p>Select betweeon <a href="https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage" rel="nofollow noreferrer">localStorage</a> or <a href="https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage" rel="nofollow noreferrer">sessionStorage</a>.<br/>
<code>localStorage</code> can be shared betw... | How do I make a react app that preserves the data on refresh | node.js|reactjs|json | 0 | 53 | 1 | 72,326,949 | 72,326,949 | 1 | true | 2022-05-21T05:30:13.533Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I make a react app that preserves the data on refresh<p>I've built a simple expense tracker app on react like such</p>
<p>How do I now make it such th... |
72,330,225 | LINQ Extract partial match from dataTable from list<p>I'm trying to extract all rows from a dataTable that for column "A" have at the end a string from a list.</p>
<p>For example:</p>
<p>DataTable</p>
<pre><code>ID A
1 1220
2 1221
3 1223
</code></pre>
<p>list</p>
<pre><code>{"20",... | <p>You tagged your question with <code>C#</code>. In C# the query would be</p>
<pre><code>dataTable
.Where(r => list.Any(s => r.A.EndsWith(s)))
</code></pre>
<p>The test code I tried is</p>
<pre><code>var array = dataSet1
.DataTable1
.Where(r => list.Any(s => r.A.EndsWith(s)))
.ToArray();
</... | LINQ Extract partial match from dataTable from list | c#|vb.net|linq | 0 | 53 | 1 | 72,330,366 | 72,330,366 | 1 | true | 2022-05-21T13:57:52.487Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
LINQ Extract partial match from dataTable from list<p>I'm trying to extract all rows from a dataTable that for column "A" have at the end a string ... |
72,336,232 | Create numpy array with shape of one array and values from a list<p>I have a (128x128) array consisting of values of which cluster/super-pixel each pixel belongs to, small 9x9 example:</p>
<pre><code>array([[0, 0, 1, 1, 1, 2, 2, 2, 2],
[0, 0, 1, 1, 1, 2, 2, 2, 2],
[0, 0, 1, 1, 1, 2, 2, 2, 2],
[3, 3... | <p>I would use the <a href="https://numpy.org/doc/stable/reference/generated/numpy.where.html?highlight=where#numpy.where" rel="nofollow noreferrer"><code>numpy.where</code></a> function for this:</p>
<pre class="lang-py prettyprint-override"><code>from numpy import *
arr1=array([0,0,1,1,1,2,2,2,2,
0,0,1,1,1,2,2,2,2,
0... | Create numpy array with shape of one array and values from a list | python|numpy|superpixels | 2 | 53 | 2 | 72,336,330 | 72,336,330 | 1 | true | 2022-05-22T09:18:40.207Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Create numpy array with shape of one array and values from a list<p>I have a (128x128) array consisting of values of which cluster/super-pixel each pixel bel... |
72,341,040 | why does the getline() function does not work unless I call it twice in the function charmodifier<p><strong>what's wrong</strong>
if I use the get line function only once in the character modifier function the compiler will ignore it
unless I call the function twice
why cant I use it only once?
I tried using other way... | <p>The problem is that after entering an integer or a character as for example</p>
<pre><code>cout << "episode No." << endl;
cin >> e;
cout << "enter the name of the show:" << endl;
charmodifier();
//...
</code></pre>
<p>the input buffer contains the new line character ... | why does the getline() function does not work unless I call it twice in the function charmodifier | c++|oop|getline | -1 | 53 | 1 | 72,341,076 | 72,341,076 | 1 | true | 2022-05-22T20:19:29.613Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
why does the getline() function does not work unless I call it twice in the function charmodifier<p><strong>what's wrong</strong>
if I use the get line funct... |
72,342,626 | C# class design for JSON data structure<p>I am writing some code to meet a spec for a government department. I can't parse a section in to classes in C#</p>
<p><strong>Sample</strong></p>
<pre><code>{
"tdeVersion": "2.0",
"batchId": "ABC20190803",
"deviceRecords... | <p>You have this JSON:</p>
<pre class="lang-json prettyprint-override"><code>{
"tdeVersion": "2.0",
"batchId": "ABC20190803",
"deviceRecords": [
{
"device": {
"id": "1234"
},
... | C# class design for JSON data structure | c#|json|serialization | -1 | 53 | 2 | 72,343,828 | 72,343,828 | 1 | true | 2022-05-23T02:15:25.647Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
C# class design for JSON data structure<p>I am writing some code to meet a spec for a government department. I can't parse a section in to classes in C#</p>... |
72,343,995 | How is OpenMP communicating between threads with what should be a private variable?<p>I'm writing some code in C++ using OpenMP to parallelize some chunks. I run into some strange behavior that I can't quite explain. I've rewritten my code such that it replicates the issue minimally.</p>
<p>First, here is a function I ... | <p>From the <a href="https://www.ibm.com/docs/en/xl-c-and-cpp-linux/13.1.5?topic=parallelization-pragma-omp-parallel" rel="nofollow noreferrer">documentation of <code>omp parallel</code></a>:</p>
<blockquote>
<p>Each thread in the team executes all statements within a parallel region <em>except for work-sharing constru... | How is OpenMP communicating between threads with what should be a private variable? | c++|multithreading|openmp | 0 | 53 | 2 | 72,344,555 | 72,344,555 | 1 | true | 2022-05-23T06:15:27.503Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How is OpenMP communicating between threads with what should be a private variable?<p>I'm writing some code in C++ using OpenMP to parallelize some chunks. I... |
72,347,764 | Python creating 3d plot from lists<p>I am trying to make a 3D plot from the following lists:</p>
<p>X-axis:</p>
<pre><code>S = [1.0, 3.0, 5.0, 7.0, 9.0,11.0,13.0,15.0,17.0]
</code></pre>
<p>Y-axis:</p>
<pre><code>T = [0.25,0.5,1,2,3,5]
</code></pre>
<p>Z-axis:</p>
<pre><code>Diff_025 = [-0.0, -0.0001, -0.0002, -0.0027... | <p>All you need to do is to format the lists using <code>np.meshgrid()</code></p>
<pre><code>import numpy as np
import matplotlib.pyplot as plt
s = [1.0, 3.0, 5.0, 7.0, 9.0,11.0,13.0,15.0,17.0]
t = [0.25,0.5,1,2,3,5]
S, T = np.meshgrid(s, t)
Z = [Diff_025, Diff_05, Diff_1, Diff_2, Diff_3, Diff_5]
fig = plt.figure()... | Python creating 3d plot from lists | python|matplotlib|plot|3d | 0 | 53 | 1 | 72,348,344 | 72,348,344 | 1 | true | 2022-05-23T11:27:38.857Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python creating 3d plot from lists<p>I am trying to make a 3D plot from the following lists:</p>
<p>X-axis:</p>
<pre><code>S = [1.0, 3.0, 5.0, 7.0, 9.0,11.0,... |
72,348,600 | Excel VBA color cell based on value in two other cells<p>I am trying to fill cells in a range with color based on the values of two other cells.</p>
<p>I work with the table below:</p>
<p><a href="https://i.stack.imgur.com/d8LHM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/d8LHM.png" alt="enter im... | <p>Just loop trough each cell and check if first column equals B or C and if row 1 or 2 of data equals to 1</p>
<pre><code>Application.ScreenUpdating = False
Dim rng As Range
For Each rng In Range("A1").CurrentRegion
If rng.Column = 1 Or rng.Row = 1 Or rng.Row = 2 Then
'do nothing, headers and fi... | Excel VBA color cell based on value in two other cells | excel|vba | -2 | 53 | 2 | 72,348,770 | 72,348,770 | 1 | true | 2022-05-23T12:34:59.463Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Excel VBA color cell based on value in two other cells<p>I am trying to fill cells in a range with color based on the values of two other cells.</p>
<p>I wor... |
72,350,867 | How to generate a version1 uuid in Cockroachdb<p>Our current datastore is Cassandra. We're planning to move away from it towards Cockroachdb wherein we need to refactor our code(Spring boot). The current scripts use the datatype <code>'timeuuid'</code> which gives a version1 uuid in Cassandra. Now, I need a similar dat... | <p>CockroachDB is adding support for the <code>uuid_generate_v1()</code> builtin function <a href="https://github.com/cockroachdb/cockroach/pull/80204" rel="nofollow noreferrer">in v22.2</a>, which is coming out later in 2022. Until then, you'd need to generate the UUID within your application.</p> | How to generate a version1 uuid in Cockroachdb | spring-boot|cassandra|cockroachdb|timeuuid | 1 | 53 | 1 | 72,351,070 | 72,351,070 | 1 | true | 2022-05-23T15:10:07.970Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to generate a version1 uuid in Cockroachdb<p>Our current datastore is Cassandra. We're planning to move away from it towards Cockroachdb wherein we need ... |
72,352,059 | c# Is there a way to determine if an object value is a base type like ints and strings or like class or structs<p>I want to make a serializer and to do this I have to check if the current object's type can hold multiple values. (What I mean by base type are Strings and Ints)</p>
<p>I know there are a lot of great seria... | <p>This is what you are looking for?</p>
<pre><code>public static class TypeExtensions
{
private static HashSet<Type> otherScalarTypes = new HashSet<Type>
{
typeof(string), typeof(Guid), typeof(DateTime),
typeof(DateTimeOffset)
};
public static bool IsScalar(this Type type)... | c# Is there a way to determine if an object value is a base type like ints and strings or like class or structs | c#|object|serialization | -1 | 53 | 2 | 72,352,568 | 72,352,568 | 1 | true | 2022-05-23T16:43:22.510Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
c# Is there a way to determine if an object value is a base type like ints and strings or like class or structs<p>I want to make a serializer and to do this ... |
72,349,790 | Postgres FDW Remote only JOIN causes fetch all data<p>I'm trying to fetch data from a remote server with JOIN clause which involves only remote tables, but it is very slow because the planner decides to fetch all data from two tables and merge it locally.
When I add WHERE clause it fixes the problem and JOIN is execute... | <p>PostgreSQL has no idea how much data it will find in those tables, and its completely arbitrary guess is not very good.</p>
<p>You can help it out by doing this:</p>
<pre><code>alter server fdw options (add use_remote_estimate 'on');
</code></pre>
<p>Planning will take substantially longer because it needs to make m... | Postgres FDW Remote only JOIN causes fetch all data | postgresql|postgres-fdw|postgres-10 | 0 | 53 | 2 | 72,354,160 | 72,354,160 | 1 | true | 2022-05-23T13:55:53.710Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Postgres FDW Remote only JOIN causes fetch all data<p>I'm trying to fetch data from a remote server with JOIN clause which involves only remote tables, but i... |
72,354,591 | Error using amplify_api package inside flutter app, says property couldn't be promoted<p>I see this error message which says two things -</p>
<ol>
<li>Argument type String cant be assigned to the parameter type 'String'</li>
<li>'data' refers to a property so it couldn't be promoted.</li>
</ol>
<p><a href="https://i.st... | <p>The second error is essentially saying that you can't fix the error only by adding a null check. As you already know, the compiler treats local variable declarations as non-nullable within contexts where it can be inferred that the variable is not null - that type conversion is called "promotion".</p>
<p>T... | Error using amplify_api package inside flutter app, says property couldn't be promoted | flutter|dart|aws-amplify | 0 | 53 | 1 | 72,354,858 | 72,354,858 | 1 | true | 2022-05-23T20:41:45.900Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Error using amplify_api package inside flutter app, says property couldn't be promoted<p>I see this error message which says two things -</p>
<ol>
<li>Argume... |
72,355,317 | CSS files not loading correctly on github pages<p>I am making a calculator app with multiple themes and everything works locally but the problem is occuring on the github pages.
Each theme for the calculator has its own css file and I am using javascript to change href of the link tag based on the selected theme (theme... | <p>Github shouldn't be changing your code at all. Looking at your repo, I assume you're using the <code>main</code> branch for the page?</p>
<p>I imagine something probably happened that stopped your commit from deploying. Since your commit was exactly that change here:
<a href="https://github.com/FaDiiiLeo/calculator/... | CSS files not loading correctly on github pages | javascript|html|css|github|github-pages | 0 | 53 | 1 | 72,355,384 | 72,355,384 | 1 | true | 2022-05-23T22:12:49.143Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
CSS files not loading correctly on github pages<p>I am making a calculator app with multiple themes and everything works locally but the problem is occuring ... |
72,341,454 | How to ramp PlaygroundOscillator to value with AudioKit in Swift?<p>Is there a way to change the value (frequency, volume etc.) of an PlaygroundOscillator over time in AudioKit?</p>
<p>I have this code and would like to ramp the volume to 0 at the end, so that there is no click sound when the oscillator is stopped.</p>... | <p>Unfortunately, the playground oscillator's parameters are not able to be ramped. It is a simple generator for playgrounds and tests. For anything more serious, you should use something like SoundpipeAudioKit on top of AudioKit.</p> | How to ramp PlaygroundOscillator to value with AudioKit in Swift? | swift|audiokit | 0 | 53 | 1 | 72,356,478 | 72,356,478 | 1 | true | 2022-05-22T21:36:55.323Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to ramp PlaygroundOscillator to value with AudioKit in Swift?<p>Is there a way to change the value (frequency, volume etc.) of an PlaygroundOscillator ov... |
72,359,501 | Why I can not pass a function within two render functions?<p>I am writing a simple app where I render media (photos or videos). Depending on the rendering object, I have to pass one of the following functions: <code>removePhoto</code> or <code>removeVideo</code>. So first I have tried the following:</p>
<pre><code>expo... | <p>When calling <code>renderVideo</code>, you are passing 2 values <code>item</code> and <code>removeVideo</code> method. But in function definition you have just taken one argument i.e. props which will hold value of <code>item</code></p>
<pre><code>const renderVideo = (props, removeVideo) => {
// Here you will g... | Why I can not pass a function within two render functions? | javascript|reactjs|react-native|react-functional-component | 0 | 53 | 1 | 72,359,914 | 72,359,914 | 1 | true | 2022-05-24T08:21:11.517Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why I can not pass a function within two render functions?<p>I am writing a simple app where I render media (photos or videos). Depending on the rendering ob... |
72,360,832 | Error Installing H2O in Python - AttributeError: partially initialized module 'h2o' has no attribute 'init' (most likely due to a circular import)<p>I followed the steps given by the site (<a href="https://docs.h2o.ai/h2o/latest-stable/h2o-docs/downloading.html" rel="nofollow noreferrer">https://docs.h2o.ai/h2o/latest-... | <p>This is how <code>import</code> works - it first searchs file <code>h2o.py</code> in folder in which you run code. And if it can't find local <code>h2o.py</code> then it searchs in folders with modules (in folders which you have on list <code>sys.path</code>)</p>
<p>You created file <code>h2o.py</code> so now <code>... | Error Installing H2O in Python - AttributeError: partially initialized module 'h2o' has no attribute 'init' (most likely due to a circular import) | python|machine-learning|automl | 2 | 53 | 2 | 72,364,273 | 72,364,273 | 1 | true | 2022-05-24T09:55:14.040Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Error Installing H2O in Python - AttributeError: partially initialized module 'h2o' has no attribute 'init' (most likely due to a circular import)<p>I follow... |
72,366,144 | SQL Developer "Edit User" has incomplete DDL<p>I'm logged in as "SYS as SYSDBA" and am inspecting a user with SQL Developer 21.4.3. The user has some system privileges set:</p>
<p><a href="https://i.stack.imgur.com/0TjFp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0TjFp.png" alt="System... | <p>Edit User...find a priv, CHECK (enable) it.</p>
<p><a href="https://i.stack.imgur.com/P5F9R.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/P5F9R.png" alt="enter image description here" /></a></p>
<p>Then click on SQL page -
<a href="https://i.stack.imgur.com/uZgy1.png" rel="nofollow noreferrer"><... | SQL Developer "Edit User" has incomplete DDL | oracle|oracle-sqldeveloper | 1 | 53 | 1 | 72,366,481 | 72,366,481 | 1 | true | 2022-05-24T16:11:46.917Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SQL Developer "Edit User" has incomplete DDL<p>I'm logged in as "SYS as SYSDBA" and am inspecting a user with SQL Developer 21.4.3. The user has so... |
72,367,043 | Compress request body to send to PHP webserver<p>I have a Angular application which makes post request like the following:</p>
<pre><code> async syncDataWithMaster(): Promise<AxiosResponse<any> | void> {
....
const jsonData = {
lastSyncTimeStamp,
deviceID,
userUUID,
... | <p>Maybe consider using a compression library (depending on the content of the body). It looks like <a href="https://stackleap.io/js/fflate" rel="nofollow noreferrer">fflate</a> can do this.</p> | Compress request body to send to PHP webserver | javascript|angular|axios | -1 | 53 | 1 | 72,367,310 | 72,367,310 | 1 | true | 2022-05-24T17:25:09.317Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Compress request body to send to PHP webserver<p>I have a Angular application which makes post request like the following:</p>
<pre><code> async syncDataWit... |
72,367,384 | How do I diagonally divide two matrices<p>I've got the matrices like this one. The goal is to divide matrices diagonally in the same row, for example:</p>
<pre><code>[[a, b, c,
d, e, f,
g, h, j]]
a // e
b // f
d // h
e // j
</code></pre>
<p>etc the thing goes hard anyway but when we got multiple 2d array which loo... | <pre><code>l = [[1,2,3],[5,6,7],[6,8,9]]
for i in range(len(l)-1):
for j in range(len(l)-1):
l[i][j] = l[i][j]/l[i+1][j+1]
</code></pre> | How do I diagonally divide two matrices | python | -1 | 53 | 3 | 72,367,586 | 72,367,586 | 1 | true | 2022-05-24T17:54:27.287Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I diagonally divide two matrices<p>I've got the matrices like this one. The goal is to divide matrices diagonally in the same row, for example:</p>
<p... |
72,373,426 | Vuetify v-data-table highlight row if there is duplicate value<ol>
<li>I would like to highlight the score if it is equal to 100.</li>
</ol>
<blockquote>
<p>By this I can do this by using if (item.score == 100) return
'style-1';</p>
</blockquote>
<ol start="2">
<li>I would like to highlight the names if they have the s... | <p>You can use the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter" rel="nofollow noreferrer">Array#Filter</a> function and check if there is more than 1 items that check the condition.</p>
<pre class="lang-js prettyprint-override"><code>this.desserts.filter(x =>... | Vuetify v-data-table highlight row if there is duplicate value | vue.js|vuetify.js|vuetify-datatable | 0 | 53 | 1 | 72,373,494 | 72,373,494 | 1 | true | 2022-05-25T07:22:09.003Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Vuetify v-data-table highlight row if there is duplicate value<ol>
<li>I would like to highlight the score if it is equal to 100.</li>
</ol>
<blockquote>
<p>... |
72,374,351 | Is ProcessorCount is sensible value for maxCount in SemaphoreSlim?<p>In code of my colleagues I've noticed code like this:</p>
<pre><code>private Task FetchAllKeysFromRedis(List<string> keys, ConcurrentBag<RedisModel> resultsBag, CancellationToken cancellationToken)
{
var parallelism = Environment.P... | <p>I would agree with your reasoning, since the work looks to be network requests that is limited by latency or bandwith, restricting the concurrency to the number of CPU cores make little sense.</p>
<p>You probably need to do some testing to find a suitable maxCount value. But ideally you should have a system that is ... | Is ProcessorCount is sensible value for maxCount in SemaphoreSlim? | c#|.net|asynchronous|task|semaphore | 1 | 53 | 2 | 72,374,676 | 72,374,676 | 1 | true | 2022-05-25T08:33:17.563Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is ProcessorCount is sensible value for maxCount in SemaphoreSlim?<p>In code of my colleagues I've noticed code like this:</p>
<pre><code>private Task FetchA... |
72,383,771 | Scraping issue. data not retrieved<p>I'm trying to scrape some football data from the transfer market.
I want to extract:</p>
<ol>
<li>league name</li>
<li>clubs within the league</li>
<li>each player's information</li>
</ol>
<p>The code I have runs with no issues but it doesn't retrieve any information.
I'm new to dat... | <p>You have a number of problems in your scraping code. You really need to print out the HTML and make sure what you're asking is what you want. Intermediate debug prints would always help.</p>
<p>For one thing, the <code>td_tag.string</code> value returns a long string with the combined contents of the tag. It migh... | Scraping issue. data not retrieved | python|web-scraping|beautifulsoup | 0 | 53 | 1 | 72,384,041 | 72,384,041 | 1 | true | 2022-05-25T20:25:07.973Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Scraping issue. data not retrieved<p>I'm trying to scrape some football data from the transfer market.
I want to extract:</p>
<ol>
<li>league name</li>
<li>c... |
72,384,958 | Finding sum of all possible column combinations without repetition<p>I have a large table that is structured like this:</p>
<pre><code>DT <- data.table(Sample = c(LETTERS[1:3]),
ColA = c(1:3),
ColB = c(3:1),
ColC = 1,
ColD = 2)
> DT
Sample ColA C... | <pre><code>DT %>%
group_by(Sample) %>%
summarise(s = combn(cur_data(), 3, \(x)c(nms = names(x), Sum = rowSums(x)),
simplify = FALSE), .groups = 'drop') %>%
unnest_wider(s) %>%
type.convert(as.is = TRUE)
# A tibble: 12 x 5
Sample nms1 nms2 nms3 Sum
<chr> ... | Finding sum of all possible column combinations without repetition | r|merge|data.table|cross-join | 1 | 53 | 1 | 72,385,089 | 72,385,089 | 1 | true | 2022-05-25T22:57:27.907Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Finding sum of all possible column combinations without repetition<p>I have a large table that is structured like this:</p>
<pre><code>DT <- data.table(Sa... |
72,793,782 | Purrr map a function to all columns except for one<p>I would like to apply Blom transformation to all columns but 'ID'. Since they are all numeric, <code>map_if</code> and <code>is.numeric</code> do not work here.</p>
<pre><code>library(rcompanion)
data("mtcars")
# Get a list of the columns that I would like... | <p>This could be done within <code>dplyr</code> itself if we use <code>across</code></p>
<pre><code>library(dplyr)
mtcars <- mtcars %>%
mutate(across(all_of(col_names), rcompanion::blom, method = "blom"))
</code></pre>
<p>-output</p>
<pre><code>> head(mtcars)
mpg ... | Purrr map a function to all columns except for one | r|purrr | 2 | 53 | 2 | 72,794,090 | 72,794,090 | 1 | true | 2022-06-28T22:25:43.950Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Purrr map a function to all columns except for one<p>I would like to apply Blom transformation to all columns but 'ID'. Since they are all numeric, <code>map... |
72,791,175 | Python/tkinter: Pressing OK in dialog destroys the info in it<p>I'm using Python/tkinter for a GUI and I found a strange behaviour.</p>
<p>I'm building a very small dialog for selecting the language for my app. Then when closing it, I find that my 'result' variable in the dialog is gone.</p>
<p>Here's the snippet:</p>
... | <p>If you look into the source code of <code>simpledialog.Dialog</code> class, you will find that <code>wait_window()</code> is executed at the end of <code>Dialog.__init__()</code> which tries to make the window like a modal dialog.</p>
<p>So <code>super().__init__(...)</code> inside <code>LanguageDialog.__init__()</c... | Python/tkinter: Pressing OK in dialog destroys the info in it | python|python-3.x|tkinter|dialog | 0 | 53 | 2 | 72,795,091 | 72,795,091 | 1 | true | 2022-06-28T18:00:42.113Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python/tkinter: Pressing OK in dialog destroys the info in it<p>I'm using Python/tkinter for a GUI and I found a strange behaviour.</p>
<p>I'm building a ver... |
72,793,481 | react Firestore query nested collection where field then update, or add new doc<p>I'm currently ripping my hair out trying to query a nested collection in my Firestore db.</p>
<p>my db is set up as follows:</p>
<pre><code> users (collection)
- username
- displayName
- ratedItems (collection)
- ... | <blockquote>
<p>I assume the query is incorrect as if(querySnapshot.empty) always returns false even if there are no matching items (matching the itemId) in the ratedItems collection, so it always attempts to add a new item which results in duplicate entries in the collection.</p>
</blockquote>
<p>You used the <code>it... | react Firestore query nested collection where field then update, or add new doc | javascript|reactjs|firebase|google-cloud-firestore | 0 | 53 | 1 | 72,796,780 | 72,796,780 | 1 | true | 2022-06-28T21:46:18.930Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
react Firestore query nested collection where field then update, or add new doc<p>I'm currently ripping my hair out trying to query a nested collection in my... |
72,783,945 | How to return multiple values from one function postgres<p>I have these two functions that are returning cursor and dynamically created text, but I need to do it inside one function.</p>
<pre><code>CREATE OR REPLACE FUNCTION get_students2(classId integer)
RETURNS refcursor
LANGUAGE plpgsql
AS
$$
DECLARE
stu... | <p>To return value to a function that returns table, we have to include RETURN QUERY statement inside function.</p>
<pre><code>CREATE OR REPLACE FUNCTION get_students(classId int)
RETURNS TABLE (
students_cursor refcursor,
students_list text
)
AS $$
DECLARE
students text DEFAULT '';
studen... | How to return multiple values from one function postgres | sql|postgresql|plpgsql | 2 | 53 | 1 | 72,798,452 | 72,798,452 | 1 | true | 2022-06-28T09:28:30.187Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to return multiple values from one function postgres<p>I have these two functions that are returning cursor and dynamically created text, but I need to d... |
72,798,505 | unable to watch a bool variable in riverpod<p>i am trying to watch a boolean variable in riverpod so i have the bellow code sample.</p>
<pre><code>final isPro = StateProvider<bool>((_) => false);
class Example extends ConsumerWidget {
@override
Widget build(BuildContext context, ScopedReader watch) {
... | <p>try this</p>
<pre><code>class Example extends ConsumerWidget {
@override
Widget build(BuildContext context, WidgetRef ref) { // changed here
bool testPro = ref.watch(isPro);
var totgleBool = context.read(isPro.notifier);
return InkWell(
onTap: () {
totgleBool.state = true;
... | unable to watch a bool variable in riverpod | flutter|dart|riverpod | 0 | 53 | 1 | 72,798,839 | 72,798,839 | 1 | true | 2022-06-29T08:51:53.353Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
unable to watch a bool variable in riverpod<p>i am trying to watch a boolean variable in riverpod so i have the bellow code sample.</p>
<pre><code>final isPr... |
72,797,068 | Compute and plot 'grand' regression over multiple smaller regressions<p>I have grouped <code>Area</code> values, for each of which I can compute and plot regressions:</p>
<pre><code>set.seed(123)
df <- data.frame(
Group = c(rep("A",8), rep("B",10), rep("C",7)),
Area = c(1,3,2,4,3,5,... | <p>I would be wary of the answers using <code>stat_smooth</code>/<code>geom_smooth</code> to plot a fitted line for the disaggregated values. This simply draws a best fit line through all of the data, <strong>ignoring how they are clustered</strong>.</p>
<p>As you say in your edit, what you need is a model that can acc... | Compute and plot 'grand' regression over multiple smaller regressions | r|ggplot2|regression | 0 | 53 | 3 | 72,801,347 | 72,801,347 | 1 | true | 2022-06-29T07:01:23.133Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Compute and plot 'grand' regression over multiple smaller regressions<p>I have grouped <code>Area</code> values, for each of which I can compute and plot reg... |
72,799,397 | How can i make that when a poll reaches por example 5 votes send the message to another channel<p>I'm trying to make a poll, but all the ones I see have a limit of time created with asyncio, but I want to make that when the a poll reaches 5 reaction of the emoji ✅ instead of having a limit of time, send the message to ... | <p>I have done it, but you must change if if your bot turns off anytime, if it's always on this code should work:</p>
<pre><code>@commands.Cog.listener()
async def on_reaction_add(self,reaction, user):
if reaction.count == 2 and reaction.emoji == "✅":
await reaction.message.reply(f"Votacion A... | How can i make that when a poll reaches por example 5 votes send the message to another channel | python|discord|discord.py | 1 | 53 | 1 | 72,821,917 | 72,821,917 | 1 | true | 2022-06-29T09:57:40.987Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can i make that when a poll reaches por example 5 votes send the message to another channel<p>I'm trying to make a poll, but all the ones I see have a li... |
72,824,376 | Trying to draw sphere in OpenGL, Only part of the sphere is showing, seems clipped?<p>I created a minimal setup with a fragment shader setting the color to write, so not even a parameter.
The vertex shader passes in a matrix and transforms the points. We can see the sphere, but only part of it.</p>
<p>I hesitate to pos... | <p>The <em>size</em> argument of <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glBufferData.xhtml" rel="nofollow noreferrer"><code>glBufferData</code></a> specifies the size in bytes of the buffer object's new data store:</p>
<p><s><code>glBufferData(GL_ARRAY_BUFFER, resolution, vert, GL_STATIC_DRA... | Trying to draw sphere in OpenGL, Only part of the sphere is showing, seems clipped? | c++|opengl|glsl|vbo | 0 | 53 | 1 | 72,824,616 | 72,824,616 | 1 | true | 2022-07-01T04:26:59.223Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Trying to draw sphere in OpenGL, Only part of the sphere is showing, seems clipped?<p>I created a minimal setup with a fragment shader setting the color to w... |
72,822,303 | adding more table rows depending on the first filtered result with mysql<p>Using mariadb version 10.5.15 (and SQLAlchemy with python 3.9).
After filtering the following table with e.g. count == 3 i would get the rows with id's</p>
<p>2, 3, 4, 7 and 12.</p>
<p>Then for each of these rows i want to add every row (of the ... | <p>You can join the filtered table on the count_ with the original table, where you impose the two main conditions:</p>
<ul>
<li>"<em>group_id</em>" are the same</li>
<li>"<em>group_leader</em>" are different</li>
</ul>
<p>Then apply a <code>UNION</code> between the two result sets, optionally follo... | adding more table rows depending on the first filtered result with mysql | mysql|mariadb|flask-sqlalchemy | 2 | 53 | 1 | 72,827,374 | 72,827,374 | 1 | true | 2022-06-30T21:38:19.230Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
adding more table rows depending on the first filtered result with mysql<p>Using mariadb version 10.5.15 (and SQLAlchemy with python 3.9).
After filtering th... |
72,800,931 | Cannot add templates to TreeView resources without setting Keys<p>I'm trying to create a TreeView, where ItemsSource is a collection of different types of objects. Previously (VS2019) all I needed to do was to specify templates in TreeView.Resources.</p>
<pre><code><TreeView ItemsSource="{Binding collectionA}&q... | <p>In the end I used a custom TemplateSelector to manually assign templates to objects from my collection.</p>
<pre><code>public class TreeViewTemplateSelector : DataTemplateSelector
{
public override DataTemplate SelectTemplate(object item, DependencyObject container)
{
if (item is type... | Cannot add templates to TreeView resources without setting Keys | wpf|treeview|visual-studio-2022 | 0 | 53 | 1 | 72,828,231 | 72,828,231 | 1 | true | 2022-06-29T11:49:46.240Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Cannot add templates to TreeView resources without setting Keys<p>I'm trying to create a TreeView, where ItemsSource is a collection of different types of ob... |
72,830,871 | PostgreSQL: How to view current "grant usage on schema" permissions?<p>Is there a system view in Postgres where I can see which users/roles have "grant usage" and on which schema?</p> | <p>The grants are stored in ACLs (=Access Control Lists) for each schema. You can view them by looking a <code>pg_namespace</code></p>
<pre><code>select nspname, nspacl
from pg_namespace
</code></pre>
<p>The format of the acl is explained <a href="https://www.postgresql.org/docs/current/ddl-priv.html#PRIVILEGE-ABBREVS... | PostgreSQL: How to view current "grant usage on schema" permissions? | postgresql|database-permissions | 0 | 53 | 1 | 72,831,002 | 72,831,002 | 1 | true | 2022-07-01T14:36:59.967Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
PostgreSQL: How to view current "grant usage on schema" permissions?<p>Is there a system view in Postgres where I can see which users/roles have "grant ... |
72,826,888 | why must display be initialized when setting palette?<p>I want to manually create and save a color-indexed image (palette) as a PNG file, using pygame :</p>
<pre><code># create the bitmap
res = pygame.Surface((src.width, src.height), depth=8)
# create the palette
res.set_palette([pygame.Color((0, 0, 0, 0)), ...])
pyg... | <p>The reason is because the pygame source says so :)</p>
<p>But I couldn’t find any reason it was necessary, so I recently removed that check in <a href="https://github.com/pygame/pygame/pull/3259" rel="nofollow noreferrer">https://github.com/pygame/pygame/pull/3259</a>.</p>
<p>So this will not be the case in the next... | why must display be initialized when setting palette? | python|pygame | 2 | 53 | 2 | 72,831,677 | 72,831,677 | 1 | true | 2022-07-01T09:05:09.917Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
why must display be initialized when setting palette?<p>I want to manually create and save a color-indexed image (palette) as a PNG file, using pygame :</p>
... |
72,831,006 | How to share .env with teams<p>I have a question about <code>.env</code> file. I know it is a file that contains secrets like API key and password. I also read that you should not commit it to VCS like GitHub. This is fine if I am working alone, but of course, I have team members. So, how should I share the file with s... | <p>As you mentioned, it's not a good idea to store secrets in a repository. If you're discussing production secrets, then typically you don't want those on developer machines at all, and you can use some sort of secret store. For example, your CI system, such as Travis CI or GitHub Actions, will typically have a way ... | How to share .env with teams | git|version-control|environment-variables|file-sharing|secret-key | -1 | 53 | 1 | 72,831,695 | 72,831,695 | 1 | true | 2022-07-01T14:47:05.210Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to share .env with teams<p>I have a question about <code>.env</code> file. I know it is a file that contains secrets like API key and password. I also re... |
72,832,690 | No Django POST data when sent over a form?<p>I am on a development server (no CSRF protection), sending over login data to Django via a web form (Django: 127.0.0.1:8000).
HTML:</p>
<pre><code><!DOCTYPE html>
<html>
<head>
<title>Log In</title>
<meta charset="utf-8">
</he... | <p>In <code>request.POST</code> you don't have keys from <code>id</code> attribute, but from <code>name</code>. Add it to inputs and you're fine.</p>
<pre><code><input type="text" id="uname" name="uname"><br>
<input type="password" id="pass" name="pa... | No Django POST data when sent over a form? | python|django|forms|http|post | 1 | 53 | 1 | 72,832,767 | 72,832,767 | 1 | true | 2022-07-01T17:16:52.320Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
No Django POST data when sent over a form?<p>I am on a development server (no CSRF protection), sending over login data to Django via a web form (Django: 127... |
72,781,814 | How can I split a page in half horizontally with same content on both sides?<p>I Have some text, a small logo and a table. It would look like this:</p>
<pre><code>[Text] [Logo]
[ table ]
</code></pre>
<p>I want to add a duplicate copy of it, below it while adding a horizontal rule. I can use a 0 height table ... | <p><strong>Pdfmake still <a href="https://github.com/bpampuch/pdfmake/issues/74" rel="nofollow noreferrer">hasn't developed a vertical-align feature</a> yet.</strong></p>
<p><strong>However</strong> if your page content's height (the logo, text and table elems) is not going to change, I would suggest using the margin a... | How can I split a page in half horizontally with same content on both sides? | javascript|angular|typescript|pdfmake | 1 | 53 | 1 | 72,834,022 | 72,834,022 | 1 | true | 2022-06-28T06:45:42.497Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I split a page in half horizontally with same content on both sides?<p>I Have some text, a small logo and a table. It would look like this:</p>
<pre>... |
72,814,892 | Ingesting stream counters from Cloud Pubsub to Bigtable using Google Cloud Dataflow?<p>I want to consume data from PubSub and maintain the counter of some data fields and maintain the real-time counters for the same, how can I do the same in Google Cloud DataFlow. I can Sink the data into Bigtable, but how do I update ... | <p>You should be able to do this with <a href="https://beam.apache.org/blog/timely-processing/" rel="nofollow noreferrer">state and timers</a>, outputting running totals and such from your <code>Countit</code> DoFn.</p> | Ingesting stream counters from Cloud Pubsub to Bigtable using Google Cloud Dataflow? | google-cloud-dataflow|apache-beam|google-cloud-pubsub | -1 | 53 | 1 | 72,834,581 | 72,834,581 | 1 | true | 2022-06-30T11:21:10.770Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Ingesting stream counters from Cloud Pubsub to Bigtable using Google Cloud Dataflow?<p>I want to consume data from PubSub and maintain the counter of some da... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.