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,183,144 | How to see when the last time a specific block of code or if condition was used in Java<p>I'd like to find redundant blocks of code in my service. Is there a way to check when that last time this code was used runtime? The service is running on GCP.</p> | <p>I don't think there's a great solution to your problem but you could instrument, perhaps via Aspect-Oriented Programming (AOP), selected places in your code with simple logging statements and then monitor those.</p>
<p>You should avoid including <em>any</em> "hot code" which is executed very frequently bec... | How to see when the last time a specific block of code or if condition was used in Java | java|google-cloud-platform|jvm | -1 | 45 | 2 | 72,220,968 | 72,220,968 | 0 | true | 2022-05-10T08:39:07.140Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to see when the last time a specific block of code or if condition was used in Java<p>I'd like to find redundant blocks of code in my service. Is there a... |
72,220,392 | How to find nearest latitude/longitude from big json array of lat/lng<p>I'm building a website that locates your device and shows you 4 of the nearest parking meters.</p>
<p>For the parking meters I'm using an API to retrieve the latitude and longitude and using Google Directions API to set the start and destination co... | <p>In case anyone comes here looking for a solution, how I solved it is by the following code:</p>
<pre class="lang-js prettyprint-override"><code>for (let i = 0; i < json.length; i++) {
if ((Math.abs(json[i].coordinates[1] - start.lat)) + ((Math.abs(json.[i].coordinates[0] - start.lng))) < sumLat... | How to find nearest latitude/longitude from big json array of lat/lng | javascript|google-maps-api-3 | -1 | 38 | 1 | 72,222,007 | 72,222,007 | 0 | true | 2022-05-12T18:18:17.700Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to find nearest latitude/longitude from big json array of lat/lng<p>I'm building a website that locates your device and shows you 4 of the nearest parkin... |
72,222,838 | How to loop though and change background color of each item in a list<p>I'm trying to change the <code>Console.BackgroundColor</code> for each item in a list, and am wondering how I would go about doing so.</p>
<pre><code>public static List<string> cardTypeStore = new List<string>();
public static List<i... | <p>Instead of using a foreach loop, you can use a for loop. The benefit of using the for loop is the index, which can be used to access both collections.</p>
<pre><code>for (int i = 0; i < cardTypeStore.Count; i++)
{
Console.BackgroundColor = cardColorStore[i];
Console.Write(cardTypeStore[i]);
}
</code></pr... | How to loop though and change background color of each item in a list | c# | -1 | 133 | 1 | 72,223,301 | 72,223,301 | 0 | true | 2022-05-12T22:52:30.160Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to loop though and change background color of each item in a list<p>I'm trying to change the <code>Console.BackgroundColor</code> for each item in a list... |
72,223,763 | i dont know where im wrong in this python code of conditional statements using if elif and else<p><a href="https://i.stack.imgur.com/kK4XJ.png" rel="nofollow noreferrer">this is what I'm trying to do but it keeps on saying something is wrong in line 15</a></p> | <p>There is an error in your code because you can not have an <code>elif</code> statement after an <code>else</code> statment.</p>
<p>Your code</p>
<pre class="lang-py prettyprint-override"><code>if #something:
#something
else #something:
#something
elif #something:
#something
</code></pre>
<p>Correct way:</p>... | i dont know where im wrong in this python code of conditional statements using if elif and else | python|conditional-statements | -1 | 19 | 2 | 72,223,815 | 72,223,815 | 0 | true | 2022-05-13T02:11:06.727Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
i dont know where im wrong in this python code of conditional statements using if elif and else<p><a href="https://i.stack.imgur.com/kK4XJ.png" rel="nofollow... |
72,223,739 | Fixed border tables html css<p>I want to make the borders of the table round. If I change the background color, or make a grid in the table, then everything goes beyond the rounded corners
<br />
Is it possible to fix it?</p>
<p><a href="https://i.stack.imgur.com/ok44B.png" rel="nofollow noreferrer"><img src="https://i... | <p>a simple solution would be to add <code>overflow: hodden</code> to your 'div.blueTable' rule</p> | Fixed border tables html css | html|css | -1 | 26 | 1 | 72,224,264 | 72,224,264 | 0 | true | 2022-05-13T02:07:04.717Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Fixed border tables html css<p>I want to make the borders of the table round. If I change the background color, or make a grid in the table, then everything ... |
72,225,102 | Run two variable loop to increment the column number for diff. sheets<p>I want to run this in loop by taking two variables for example i and j. Suppose i for sheet 1 and 2 and j for Sheet 3 until I dont reach the end column of sheet 1 or 2.</p>
<pre><code>Sub CopyColumn()
'
' CopyColumn Macro
'
'
Sheets("Shee... | <p>Try two loops</p>
<pre><code> Sub CopyColumn()
Dim sh1 As Worksheet, sh2 As Worksheet
Dim dest As Worksheet, i, j
Dim L1 As Long, L2 As Long
Set sh1 = Sheets("Sheet1")
Set sh2 = Sheets("Sheet2")
Set dest = Sheets("Sheet3")
With sh1
L1 = .Cells.Fin... | Run two variable loop to increment the column number for diff. sheets | excel|vba | -1 | 35 | 1 | 72,225,581 | 72,225,581 | 0 | true | 2022-05-13T06:07:06.223Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Run two variable loop to increment the column number for diff. sheets<p>I want to run this in loop by taking two variables for example i and j. Suppose i for... |
72,225,544 | How to convert input arguments to program as json in python<p>Here is my code</p>
<pre><code>import json
import sys
def main():
payloads=sys.argv[2]
payloads=payloads.replace(",",",\"")
payloads=payloads.replace(":","\":")
payloads=payloads.replace(&quo... | <p>The easyest way to solve your problem would be to add good quotes to the input but if you can't, you can use this</p>
<pre class="lang-py prettyprint-override"><code>import json, sys
def main():
payloads=sys.argv[2]
payloads=payloads.replace(",",",\"")
payloads=payloads.replace(... | How to convert input arguments to program as json in python | python|python-3.x | -1 | 37 | 2 | 72,225,963 | 72,225,963 | 0 | true | 2022-05-13T06:57:10.187Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to convert input arguments to program as json in python<p>Here is my code</p>
<pre><code>import json
import sys
def main():
payloads=sys.argv[2]
... |
72,221,908 | How can I handle pagination with Scrapy and Splash, if the href of the button is javascript:void(0)<p>I am trying to scrape the names and links of universities from this website: <a href="https://www.topuniversities.com/university-rankings/world-university-rankings/2021" rel="nofollow noreferrer">https://www.topunivers... | <p>You don't need splash for this simple website.</p>
<p>Try loading following link instead:</p>
<p><a href="https://www.topuniversities.com/sites/default/files/qs-rankings-data/en/2057712.txt" rel="nofollow noreferrer">https://www.topuniversities.com/sites/default/files/qs-rankings-data/en/2057712.txt</a></p>
<p>This ... | How can I handle pagination with Scrapy and Splash, if the href of the button is javascript:void(0) | python|web-scraping|scrapy|scrapy-splash | -1 | 49 | 1 | 72,226,020 | 72,226,020 | 0 | true | 2022-05-12T20:48:26.080Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I handle pagination with Scrapy and Splash, if the href of the button is javascript:void(0)<p>I am trying to scrape the names and links of universiti... |
72,225,925 | How to split a string with whitespace and underscore in Python<p>I hope this will find you guys well, can you please show me how to split text with whitespace and underscore?
For Example,</p>
<pre><code>txt= "Im Alex_from_canada"
</code></pre>
<p>Output should be</p>
<pre><code>['Im','Alex','frpm','canada']
<... | <p>you could try something like :</p>
<pre><code>import re
r = re.compile("\s+|_")
s = "bal1 bla2_bla3"
print(r.split(s)) --->['bal1', 'bla2', 'bla3']
</code></pre> | How to split a string with whitespace and underscore in Python | python|split | -1 | 72 | 1 | 72,226,025 | 72,226,025 | 0 | true | 2022-05-13T07:32:56.873Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to split a string with whitespace and underscore in Python<p>I hope this will find you guys well, can you please show me how to split text with whitespac... |
72,225,989 | why does this log the old value and not the new value<pre><code>const [title,setTitle] = useState("");
const titleHandler=e => {
setTitle(e.target.value)
console.log(title)
}
</code></pre>
<p>Why does this code log the old value of title and not the new one. I'm new to js and react please can anyone e... | <p>it happend because when you call <code>setTitle</code> it doesn't update the state instantaneously but it trigger a rerender of the component with the updated state</p>
<p>if you do</p>
<pre><code>const [title,setTitle] = useState("");
const titleHandler=e => {
setTitle(e.target.value)
console.log('up... | why does this log the old value and not the new value | javascript|reactjs|react-native|react-hooks|use-state | -1 | 23 | 1 | 72,226,041 | 72,226,041 | 0 | true | 2022-05-13T07:38:52.233Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
why does this log the old value and not the new value<pre><code>const [title,setTitle] = useState("");
const titleHandler=e => {
setTitle(e.tar... |
72,219,793 | how i can add multiple themes in flutter?<p>i'm new in flutter space 'just 3 weeks from first code i wrote' and wanna to help in this issue, i develop an application with multiple themes 'just colors' and i want to get it in settings page like this:
<a href="https://i.stack.imgur.com/VTL3C.jpg" rel="nofollow noreferrer... | <p>To change the theme in your flutter application you need to organize your <code>themeData</code> like this</p>
<pre><code>import 'package:flutter/material.dart';
ThemeData blueTheme = ThemeData(
appBarTheme: AppBarTheme(
color: Color.fromARGB(255, 240, 240, 240),
iconTheme: IconThemeData(color: Color.... | how i can add multiple themes in flutter? | android|flutter | -1 | 109 | 1 | 72,226,562 | 72,226,562 | 0 | true | 2022-05-12T17:21:06.647Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how i can add multiple themes in flutter?<p>i'm new in flutter space 'just 3 weeks from first code i wrote' and wanna to help in this issue, i develop an app... |
72,221,443 | Angular App Not Working When Moving to Python Flask<p>Not sure what information to give so will do as much as I can.</p>
<p>Currently have an Angular app sitting on IIS and using Classic ASP. All works fine. There is a dropdown which fetches some JSON that then populates a table.</p>
<p>Now, I have moved this over to F... | <p>Python flask uses Jinja templates that use <code>{{}}</code> which is what AngularJS also uses so doing <code>{{ '{{ variable_name }}' }}</code> in the relevant places solved my issues</p> | Angular App Not Working When Moving to Python Flask | python|angular|flask|iis | -1 | 79 | 1 | 72,227,469 | 72,227,469 | 0 | true | 2022-05-12T19:56:00.367Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Angular App Not Working When Moving to Python Flask<p>Not sure what information to give so will do as much as I can.</p>
<p>Currently have an Angular app sit... |
72,226,862 | Download file from HTTP response NodeRed<p>In Node-Red, I'm trying to call an API that provides me with a csv file full of data, I make a http request and get the following return:</p>
<pre><code>{
"_msgid": "60d0351dcf215557",
"payload": "",
"topic": "",
&quo... | <p>The files content would be in the <code>msg.payload</code> but looking at that response the file returned by the server was empty.</p>
<p>This can be seen by <code>msg.payload</code> being empty and <code>msg.headers.content-length</code> being <code>0</code></p> | Download file from HTTP response NodeRed | javascript|http|node-red | -1 | 198 | 1 | 72,227,674 | 72,227,674 | 0 | true | 2022-05-13T08:51:50.253Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Download file from HTTP response NodeRed<p>In Node-Red, I'm trying to call an API that provides me with a csv file full of data, I make a http request and ge... |
72,214,336 | Python Scrapy Web Scraping : problem with getting URL inside the onclick element which has ajax content<p>I am beginner for the web scraping with scrapy . I try to scrape user reviews for specific book from goodreads.com . I want to scrape all of the reviews about book so i must parse every review page . There is a nex... | <p>Instead of following code:</p>
<pre><code>next_page = response.xpath("(//a[@class='next_page'])[1]/@onclick")
if next_page:
url = response.urljoin(next_page[0].extract())
yield scrapy.Request(url,callback=self.parse_page)
</code></pre>
<p>Try this instead:</p>
<p>First import this repository:</p>
<... | Python Scrapy Web Scraping : problem with getting URL inside the onclick element which has ajax content | javascript|python|ajax|scrapy|web-crawler | -1 | 75 | 1 | 72,227,708 | 72,227,708 | 0 | true | 2022-05-12T10:57:24.560Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python Scrapy Web Scraping : problem with getting URL inside the onclick element which has ajax content<p>I am beginner for the web scraping with scrapy . I ... |
72,228,743 | Partial Derivative term in the Gradient Descent Algorithm<p>I'm learning the "Machine Learning - Andrew Ng" course from Coursera. In the lesson called "Gradient Descent", I've found the formula a bit complicated. The theorem is consist of "<strong>partial derivative</strong>" term. <br/>
T... | <p>Differentiation of <code>x²</code> is <code>2x</code>.
Similarly, differentiation of <code>∑(h θ(x) − y(i) )²</code> is <code>2 * ∑(h θ(x) − y(i) )</code>.
Therefore, differentiation of <code>1/2m * ∑(h θ(x) − y(i) )²</code> is <code>1/m * ∑(h θ(x) − y(i) )</code>.</p> | Partial Derivative term in the Gradient Descent Algorithm | machine-learning|gradient-descent | -1 | 55 | 1 | 72,228,918 | 72,228,918 | 0 | true | 2022-05-13T11:21:18.607Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Partial Derivative term in the Gradient Descent Algorithm<p>I'm learning the "Machine Learning - Andrew Ng" course from Coursera. In the lesson cal... |
72,228,157 | Find sorting algorithm for an elevators floor travel schedule, starting from the current floor with preselected floors to reach and a travel direction<p>I'm making an elevator in react, But I need to make a function that sorts an array to the nearest to the number X and also there is a condition if the elevator goes up... | <p>I guess you need sth like this</p>
<p>Whenever you go up, you need to find all greater numbers and sort them in ascending order so elevator will stop at the next possible floor as it goes up.</p>
<p>Then find all lower numbers and sort them in reverse order.</p>
<p>The opposite procedure will be done if you choose t... | Find sorting algorithm for an elevators floor travel schedule, starting from the current floor with preselected floors to reach and a travel direction | javascript|arrays|algorithm|sorting | -1 | 132 | 5 | 72,229,201 | 72,229,201 | 0 | true | 2022-05-13T10:32:15.193Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Find sorting algorithm for an elevators floor travel schedule, starting from the current floor with preselected floors to reach and a travel direction<p>I'm ... |
72,228,826 | Write data in unknown encoding<p>Is it possible write data to a file in an unknown encoding?
I cannot decode email headers, for example message-id, because if I use handler ignore or a replace
<a href="https://docs.python.org/3/library/codecs.html#error-handlers" rel="nofollow noreferrer">https://docs.python.org/3/libr... | <p>You want to handle raw <code>bytes</code> then, not strings. <code>open</code> the output file in binary mode. Note this:</p>
<blockquote>
<p><code>sys.argv</code></p>
<p>..</p>
<p><strong>Note:</strong> On Unix, command line arguments are passed by bytes from OS. Python decodes them with filesystem encoding and “su... | Write data in unknown encoding | python|python-3.x|encoding|milter | -1 | 189 | 1 | 72,229,221 | 72,229,221 | 0 | true | 2022-05-13T11:27:02.313Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Write data in unknown encoding<p>Is it possible write data to a file in an unknown encoding?
I cannot decode email headers, for example message-id, because i... |
72,229,830 | the for loop exit after it has been executed one time<p>the <strong>for</strong> loop in the following code exit after removing one class and doesn't remove the other one unless I click the button again</p>
<p>I want to remove the class <strong>hidden</strong> from 2 divs but I don't want to use <strong>querySelectorAl... | <p>Using a forEach would help -</p>
<pre class="lang-js prettyprint-override"><code>show.addEventListener('click', () => {
items.forEach((element) => {
element.classList.remove('hidden');
})
});
</code></pre> | the for loop exit after it has been executed one time | javascript|html|css | -1 | 43 | 1 | 72,229,887 | 72,229,887 | 0 | true | 2022-05-13T12:44:44.107Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
the for loop exit after it has been executed one time<p>the <strong>for</strong> loop in the following code exit after removing one class and doesn't remove ... |
72,229,852 | I want to get a way to highlight code using the python Tkinter Text control<p>I want to implement a code highlighting function, but I don't know how to use this <code>tk.Text</code> 。 (not necessarily python, of course)</p>
<p>I hope to get a highlighted function <code>f (x, y, z, a)</code> whose function is to highlig... | <p>You should use search function to search the first index of you word and then use this "%s+%sc"%(starting_index(that you will find with the help of search function),length of your word)</p>
<p>if you don't want to download any external module then I suggest you to use <strong>idlelib</strong> this is a bui... | I want to get a way to highlight code using the python Tkinter Text control | python|tkinter | -1 | 33 | 1 | 72,230,680 | 72,230,680 | 0 | true | 2022-05-13T12:46:33.327Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I want to get a way to highlight code using the python Tkinter Text control<p>I want to implement a code highlighting function, but I don't know how to use t... |
72,224,366 | Why my code work fine on chrome but not firefox?<p>I am creating a split-flap. It works fine in Chrome, but in firefox, during the second rotation period, it is not smooth as in chrome. How can I fix it?</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="sni... | <p>After several tries, I have made it work properly by adding the following CSS attribute to the <code>splitFlap</code> class</p>
<p><code>transform-style: preserve-3d;</code></p> | Why my code work fine on chrome but not firefox? | javascript|html|css | -1 | 94 | 2 | 72,230,692 | 72,230,692 | 0 | true | 2022-05-13T04:16:03.877Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why my code work fine on chrome but not firefox?<p>I am creating a split-flap. It works fine in Chrome, but in firefox, during the second rotation period, it... |
72,231,225 | List changed in a function<p>I'm supposed to rotate the list iteratively which means put the first element to the last, and the rest move forward until it back to the original list.</p>
<p>Here is the main function</p>
<pre><code>a = input("Enter your list: ")
alist = a.split(' ')
alist = [int(alist[i]) for i... | <p>the problem is that when you're doing origin = alist you're actually creating a pointer to the same object, you're not creating a copy of the list.
In order to create a copy of the list I suggest you use the following notation:</p>
<pre><code>origin = alist[:]
</code></pre>
<p>By doing that you're creating another o... | List changed in a function | python|python-3.x|list|function|loops | -1 | 44 | 1 | 72,231,318 | 72,231,318 | 0 | true | 2022-05-13T14:30:09.933Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
List changed in a function<p>I'm supposed to rotate the list iteratively which means put the first element to the last, and the rest move forward until it ba... |
72,225,608 | ASP.NET show dynamic changes on all clients<p>I'm a beginner with ASP.NET and webapplications in general.</p>
<p>For a project I have to interact with an enginnering software to read some data, for this I have to to use a ASP.NET project based on the .Net Framework 4.8.</p>
<p>For now I called these functions with butt... | <p>Well, running some in-memmory code for one user of course will not work for other users. You probably would be best to write a seperate console application, place it on the server, and then say schedule it to run ever 5 minuites or whatever. That console or desktop program would thus then write out the data to a da... | ASP.NET show dynamic changes on all clients | c#|html|asp.net|.net | -1 | 53 | 1 | 72,232,164 | 72,232,164 | 0 | true | 2022-05-13T07:02:55.620Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
ASP.NET show dynamic changes on all clients<p>I'm a beginner with ASP.NET and webapplications in general.</p>
<p>For a project I have to interact with an eng... |
72,231,494 | Deploy API Platform 2.6 and Symfony 5.4<p>I created a project with Api platform 2.6 & Symfony 5.4 and then I uploaded it with FileZilla (FTP).</p>
<p>I followed the step to deploy a Symfonyproject update composer packages and change database in .env.
I sent the project online so that it would be avalaible on a doma... | <p>Thanks for your help everybody !</p>
<p>I found the solution.
I was missing a htaccess file in the /public directory.
I found one here : <a href="https://github.com/symfony/recipes-contrib/blob/main/symfony/apache-pack/1.0/public/.htaccess" rel="nofollow noreferrer">https://github.com/symfony/recipes-contrib/blob/ma... | Deploy API Platform 2.6 and Symfony 5.4 | symfony|api-platform.com | -1 | 50 | 2 | 72,232,380 | 72,232,380 | 0 | true | 2022-05-13T14:48:59.333Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Deploy API Platform 2.6 and Symfony 5.4<p>I created a project with Api platform 2.6 & Symfony 5.4 and then I uploaded it with FileZilla (FTP).</p>
<p>I f... |
72,233,182 | How do I get my webpage go to another page when the validations are true<p>I need help trying to get my webpage to go to a thank you page if all validation are true and entered correctly then it would go there. But I have no luck trying to get it to work. If there is any way that I can fix it.</p> | <p>Assuming that this code from your codepen validates before submit.</p>
<pre class="lang-js prettyprint-override"><code>if (isValid == true) {
$("registration_form").submit();
}
</code></pre>
<p>You have to add:</p>
<pre class="lang-js prettyprint-override"><code>if (isValid == true) {
$("regis... | How do I get my webpage go to another page when the validations are true | javascript|window.location | -1 | 18 | 1 | 72,233,424 | 72,233,424 | 0 | true | 2022-05-13T17:08:36.433Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I get my webpage go to another page when the validations are true<p>I need help trying to get my webpage to go to a thank you page if all validation a... |
72,232,654 | why the output is blank?<p>I have to write a program for matrix multiplication.there may be an easier algorithm,but i want to know what is the problem here and if there is anything wrong with my algorithm or ....
if there is any need for additional info,please tell me.the program should multiply two matrixes with varia... | <p>Changed increment/decrement instructions and added output statements:</p>
<pre><code>#include <stdio.h>
int main()
{
int m,n,l,a,b;
printf("Enter m, n, l: ");
scanf("%d %d %d",&m,&n,&l);
int A[m][n],B[n][l],AB[m][l];
for(int i=0;i<m;i++){
for(int ... | why the output is blank? | c|output | -1 | 63 | 1 | 72,233,617 | 72,233,617 | 0 | true | 2022-05-13T16:22:09.667Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
why the output is blank?<p>I have to write a program for matrix multiplication.there may be an easier algorithm,but i want to know what is the problem here a... |
72,201,862 | How do I set up bind via webmin to delegate dns lookups for certain subdomains?<p>I have several docker containers with some web applications running via docker compose. One of the containers is a custom DNS server with Bind and Webmin installed. Webmin gives a nice web UI allowing me to update Bind DNS configuration w... | <p>I guess the workaround is to use fully qualified name when creating the zone file. Instead of creating a master zone <strong>example.com</strong> and listing <strong>server1</strong> inside that zone I am creating a master zone with <strong>server1.example.com</strong>. It means I have to create a zone file for ever... | How do I set up bind via webmin to delegate dns lookups for certain subdomains? | docker|dns|bind | -1 | 69 | 1 | 72,233,670 | 72,233,670 | 0 | true | 2022-05-11T13:23:32.017Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I set up bind via webmin to delegate dns lookups for certain subdomains?<p>I have several docker containers with some web applications running via doc... |
72,233,579 | Integer promotions in C programming<p>In the code below which statements have integer promotions?</p>
<pre><code>unchar a;
unchar b;
short c;
a = 0xFE;
b = 0xFE;
c = a+b;
int d = a==b
</code></pre>
<p>I got the question like this in a question series. How to answer it.</p>
<p>Moreover,Some data types like char , short ... | <blockquote>
<p>which statements have integer promotions.</p>
</blockquote>
<blockquote>
<p><code>unchar a;</code><br>
<code>unchar b;</code><br>
<code>short c;</code></p>
</blockquote>
<p>These appear to be declarations, and possibly <code>unchar</code> is an alias for <code>unsigned char</code>. There are no expressi... | Integer promotions in C programming | c | -1 | 76 | 1 | 72,233,806 | 72,233,806 | 0 | true | 2022-05-13T17:44:45.860Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Integer promotions in C programming<p>In the code below which statements have integer promotions?</p>
<pre><code>unchar a;
unchar b;
short c;
a = 0xFE;
b = 0... |
72,231,453 | Is it possible to average the output of multiple classification models using pipeline in sklearn?<p>As an example, suppose there is a random forest and a logistic regression model that accept the same input data, and I want the inference result to be the average of the probabilities of these two models.</p>
<p>In this ... | <p>A <code>VotingClassifier</code> with <code>voting="soft"</code> will work for this purpose.</p> | Is it possible to average the output of multiple classification models using pipeline in sklearn? | python|machine-learning|scikit-learn|pipeline|ensemble-learning | -1 | 47 | 1 | 72,234,164 | 72,234,164 | 0 | true | 2022-05-13T14:45:54.077Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is it possible to average the output of multiple classification models using pipeline in sklearn?<p>As an example, suppose there is a random forest and a log... |
72,233,616 | Amazon Redshift- How to get start date of the Week from existing daily date field from the table?<p>I am trying to get start date of the week from existing daily date field from the same table. For example daily dates from 05/08/2022 to 05/14/2022 , the start of the week date output need to come as 05/08/2022 for all d... | <p>The date_trunc() function performs this operation - <a href="https://docs.aws.amazon.com/redshift/latest/dg/r_DATE_TRUNC.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/redshift/latest/dg/r_DATE_TRUNC.html</a></p> | Amazon Redshift- How to get start date of the Week from existing daily date field from the table? | sql|date|amazon-redshift | -1 | 213 | 1 | 72,235,004 | 72,235,004 | 0 | true | 2022-05-13T17:48:00.050Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Amazon Redshift- How to get start date of the Week from existing daily date field from the table?<p>I am trying to get start date of the week from existing d... |
72,236,374 | SQL FOREIGN KEY ERROR (errno: 150 "Foreign key constraint is incorrectly formed")<p>Hi I have this three very simple tables but I can't fix it to get the right format of foreign key.</p>
<p>CREATE TABLE company(
company_name varchar(30) UNIQUE NOT NULL,
bid INT(15) NOT NULL UNIQUE,
cid INT(15) NOT NULL UNIQUE,
FOREIGN ... | <p>The problem is that you have the <code>company</code> table reference the <code>branch</code> and <code>contact</code> table before they are created.
Also, the branch table references the contact table and vice versa so the database goes like that:</p>
<p>Creating the <code>contact</code> table ... there is a <code>... | SQL FOREIGN KEY ERROR (errno: 150 "Foreign key constraint is incorrectly formed") | mysql|sql|foreign-keys | -1 | 46 | 1 | 72,236,464 | 72,236,464 | 0 | true | 2022-05-13T23:58:24.723Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SQL FOREIGN KEY ERROR (errno: 150 "Foreign key constraint is incorrectly formed")<p>Hi I have this three very simple tables but I can't fix it to get the rig... |
72,236,560 | PHP file is not reading my js script file<p>I am trying to make sure my php file is reading my js file and when I click my decrease button, my console says</p>
<pre><code>Uncaught ReferenceError: decrease is not defined
onclick http://localhost:3000/index.php:1
</code></pre>
<p>I know this is indicating that my decreas... | <p>From my understanding when working with a webserver, I do not use relative paths for my resources like js, CSS or images.</p>
<p>If your directory looks like this:</p>
<pre><code>Main
|- index.php
|- index.js
</code></pre>
<p>Then you can import your javascript file like so without the dot <code>.</code>:</p>
<pre... | PHP file is not reading my js script file | javascript|php|html|apache | -1 | 30 | 1 | 72,236,641 | 72,236,641 | 0 | true | 2022-05-14T00:47:23.353Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
PHP file is not reading my js script file<p>I am trying to make sure my php file is reading my js file and when I click my decrease button, my console says</... |
72,237,193 | Add Python terminal in VS Code<p>I am trying to run Python from VS Code. I have already activated python through the terminal. However, in the terminal selector in the lower right of the screen, I cannot find Python terminal option there:
<a href="https://i.stack.imgur.com/t0D4P.jpg" rel="nofollow noreferrer"><img src=... | <p>There is no Python terminal. If you are asking about loading Python shell you just have to type <code>python</code> into your terminal to load the Python shell</p> | Add Python terminal in VS Code | python|visual-studio-code | -1 | 139 | 2 | 72,237,242 | 72,237,242 | 0 | true | 2022-05-14T03:44:56.840Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Add Python terminal in VS Code<p>I am trying to run Python from VS Code. I have already activated python through the terminal. However, in the terminal selec... |
72,235,701 | best way to compare images for similarity in android<p>how to compare two images, to know are they similar for 100%?
I was getting path of all images from mediastore, then converted to bitmap and compared using bitmap.sameAs(bitmapToCompare), but it takes to much memory and got outofmemory exepcetion
Now i am trying to... | <p>First off, let's correct you. Neither your OpenCV snippet not Android can directly compare if two images are "similar". They can compare if they are exactly the same. That's not the same thing. You'd have to decide if its good enough.</p>
<p>Secondly, OpenCV is overkill for this. If the two images are ... | best way to compare images for similarity in android | android|kotlin | -1 | 181 | 1 | 72,237,305 | 72,237,305 | 0 | true | 2022-05-13T21:43:44.587Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
best way to compare images for similarity in android<p>how to compare two images, to know are they similar for 100%?
I was getting path of all images from me... |
72,237,314 | How do I find the best possible combination which gives the cheapest price<p>The tickets are:</p>
<ol>
<li>One adult ($20)</li>
<li>One child (one adult can only bring two children/children are not allowed to go by themselves) ($12)</li>
<li>One senior ($16)</li>
<li>Family ticket (up to two adults or seniors, and up t... | <p>I would try and break it up into its cases</p>
<pre><code>def best_price(adults,seniors,children):
if adults + seniors + children < 6:
# too small to get a group discount
return best_price_no_group(adults,seniors,children)
else:
# we can get a group discount but maybe its not best
... | How do I find the best possible combination which gives the cheapest price | python | -1 | 48 | 1 | 72,237,800 | 72,237,800 | 0 | true | 2022-05-14T04:17:51.777Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I find the best possible combination which gives the cheapest price<p>The tickets are:</p>
<ol>
<li>One adult ($20)</li>
<li>One child (one adult can ... |
72,211,126 | SQL (INSERT INTO) COMMAND DOES NOT WORK IN OLEDB IN VB.NET<p>I want to update in the "CIU" column in the database "GSDTS" and retrieve the data or values from the database "IFGTS" in the column "PRSOBNET" based on the conditions of the "ITM" column and the "GDN&quo... | <p>I found a solution according to the link below
Here's <a href="https://stackoverflow.com/questions/12737221/update-msaccess-table-from-another-access-table-using-sql">a link</a>!</p>
<pre><code>Sub InsertIntoGsdts()
Try
Dim sql As String = "update GSDTS as t1 inner join IFGTS as t2 on t1.[IT... | SQL (INSERT INTO) COMMAND DOES NOT WORK IN OLEDB IN VB.NET | sql|vb.net|oledbconnection|oledbcommand | -1 | 57 | 1 | 72,238,131 | 72,238,131 | 0 | true | 2022-05-12T06:43:56.457Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SQL (INSERT INTO) COMMAND DOES NOT WORK IN OLEDB IN VB.NET<p>I want to update in the "CIU" column in the database "GSDTS" and retrieve th... |
72,230,608 | Discord.js timeout timer not working and delete right away<p>Im trying to send a embed then after 5 seconds ins gonna get deleted. I haved tried this.</p>
<pre><code> client.on('messageCreate', async (message) => {
if (message.content === '&unlock') {
await message.channel
.permissionOver... | <p>This code will work for you and employs the new method of delayed message.delete()</p>
<pre class="lang-js prettyprint-override"><code> client.on('messageCreate', async (message) => {
if (message.content === '&unlock') {
const channel = message.channel;
channel.permissionOverwrites.edit(me... | Discord.js timeout timer not working and delete right away | discord.js | -1 | 71 | 2 | 72,241,055 | 72,241,055 | 0 | true | 2022-05-13T13:45:57.887Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Discord.js timeout timer not working and delete right away<p>Im trying to send a embed then after 5 seconds ins gonna get deleted. I haved tried this.</p>
<p... |
72,225,405 | How do I remove this delivery notification from here?<p>I used STMP PHPMailer to send emails to newly clients on website. It works, but the weird thing is that it gives a delivery notification which I don't want.</p>
<p>How do I get rid of it?</p>
<p><a href="https://i.stack.imgur.com/M7Xa6.png" rel="nofollow noreferre... | <p>You have enabled debug output, so all you need to do is not do that. You will have a line somewhere that says:</p>
<pre><code>$mail->SMTPDebug = 2;
</code></pre>
<p>or similar. Just delete it.</p> | How do I remove this delivery notification from here? | php|html|phpmailer | -1 | 22 | 1 | 72,242,554 | 72,242,554 | 0 | true | 2022-05-13T06:42:00.303Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I remove this delivery notification from here?<p>I used STMP PHPMailer to send emails to newly clients on website. It works, but the weird thing is th... |
72,213,077 | Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client. Why?<p>I am having a issue while saving the image file in MognoDB. It is saying the error</p>
<blockquote>
<p>(node:14849) UnhandledPromiseRejectionWarning: Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the c... | <p>I couldn't properly defined the <strong>if</strong> condition with else.</p>
<blockquote>
<p>Here is the code below rewritten.</p>
</blockquote>
<p><strong>imageUpload.js</strong></p>
<pre><code>const multer = require("multer");
const uploadImage = require("../../models/fileUpload");
// const St... | Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client. Why? | javascript|node.js|mongodb|backend | -1 | 55 | 2 | 72,242,610 | 72,242,610 | 0 | true | 2022-05-12T09:24:02.473Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client. Why?<p>I am having a issue while saving the image file in MognoDB. It is... |
72,236,018 | How to use Python to parse custom file into JSON format<p>I am trying to parse a machine/software generated file type into a JSON file type for easy analysis with other software and other Python scripts. The file is structured similarly to a JSON file, but not automatically convertible as far as I can tell.</p>
<p>The ... | <p>The following python module should help. Please see the example:</p>
<pre><code>!pip install ttp
from ttp import ttp
import json
data_to_parse = """
PACKET fileName.bpf
STYLE 502
last_modified 1651620170 # Tue May 03 19:22:50 2022
STRUCTURE BuildInfo
PARAM Version
Val... | How to use Python to parse custom file into JSON format | python|json|parsing | -1 | 65 | 1 | 72,256,828 | 72,256,828 | 0 | true | 2022-05-13T22:39:45.013Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to use Python to parse custom file into JSON format<p>I am trying to parse a machine/software generated file type into a JSON file type for easy analysis... |
72,206,609 | A-Frame scene optimization for mobile devices<p>I have created a grocery store project built on A-Frame with 63 products and 3 shelves.</p>
<ul>
<li>Screenshot: <a href="https://i.stack.imgur.com/A1x5u.jpg" rel="nofollow noreferrer">https://i.stack.imgur.com/A1x5u.jpg</a></li>
</ul>
<p>On the laptop, after the grocery ... | <p>I'd recommend looking at the <a href="https://aframe.io/docs/1.3.0/introduction/best-practices.html#performance" rel="nofollow noreferrer">Best Practices - Performance</a> docs.</p>
<p>In my experience the most common culprit is making too many draw calls. If you have identical objects it would be best to use <a hre... | A-Frame scene optimization for mobile devices | aframe | -1 | 72 | 1 | 72,256,845 | 72,256,845 | 0 | true | 2022-05-11T19:27:07.363Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
A-Frame scene optimization for mobile devices<p>I have created a grocery store project built on A-Frame with 63 products and 3 shelves.</p>
<ul>
<li>Screensh... |
72,232,495 | Xcode is damaged and refuse to run the code<p>When I press "Build" and/or "Run" buttons in Xcode (SwiftUI), it shows me an error and I get this message:</p>
<p>One of the paths in DEVELOPMENT_ASSET_PATHS does not exist: /Users/mohammedshaheen/Downloads/Clicker/Clicker/Preview Content</p> | <p>This worked with me! If the file "Preview Content" is not existing in your main project file, just create a new file called "Preview Content".</p>
<p>And the name is based on what is shown to you.</p> | Xcode is damaged and refuse to run the code | xcode|debugging|swiftui|error-handling | -1 | 359 | 1 | 72,264,094 | 72,264,094 | 0 | true | 2022-05-13T16:08:29.050Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Xcode is damaged and refuse to run the code<p>When I press "Build" and/or "Run" buttons in Xcode (SwiftUI), it shows me an error and I ge... |
72,226,673 | Multi Threading from a function to another function and back to the main function<p>currently this is my setup, python in PyCharm, and an Arduino Uno with MAX30100 sensor for heart rate. I am currently able to transmit data via pyserial into my pycharm from arduino, and will show the heartrate in pycharm.
But I want my... | <p>Thanks to @cguk70,</p>
<p>i managed to solve the problem, by putting the</p>
<pre><code> t1 = threading.Thread(target=arduino)
t1.start()
</code></pre>
<p>outside together with</p>
<pre><code>#cam start here ~~!!
cap = cv2.VideoCapture(0)
</code></pre>
<p>reason is that i am creating a new Arduin... | Multi Threading from a function to another function and back to the main function | python|arduino|serial-port|arduino-uno | -1 | 79 | 1 | 72,269,346 | 72,269,346 | 0 | true | 2022-05-13T08:36:29.603Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Multi Threading from a function to another function and back to the main function<p>currently this is my setup, python in PyCharm, and an Arduino Uno with MA... |
72,221,317 | Using Pivot to remove duplicated results adding new columns<p>I have the following table</p>
<p>[_teste_calendario_Table]</p>
<p><img src="https://i.stack.imgur.com/vzhya.png" alt="1" /></p>
<p>and when "Monstrengo" has the same value, I'd like to make a pivot, adding new columns "De1", "Ate1&q... | <p>I managed to find a solution; I had already tried something like it, but I problaby made a mistake with the syntax.
I changed the code</p>
<pre><code>select *
,MAX(CASE WHEN BBLA = 2 THEN de END) AS De1
,MAX(CASE WHEN BBLA= 2 THEN Ate END) AS Ate1
,MAX(CASE WHEN BBLA= 2 THEN Vencimento END) AS Vencimento1
,MAX(CASE ... | Using Pivot to remove duplicated results adding new columns | sql|sql-server|pivot | -1 | 24 | 1 | 72,274,665 | 72,274,665 | 0 | true | 2022-05-12T19:44:20.843Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Using Pivot to remove duplicated results adding new columns<p>I have the following table</p>
<p>[_teste_calendario_Table]</p>
<p><img src="https://i.stack.im... |
72,225,901 | RegEx for email with only one special character<p>I am trying to modify a regex for emails (gmail) that should contains special characters like _%+-. but only one, not more</p>
<p>I made 2 test cases below that are both passing</p>
<p>I also tried [a-z0-9]+.+[a-z0-9] instead of [A-Z0-9_%+-.] but both test cases are pas... | <p>I managed to find the right regex for my question</p>
<pre><code>/^[A-Z0-9]+(?:[_%+.-][A-Z0-9]+)?@[A-Z0-9.-]+\.[A-Z]{2,4}$/i
</code></pre> | RegEx for email with only one special character | regex | -1 | 107 | 4 | 72,274,738 | 72,274,738 | 0 | true | 2022-05-13T07:30:54.247Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
RegEx for email with only one special character<p>I am trying to modify a regex for emails (gmail) that should contains special characters like _%+-. but onl... |
72,229,001 | Generating aes cbc key from password and iv in dart<p>anyone havean idea how can i generate a key for aes encryption in dart from iv and password?
like this code written in C#:</p>
<pre><code> var spec = new Rfc2898DeriveBytes(Encoding.UTF8.GetBytes(PASSWORD), Encoding.UTF8.GetBytes(SALT), 65536);
byte[] key = ... | <p>Thank you everyone, I generated the key using C# code then I used it as constant in my flutter app, I really appreciate your help.</p> | Generating aes cbc key from password and iv in dart | c#|flutter|dart|encryption|aes | -1 | 126 | 1 | 72,276,198 | 72,276,198 | 0 | true | 2022-05-13T11:40:47.473Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Generating aes cbc key from password and iv in dart<p>anyone havean idea how can i generate a key for aes encryption in dart from iv and password?
like this ... |
72,202,763 | PHP variable added to page not populated - getting undefined in Javascript function call<p>I am having a bit of trouble, and i think my syntax and structure is correct but for some reason the function is failing.</p>
<p>products.php page</p>
<p>i have this function at the bottom of the page which takes the value of $ch... | <p>I found the issue and it was that my parsers file couldn't see my authentication file to get the function. Once i had add the correct path to the file it all worked.</p> | PHP variable added to page not populated - getting undefined in Javascript function call | javascript|php|html|function|variables | -1 | 40 | 1 | 72,287,449 | 72,287,449 | 0 | true | 2022-05-11T14:23:03.077Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
PHP variable added to page not populated - getting undefined in Javascript function call<p>I am having a bit of trouble, and i think my syntax and structure ... |
72,221,670 | Running STIGViewer on a Mac<p>I'm trying to run <a href="https://public.cyber.mil/stigs/srg-stig-tools/" rel="nofollow noreferrer">DISA</a>'s <a href="https://dl.dod.cyber.mil/wp-content/uploads/stigs/zip/U_STIGViewer_2-16.zip" rel="nofollow noreferrer">STIGViewer</a> on my Mac. It is a JAR file, and I have Java instal... | <p>My current version of Java is 16.0.2 (<code>java -version</code>). I tried to install Java 8, which is said to include JavaFX. I tried simple procedures (installers only, no environmental variables) but was not able to get anything to work. I tried to uninstall every install attempt to keep my system as close to its... | Running STIGViewer on a Mac | java|macos|stig | -1 | 428 | 1 | 72,295,465 | 72,295,465 | 0 | true | 2022-05-12T20:20:24.920Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Running STIGViewer on a Mac<p>I'm trying to run <a href="https://public.cyber.mil/stigs/srg-stig-tools/" rel="nofollow noreferrer">DISA</a>'s <a href="https:... |
72,056,029 | Binanace get Order Book in C# .Net Core<p>i'm part of a MarketMaker team and currently need to get crypto Market Data from Binance. Here are the requirements...</p>
<ul>
<li>get public market data, so dont have api keys</li>
<li>get order book market depth, at least last 1000 bid/ask prices.</li>
<li>use websocket, not... | <p>got it through BinanceDotNet api</p> | Binanace get Order Book in C# .Net Core | c#|websocket|real-time|binance|orderbook | -1 | 263 | 1 | 72,297,796 | 72,297,796 | 0 | true | 2022-04-29T09:48:11.973Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Binanace get Order Book in C# .Net Core<p>i'm part of a MarketMaker team and currently need to get crypto Market Data from Binance. Here are the requirements... |
72,230,732 | Changing server time externally causes gunicorn to enter critical-timeout state<p>I am using gunicorn to serve my local-hosted flask app on my (iot-like) raspberry. As a part of my application, users can change the date of the server (and sync with my external RTC).
However, every time the date is changed on the OS, it... | <p>I solved the issue by using waitress instead of gunicorn.
<br>It turns out that gunicorn is not suitable for such application as I work on.</p> | Changing server time externally causes gunicorn to enter critical-timeout state | gunicorn | -1 | 29 | 1 | 72,304,936 | 72,304,936 | 0 | true | 2022-05-13T13:54:22.357Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Changing server time externally causes gunicorn to enter critical-timeout state<p>I am using gunicorn to serve my local-hosted flask app on my (iot-like) ras... |
72,185,818 | How can I turn my SELECT INNER JOIN into an UPDATE<p>I've been trying to turn my SELECT INNER JOIN into an UPDATE.
The query I've made in BigQuery is as follows:</p>
<pre><code>SELECT tt.*
FROM `table` tt
INNER JOIN
(SELECT c_id, MIN(c_orderid) as OrderID, MIN(c_orderdate) AS MinDateTime
FROM `table`
GROUP ... | <p>As mentioned by @Pale, this error occurs when you try to update a table by updating joins with more than one row from the FROM clause as given in this <a href="https://cloud.google.com/bigquery/docs/reference/standard-sql/dml-syntax#from_keyword" rel="nofollow noreferrer">documentation</a>. You can create a separate... | How can I turn my SELECT INNER JOIN into an UPDATE | sql|google-bigquery | -1 | 77 | 1 | 72,319,234 | 72,319,234 | 0 | true | 2022-05-10T11:51:46.067Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I turn my SELECT INNER JOIN into an UPDATE<p>I've been trying to turn my SELECT INNER JOIN into an UPDATE.
The query I've made in BigQuery is as foll... |
72,201,886 | An effective way to implement Threads in Java on many DB records<p>I am in the development stages of an experimental system in Java with a heavy MySQL DB, containing thousands of records, for each of which is required to perform a number of operations, and in parallel.</p>
<p>I'm well aware of using Java Threads, but I... | <p><strong>Better design:</strong></p>
<p>Don't use cron or Events for a repeating task that <em>might</em> take longer than the allotted interval to finish.</p>
<p>Instead, have a separate program that runs through all 4000 items (taking as long as needed), then starts over.</p>
<p><strong>Further comments:</strong></... | An effective way to implement Threads in Java on many DB records | java|mysql|multithreading | -1 | 70 | 2 | 72,339,269 | 72,339,269 | 0 | true | 2022-05-11T13:24:55.493Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
An effective way to implement Threads in Java on many DB records<p>I am in the development stages of an experimental system in Java with a heavy MySQL DB, co... |
71,160,191 | Add cache-control to my python app in Flask<p>I am doing a few tests about my website.
My app was developped using flask,
I want to add cach-control "max-age=3600" in my function below :</p>
<pre><code>from flask import Flask, jsonify, abort
from waitress import serve
import pandas as pd
from time import t... | <p>We can add cach control using :</p>
<pre><code>@app.after_request
def apply_caching(response):
response.headers['Cache-Control'] = 'public, max-age=3600,stale-while-revalidate=600, stale-if-error=259200'
return response
</code></pre> | Add cache-control to my python app in Flask | python|flask | -1 | 32 | 1 | 72,462,152 | 72,462,152 | 0 | true | 2022-02-17T14:39:47.393Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Add cache-control to my python app in Flask<p>I am doing a few tests about my website.
My app was developped using flask,
I want to add cach-control "ma... |
72,140,390 | Why is JobConsumer not being hit/run?<p>I am trying out the new <code>MassTransit</code> <code>IJobConsumer</code> implementation, and although I've tried to follow the documentation, the <code>JobConsumer</code> I have written is never being run/hit.</p>
<p>I have:</p>
<ul>
<li><p>created the <code>JobConsumer</code> ... | <p>The setup of any type of repository for long running jobs is missing. We needed to either:</p>
<ul>
<li>explicitly specify that it was using InMemory (missing from the docs)</li>
<li>Setup saga repositories using e.g. EF Core.</li>
</ul>
<p>As recommended by MassTransit, we went with the option of setting up saga re... | Why is JobConsumer not being hit/run? | rabbitmq|.net-6.0|masstransit | -1 | 51 | 1 | 72,528,663 | 72,528,663 | 0 | true | 2022-05-06T10:57:54.193Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why is JobConsumer not being hit/run?<p>I am trying out the new <code>MassTransit</code> <code>IJobConsumer</code> implementation, and although I've tried to... |
72,171,379 | BeautifulSoup Scraping Results not showing<p>I am playing around with BeautifulSoup to scrape data from websites. So I decided to scrape empireonline's website for 100 greatest movies of all time.</p>
<p>Here's the link to the webpage:
<a href="https://www.empireonline.com/movies/features/best-movies-2/" rel="nofollow ... | <p>It's because in this page, the html tags you are looking for (the movie titles) are not in the original html page you request, but are added later by javascript. You can confirm this by loading the page in Chrome with <a href="https://developer.chrome.com/docs/devtools/javascript/disable/" rel="nofollow noreferrer">... | BeautifulSoup Scraping Results not showing | python|web-scraping|beautifulsoup|lxml.html | -1 | 82 | 3 | 72,171,627 | 72,171,627 | 0 | true | 2022-05-09T11:39:29.400Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
BeautifulSoup Scraping Results not showing<p>I am playing around with BeautifulSoup to scrape data from websites. So I decided to scrape empireonline's websi... |
72,201,124 | Converted a code from javascript to python, tryin to use Python Turtle<p>The code under does not draw any image:
"""</p>
<pre><code>import turtle
import numpy as np
turtle = turtle.Turtle()
steps = 24000
size = 61
def walk(i):
turtle.penup()
term = 1.0357902468 * 2 * np.pi * i/steps
turtl... | <p>To my eye, it seems like you used an <code>if</code> when you meant a <code>while</code>. Making that substitution, and tidying up the code, it does draw something:</p>
<pre><code>from turtle import Screen, Turtle
from math import sin, cos, pi
STEPS = 24000
SIZE = 61
def walk(i):
turtle.penup()
term = 1.0... | Converted a code from javascript to python, tryin to use Python Turtle | python|turtle-graphics | -1 | 37 | 1 | 72,204,483 | 72,204,483 | 0 | true | 2022-05-11T12:32:16.490Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Converted a code from javascript to python, tryin to use Python Turtle<p>The code under does not draw any image:
"""</p>
<pre><code>import tur... |
72,203,256 | Need to Pick Max Date when status = N otherwise No in MYSQL<p>I have a table which have records like this</p>
<pre><code> ID DATEADD STATUS
'A0011' '04/01/2018 11:58:31' 'C'
'A0011' '31/05/2019 10:02:36' 'N'
'B0022' '04/01/2018 11:58:31' 'N'
'B0022' '31/05/2019 10:02:36' 'N'
'B0022' '30/... | <p>You can use <code>NOT EXISTS</code>:</p>
<pre><code>SELECT i1.*
FROM INVOICE i1
WHERE i1.STATUS = 'N'
AND NOT EXISTS (
SELECT 1
FROM INVOICE i2
WHERE i2.ID = i1.ID
AND STR_TO_DATE(i2.DATEADD, '%d/%m/%Y %H:%i:%s') > STR_TO_DATE(i1.DATEADD, '%d/%m/%Y %H:%i:%s')
);
</code></pre>
<p>If the col... | Need to Pick Max Date when status = N otherwise No in MYSQL | mysql|sql|max|exists|date-formatting | -1 | 53 | 3 | 72,203,745 | 72,203,745 | 0 | true | 2022-05-11T14:57:24.583Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Need to Pick Max Date when status = N otherwise No in MYSQL<p>I have a table which have records like this</p>
<pre><code> ID DATEADD S... |
72,158,021 | Index error, code not splitting my string properly<p>I am trying to run pytest to test my function but I am running into an issue where I am trying to split a function called get_prepositional_phrase(amount) that returns a string of three variables into each variable but after I split it I keep getting a list index out... | <p>Line 115 will raise an exception if the <code>parts</code> list has only one (or zero) items in it. Given your code is</p>
<pre class="lang-py prettyprint-override"><code>one = parts[1]
# two = parts[1]
# three = parts[2]
</code></pre>
<p>I would say that you should be assigning <code>parts[0]</code>, rather than <c... | Index error, code not splitting my string properly | python|list|split | -1 | 39 | 1 | 72,158,043 | 72,158,043 | 0 | true | 2022-05-08T04:17:37.030Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Index error, code not splitting my string properly<p>I am trying to run pytest to test my function but I am running into an issue where I am trying to split ... |
72,147,984 | How to select multiple class class with same name in JS<p>I use PHP to dynamically render these lists that I fetched from the database, and each one has the same class, because I can't change it, it renders dynamically. I select these classes via JavaScript and create an event on click to open and close them with the ... | <p>You are only selecting the first <code>.likarton</code> instance - this is fixed by using <code>querySelectorAll()</code></p>
<hr />
<p>Since you are using <code>addEventListener</code>, you are getting the exact item being clicked as an argument into the callback.</p>
<p>The correct javascript to use this feature i... | How to select multiple class class with same name in JS | javascript|php | -1 | 67 | 2 | 72,148,146 | 72,148,146 | 0 | true | 2022-05-06T22:29:54.967Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to select multiple class class with same name in JS<p>I use PHP to dynamically render these lists that I fetched from the database, and each one has the ... |
72,157,749 | display Github data using "Github API" (SwiftUI)<p><strong>task</strong> to be done: Make your github data appear on the ContentView screen using the Github API.</p>
<pre><code>struct TaskEntry: Codable {
let id: Int
let title: String
}
</code></pre>
<pre><code> @State var results = [TaskEntry]()
f... | <p>try something like this approach to display some info retrieved from github.</p>
<p>You need to have a model for your info, here I called it <code>Repository</code>.
You then need to fetch the info from the github server using the appropriate url as shown in <code>loadData</code>. Finally you need to display the inf... | display Github data using "Github API" (SwiftUI) | github|swiftui|github-api | -1 | 89 | 2 | 72,158,114 | 72,158,114 | 0 | true | 2022-05-08T02:58:41.420Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
display Github data using "Github API" (SwiftUI)<p><strong>task</strong> to be done: Make your github data appear on the ContentView screen using the Github ... |
72,206,065 | Recipients(1) generates Error 440 array index out of bounds<p>I have Outlook VBA code that looks for a condition to match the exact subject and exact email address in one mailbox and then send a reply (Template) to the recipient of that email.</p>
<p>The script was working but lately is getting</p>
<blockquote>
<p>Erro... | <p>You run into a message with no recipients, hence the line accessing the very first recipient fails.</p>
<pre><code> recipientEmailString = ""
For Each recip In recips
Set pa = recip.PropertyAccessor
recipientEmailString = pa.GetProperty(PR_SMTP_ADDRESS) & ";" & recipi... | Recipients(1) generates Error 440 array index out of bounds | arrays|vba|outlook | -1 | 72 | 2 | 72,207,445 | 72,207,445 | 0 | true | 2022-05-11T18:37:57.820Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Recipients(1) generates Error 440 array index out of bounds<p>I have Outlook VBA code that looks for a condition to match the exact subject and exact email a... |
72,174,068 | Marker change based on text/address input using HERE map<p>I'm using HERE map plugin and I need to change marker position based on address/text input. I was looking for an examples in internet, but nothing was found.
Is it even possible to do such thing, using this plugin? May be someone can point out, where do I have ... | <p>You can refer to the documentation for "Search for a Location based on an Address" can be found at <a href="https://developer.here.com/documentation/examples/maps-js/services/geocode-a-location-from-address" rel="nofollow noreferrer">https://developer.here.com/documentation/examples/maps-js/services/geocod... | Marker change based on text/address input using HERE map | here-api|heremaps | -1 | 44 | 1 | 72,255,218 | 72,255,218 | 0 | true | 2022-05-09T14:58:15.443Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Marker change based on text/address input using HERE map<p>I'm using HERE map plugin and I need to change marker position based on address/text input. I was ... |
72,171,515 | JWT Validation in .Net Core<p>I've been struggling with this for a few days... There seems to be a number of similar questions on here but I can't find one which covers this exact scenario.</p>
<p>I have a node service which is creating a jsonwebtoken NPM package (RS256). Any other node service is able to validate th... | <p>Configure <code>JWT</code> bearer authentication (as well as the <a href="https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.authentication.jwtbearer.jwtbeareroptions.tokenvalidationparameters" rel="nofollow noreferrer">token validation options</a>) on <code>DI</code> using <a href="https://docs.micros... | JWT Validation in .Net Core | authentication|.net-core|jwt|rs256 | -1 | 90 | 1 | 72,171,755 | 72,171,755 | 0 | true | 2022-05-09T11:49:06.227Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
JWT Validation in .Net Core<p>I've been struggling with this for a few days... There seems to be a number of similar questions on here but I can't find one ... |
72,210,248 | Understanding a component in python guessing game code<p>I am new to Python and using some online resources to learn stuff.
I am trying to wrap my head around a guessing game, but I am getting confused by one condition in the code.</p>
<pre><code>secret_word = "giraffe"
guess = ""
guess_count = 0
gu... | <p>Split into two parts, you have:</p>
<pre><code>guess != secret_word
</code></pre>
<p>This means <code>guess</code> does not equal <code>secret_word</code></p>
<p><sup><em>clearly</em></sup></p>
<p>And</p>
<pre><code>not(out_of_guesses)
</code></pre>
<p><code>not out_of_guesses</code> is checking that variable is <co... | Understanding a component in python guessing game code | python|while-loop | -1 | 32 | 2 | 72,210,313 | 72,210,313 | 0 | true | 2022-05-12T04:48:03.217Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Understanding a component in python guessing game code<p>I am new to Python and using some online resources to learn stuff.
I am trying to wrap my head aroun... |
72,236,578 | how to scroll a local div element with selenium<p>I am trying to scroll through a local div element using <code>driver.find_element_by_xpath(element).send_keys(Keys.PAGE_DOWN)</code></p>
<p>the problem is that <code>element</code> is not an element that accepts key input, so the code throws an <code>selenium.common.exc... | <pre><code>driver.execute_script("arguments[0].scrollIntoView(true)", element)
</code></pre> | how to scroll a local div element with selenium | python|selenium|selenium-webdriver | -1 | 44 | 1 | 72,236,596 | 72,236,596 | 0 | true | 2022-05-14T00:53:11.063Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to scroll a local div element with selenium<p>I am trying to scroll through a local div element using <code>driver.find_element_by_xpath(element).send_ke... |
72,217,829 | how to create a timer minutes by pressing the button?<p>how to create a timer for 2 minutes by pressing the button?
I want to create a button that after pressing this button will unclicable for 2 minutes</p> | <p>Try this --</p>
<p>use Handler(import android.os.Handler;)</p>
<pre><code> btn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
btn.setEnabled(false);
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
//... | how to create a timer minutes by pressing the button? | java|android|button | -1 | 35 | 1 | 72,217,977 | 72,217,977 | 0 | true | 2022-05-12T14:55:41.930Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to create a timer minutes by pressing the button?<p>how to create a timer for 2 minutes by pressing the button?
I want to create a button that after pres... |
72,236,624 | Getting content that are not wrapped in tags<p>Here's what I'm dealing with; I don't have control of it.</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code><div id="foo">... | <p>Easier than I thought: Remove all childs that are not <code>a</code>, the rest is trivial.</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>$('button').click(function() {
... | Getting content that are not wrapped in tags | javascript|html | -1 | 26 | 2 | 72,237,032 | 72,237,032 | 0 | true | 2022-05-14T01:07:13.180Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Getting content that are not wrapped in tags<p>Here's what I'm dealing with; I don't have control of it.</p>
<p><div class="snippet" data-lang="js" data-hide... |
72,216,863 | context.getInitParameter("") and config.getInitParameter("") always returning null<p>I am a beginner in servlets and JSP and I've tried my best to get the values yet I am getting null, any help is welcomed:</p>
<p>This is basic code on using ServletConfig and ServletContext to get param-value from web.xml</p>
<p>Servle... | <ul>
<li><p>tag <element> must be removed from web.xml because it not part of XML definition in this case</p>
</li>
<li><p><context-param> must not be used inside the <servlet>, it must be replaced by <init-param> to access parameters from ServletConfig object. This is the reason why the OP is g... | context.getInitParameter("") and config.getInitParameter("") always returning null | java|xml|servlets | -1 | 125 | 1 | 72,283,617 | 72,283,617 | 0 | true | 2022-05-12T13:52:28.593Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
context.getInitParameter("") and config.getInitParameter("") always returning null<p>I am a beginner in servlets and JSP and I've tried my best to get the va... |
72,153,633 | Flutter: Submit TextFormField on Enter<p>I'm working on a desktop application for Windows with Flutter. I want to listen to keyboard keys. I made a Login page and it has two TextFormFields, (one for Username and the other for Password).
When I press the 'enter' key on the keyboard, I want the form to be submitted as I ... | <p>Add the field <code>onFieldSubmitted</code> and a <code>FormKey</code>:</p>
<pre class="lang-dart prettyprint-override"><code>// Widget attribute
final _formKey = GlobalKey<FormState>();
// Widget method: build()
Form(
key: _formKey,
child:
TextFormField(
onFieldSubmitted: (value) {
p... | Flutter: Submit TextFormField on Enter | flutter|listener|event-listener|keylistener|flutter-desktop | -1 | 314 | 1 | 72,155,159 | 72,155,159 | 0 | true | 2022-05-07T14:52:09.207Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Flutter: Submit TextFormField on Enter<p>I'm working on a desktop application for Windows with Flutter. I want to listen to keyboard keys. I made a Login pag... |
72,213,226 | Trouble with mysql subquery<p>I have a table with the following values: Name, Street,I'd , Value, Date.</p>
<p>I need to combine Name, Street, Id and make 2 subgroups by date. I want to compare the value in row with the same name, street and id but different date. And write only the ones with different value</p>
<p>Exa... | <p>dYou could use an aggregation approach here. Assuming that you want to flag any name, street, and ID combination which have 2 or more records on different dates, you may try:</p>
<pre class="lang-sql prettyprint-override"><code>SELECT name, street, ID, MAX(val) - MIN(val) AS diff
FROM yourTable
GROUP BY name, stree... | Trouble with mysql subquery | mysql|sql | -1 | 30 | 1 | 72,213,265 | 72,213,265 | 0 | true | 2022-05-12T09:35:15.063Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Trouble with mysql subquery<p>I have a table with the following values: Name, Street,I'd , Value, Date.</p>
<p>I need to combine Name, Street, Id and make 2 ... |
72,062,826 | how to delete from table based on query results<p>I have the following query which spits out some values and I need to basically modify it so that I can delete some rows from the source table based on whether the Ticker symbol and date are represented in the output of the select query.
Here is the query.</p>
<pre><code... | <pre><code> ;with cte_tenPct as (
select exchange, ticker
, CurrentDate = date, Prior_Date = (lag(date) over(partition by ticker order by date))
, Current_open = [open] , Prior_open = (lag([open]) over(partition by ticker order by date))
, Current_high = [high] , Prior_high = (lag([high]) over(partition b... | how to delete from table based on query results | sql | -1 | 28 | 1 | 72,062,873 | 72,062,873 | 0 | true | 2022-04-29T19:23:25.073Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to delete from table based on query results<p>I have the following query which spits out some values and I need to basically modify it so that I can dele... |
72,193,497 | Query to restrict results from left join<p>I have the following query</p>
<pre><code>select S.id, X.id, 15,15,1 from schema_1.tbl_2638 S
JOIN schema_1.tbl_2634_customid X on S.field_1=x.fullname
</code></pre>
<p>That returns the following results, where you can see the first column is duplicated on matches to the 2nd t... | <p>From your result you can do,this to achieve your result, for much more compicated structures, you can always take a look at window fucntions</p>
<pre><code>select S.id, MIN(X.id) x_id, 15,15,1 from schema_1.tbl_2638 S
JOIN schema_1.tbl_2634_customid X on S.field_1=x.fullname
GROUP BY 1,3,4,5
</code></pre>
<p>window ... | Query to restrict results from left join | sql|postgresql | -1 | 45 | 1 | 72,193,903 | 72,193,903 | 0 | true | 2022-05-10T22:19:34.327Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Query to restrict results from left join<p>I have the following query</p>
<pre><code>select S.id, X.id, 15,15,1 from schema_1.tbl_2638 S
JOIN schema_1.tbl_26... |
72,200,919 | I have to read config file and after reading it will run scp command to fetch all details from the available servers in config<p>I have a config file that has details like</p>
<pre><code> #pem_file username ip destination
./test.pem ec2-user 00.00.00.11 /Desktop/new/
./test1.pem ec2-user 00.00.00.22 /Desktop/new/
</c... | <p>Build your <code>while</code> <code>read</code> like this:</p>
<pre><code>#!/bin/bash
while read -r file user ip destination
do
echo $file
echo $user
echo $ip
echo $destination
echo ""
done < <(grep -Ev "^#" "$conffile")
</code></pre>
<ul>
<li>Use these variab... | I have to read config file and after reading it will run scp command to fetch all details from the available servers in config | linux|shell|ubuntu|amazon-ec2 | -1 | 22 | 1 | 72,206,445 | 72,206,445 | 0 | true | 2022-05-11T12:17:30.960Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I have to read config file and after reading it will run scp command to fetch all details from the available servers in config<p>I have a config file that ha... |
72,145,821 | Checkbox to show hide div .... on another page<p>This code works well for results on the same page. I've been looking around and cant find what i want...what i want is to see the results on a page 2, not page 1...by using this code. Not by a form solution either.</p>
<p>I saw something about using cookies. Not sure how... | <p>You can use <code>localStorage</code>. Try this</p>
<p><strong>Page 1</strong></p>
<pre><code><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery Show Hide Elements Using Checkboxes</title>
<script src="https://code.jquery.com/j... | Checkbox to show hide div .... on another page | php|jquery | -1 | 127 | 1 | 72,146,312 | 72,146,312 | 0 | true | 2022-05-06T18:17:32.547Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Checkbox to show hide div .... on another page<p>This code works well for results on the same page. I've been looking around and cant find what i want...what... |
72,157,815 | Ctrl still pressed with keyb_event()<p>i'm trying to help a friend with a macro for his mouse, but i've been strugling with an error.</p>
<p>But when i use :</p>
<pre><code>if(GetAsyncKeyState(VK_XBUTTON2)){
keybd_event(VK_LCONTROL, 0xA2, 0x0001, 0);
Sleep(50);
keybd_event(VK_LCONTROL, 0xA2, 0x0002, 0);
Slee... | <p>Don't use <a href="https://en.wikipedia.org/wiki/Magic_number_(programming)" rel="nofollow noreferrer">magic numbers</a> in your code, it makes it harder to read and understand. Use named constants instead. In this case, <code>KEYEVENTF_EXTENDEDKEY</code> and <code>KEYEVENTF_KEYUP</code>. Then you will notice that y... | Ctrl still pressed with keyb_event() | c++|windows|keyboard | -1 | 22 | 1 | 72,157,918 | 72,157,918 | 0 | true | 2022-05-08T03:21:16.737Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Ctrl still pressed with keyb_event()<p>i'm trying to help a friend with a macro for his mouse, but i've been strugling with an error.</p>
<p>But when i use :... |
72,214,840 | how to convert Object into any type in this situation<p>So I have the following problem, I need to pass the data Object into this method but the problem is that it says it doesn't have the hits property, usually I would just do (data:any) but since I also need the news data I can't, any way to solve this?</p>
<pre><cod... | <p>Does this solve you problem?
<code>this.parseNewsData([...news, ...(data as any).hits]);</code></p>
<p>a better solution would be:
<code>this.http.get<any>('https://hn.algolia.com.....</code></p>
<p>or
<code> this.http.get<{hits:number}>('https://hn.algolia.com.....</code></p>
<p>so <code>data</code> wil... | how to convert Object into any type in this situation | angular | -1 | 36 | 1 | 72,215,017 | 72,215,017 | 0 | true | 2022-05-12T11:37:43.710Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to convert Object into any type in this situation<p>So I have the following problem, I need to pass the data Object into this method but the problem is t... |
72,214,324 | Get the value of URL Parameters for bid i'm getting nil value<pre><code>let strUrl = bank://bpay?link=https://bpayuat.allsocialassets.com/pay?bid=OU1200000NATGF&cpm=Policy%20Number:217307XX|DOB%20(DD-MMM-YYYY):07-MAR-1985&cnm=BBPS&bnm=10142&bpr=JUNE&bmt=360&bdt=2021%2D06%2D11&&bai=Policy... | <p>Your URL is:</p>
<pre><code>bank://bpay?link=https://bpayuat.allsocialassets.com/pay?bid=OU1200000NATGF&cpm=Policy%20Number:217307XX|DOB%20(DD-MMM-YYYY):07-MAR-1985&cnm=BBPS&bnm=10142&bpr=JUNE&bmt=360&bdt=2021%2D06%2D11&&bai=Policy%20Status:active|Product%20Name:ICICI%20Pru%20Heart%20... | Get the value of URL Parameters for bid i'm getting nil value | ios|swift|urlencode|urlparse | -1 | 44 | 1 | 72,214,542 | 72,214,542 | 0 | true | 2022-05-12T10:56:38.130Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Get the value of URL Parameters for bid i'm getting nil value<pre><code>let strUrl = bank://bpay?link=https://bpayuat.allsocialassets.com/pay?bid=OU1200000NA... |
72,158,884 | How to design shadow with border look like below image using flutter?<p>How I design UI as like as below image using flutter, <a href="https://i.stack.imgur.com/rnJLI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rnJLI.png" alt="image" /></a></p> | <p><strong>Design page</strong></p>
<pre class="lang-dart prettyprint-override"><code>import 'package:flutter/material.dart';
import 'package:shaon_project/themes/light_color.dart';
import '../wigets/apply_form.dart';
class ApplyNewScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
... | How to design shadow with border look like below image using flutter? | flutter|flutter-layout | -1 | 52 | 1 | 72,161,603 | 72,161,603 | 0 | true | 2022-05-08T07:18:39.223Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to design shadow with border look like below image using flutter?<p>How I design UI as like as below image using flutter, <a href="https://i.stack.imgur... |
72,169,075 | Why different primary key queries have huge speed difference in innodb?<p>I have a simple table <code>Test</code>:</p>
<ul>
<li><code>id</code>, primary key;</li>
<li><code>id2</code>, index;</li>
<li>and other 50+ all kinds of type columns;</li>
</ul>
<p>And I know that if I <code>select id from Test</code>, it'll use... | <p>Ok, I found the reason finally... It's because the implementation of mysql <a href="https://mp.weixin.qq.com/s/CM7a6XageZEZ4008Ha8bew" rel="nofollow noreferrer">limit</a>. (sorry that I just found this Chinese explanation, no English version)</p>
<p>In Query1 and Query2 above, here is what <code>limit</code> do:</p>... | Why different primary key queries have huge speed difference in innodb? | mysql|innodb | -1 | 71 | 3 | 72,173,942 | 72,173,942 | 0 | true | 2022-05-09T08:32:36.837Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why different primary key queries have huge speed difference in innodb?<p>I have a simple table <code>Test</code>:</p>
<ul>
<li><code>id</code>, primary key;... |
72,176,120 | Encountered an error in python with getpixel(). (getpixel() takes 2 positional arguments but 3 were given.)<p>I am having some issues with PIL's getpixel() function I am giving it only two arguments but it is saying that I am putting 3? Here is my code:</p>
<pre><code> x = self.get_piece_center_position()[0] + search_a... | <p>The issue was that it was returning an RGBA value instead of an RGB value!</p>
<p>Here is my fix:</p>
<pre class="lang-py prettyprint-override"><code>r, g, b, a = image.getpixel((self.get_piece_center_position()[0] + search_array_x[check], self.get_piece_center_position()[1] + search_array_y[check]))
if ... | Encountered an error in python with getpixel(). (getpixel() takes 2 positional arguments but 3 were given.) | python|python-3.x|python-imaging-library | -1 | 144 | 1 | 72,350,943 | 72,350,943 | 0 | true | 2022-05-09T17:40:04.483Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Encountered an error in python with getpixel(). (getpixel() takes 2 positional arguments but 3 were given.)<p>I am having some issues with PIL's getpixel() f... |
72,189,949 | Adding content in file in specific place with node js (Like Angular Cli Modify app.module file)<p>I got the idea that node js its not just for web application for example I can create a console application with node (cli) .
and already I have an interest in how I can make a cli app that create files and modify existing... | <p>After some searches i found this answer:</p>
<blockquote>
<p>There a couple of ways of editing a file, the most reliable is perhaps
the most complex one which can be done by parsing the file (Generating
an abstract syntax tree) update the new ast and pass it to a code
generator which will output the new string (code... | Adding content in file in specific place with node js (Like Angular Cli Modify app.module file) | node.js|angular | -1 | 26 | 1 | 72,232,953 | 72,232,953 | 0 | true | 2022-05-10T16:29:33.680Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Adding content in file in specific place with node js (Like Angular Cli Modify app.module file)<p>I got the idea that node js its not just for web applicatio... |
72,176,459 | How to reframe a times series data-frame by adding 3 columns that will contain the information of row-level partition of the data-frame<p><a href="https://i.stack.imgur.com/hql6W.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hql6W.jpg" alt="row-level partition of time series data-frame and capture ... | <p>You can get each of your columns with <code>groupby</code> and <code>transform</code>:</p>
<pre><code>df["group"] = df.groupby(df["fault_code"].ne(df["fault_code"].shift()).cumsum()).ngroup().add(1)
df["count"] = df.groupby("group")["timestamp"].transform(&... | How to reframe a times series data-frame by adding 3 columns that will contain the information of row-level partition of the data-frame | python|pandas | -1 | 40 | 1 | 72,176,615 | 72,176,615 | 0 | true | 2022-05-09T18:09:59.523Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to reframe a times series data-frame by adding 3 columns that will contain the information of row-level partition of the data-frame<p><a href="https://i.... |
72,216,891 | How to append values to list?<p>I want to append my list with values for each loop iteration:</p>
<pre><code> for i in range (4,10):
a_list = [1,2,3]
a_list = a_list.append(i)
</code></pre>
<p>The wanted output would be [1,2,3,4,5,6,7,8,9]. But I get None. Also printing type(a_list) after using .... | <p>it is mainly because of the fact that list.append method does not return anything, it appends the given value to the list in-place.</p>
<p>we can confirm this by the simple example below</p>
<pre><code>a = list()
b = a.append(5)
>> print(b)
None
>> print(a)
[5]
</code></pre>
<p>As matter of fact,there is... | How to append values to list? | python|arrays|list|for-loop | -1 | 61 | 3 | 72,216,945 | 72,216,945 | 0 | true | 2022-05-12T13:53:37.387Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to append values to list?<p>I want to append my list with values for each loop iteration:</p>
<pre><code> for i in range (4,10):
a_list = ... |
72,218,082 | Go program prints asterisks instead of actual characters<p>I'm writing a program that converts postfix expression to it's prefix form (so like it should convert this "ABC/-AK/L-*" to this "*-A/BC-/AKL". The rules are simple: if it's a letter or a number (operand), then it is pushed to the stack, if ... | <pre><code>func input() {
var stack Stack
fmt.Print("Please input the equation without spaces: \n")
input := "ABC/-AK/L-*"
for _, character := range input {
valueCheck := isOperator(string(character))
if valueCheck {
operand1 := stack[len(stack)-1]
... | Go program prints asterisks instead of actual characters | go | -1 | 47 | 1 | 72,219,040 | 72,219,040 | 0 | true | 2022-05-12T15:10:13.963Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Go program prints asterisks instead of actual characters<p>I'm writing a program that converts postfix expression to it's prefix form (so like it should conv... |
72,214,144 | Unchanged test target added after the fact fails<p>In my existing project, I added a Unit Test Target.
Running the test of this newly added target fails without me having changed anything. Also, the diamonds next to the funcs remain blank, so I cannot even say where it is failing specifically...</p>
<p>Shouldn't the te... | <p>Turns out that I had to change the Signing Certificate of the target under test from "Sign to run locally" to "Development" and double check that the same value was set in the test target.</p>
<p>After that was in place, everything worked.</p> | Unchanged test target added after the fact fails | xcode | -1 | 15 | 1 | 72,218,943 | 72,218,943 | 0 | true | 2022-05-12T10:41:43.017Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Unchanged test target added after the fact fails<p>In my existing project, I added a Unit Test Target.
Running the test of this newly added target fails with... |
72,208,699 | Return smalldatetime value from scalar function SELECT query<p>I'm looking to create a scalar function in SQL Server (2017) that leverages a calendar table I built awhile back in order to calculate and return a date a given number of business days forward in time from a given date. I have been struggling with how to p... | <p>I was able to resolve with the following:</p>
<pre><code>CREATE FUNCTION dbo.AddBusDaysToDate
(
@startDate SMALLDATETIME,
@numBusDays INT,
)
RETURNS SMALLDATETIME
AS
BEGIN
DECLARE @rs SMALLDATETIME;
DECLARE @workdayModifier INT;
IF EXISTS (
SELECT dt FROM dbo.OurCalendar
WHERE dt = @st... | Return smalldatetime value from scalar function SELECT query | sql|sql-server | -1 | 55 | 1 | 72,208,962 | 72,208,962 | 0 | true | 2022-05-11T23:45:41.273Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Return smalldatetime value from scalar function SELECT query<p>I'm looking to create a scalar function in SQL Server (2017) that leverages a calendar table I... |
72,226,618 | Global route for all ApiControllers in .Net 6<p>In all of my projects i put this code in top my controllers :</p>
<pre><code>[Route("api/[controller]/[action]")]
[ApiController]
public class ValuesController : ControllerBase
{
[HttpGet]
public IActionResult GetTest1()
{
return Ok();
}
... | <p>I search few hours for this and after all i didn't find any simple solution for creating good, simple, fast global route for APIs, Then i tried on my own.</p>
<p><strong>Solution 1 :</strong>
You can create a base class for your APIs and put your route in that file, Then you only inherit from that class in all of yo... | Global route for all ApiControllers in .Net 6 | c#|asp.net-core|asp.net-core-webapi|.net-6.0|webapi | -1 | 681 | 2 | 72,231,634 | 72,231,634 | 0 | true | 2022-05-13T08:31:33.580Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Global route for all ApiControllers in .Net 6<p>In all of my projects i put this code in top my controllers :</p>
<pre><code>[Route("api/[controller]/[a... |
72,179,113 | What .NET / C# equivalent to ADO.AddNew(), ADO.Update(), etc<p>Remember these from ADO days?</p>
<pre><code>rs.movenext()
rs.addnew()
rs.update()
</code></pre>
<p>Is there an equivalent <code>.Open</code>, <code>.MoveNext</code>, <code>.AddNew</code> and <code>.Update</code> class or component in .NET? What's the curr... | <p>Concur with all the comments. To answer your question the closest is perhaps DataReader and manual update ;</p>
<pre><code>using var c = new SqlCommand("SELECT * FROM person", "connstr here");
using var u = new SqlCommand("UPDATE person SET Name = @n WHERE ID = @i", "connstr here&q... | What .NET / C# equivalent to ADO.AddNew(), ADO.Update(), etc | c#|.net|sql-server|ado.net|sqlclient | -1 | 95 | 1 | 72,181,265 | 72,181,265 | 0 | true | 2022-05-09T23:14:58.840Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What .NET / C# equivalent to ADO.AddNew(), ADO.Update(), etc<p>Remember these from ADO days?</p>
<pre><code>rs.movenext()
rs.addnew()
rs.update()
</code></pr... |
72,163,466 | Using C++ libraries in VS Code (Winsock)<p>I'm coding on Visual Studio for a simple UDP socket application on windows, for which I need the ws2_32.lib library.
Now, in Visual Studio I'm using</p>
<pre><code>#pragma comment (lib, "ws2_32.lib")
</code></pre>
<p>to link the needed library.</p>
<p>What about movi... | <p>You can add properties in tasks.json in VS Code. This is the test demo <strong>DLLProject.lib</strong></p>
<pre><code>{
"tasks": [
{
...
...
"args": [
......
"${fileDirname}\\${fileBasenameNoExtension}.exe",... | Using C++ libraries in VS Code (Winsock) | c++|visual-studio|visual-studio-code | -1 | 289 | 1 | 72,168,683 | 72,168,683 | 0 | true | 2022-05-08T17:20:55.417Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Using C++ libraries in VS Code (Winsock)<p>I'm coding on Visual Studio for a simple UDP socket application on windows, for which I need the ws2_32.lib librar... |
72,139,231 | pandas exlewriter.book does not read my excel file and even break the existed file<p>I want to stack a series of dataframe in one excel file and I wrote the code below.</p>
<pre><code>if os.path.isfile(result) is False:
with pd.ExcelWriter(result, engine='openpyxl') as writer:
raw_data.to_excel(writer,sheet... | <p>I found a solution to this problem</p>
<p>Using the 'mode' property of ExcelWriter solves this problem and also makes code easy to read.</p>
<p>The modified code is below and it works fine</p>
<pre><code>import pandas as pd
import os
result = pd.DataFrame({'a': range(10), 'b': range(10)})
resultpath=r'D:/CODE/test... | pandas exlewriter.book does not read my excel file and even break the existed file | pandas|openpyxl|pandas.excelwriter | -1 | 97 | 2 | 72,203,040 | 72,203,040 | 0 | true | 2022-05-06T09:32:01.870Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
pandas exlewriter.book does not read my excel file and even break the existed file<p>I want to stack a series of dataframe in one excel file and I wrote the ... |
72,159,979 | Warning: You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be<p>I get this warning every time I reload my browser.
The warning is not saying which line or which component I need to modify/change to rid of this warning. How can I get rid of... | <p>That's because you use an Input with a Value:</p>
<pre><code><input type='text' name='name' placeholder='name' value={formData.name}/>
</code></pre>
<p>and you should add inside your input:</p>
<pre><code>onChange={yourchangefunction}
</code></pre>
<p>so you get something like this</p>
<pre><code><input typ... | Warning: You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be | reactjs | -1 | 160 | 1 | 72,166,319 | 72,166,319 | 0 | true | 2022-05-08T10:11:29.187Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Warning: You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be<p>I get this w... |
72,153,819 | assigning new array to reference variable<pre><code>void byReference(int (&p)[3]){
int q[3] = {8, 9, 10};
p = q;
}
</code></pre>
<p>I want to write function where i can reassign the p with new array. I am not sure if we can do that.</p>
<p>My goal :
i want to change the original array, like we do swapping ... | <p>In c++ it is recomended to use <code>std::array</code> for fixed size arrays, and <code>std::vector</code> for a dynamic size arrays.</p>
<p>Both of them can be passed by refernce, to be modified by a function.
This requires the function to <strong>declare that the argument is passed by refernce</strong> using the <... | assigning new array to reference variable | c++|arrays|pass-by-reference | -1 | 67 | 3 | 72,153,956 | 72,153,956 | 0 | true | 2022-05-07T15:16:50.403Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
assigning new array to reference variable<pre><code>void byReference(int (&p)[3]){
int q[3] = {8, 9, 10};
p = q;
}
</code></pre>
<p>I want to wr... |
72,158,125 | Cannot scrape the correct aspect ration of the image - Python<p>I'm having a problem to extract an image from a "Manga" website using python.
Below is the element example on the website:</p>
<ul>
<li>img id="comic" class="loading" onerror="this.src='data:image/gif;base64,R0lGODlhAQABA... | <p>'''
Here's my Playwright code:</p>
<pre><code>from playwright.sync_api import sync_playwright
manga_url = ("the url that u going to scrape")
dwn_path = your_directory
os.chdir(dwn_path)
with sync_playwright() as p:
browser = p.chromium.launch(headless=False, slow_mo=500)
... | Cannot scrape the correct aspect ration of the image - Python | python-3.x|image|selenium-webdriver|web-scraping|css-selectors | -1 | 29 | 2 | 72,239,861 | 72,239,861 | 0 | true | 2022-05-08T04:43:53.570Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Cannot scrape the correct aspect ration of the image - Python<p>I'm having a problem to extract an image from a "Manga" website using python.
Below... |
72,148,702 | Sytax error: Missing ), but I don't see it. My quotation marks don't seem to be the problem either<p>I've been working on this app script trying to automate data from a Google sheet to create events on Google Calendar. I've tried changing the Quotation marks from single to double and back. I've checked my () over and o... | <p>Assuming your data are as follows</p>
<p><a href="https://i.stack.imgur.com/NQU2d.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NQU2d.png" alt="enter image description here" /></a></p>
<p>Try (to prevent duplicates, the event ID is here stored in column AI fr instance)</p>
<pre><code>function Au... | Sytax error: Missing ), but I don't see it. My quotation marks don't seem to be the problem either | javascript|google-apps-script|google-sheets|syntax | -1 | 87 | 2 | 72,148,872 | 72,148,872 | 0 | true | 2022-05-07T01:05:47.640Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Sytax error: Missing ), but I don't see it. My quotation marks don't seem to be the problem either<p>I've been working on this app script trying to automate ... |
72,148,011 | How to size css cards in the right way<p>so this is my 1st project. and i could appreciate help with this. I tried everything but i dont know what i am doing wrong, i will be so thankful if someone know the sollution.
Can you please help me with this
i want the cards to stay the same size, all of em the same as the one... | <p>Hello there is a lot of issues with your code but,I tried to reach what you are looking for.
I can make you a professional layout if you need it, since this one is not that clean and not well organized.</p>
<p>Also one other advice, please take a look at <code>css reset</code> and start styling your website from scr... | How to size css cards in the right way | html|css | -1 | 62 | 3 | 72,148,275 | 72,148,275 | 0 | true | 2022-05-06T22:34:56.807Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to size css cards in the right way<p>so this is my 1st project. and i could appreciate help with this. I tried everything but i dont know what i am doing... |
72,160,551 | How to center an image in tkinter with PIL<p>I want to center an image in tkinter canvas. The only thing I could think of is using <code>anchor = 'c'</code> but that does not seem to work. I have also tried using it on the <code>stage</code>.</p>
<pre><code>def newsetup(filelocation):
global width, height
... | <p>if you want to center on canvas then you need</p>
<pre><code>stage.winfo_width()/2, stage.winfo_height()/2
</code></pre>
<p>(even without <code>anchor=</code> which as default has value <code>center</code>)</p>
<p>But if you put image before it runs <code>mainloop()</code> then <code>stage.winfo_width()</code> <code... | How to center an image in tkinter with PIL | python|tkinter|python-imaging-library | -1 | 64 | 1 | 72,161,511 | 72,161,511 | 0 | true | 2022-05-08T11:29:33.343Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to center an image in tkinter with PIL<p>I want to center an image in tkinter canvas. The only thing I could think of is using <code>anchor = 'c'</code> ... |
72,183,720 | Getting Max Date for each group using MYSQL<p>I have a Invoice table in MYSQL which have below data types.
INVOICE :
ID VARCHAR(20)
DATEADD TEXT
STATUS VARCHAR(10)
Data looks :</p>
<pre><code> ID DATEADD STATUS
'A0011' '04/01/2018 11:58:31' 'N'
'A0011' '31/05/2019 10:02:36' 'N'
'B0022' '04... | <p>With <code>MySQL 8+</code> you can use <code>ROW_NUMBER</code></p>
<pre><code>with cte as(
select *,row_number() over(partition by ID order by STR_TO_DATE(DATEADD, '%d/%m/%Y %H:%i:%s') desc) as row_num
from Invoice
) select ID,DATEADD,STATUS
from cte
where row_num =1;
</code></pre>
<p><a href="https://dbfiddle.uk/?... | Getting Max Date for each group using MYSQL | mysql|sql | -1 | 39 | 1 | 72,183,963 | 72,183,963 | 0 | true | 2022-05-10T09:20:05.187Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Getting Max Date for each group using MYSQL<p>I have a Invoice table in MYSQL which have below data types.
INVOICE :
ID VARCHAR(20)
DATEADD TEXT
STATUS ... |
72,217,242 | how to append data frame to existed formulated excel file<p>if u have a formulated excel file and now wants to append data frame by python then how..</p>
<p>I used this code but did not get output</p>
<p><code>mypath="C:\\Users\\egoyrat\\Desktop\\smt tracker\\Swap Manual.xlsx" book = load_workbook(mypath) w... | <p>If you write to the file by cells, you can do it. Below is the code...
Assuming that, by formulated, you mean the cells have format (color, font, etc.) and you want to write data without changing the format of the cells)</p>
<pre><code>import numpy as np
#Create random 10x3 dataframe
df = pd.DataFrame(np.random.rand... | how to append data frame to existed formulated excel file | python|pandas|openpyxl | -1 | 51 | 1 | 72,220,116 | 72,220,116 | 0 | true | 2022-05-12T14:14:30.493Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to append data frame to existed formulated excel file<p>if u have a formulated excel file and now wants to append data frame by python then how..</p>
<p>... |
72,206,047 | How can I copy a range of data in excel (B2:B15) down with openpyxl?<p>I'm a Python beginner and I made a script to extract data into an xlsx file with openpyxl but I'm stuck with a problem which seems pretty easy. I'd like to copy(not move) the yellow data to the green cells in the following Excel file: <img src="htt... | <p>If <code>ws</code> is your worksheet, then the code to do that is...</p>
<pre><code>for row in range(16,30):
ws.cell(row=row, column=2).value = ws.cell(row=row-14, column=2).value
</code></pre>
<p>Updated below for doing this multiple times</p>
<pre><code>Repeat = 5 #Indicate how many times you want to paste th... | How can I copy a range of data in excel (B2:B15) down with openpyxl? | python|excel|openpyxl | -1 | 46 | 1 | 72,220,267 | 72,220,267 | 0 | true | 2022-05-11T18:36:21.263Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I copy a range of data in excel (B2:B15) down with openpyxl?<p>I'm a Python beginner and I made a script to extract data into an xlsx file with openp... |
72,152,676 | CGAL: How to use CGAL::Polygon_mesh_processing::area()? C++<p>I am trying to estimate the area of a segmented leaf. I already triangulated the leaf using advancing front surface reconstruction. Currently, I am having a hard time understanding the CGAL documentation of area() function. The result of the reconstruction p... | <p><a href="https://doc.cgal.org/latest/Polygon_mesh_processing/Polygon_mesh_processing_2compute_normals_example_8cpp-example.html#a4" rel="nofollow noreferrer">Link to the code where I based my answer</a> in using <a href="https://doc.cgal.org/latest/Polygon_mesh_processing/group__measure__grp.html#ga7e6384810b305b9df... | CGAL: How to use CGAL::Polygon_mesh_processing::area()? C++ | c++|cmake|visual-studio-2019|cgal|triangulation | -1 | 70 | 1 | 72,153,329 | 72,153,329 | 0 | true | 2022-05-07T12:49:44.170Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
CGAL: How to use CGAL::Polygon_mesh_processing::area()? C++<p>I am trying to estimate the area of a segmented leaf. I already triangulated the leaf using adv... |
72,196,600 | Problems using classes in vb.net<p>I am implementing a procedure for creating an XML file for the transmission of some data, using VS 2019 vb.net.
To do this, I have built a series of classes as suggested by Microsoft. The procedure compiles correctly but at run time generates an error like 'Object reference not set on... | <p>Obviously it’s right because you have to initialize <code>struttura</code> as it is always <code>Nothing</code>.</p>
<p>Cambia questa classe come segue:</p>
<pre><code>Public Class strutture
<XmlElement()>
Public Property struttura As List(Of struttura)
Public Sub New()
If Me.struttura Is N... | Problems using classes in vb.net | xml|vb.net|class | -1 | 39 | 1 | 72,197,041 | 72,197,041 | 0 | true | 2022-05-11T06:51:10.027Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Problems using classes in vb.net<p>I am implementing a procedure for creating an XML file for the transmission of some data, using VS 2019 vb.net.
To do this... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.