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,182,935 | How can I difference id (number) and email (string) in Javascript?<p>I have API and some of them return to only email and some return only id. For example:</p>
<p>user1
<code>value: example@example.com</code></p>
<p>user2
<code>value: 1212391361783212</code></p>
<p>I need that if I have input and wanna give value if th... | <p>Your code sample is incomplete but what you're trying to do should look something like this. Rather than assuming any non-numerical response is a valid email, which can break in the future as the API changes, be explicit about what you're looking for as below.</p>
<pre class="lang-js prettyprint-override"><code>// A... | How can I difference id (number) and email (string) in Javascript? | javascript|arrays|string | -2 | 44 | 3 | 72,183,012 | 72,183,012 | 0 | true | 2022-05-10T08:23:08.477Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I difference id (number) and email (string) in Javascript?<p>I have API and some of them return to only email and some return only id. For example:</... |
72,181,771 | Connecting firebird to adf using ODBC connection string<p><a href="https://i.stack.imgur.com/nzYwx.png" rel="nofollow noreferrer">enter image description here</a></p>
<p>This is the connection String i am using -
DRIVER=Firebird/InterBase(r) driver;UID=[SYSDBA];PWD=[firebird];DBNAME=[192.168.1.7/3050]:[D:\demodb.FDB]</... | <p>In your connection string square brackets are not needed.
<a href="https://www.connectionstrings.com/firebird/" rel="nofollow noreferrer">https://www.connectionstrings.com/firebird/</a></p> | Connecting firebird to adf using ODBC connection string | azure|firebird | -2 | 107 | 1 | 72,185,253 | 72,185,253 | 0 | true | 2022-05-10T06:46:51.717Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Connecting firebird to adf using ODBC connection string<p><a href="https://i.stack.imgur.com/nzYwx.png" rel="nofollow noreferrer">enter image description her... |
72,173,792 | Contact Form 7 in vs code<p>I have a contact form</p>
<pre><code>[contact-form-7 id="2722" title="Contact form 1"]
</code></pre>
<p>I want to write it down to vs code but I don't know how to do it!</p> | <p>You can use this code in php file with do_shortcode function.
<a href="https://developer.wordpress.org/reference/functions/do_shortcode/" rel="nofollow noreferrer">https://developer.wordpress.org/reference/functions/do_shortcode/</a></p>
<pre><code>echo do_shortcode('[contact-form-7 id="2722" title="C... | Contact Form 7 in vs code | wordpress|contact-form-7 | -2 | 35 | 1 | 72,185,401 | 72,185,401 | 0 | true | 2022-05-09T14:38:17.523Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Contact Form 7 in vs code<p>I have a contact form</p>
<pre><code>[contact-form-7 id="2722" title="Contact form 1"]
</code></pre>
<p>I wan... |
72,188,452 | Result of function, as value in object<p>Is possible to obtain in <strong>sum</strong> result of a function ? Not function itself, just result.</p>
<pre><code>let a = 1;
let b = 2;
let object = {
dummy: 'dummy text',
sum: function () {
a + b
},
}
console.log(object) // { dummy: 'dummy text', sum: ... | <p>Use an IIFE if you want to assign the result of a function invocation to <code>sum</code></p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>let a = 1;
let b = 2;
let object =... | Result of function, as value in object | javascript | -2 | 43 | 3 | 72,188,508 | 72,188,508 | 0 | true | 2022-05-10T14:44:04.987Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Result of function, as value in object<p>Is possible to obtain in <strong>sum</strong> result of a function ? Not function itself, just result.</p>
<pre><cod... |
72,194,436 | SQL Query returning incorrectly formatted data even though the function is returning the correct values<p>The data in my table represents physical locations with the following data: A municipality name, a state(province/region), and a unique ID which is comprised of a prefix and postfix separated by a dash (all NVARCHA... | <p><code>CHARINDEX</code> is counting how many chars before the <code>-</code> i.e. how many chars on the <em>left hand side</em>, so using <code>RIGHT</code> with the number of chars on the <em>left</em> isn't going to work. You need to find out how many chars are on the <em>right</em> which can be done with <code>LEN... | SQL Query returning incorrectly formatted data even though the function is returning the correct values | sql|sql-server|select | -2 | 30 | 1 | 72,194,453 | 72,194,453 | 0 | true | 2022-05-11T01:20:12.407Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SQL Query returning incorrectly formatted data even though the function is returning the correct values<p>The data in my table represents physical locations ... |
72,198,377 | How to get list of strings from list-like string that includes nan?<p>Here is toy-example, I've string like this:</p>
<pre><code>import numpy as np
z = str([np.nan, "ab", "abc"])
</code></pre>
<p><strong>Printed</strong> it looks like <code>"[nan, 'ab', 'abc']"</code> but I've to process <... | <p>What about:</p>
<pre><code>eval(z,{'nan':'nan'}) # if you can tolerate then:
[i for i in eval(z,{'nan':'nan'}) if i != 'nan']
</code></pre>
<p>It may have security considerations.</p> | How to get list of strings from list-like string that includes nan? | python|string|list|abstract-syntax-tree | -2 | 93 | 5 | 72,198,659 | 72,198,659 | 0 | true | 2022-05-11T09:12:22.053Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to get list of strings from list-like string that includes nan?<p>Here is toy-example, I've string like this:</p>
<pre><code>import numpy as np
z = str([... |
72,202,265 | Add a value to an empty key in a created dictionary<p>so I basically need to add a value From a txt file to the keys in output_dic and be in the following format for both years</p>
<p>the idea is to get data from a txt that's organised in rows and columns and procese it to get the data organised in the following output... | <p>You can add values to a dictionary by simply assigning the values to a keys, if for example a key already exists, then the new value would replace the old one, for example:</p>
<pre><code>output_dic['Max Volume (Date)'] = [0, 1, 2]
</code></pre>
<p>Just to be complete I would write a sample code snippet on how to re... | Add a value to an empty key in a created dictionary | python|dictionary | -2 | 56 | 1 | 72,202,865 | 72,202,865 | 0 | true | 2022-05-11T13:50:25.890Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Add a value to an empty key in a created dictionary<p>so I basically need to add a value From a txt file to the keys in output_dic and be in the following fo... |
72,204,097 | How to create query more than two table in SQL?<p>I found difficulties answering Q2.</p>
<pre><code>Orders >>
OrderID, CustomerID, ProductID, Qty, OrderDatetime
Customers >>
CustomerID, CustomerName, Area, CreatedAt
Products>>
ProductID, ProductName, Category, UnitPrice
</code></pre>
<p>Q1) Total or... | <p>Here are a pair of queries for you to test:</p>
<pre><code>select
count(distinct o.orderID)
from Orders o
join Products p on o.ProductID = p.productID
where p.Category = 'Mobile Phones'
and month(p.orderdatetime) = 1
and year(p.orderdatetime) = 2022
and p.productID = 'OPPO A31';
</code></pre>
<pre><code>select
c... | How to create query more than two table in SQL? | sql | -2 | 33 | 1 | 72,204,282 | 72,204,282 | 0 | true | 2022-05-11T15:53:42.480Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to create query more than two table in SQL?<p>I found difficulties answering Q2.</p>
<pre><code>Orders >>
OrderID, CustomerID, ProductID, Qty, Orde... |
72,204,994 | Do GitHub Pages repositories have to be public?<p>Do GitHub Pages repositories have to be public, or on a private one is possible?</p> | <blockquote>
<p>Do GitHub Pages repositories have to be public, or on a private one is
possible?</p>
</blockquote>
<p>It is possible to use GitHub Pages with a private repository.</p>
<blockquote>
<p>GitHub Pages is available in public repositories with GitHub Free and
GitHub Free for organizations, and in public and p... | Do GitHub Pages repositories have to be public? | github|github-pages | -2 | 319 | 1 | 72,205,282 | 72,205,282 | 0 | true | 2022-05-11T17:06:04.240Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Do GitHub Pages repositories have to be public?<p>Do GitHub Pages repositories have to be public, or on a private one is possible?</p> |
72,206,784 | SQLAlchemy Retrieving Different Columns<p>Here is my code:</p>
<pre><code>import pandas as pd
from sqlalchemy import create_engine
db_username = "my_username"
db_pw = "my_password"
db_to_use = "my_database"
#####
engine = create_engine(
"postgresql://" +
db_username + &q... | <p>When you loop over the results, you can spread them into separate variables and append them to the corresponding lists</p>
<pre><code>names = []
logos = []
for name, logo in fac_id_list:
names.append(name)
logos.append(log)
</code></pre> | SQLAlchemy Retrieving Different Columns | python|python-3.x|sqlalchemy | -2 | 118 | 1 | 72,207,113 | 72,207,113 | 0 | true | 2022-05-11T19:41:21.457Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SQLAlchemy Retrieving Different Columns<p>Here is my code:</p>
<pre><code>import pandas as pd
from sqlalchemy import create_engine
db_username = "my_us... |
72,207,910 | Rename multiple files based on tuple used to sort<p>I am trying to sort/rename files that I automatically download from outlook. Each file comes from an athlete from one of three sports. Right now I have this loop able to sort the file into the correct folder based on the tuple but I was wondering if I can also make it... | <p>Here is an example of how to do what your question asks, with a few preliminary comments:</p>
<ul>
<li>You asked: "I was wondering if I can also make it rename the file at the same time based on the name in the tuple that identified where it should be sorted to". I would observe that the name in the tuple ... | Rename multiple files based on tuple used to sort | python | -2 | 43 | 1 | 72,208,243 | 72,208,243 | 0 | true | 2022-05-11T21:43:00.947Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Rename multiple files based on tuple used to sort<p>I am trying to sort/rename files that I automatically download from outlook. Each file comes from an athl... |
72,209,567 | mysql COUNT and Sum with join 2 tables<p>I have tried many queries with no right result</p>
<p>my goal is to get user commission based on userid attend to branchid and how many users was attended on same day on same branch;</p>
<p>want have result like so</p>
<div class="s-table-container">
<table class="s-table">
<the... | <p>It seems you want to count att by date but amount for a specified user. So conditionally aggregate</p>
<pre><code>SELECT
a.date,
COUNT(DISTINCT a.USERID) AS totalatt ,
SUM(CASE WHEN USERID = 20 THEN (m.ca+m.ce)-(m.car+m.cer) END) AS amount
FROM att a
LEFT JOIN money m ON a.date = m.date AND a.branchid = ... | mysql COUNT and Sum with join 2 tables | mysql|join|count|sum | -2 | 45 | 1 | 72,212,201 | 72,212,201 | 0 | true | 2022-05-12T02:43:51.620Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
mysql COUNT and Sum with join 2 tables<p>I have tried many queries with no right result</p>
<p>my goal is to get user commission based on userid attend to br... |
72,217,566 | How to check the size of a file inside zipped folder in unix?<p>Is there a way to check the compressed size of files inside a zipped folder, and split files which are greater than 500 KB. The objective is to have a zipped file with multiple files which are less that 500KB each.</p> | <p><a href="http://infozip.sourceforge.net/Zip.html" rel="nofollow noreferrer">Info-ZIP's open-source zip</a> comes with a utility "zipsplit" that does exactly what you are asking for.</p> | How to check the size of a file inside zipped folder in unix? | shell|file|unix|gzip|ziparchive | -2 | 51 | 1 | 72,218,074 | 72,218,074 | 0 | true | 2022-05-12T14:36:24.817Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to check the size of a file inside zipped folder in unix?<p>Is there a way to check the compressed size of files inside a zipped folder, and split files ... |
72,217,810 | How do I join text if key value are the same<p>my code</p>
<pre><code>import requests
request = requests.get("https://itspaudal-git.github.io/jsonapi/roku.json")
package_json = request.json()
menu = package_json['Chicago']['Menu']['Strawberry Pie']
for i in menu:
product = i['item']
weight = i['wei... | <p>I have made a nfew changes to your code and also added some comment for undertsanding.
We are using a dictionary to store values instead of simple lists.
Hope it helps.</p>
<pre><code>import requests
request = requests.get("https://itspaudal-git.github.io/jsonapi/roku.json")
package_json = request.json()
... | How do I join text if key value are the same | python | -2 | 42 | 1 | 72,218,173 | 72,218,173 | 0 | true | 2022-05-12T14:54:13.413Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I join text if key value are the same<p>my code</p>
<pre><code>import requests
request = requests.get("https://itspaudal-git.github.io/jsonapi/r... |
72,219,505 | Calculate the mean of amino acids sequences biopython<p>I have this code for calculating the length of sequences in fasta format using BioPython. I got the lenghts.</p>
<p><code>NP_418305.1</code></p>
<p><code>349</code></p>
<p><code>NP_418306.1</code></p>
<p><code>469</code></p>
<p><code>NP_418308.1</code></p>
<p><cod... | <p>I was able to get the mean of total length by summing each length of every sequence and dividing by the total of sequences.</p> | Calculate the mean of amino acids sequences biopython | python|sequence|biopython|dna-sequence | -2 | 31 | 1 | 72,219,691 | 72,219,691 | 0 | true | 2022-05-12T16:56:42.267Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Calculate the mean of amino acids sequences biopython<p>I have this code for calculating the length of sequences in fasta format using BioPython. I got the l... |
72,177,726 | Loop Through All Sheets In Workbook And Copy/Paste Match To Summary Sheet<p>I am trying to develop an Excel VBA sheet where there is a summary sheet. The program has to loop through all the active sheets with the title "revision" in it and be able to copy and paste everything from the latest revision workshee... | <p>I'm sorry because it's difficult for me to understand what you want.<br>
Especially you mentioned a sheet with name "summary" and a sheet with name "BOM".</p>
<p>Anyway, below is my guess on what you want<br></p>
<p><a href="https://i.stack.imgur.com/2bsiW.png" rel="nofollow noreferrer"><img src=... | Loop Through All Sheets In Workbook And Copy/Paste Match To Summary Sheet | excel|vba|loops|match|copy-paste | -2 | 60 | 1 | 72,220,054 | 72,220,054 | 0 | true | 2022-05-09T20:11:53.667Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Loop Through All Sheets In Workbook And Copy/Paste Match To Summary Sheet<p>I am trying to develop an Excel VBA sheet where there is a summary sheet. The pro... |
72,222,812 | Hive SQL regexp_extract (number)_(number)<p>I'm new to hiveSQL and I'm trying to extract a value from the column <code>col_a</code> from the data <code>df</code> which is in this format:
<code>\\\"id\\\":\\\"101_12345\\\"</code>
I only need to extract <code>101_12345</code>, but underscore makes it ... | <p>Simple solution: You don't need the two brackets.</p>
<p>Here's a working solution: <code>'\\d+[_]\\d+'</code></p>
<p>When you put tokens into parentheses, the regex engine will group its match together, <strong>separate from the complete match</strong>. So the final result will comprise the complete match, and two ... | Hive SQL regexp_extract (number)_(number) | sql|regex|hive | -2 | 83 | 1 | 72,222,979 | 72,222,979 | 0 | true | 2022-05-12T22:47:39.280Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Hive SQL regexp_extract (number)_(number)<p>I'm new to hiveSQL and I'm trying to extract a value from the column <code>col_a</code> from the data <code>df</c... |
72,224,509 | variable is empty even after using global to make it global scoped<p>I want my program to welcome someone as soon as they join a discord server (discord.py), and that part works fine. However, to get the guild name, my program sends a message in a channel, and then it checks if it sent the message in the required chann... | <p>You don't need to send a message to get the guild name.
On member join there is a <code>discord.Member</code> parameter which is a member of the guild. there u can get the guild name by <code>member.guild.name</code></p> | variable is empty even after using global to make it global scoped | python|discord.py|global | -2 | 46 | 1 | 72,224,786 | 72,224,786 | 0 | true | 2022-05-13T04:37:16.553Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
variable is empty even after using global to make it global scoped<p>I want my program to welcome someone as soon as they join a discord server (discord.py),... |
72,228,883 | can you help me to fix this code about bubble sort?<p>i am newbie, i don't know how to fix it?
i don't know how to call function void bubblesort</p>
<pre><code> #include<iostream>
using namespace std;
void bubbleSort(int a[], int n)
{
for (int i = 0; i < n - 1; i++)
for (int j = n - 1; j > i; ... | <p>When you pass an array as an argument into a function, you simply pass it as if it were a variable. In this case, simply just <code>a</code> would do. This is because <a href="https://stackoverflow.com/questions/1641957/is-an-array-name-a-pointer">arrays "decay" into pointers</a> so <code>a</code> is a &qu... | can you help me to fix this code about bubble sort? | c++|bubble-sort | -2 | 58 | 3 | 72,229,038 | 72,229,038 | 0 | true | 2022-05-13T11:31:44.707Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
can you help me to fix this code about bubble sort?<p>i am newbie, i don't know how to fix it?
i don't know how to call function void bubblesort</p>
<pre><co... |
72,221,093 | How to write Debezium Connector Configuration and Debezium Listener for mongoDB in spring-boot and before, after payload as JSON?<p>Could anyone please provide the sample code in spring-boot for Debezium connector Listeners class and configuration class for MongoDB which provide the changed data payload in Json.
Thanks... | <p>I'm fairly certain you have a typo in your <code>mongodb.hosts</code> configuration property. It should have a value of:</p>
<pre><code>rs0/localhost:27017
</code></pre>
<p>(Note the <code>:</code> rather than the <code>,</code> you have in your question).</p> | How to write Debezium Connector Configuration and Debezium Listener for mongoDB in spring-boot and before, after payload as JSON? | mongodb|spring-boot|debezium|cdc | -2 | 279 | 1 | 72,230,914 | 72,230,914 | 0 | true | 2022-05-12T19:22:41.080Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to write Debezium Connector Configuration and Debezium Listener for mongoDB in spring-boot and before, after payload as JSON?<p>Could anyone please provi... |
72,229,353 | Get homebrew to run a script after 'brew install x' or 'brew uninstall x'<p>I want to automate having a file that tracks all my installed brew packages.</p>
<p>I can do this manually with <code>brew list > somefile</code>, how ever I want this process to be automated.</p>
<p>Is there a way to run a script automatica... | <p>Yes. You can create functions to run the <code>brew install</code> or <code>brew uninstall</code> and add on whatever else you'd like to run.</p>
<pre><code>function bi() {
brew install $@
brew list > somefile
}
function bu() {
brew uninstall $@
brew list > somefile
}
</code></pre>
<p>Then instead of ... | Get homebrew to run a script after 'brew install x' or 'brew uninstall x' | bash|macos|shell|sh|homebrew | -2 | 125 | 1 | 72,233,216 | 72,233,216 | 0 | true | 2022-05-13T12:07:10.720Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Get homebrew to run a script after 'brew install x' or 'brew uninstall x'<p>I want to automate having a file that tracks all my installed brew packages.</p>
... |
72,233,553 | How to move a key in a dictionary to upper level in python?<p>I am trying to move 2 pairs of key-value "time:1000" and "time:5000" from below dictionary to upper level, and then delete the original one under "name". Below is the sample dict.
I tried pop,</p>
<pre><code>for d in dict["... | <p>Assuming <code>d</code> the input dictionary, you can use:</p>
<pre><code>for d1 in d['total']:
for d2 in d1['name']:
d1['time'] = d2.pop('time')
</code></pre>
<p>Note that this sets/overwrites the 'time' key as many times as there are dictionaries in the sublists (so if the values were different, the la... | How to move a key in a dictionary to upper level in python? | python|dictionary | -2 | 89 | 2 | 72,233,708 | 72,233,708 | 0 | true | 2022-05-13T17:42:41.107Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to move a key in a dictionary to upper level in python?<p>I am trying to move 2 pairs of key-value "time:1000" and "time:5000" from b... |
72,230,288 | Need help joining 2 tables on one<p>So I got an admin dashboard which are not linked by ID but by name. So developer.name is the core name, dateName and absentName are meant to join this developer.name value.</p>
<p>What I got so far is this</p>
<pre><code>db.query("SELECT id, name, absentday, date, slack_id, sele... | <p>You are using a join syntax that was already out-dated when MySQL was developed. It is weird seeing you using it. Maybe you mistakenly took a book from the 1980s to learn SQL? Better quit this. MySQL still supports this old syntax (as it is still allowed), but we are not using it any longer, because it is less read... | Need help joining 2 tables on one | mysql|sql|node.js|reactjs | -2 | 74 | 1 | 72,258,773 | 72,258,773 | 0 | true | 2022-05-13T13:22:08.673Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Need help joining 2 tables on one<p>So I got an admin dashboard which are not linked by ID but by name. So developer.name is the core name, dateName and abse... |
72,231,972 | JSON response TypeError - 'The "data" argument must be of type string'<p>The API I'm trying to fetch an access token gives me the following instructions <em>(you can check for yourself at <a href="https://developers.finove.com.br/authentication" rel="nofollow noreferrer">https://developers.finove.com.br/authentication<... | <p>The following code works:</p>
<pre><code><?php
private function finove_auth(){
// Get the id and secret values
$clientId = $this->finoveID;
$clientSecret = $this->finoveSecret;
$url = "https://api.finove.com.br/api/auth/authenticate";
// encode to json
$data = array(... | JSON response TypeError - 'The "data" argument must be of type string' | php|json|authentication | -2 | 131 | 1 | 72,260,286 | 72,260,286 | 0 | true | 2022-05-13T15:24:05.143Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
JSON response TypeError - 'The "data" argument must be of type string'<p>The API I'm trying to fetch an access token gives me the following instructions <em>... |
72,201,770 | Phantom wallet: Solana transactions debug<p>I need to know which instuctions list is used for a transaction in order to use it in my application.</p>
<p>For example:
There is an unknown NFT marketplace, I can buy NFT through the "Buy" button in the browser.
I want to buy these nft programmatically, not throug... | <p>Each marketplace/platform has a different way of managing transactions.</p>
<p>If you are interested in how transactions are put together and want to start building an understanding of the ecosystem, you have two options:</p>
<ol>
<li><p>pick an open source repo (on Metaplex on you have auction house / storefront / ... | Phantom wallet: Solana transactions debug | solana|nft|metaplex|phantom-wallet | -2 | 498 | 1 | 72,266,274 | 72,266,274 | 0 | true | 2022-05-11T13:16:52.490Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Phantom wallet: Solana transactions debug<p>I need to know which instuctions list is used for a transaction in order to use it in my application.</p>
<p>For ... |
72,221,836 | Grouping ranges of data<p>I have segmented linear data to identify the minimum and maximum begin and end values of each range, now I want to consolidate overlapping ranges. This is easy if the data is easy. For example, if the data is always increasing for both the begin and end values. (see the first 4 rows in my s... | <p>Since we're sorting by StartDate and EndDate, we should be able to use the minimum of this and all future start dates and the maximum of this and all past end dates. This is just one more step beyond <a href="https://bertwagner.com/posts/gaps-and-islands/" rel="nofollow noreferrer">what Bert Wagner published</a>.</... | Grouping ranges of data | sql | -2 | 130 | 3 | 72,266,739 | 72,266,739 | 0 | true | 2022-05-12T20:39:05.947Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Grouping ranges of data<p>I have segmented linear data to identify the minimum and maximum begin and end values of each range, now I want to consolidate over... |
72,216,444 | Apache Camel Split by start and end characters SOH and ETX<p>I have an spring boot application which have routes.xml being loaded on startup</p>
<p>On the routes.xml, i have a MQ queue source that contains sample message</p>
<pre><code>SOH{123}{345}{4
5
6
}ETXSOH{111}{222}{3
3
3
}ETX
</code></pre>
<p>where SOH = \u0001... | <p>Seems camel regex is different with java regex, just created a new process using sample code below</p>
<pre><code> Pattern p = Pattern.compile("(?s)(?<=\\u0001).*?(?=\\u0003)");
Matcher m = p.matcher(items);
List<String> tokens = new LinkedList<>();
while (m.find()) {
... | Apache Camel Split by start and end characters SOH and ETX | regex|split|apache-camel|tokenize|spring-camel | -2 | 41 | 1 | 72,284,026 | 72,284,026 | 0 | true | 2022-05-12T13:25:15.280Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Apache Camel Split by start and end characters SOH and ETX<p>I have an spring boot application which have routes.xml being loaded on startup</p>
<p>On the ro... |
72,189,504 | how can i make an image point towards the mouse in python<p>so I am making a game where the movement involves the player always moving towards the mouse. unfortunately, I have no idea how to do either of these things, but the most important one right now is rotating the image towards the mouse. please help?</p> | <p>I have solved this issue. turns out, i need to use some trig.</p>
<pre><code>self.x += Pl_NPC.speed * cos(self.angle * pi / 180)
self.y -= Pl_NPC.speed * sin(self.angle * pi / 180)
</code></pre>
<p>for the movement</p>
<pre><code>self.mouseposx, self.mouseposy = pygame.mouse.get_pos()
mouse_x, mouse_y = pygame.mouse... | how can i make an image point towards the mouse in python | python | -2 | 26 | 1 | 72,353,664 | 72,353,664 | 0 | true | 2022-05-10T15:54:54.330Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how can i make an image point towards the mouse in python<p>so I am making a game where the movement involves the player always moving towards the mouse. unf... |
72,206,000 | Order payment status check failing when waiting for payment status through a webhook<p>I'm building a payment plugin. The way it works is on clicking the pay option on the checkout page, the user gets a link on their mobile phone where they can complete the payment which then triggers a webhook to the WooCommerce site ... | <p>After multiple trials and error I understood that <code>$loopOrder = wc_get_order($order_id);</code> doesn't load the order information from the database. So to fetch the updated information, adding an <code>$loopOrder->save();</code> after fetching current information fixed the issue.</p> | Order payment status check failing when waiting for payment status through a webhook | php|woocommerce|woocommerce-rest-api | -2 | 149 | 2 | 72,357,879 | 72,357,879 | 0 | true | 2022-05-11T18:31:41.850Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Order payment status check failing when waiting for payment status through a webhook<p>I'm building a payment plugin. The way it works is on clicking the pay... |
72,230,006 | Populate word tables from an Excel table<p>From our audit database I derive an Excel table like this one below. What I need to do is populate a table in a word template document with the content of the first row in the excel table, then drop a couple of lines and have a new table identical to the first one, but populat... | <p>I have self-resolved the issue myself. Maybe not in the way I originally wanted, but it works and it satisfies our needs. Below the full code. I ended up generating the tables in Excel and the copying them into word and doing some formatting.</p>
<pre><code>Sub RefreshData_Click()
Dim pvtTbl As PivotTable, aCell As... | Populate word tables from an Excel table | excel|vba|ms-word | -2 | 67 | 1 | 72,390,378 | 72,390,378 | 0 | true | 2022-05-13T12:59:55.733Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Populate word tables from an Excel table<p>From our audit database I derive an Excel table like this one below. What I need to do is populate a table in a wo... |
72,237,004 | How to write rendered content between<pre><code> to a file<p>I have a file main.php with code snippet as</p>
<pre><code><pre><code>
echo htmlspecialchars ('echo "this is a $name of your best friend";');
</pre></code>
</code></pre>
<p>When I run main.php file in browser I get</p>
<p... | <p>Actually this is not possible in direct way. The reason is that client side rendered values can't be taken into db or used outside. What I mean, suppose you have a value calculated on client side ( like javascript giving value in id) . To make a file from rendered html is only way is to curl the url in backend and t... | How to write rendered content between<pre><code> to a file | php | -2 | 36 | 1 | 72,423,283 | 72,423,283 | 0 | true | 2022-05-14T03:01:43.397Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to write rendered content between<pre><code> to a file<p>I have a file main.php with code snippet as</p>
<pre><code><pre><code>
echo htmlspe... |
72,153,502 | how can i print increasing number value on every click inside divs?<p>how can i print increasing number value on every click inside divs?</p>
<p><a href="https://i.stack.imgur.com/rM5eL.png" rel="nofollow noreferrer">here my divs that i want to insert numbers on every click</a></p>
<pre><code>for(let i = 1; i < 101;... | <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>let index = 1;
let last_element = undefined;
let last_value = undefined;
function myFunction(element) {
last_value = element.inn... | how can i print increasing number value on every click inside divs? | javascript | -2 | 80 | 3 | 72,153,586 | 72,153,586 | 0 | true | 2022-05-07T14:36:57.120Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how can i print increasing number value on every click inside divs?<p>how can i print increasing number value on every click inside divs?</p>
<p><a href="htt... |
72,150,139 | Python - Division by zero<p>how can i make something divided by 0 equal base, EX:</p>
<p><code>5/0</code> output <em><strong>5</strong></em></p>
<p>Sorry I can't explain properly, I'm new to programming</p> | <p>There are 3 ways to do this, the normal way I do it is like this. Note this will also output 5 if <code>n</code> is negative. I typically use this when averaging collections that might be empty, since negative lengths are impossible.</p>
<pre><code>result = 5/max(1, n)
</code></pre>
<p>Will output 5 if n is 0 or neg... | Python - Division by zero | python|python-3.x | -2 | 83 | 3 | 72,150,209 | 72,150,209 | 0 | true | 2022-05-07T06:47:33.010Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python - Division by zero<p>how can i make something divided by 0 equal base, EX:</p>
<p><code>5/0</code> output <em><strong>5</strong></em></p>
<p>Sorry I c... |
72,166,756 | Get sum of duplicate obj in a nested array object<p>I have an obj array like this:</p>
<pre><code>[
{
"feeTypeTitle": "STORAGE",
"itemFees": [
{
"idx": 0,
"itemTitle": "Apple iPhone 11 128GB",
"itemFee": 4,
... | <p>You can <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map" rel="nofollow noreferrer">Array.prototype.map()</a> your <code>data</code> array and to get the sum of duplicated objects in <code>itemFees</code> array just create a hash object <code>itemFeesHash </code> us... | Get sum of duplicate obj in a nested array object | javascript|arrays | -2 | 26 | 1 | 72,166,810 | 72,166,810 | 0 | true | 2022-05-09T03:41:00.503Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Get sum of duplicate obj in a nested array object<p>I have an obj array like this:</p>
<pre><code>[
{
"feeTypeTitle": "STORAGE",
... |
72,172,112 | Get Linux file descriptor of FileChannel<p>Is there a way to get the Linux file descriptor for an opened FileChannel?</p>
<p>I need it to call <code>mount.fuse -o fd=...</code> (for implementing FUSE).</p>
<p>As a hacky workaround, I'm doing:</p>
<pre><code>var pid = ProcessHandle.current().pid();
var fd = Files.list(P... | <p>You can use reflection to get the file descriptor from a <code>RandomAccessFile</code>:</p>
<pre><code>long pid = ProcessHandle.current().pid();
long guessedFd = Files.list(Path.of("/proc/"+pid+"/fd")).count();
var file = new java.io.RandomAccessFile(FUSE_DEVICE_PATH.toFile(), "rw");
F... | Get Linux file descriptor of FileChannel | java|linux|java-nio | -2 | 156 | 1 | 72,284,270 | 72,284,270 | 0 | true | 2022-05-09T12:35:13.963Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Get Linux file descriptor of FileChannel<p>Is there a way to get the Linux file descriptor for an opened FileChannel?</p>
<p>I need it to call <code>mount.fu... |
72,176,639 | Is there a way to return only the first word in a set<pre><code>from nltk.corpus import wordnet as wn
def antonyms_for(word):
antonyms = set()
for ss in wn.synsets(word):
for lemma in ss.lemmas():
any_pos_antonyms = [ antonym.name() for antonym in lemma.antonyms() ]
for antonym... | <p>If you don't care about the state of the set that's returned, you could use the method <a href="https://docs.python.org/3/library/stdtypes.html#frozenset.pop" rel="nofollow noreferrer"><code>pop()</code></a> on it:</p>
<pre><code>print(antonyms_for("bad").pop())
</code></pre>
<p>This will return ONE of the... | Is there a way to return only the first word in a set | python | -2 | 62 | 3 | 72,176,962 | 72,176,962 | 0 | true | 2022-05-09T18:26:30.840Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is there a way to return only the first word in a set<pre><code>from nltk.corpus import wordnet as wn
def antonyms_for(word):
antonyms = set()
for ... |
72,154,811 | How to load an application to systemtray using Avalonia<p>How can I load an Avalonia application to the systemtray and set the menu items?</p> | <p>Avalonia seems to be a UI/<a href="https://en.wikipedia.org/wiki/Windows_Presentation_Foundation" rel="nofollow noreferrer">WPF</a> library/resource, so I don't think that would affect how your application runs. This would be related to WPF application development.</p>
<p>A bit of reading around, and it appears you ... | How to load an application to systemtray using Avalonia | c#|cross-platform|system-tray|avalonia | -2 | 552 | 1 | 72,155,365 | 72,155,365 | 0 | true | 2022-05-07T17:15:41.003Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to load an application to systemtray using Avalonia<p>How can I load an Avalonia application to the systemtray and set the menu items?</p> |
72,166,606 | How to make data from a text file be filtered into a vector<p>I have a little program I don't know how to make. Basically, it is a function to create a vector with data from a text file that meets a parameter in its text.</p>
<pre><code>text_in_vector("file.txt", "10")
</code></pre>
<p>text example:... | <p>Try something like this:</p>
<pre><code>#include <fstream>
#include <vector>
#include <string>
#include <iomanip>
std::vector<std::string> text_in_vector(const std::string &fileName, const std::string &searchStr)
{
std::vector<std::string> vec;
std::ifstream inFil... | How to make data from a text file be filtered into a vector | c++ | -2 | 17 | 1 | 72,166,664 | 72,166,664 | 0 | true | 2022-05-09T03:05:56.293Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to make data from a text file be filtered into a vector<p>I have a little program I don't know how to make. Basically, it is a function to create a vecto... |
72,207,634 | How do I webscrape nested lists in Python?<p>Link of website: <a href="https://www.zivame.com/rosaline-chromaticity-knit-cotton-top-florida-key.html?trksrc=category&trkid=search&trkorder=relevance" rel="nofollow noreferrer">https://www.zivame.com/rosaline-chromaticity-knit-cotton-top-florida-key.html?trksrc=cat... | <p>The data is coming as JSON data, you can scrape the data from the source page directly.</p>
<pre><code>import requests
from lxml import html
r = requests.get('https://www.zivame.com/rosaline-chromaticity-knit-cotton-top-florida-key.html?trksrc=category&trkid=search&trkorder=relevance')
source_page = html.fr... | How do I webscrape nested lists in Python? | python|web-scraping | -2 | 64 | 1 | 72,207,878 | 72,207,878 | 0 | true | 2022-05-11T21:11:15.587Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I webscrape nested lists in Python?<p>Link of website: <a href="https://www.zivame.com/rosaline-chromaticity-knit-cotton-top-florida-key.html?trksrc=c... |
72,163,902 | How to stack divs by click on image<p>Is there any way to make a div appear stacked on top of another one, by clicking on a button/image?</p>
<p>The problem I have: <br>
I want a poster to appear if I click on it in the selector. <br> I want it to stay, once I click on another poster, which then will stack on top of th... | <p>I will cut down the explaination to some documentations such as <a href="https://developer.mozilla.org/de/docs/Web/API/Document/createElement" rel="nofollow noreferrer">how to create an element through JS</a>. Teachign every single step would blow the scope of Stackoverflow.</p>
<p>If you know how to create an eleme... | How to stack divs by click on image | html|css | -2 | 66 | 2 | 72,164,289 | 72,164,289 | 0 | true | 2022-05-08T18:12:16.460Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to stack divs by click on image<p>Is there any way to make a div appear stacked on top of another one, by clicking on a button/image?</p>
<p>The problem ... |
72,211,665 | I'm having problems with one-hot encoding<p>I am using logistic regression for a football dataset, but it seems when i try to one-hot encode the home team names and away team names it gives the model a 100% accuracy, even when doing a train_test_split i still get 100. What am i doing wrong?</p>
<pre><code>from sklearn.... | <p>Overfitting would be a situation where your training accuracy is very high, and your test accuracy is very low. That means it's "over fitting" because it essentially just learns what the outcome will be on the training, but doesn't fit well on new, unseen data.</p>
<p>The reason you are getting 100% accura... | I'm having problems with one-hot encoding | numpy|scikit-learn | -2 | 143 | 1 | 72,214,817 | 72,214,817 | 0 | true | 2022-05-12T07:34:09.267Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I'm having problems with one-hot encoding<p>I am using logistic regression for a football dataset, but it seems when i try to one-hot encode the home team na... |
72,218,090 | Find value in Javascript array<p>I'm struggling with a task in javascript. I want to extract the value from an array in an API. I want to get the last_price in the Monet_ADA array. Here is the data in the API.</p>
<p>641f0571d02b45b868ac1c479fc8118c5be6744ec3d2c5e13bd888b6.ZOMBIE_ADA: {last_price: 0.0016, base_volume: ... | <p>Not clear exactly what you need but hope this helps.</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>const api_url = 'http://analytics.muesliswap.com/ticker';
async fun... | Find value in Javascript array | javascript | -2 | 65 | 4 | 72,218,318 | 72,218,318 | 0 | true | 2022-05-12T15:10:33.783Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Find value in Javascript array<p>I'm struggling with a task in javascript. I want to extract the value from an array in an API. I want to get the last_price ... |
72,140,002 | replace text between two strings in a file - python<p>i have a sh file, i need my python script to find specific strings and replace all the text between them in it:</p>
<pre><code>hello_example=( # <- this specific line
"bla"
"bla"
"bla"
"bla"
"bla"
) # <- until ... | <p>Try this:
check solution here: <a href="https://regex101.com/r/iRnSQq/1" rel="nofollow noreferrer">Regex101</a></p>
<pre><code>your_input = """hello_example=(
"bla"
"bla"
"bla"
"bla"
"bla"
)"""
re.sub(r"(?<=hello_example\=\().*(?... | replace text between two strings in a file - python | python|regex|replace | -2 | 193 | 1 | 72,140,558 | 72,140,558 | 0 | true | 2022-05-06T10:27:16.190Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
replace text between two strings in a file - python<p>i have a sh file, i need my python script to find specific strings and replace all the text between the... |
72,197,200 | wait for loop to finish populating array before executing next function<p>I am trying to access <code>imgArr</code> after this loop, of course I get am empty Array because <code>console.log(imgArr)</code> is executed synchronously with the for loop.
But I need <code>imgArr</code> to be populated in order to be used in ... | <p>You can modify your code like this</p>
<p>imgArray is a promise so you cannot access the resolved value directly</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>var nextBtn ... | wait for loop to finish populating array before executing next function | javascript|for-loop|async-await|promise | -2 | 70 | 2 | 72,197,388 | 72,197,388 | 0 | true | 2022-05-11T07:42:32.460Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
wait for loop to finish populating array before executing next function<p>I am trying to access <code>imgArr</code> after this loop, of course I get am empty... |
72,158,769 | How do I convert a number to a string?<p>I'm trying to create the rock, paper, scissors task from The Odin Project. When I run the code, the computerPlay function name shows a random number from 0-2 because of the Math.random function. How do I turn 0-2 into the choices ['rock', 'paper', 'scissors']?</p>
<p><div class=... | <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>let playerScore = 0;
let computerScore = 0;
const choices = ['rock', 'paper', 'scissors'];
function computerPlay() {
let compu... | How do I convert a number to a string? | javascript|function | -2 | 46 | 2 | 72,158,793 | 72,158,793 | 0 | true | 2022-05-08T06:56:48.033Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I convert a number to a string?<p>I'm trying to create the rock, paper, scissors task from The Odin Project. When I run the code, the computerPlay fun... |
72,147,965 | there are some issues in this family tree I made<blockquote>
<p>I have this good family tree but the problem is that the page is funcy like everything is on top of each other how can I fix it <strong>(it's better to try it in a coding app because CSS doesn't work here (if it does I don't know))</strong></p>
<pre><co... | <p>Using <a href="https://mermaid-js.github.io/mermaid-live-editor/" rel="nofollow noreferrer">Mermaid JS</a>, to obtain a graph,
It may also be helpful to see the shape of the abstraction used to create the tree structure.</p>
<p>As you can see in code -mermaid code- section,
With a one-dimensional flat set, it is pos... | there are some issues in this family tree I made | html|css|tree|family-tree | -2 | 71 | 1 | 72,148,118 | 72,148,118 | 0 | true | 2022-05-06T22:27:10.840Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
there are some issues in this family tree I made<blockquote>
<p>I have this good family tree but the problem is that the page is funcy like everything is on ... |
72,218,616 | Unity C# error: (12,47): error CS1503: Argument 2: cannot convert from 'System.Collections.Generic.List<UnityEngine.GameObject>' to 'float'<p>I'm new to programming in general.</p>
<p>With another Script i store in the list "spawnPointC" all gameobjects called spawnPointC that appear from spawning other prefa... | <p>Ok so as said you simply wanted to pass in</p>
<pre><code>spawnPointsC.Count
</code></pre>
<p>since you want the amount of items, not the entire list instance.</p>
<p>Further for an index it makes no sense to have the type <code>GameObject</code>. You want an <code>int</code> or simply <code>var</code> since the com... | Unity C# error: (12,47): error CS1503: Argument 2: cannot convert from 'System.Collections.Generic.List<UnityEngine.GameObject>' to 'float' | c#|unity3d|arraylist|syntax-error|gameobject | -2 | 222 | 2 | 72,218,886 | 72,218,886 | 0 | true | 2022-05-12T15:48:31.393Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Unity C# error: (12,47): error CS1503: Argument 2: cannot convert from 'System.Collections.Generic.List<UnityEngine.GameObject>' to 'float'<p>I'm new to prog... |
72,095,017 | I cant save input a form to file txt<p>i have problem when i get value from input form. if only form not have tag it could be run well.</p>
<pre class="lang-php prettyprint-override"><code><form action="" method="POST">
<div id="wq_uuid_489" class="w2group ipb">
... | <p>Best practice will try run program on static / in program variable first and later use remaining code using POST and GET inputs</p>
<p>hope following code will solve your issue</p>
<pre><code>
<form action="#" method="POST">
<div id="wq_uuid_489" class="w2group ipb"... | I cant save input a form to file txt | php|html|css | -2 | 28 | 1 | 72,095,120 | 72,095,120 | 0 | true | 2022-05-03T05:12:06.480Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I cant save input a form to file txt<p>i have problem when i get value from input form. if only form not have tag it could be run well.</p>
<pre class="lang... |
72,205,785 | How can i find all channel ids?<pre><code>def SpamRequest():
channel_id = random.choice(channel_ids)
r = requests.post(f"https://discord.com/api/v9/channels/{channel_id}/messages", data=payload, headers=header)
</code></pre>
<p>How can i find all channel ids whith reqests?</p> | <p>from <a href="https://discord.com/developers/docs/resources/channel#channels-resource" rel="nofollow noreferrer">api docs</a><br></p>
<pre class="lang-json prettyprint-override"><code>{
"id": "41771983423143937",
"guild_id": "41771983423143937",
"name": "g... | How can i find all channel ids? | python|api|python-requests|discord | -2 | 73 | 1 | 72,205,823 | 72,205,823 | 0 | true | 2022-05-11T18:14:33.900Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can i find all channel ids?<pre><code>def SpamRequest():
channel_id = random.choice(channel_ids)
r = requests.post(f"https://discord.com/api... |
72,203,927 | Print all the prime numbers between 101 and 200 using while loop<p>When I run the program below there is no output and the program doesn't quit. It should print the primes. The program is required to be run using while loops. Where does it go wrong?</p>
<pre><code>public class F {
public static void main(String arg... | <p>Some issues with the original code:</p>
<ul>
<li>always increment <code>c</code></li>
<li>reset <code>c</code> outside inner while loop</li>
<li>code will never print a prime because the order of conditions is wrong. if <code>a == c</code> is valid, so is <code>a % c == 0</code></li>
<li>inner while loop needs to pe... | Print all the prime numbers between 101 and 200 using while loop | java | -2 | 154 | 1 | 72,204,439 | 72,204,439 | 0 | true | 2022-05-11T15:41:25.320Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Print all the prime numbers between 101 and 200 using while loop<p>When I run the program below there is no output and the program doesn't quit. It should pr... |
72,204,836 | Roc_curve over number of nearest-neighbors<p>I'm struggling to re-implement and catch the results of one of the unsupervised anomaly detections, which are shown below:
<img src="https://i.imgur.com/Oq6YRdv.jpg" alt="img" />
The credit of picture to this paper <a href="https://citeseerx.ist.psu.edu/viewdoc/download?doi=... | <p>As I said in the comments, one of the main issues is that you're not creating the AUCs correctly. The ROC curve requires a continuous measure of confidence, not just the hard class predictions, so you should replace all the <code>predict</code> calls by <code>decision_function</code> or <code>predict_proba</code> a... | Roc_curve over number of nearest-neighbors | python|scikit-learn|nearest-neighbor|roc|anomaly-detection | -2 | 122 | 1 | 72,249,328 | 72,249,328 | 0 | true | 2022-05-11T16:51:35.437Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Roc_curve over number of nearest-neighbors<p>I'm struggling to re-implement and catch the results of one of the unsupervised anomaly detections, which are sh... |
72,235,414 | Don't understand how to code the condition<p>There are no errors in this but I can't understand how to code the condition. If I change the condition to <code>if money != string.digits:</code> and run the code then input in a number, it will go into an endless loop until I insert anything except a digit which I don't wa... | <p>You can just <code>try</code>/<code>except</code> to convert the input to float.</p>
<pre><code>while True:
try:
money = float(input("put you salary (year)"))
break
except ValueError:
print("This is not a number. Please enter a valid number")
price = money * (2.5 ... | Don't understand how to code the condition | python|python-3.x|if-statement|conditional-statements | -2 | 85 | 2 | 72,235,508 | 72,235,508 | 0 | true | 2022-05-13T21:04:33.160Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Don't understand how to code the condition<p>There are no errors in this but I can't understand how to code the condition. If I change the condition to <code... |
72,169,420 | Combine features into one single average feature<p>How can we combine three features in a dataset, that have the same traits?</p>
<p>What I mean is: I have energy0, energy1, energy2. How can I combine these into a single feature energy, combining them all into a single average feature?</p> | <p>you can use pandas library, and the <a href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.mean.html?msclkid=4284d61acf7811ecabe1a1cdb0a0f9a1" rel="nofollow noreferrer">mean</a> function with parameter axis=1</p>
<p>code example:</p>
<pre><code>import pandas as pd
df = pd.DataFrame({&q... | Combine features into one single average feature | python|pandas | -2 | 46 | 1 | 72,169,562 | 72,169,562 | 0 | true | 2022-05-09T09:03:05.320Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Combine features into one single average feature<p>How can we combine three features in a dataset, that have the same traits?</p>
<p>What I mean is: I have e... |
72,236,837 | Problem: Assigning a group number to elements near eachother where groups are separated from spaces<p>We have a room divided of 6x5 possible seats, every place in the 6x5 matrix could be a seat or could be empty.</p>
<p>We have the Matrix with all the seats already assigned on their location, and every seat has an uniq... | <p>This is a classical neighbourhood-search scenario. See <a href="https://en.wikipedia.org/wiki/Breadth-first_search" rel="nofollow noreferrer">BFS</a> / <a href="https://en.wikipedia.org/wiki/Depth-first_search" rel="nofollow noreferrer">DFS</a> algorithms.</p>
<p>You can instantiate the graph as a simple array or a ... | Problem: Assigning a group number to elements near eachother where groups are separated from spaces | c++ | -2 | 35 | 1 | 72,236,900 | 72,236,900 | 0 | true | 2022-05-14T02:13:59.180Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Problem: Assigning a group number to elements near eachother where groups are separated from spaces<p>We have a room divided of 6x5 possible seats, every pla... |
72,159,748 | Typescript how to test if regex is valid without getting syntax error<p>I have some code that loads a number of regular expressions from an external source. I would like to test whether a given string is regular regex without crashing the application with a syntax error. I tried using try/catch blocks, but it appears t... | <p>In your example you are creating a RegExp from a regular expression literal. The compiler is likely catching the illegal expression, so its not even getting as far as a runtime exception.</p>
<p>In your explanation, you say that you are loading regex strings from an external source, and so it seems these would more... | Typescript how to test if regex is valid without getting syntax error | node.js|regex|typescript | -2 | 302 | 1 | 72,159,917 | 72,159,917 | 0 | true | 2022-05-08T09:38:57.313Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Typescript how to test if regex is valid without getting syntax error<p>I have some code that loads a number of regular expressions from an external source. ... |
72,189,804 | Pick 4 elements of a list and make a number that is a square of other<p>I have a list of some numbers, and I need to pick 4 of them that can make a number which will be like <code>sqrt(sum_of_nums) % 1 = 0</code>, problem is I don't know how to pick them</p> | <p>Way to pick 4 numbers from a list can be:</p>
<pre><code>from itertools import combinations
nums=[1,2,3,4,5,6]
list(combinations(nums,4))
</code></pre>
<p>Now you can find the sum of these numbers by:</p>
<pre><code>[sum(x) for x in list(combinations(nums,4))]
#output
[10, 11, 12, 12, 13, 14, 13, 14, 15, 16, 14, 1... | Pick 4 elements of a list and make a number that is a square of other | python-3.x | -2 | 35 | 1 | 72,189,909 | 72,189,909 | 0 | true | 2022-05-10T16:17:05.540Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pick 4 elements of a list and make a number that is a square of other<p>I have a list of some numbers, and I need to pick 4 of them that can make a number wh... |
72,187,653 | How to fill NaN value of date time based on another coloumn +1?<p>I have a dataset like this:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th style="text-align: left;">Join date</th>
<th style="text-align: center;">Pay date 1</th>
<th style="text-align: right;">Pay date 2</th>
</tr>
</thead... | <p>I would recommend that you set up a list of months eg. <code>months='Jan', 'Feb, 'Mar'</code> etc., and then use a simple algorithm to change month (and possibly year) eg.</p>
<pre class="lang-py prettyprint-override"><code>dateIn="11 Mar 2011" #the data comes into this variable
dateIn=dateIn.split("... | How to fill NaN value of date time based on another coloumn +1? | python | -2 | 35 | 1 | 72,192,063 | 72,192,063 | 0 | true | 2022-05-10T13:53:58.730Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to fill NaN value of date time based on another coloumn +1?<p>I have a dataset like this:</p>
<div class="s-table-container">
<table class="s-table">
<th... |
72,183,893 | How to change normal distribution from MySQL to SQL Server<p>I have a code not total like normal distribution. How can I change it from Mysql to SQL Server?</p>
<pre><code>select latency
where pow(e(), - pow((ln(latency) - 8.223) ,2)/2/0.3975) /sqrt(2*pi()) / 0.53 < 0.01
order by latency desc
</code></pre> | <p>I try the code, it works.</p>
<pre class="lang-sql prettyprint-override"><code>SELECT latency
FROM abc
WHERE exp( power((log(von) - 8.223) ,2)/2/0.3975) /sqrt(2*pi()) / 0.53 < 0.01
</code></pre> | How to change normal distribution from MySQL to SQL Server | sql|sql-server|distribution | -2 | 51 | 1 | 72,212,356 | 72,212,356 | 0 | true | 2022-05-10T09:32:33.117Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to change normal distribution from MySQL to SQL Server<p>I have a code not total like normal distribution. How can I change it from Mysql to SQL Server?<... |
72,219,071 | In Python, how can I read a text document line-by-line and print the number of same characters in a row at the end of each line?<p>I have a program which converts a simple image (black lines on white background) into 2 character ASCII art ("x" is black and "-" is white).</p>
<p>I want to read each l... | <p>You can use <code>itertools.groupby</code>:</p>
<pre class="lang-py prettyprint-override"><code>from itertools import groupby
with open("art.txt", 'r') as f:
for line in map(lambda l: l.strip(), f):
runs = [sum(1 for _ in g) for _, g in groupby(line)]
print(f"{line} {' '.join(map(... | In Python, how can I read a text document line-by-line and print the number of same characters in a row at the end of each line? | python|text | -2 | 26 | 1 | 72,219,218 | 72,219,218 | 0 | true | 2022-05-12T16:20:49.940Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
In Python, how can I read a text document line-by-line and print the number of same characters in a row at the end of each line?<p>I have a program which con... |
72,231,027 | React App adding Pure CSS to Tailwind CSS<p>I need to <a href="https://codepen.io/fxm90/pen/RPJZNz" rel="nofollow noreferrer">do this in tailwind CSS</a> for my react application.</p>
<p>How can I do that?</p>
<p><strong>HTML</strong></p>
<pre><code><h1>Show / Hide Animation with pure CSS</h1>
<label cl... | <pre><code>**Edit as you need. I gave the basic example here. If you not find your solution, let me a reply**
import React, { useState } from "react";
const YourComponent = () => {
const [checked, setChecked] = useState(false);
const selectStyle = (e) => {
const checked = e.target.checked;
... | React App adding Pure CSS to Tailwind CSS | javascript|css|reactjs | -2 | 59 | 1 | 72,231,817 | 72,231,817 | 0 | true | 2022-05-13T14:15:42.703Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
React App adding Pure CSS to Tailwind CSS<p>I need to <a href="https://codepen.io/fxm90/pen/RPJZNz" rel="nofollow noreferrer">do this in tailwind CSS</a> for... |
72,185,256 | Java 1.4 Sort Files - Recent & Latest<p>I'm having Java 1.4 version and need to sort the files by last modified. Sometimes I need to do it by recent and sometimes do it by oldest. I am not sure since Java 1.4 older version can be used in that project</p>
<pre><code>File directory = new File("c:\\books\\");
Fi... | <p>For java 1.2 or higher:</p>
<pre><code> File directory = new File("c:\\books\\");
File[] files = directory.listFiles();
Arrays.sort(files, new Comparator() {
public int compare(Object o1, Object o2) {
File a1=(File)o1;
File a2=(File)o2;
if (a1.lastModi... | Java 1.4 Sort Files - Recent & Latest | java|java1.4 | -2 | 51 | 1 | 72,185,530 | 72,185,530 | 0 | true | 2022-05-10T11:07:23.297Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Java 1.4 Sort Files - Recent & Latest<p>I'm having Java 1.4 version and need to sort the files by last modified. Sometimes I need to do it by recent and some... |
72,191,340 | Getter Setter returning null<p>I have an Interface</p>
<pre><code>interface IPerson
{
PersonInformation PersonInfo { get; set; }
}
</code></pre>
<p>And this class</p>
<pre><code>public class PersonInformation
{
public string Name{ get; set; }
}
</code></pre>
<p>When I implement the interface it's giving me a nu... | <p>Just declaring a reference variable member does not create an object for that variable. You must set the variable to refer to an actual object instance.</p>
<p>So you either want this:</p>
<pre><code>myEmployee.PersonInfo = new PersonInformation();
myEmployee.PersonInfo.Name = "Some Name";
</code></pre>
<p... | Getter Setter returning null | c#|interface|getter-setter | -2 | 171 | 1 | 72,191,469 | 72,191,469 | 0 | true | 2022-05-10T18:25:00.120Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Getter Setter returning null<p>I have an Interface</p>
<pre><code>interface IPerson
{
PersonInformation PersonInfo { get; set; }
}
</code></pre>
<p>And t... |
72,204,338 | I need Method that takes a vector and a circle and looks if they intersect<p>I have a vector in 2d space that starts at A and ends at B.
I also have a circle in 2d space with the Position C and has a radius of r</p>
<p>I need to know if the vector AB does intersect with the circle(center:C,radius:r)</p>
<p>what would b... | <p>Given <strong>A</strong> and <strong>B</strong> are endpoints of a line. It can be represented as a vector with direction from <strong>A</strong> to <strong>B</strong> with a magnitude as the distance of <strong>AB</strong>.</p>
<p>The line <strong>AB</strong> doesn't intersect with the circle when the distance betw... | I need Method that takes a vector and a circle and looks if they intersect | c#|math|mathematical-optimization | -2 | 53 | 1 | 72,204,615 | 72,204,615 | 0 | true | 2022-05-11T16:12:14.807Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I need Method that takes a vector and a circle and looks if they intersect<p>I have a vector in 2d space that starts at A and ends at B.
I also have a circle... |
72,139,346 | Get associative array after post via ajax<p>I need to send a form and a array/string to the server.</p>
<p>My Ajax looks like this:</p>
<pre><code> var formData = $("#formpv").serialize();
$.ajax({
type: 'POST',
url: 'scripts/formIntoDB.php',
data: formData,
</c... | <p>The issue is because the string in <code>formData</code> becomes double-wrapped, ie. a string of key/value pairs within a string of key/value pairs. As only the top level of this is deserialised, your PHP code cannot read the second level in the manner you intend.</p>
<p>To fix this you either need to <em>manually</... | Get associative array after post via ajax | javascript|php|html|jquery|ajax | -2 | 39 | 1 | 72,139,428 | 72,139,428 | 0 | true | 2022-05-06T09:39:20.663Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Get associative array after post via ajax<p>I need to send a form and a array/string to the server.</p>
<p>My Ajax looks like this:</p>
<pre><code> var formD... |
72,207,355 | Java Web Scraper project is returning null instead of normal links<p>Used maven for htmlunit dependency for the webscraper.
The main issue is that my scraper returns null instead of links. I made an item class to set and get.</p>
<pre><code>import com.gargoylesoftware.htmlunit.WebClient;
import com.gargoylesoftware.htm... | <p>This works here</p>
<pre><code>public static void main(String[] args) throws IOException {
String url = "https://sfbay.craigslist.org/search/sss?query=iphone%208&sort=rel";
try (final WebClient webClient = new WebClient()) {
HtmlPage page = webClient.getPage(url);
// webClient.... | Java Web Scraper project is returning null instead of normal links | java|htmlunit | -2 | 49 | 1 | 72,217,962 | 72,217,962 | 0 | true | 2022-05-11T20:38:56.790Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Java Web Scraper project is returning null instead of normal links<p>Used maven for htmlunit dependency for the webscraper.
The main issue is that my scraper... |
72,037,056 | SQL to select the value of a column matching multiple values in another column?<p>I have a <code>Chat_User</code> join table, and want to <strong>retrieve the <code>ChatId</code> of <code>a</code></strong> between specified <code>UserId</code> of <code>x</code> and <code>y</code>.</p>
<p><code>Chat_User</code> table:</... | <p>Aggregation offers one approach:</p>
<pre class="lang-sql prettyprint-override"><code>SELECT ChatId
FROM yourTable
WHERE UserId IN ('x', 'y')
GROUP BY ChatId
HAVING MIN(UserId) <> MAX(UserId);
</code></pre> | SQL to select the value of a column matching multiple values in another column? | sql|sqlite | -2 | 31 | 2 | 72,037,068 | 72,037,068 | 1 | true | 2022-04-28T01:40:12.517Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SQL to select the value of a column matching multiple values in another column?<p>I have a <code>Chat_User</code> join table, and want to <strong>retrieve th... |
72,066,599 | How do I get the return statement from JavaScript's Fetch?<p>Now I'm using Fetch to fetch some data from an API in SpringBoot.</p>
<pre><code>const onSubmit = (data) => {
fetch("http://localhost:8080/addMedicine", {
method: "POST",
headers: {
"Content-Type": &quo... | <p>this should work :</p>
<pre class="lang-js prettyprint-override"><code>const onSubmit = (data) => {
fetch("http://localhost:8080/addMedicine", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(data),... | How do I get the return statement from JavaScript's Fetch? | javascript|java|reactjs|spring-boot|postman | -2 | 32 | 1 | 72,066,641 | 72,066,641 | 1 | true | 2022-04-30T07:42:19.933Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I get the return statement from JavaScript's Fetch?<p>Now I'm using Fetch to fetch some data from an API in SpringBoot.</p>
<pre><code>const onSubmit ... |
72,076,760 | Database to check whether a path/ url is present<p>I have an application where it can have multiple thousands of urls.
Let's assume the url paths are of the form,</p>
<ul>
<li>/app/v1/test1</li>
<li>/app/v2/test2</li>
</ul>
<p>I want to store these paths in a datastructure, so that when a request comes for a path which... | <p>The disadvantage with approach 1 would be that you'd have to maintain a copy of that hashset in memory in each instance of your server process.</p>
<p>For approach 2 you could use Redis as a sort of shared memory and store the URLs in a Redis set which has O(1) insertion and O(1) membership check time complexity. Y... | Database to check whether a path/ url is present | database|database-design|system | -2 | 31 | 1 | 72,119,474 | 72,119,474 | 1 | true | 2022-05-01T12:35:30.127Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Database to check whether a path/ url is present<p>I have an application where it can have multiple thousands of urls.
Let's assume the url paths are of the ... |
72,139,586 | Best Practice in Python: Class Object with helper variables - delete helpers after use<p>I want to have a Class with only one argument to it. Based on that argument a couple of calculations should take place aiming at setting a specific attribute for the Class. Other attributes won't be needed afterwards and I would li... | <p>As @monk pointed out, also local variables can be assigned within the <code>__init__</code> statement. For above example the use of a helper variable would therefor be:</p>
<pre><code>class Sportsteam:
def __init__(self, members):
self.members = members # members will be a list
num_members = len(... | Best Practice in Python: Class Object with helper variables - delete helpers after use | python | -2 | 31 | 1 | 72,143,026 | 72,143,026 | 1 | true | 2022-05-06T09:56:18.890Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Best Practice in Python: Class Object with helper variables - delete helpers after use<p>I want to have a Class with only one argument to it. Based on that a... |
72,143,371 | What is faster in PHP: dechex() or sprintf("%x")?<p>What is the fastest way to convert a number to the hexadecimal representation in PHP: <code>dechex($number)</code> or <code>sprintf("%x",$number)</code>?</p> | <p>Here you go... <code>dechex</code> is faster, by an insignifficant number<br />
0.0042848587036133<br />
0.0037119388580322</p>
<pre class="lang-php prettyprint-override"><code><?php
$numbers = [];
for ($i = 1; $i < 10000; $i++) {
$numbers[] = random_int(1, 10000);
}
$start = microtime(true);
foreach (... | What is faster in PHP: dechex() or sprintf("%x")? | php|hex|printf | -2 | 30 | 1 | 72,144,505 | 72,144,505 | 1 | true | 2022-05-06T14:46:42.460Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What is faster in PHP: dechex() or sprintf("%x")?<p>What is the fastest way to convert a number to the hexadecimal representation in PHP: <code>dechex($numbe... |
72,142,902 | Opening a gif full screen in a Batch Script<p>I have a batch script and I need it to open a gif file and display full screen.
I have done research and all I can find is how to open the gif, but not resize it correctly.
The code I find wants to save it as a 500x500 for example, but not display it.</p>
<p>The path is c:\... | <p>Check out <a href="https://www.irfanview.com/" rel="nofollow noreferrer">Irfanview</a>. Here are <a href="https://www.makeuseof.com/tag/10-useful-commandline-irfanview-tools-working-images/" rel="nofollow noreferrer">some examples</a> of command line usage. To simply open something full screen, you should be able t... | Opening a gif full screen in a Batch Script | batch-file|gif|display | -2 | 131 | 1 | 72,144,627 | 72,144,627 | 1 | true | 2022-05-06T14:12:36.353Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Opening a gif full screen in a Batch Script<p>I have a batch script and I need it to open a gif file and display full screen.
I have done research and all I ... |
72,146,340 | How to check if double is NEGATIVE_INFINITY in Java<p>How do I check if double is NEGATIVE_INFINITY and not POSITIVE_INFINITY?
There is only one method in Double class <code>isInfinite()</code> which checks whether the double is infinite or not but it returns true in both cases if it's positive and if it's negative. So... | <p>Here are two possible ways to check if a double <code>x</code> specifically holds negative infinity:</p>
<pre><code>if (Double.isInfinite(x) && x < 0) ...
</code></pre>
<p>or simply</p>
<pre><code>if (x==Double.NEGATIVE_INFINITY) ...
</code></pre> | How to check if double is NEGATIVE_INFINITY in Java | java|double | -2 | 110 | 1 | 72,146,416 | 72,146,416 | 1 | true | 2022-05-06T19:10:42.057Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to check if double is NEGATIVE_INFINITY in Java<p>How do I check if double is NEGATIVE_INFINITY and not POSITIVE_INFINITY?
There is only one method in Do... |
72,147,071 | Grouping hour intervaled data into averages per day<h1>Problem</h1>
<p>The database contains a Delivery table with <em><strong>three columns:</strong></em> <em>id</em>, <em>start time</em>, and <em>finish time</em>.</p>
<p>The start and finish columns are of the timestamp without time zone data type (YYYY-MM-DD HH:MM:S... | <p>We can use <code>::date</code> to extract the date and then use this in <code>group by</code>.</p>
<blockquote>
<pre><code>select
*,
finishing - starting time_difference
from t
</code></pre>
<pre>
starting | finishing | delivery | time_difference
:------------------ | :------------------ |... | Grouping hour intervaled data into averages per day | sql|postgresql|aggregate-functions | -2 | 38 | 1 | 72,149,586 | 72,149,586 | 1 | true | 2022-05-06T20:32:20.453Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Grouping hour intervaled data into averages per day<h1>Problem</h1>
<p>The database contains a Delivery table with <em><strong>three columns:</strong></em> <... |
72,152,424 | The "Back" button messes up the view<p>I have this problem while working with SwiftUI.
So basically, when I press on the navigation link, it opens the screen like this:<a href="https://i.stack.imgur.com/JEMyK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JEMyK.png" alt="Picture 1" /></a></p>
<p>and... | <p>Your issue is that you have duplicate <code>NavigationViews</code>. There are two ways to solve this:</p>
<ol>
<li><p>When you call the next view in your <code>NavigationLink</code>, set <code>.navigationBarBackButtonHidden(true)</code>. This will disappear the extra back button.</p>
</li>
<li><p>A simpler way; just... | The "Back" button messes up the view | ios|swift|xcode|swiftui | -2 | 240 | 1 | 72,154,408 | 72,154,408 | 1 | true | 2022-05-07T12:18:55.873Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
The "Back" button messes up the view<p>I have this problem while working with SwiftUI.
So basically, when I press on the navigation link, it opens the screen... |
72,154,218 | PostgreSQL query to list all values of a column that are common between tables<p>I have a column named <code>endate</code>(its values are dates) present in five tables, <code>straddle0, straddle1, straddle2, straddle3 and straddle4</code>. My assumption regarding the data is that, one table's <code>endate</code> values... | <p>I would use <code>UNION ALL</code> and a <code>GROUP BY</code>/<code>HAVING</code>:</p>
<p><strong>Schema (PostgreSQL v13)</strong></p>
<pre><code>CREATE TABLE t1 (
enddate date
);
CREATE TABLE t2 (
enddate date
);
CREATE TABLE t3 (
enddate date
);
INSERT INTO t1
VALUES (CURRENT_DATE), (CURRENT_DATE+1... | PostgreSQL query to list all values of a column that are common between tables | sql|postgresql | -2 | 78 | 3 | 72,154,519 | 72,154,519 | 1 | true | 2022-05-07T16:01:57.867Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
PostgreSQL query to list all values of a column that are common between tables<p>I have a column named <code>endate</code>(its values are dates) present in f... |
72,154,556 | SQL Server group by max string column<p>I am trying to make a query that groups me by the ID_Country, Year_, Employee_ID columns and applying a max to the Employee_Name column so that it returns the employee name with more characters but for each execution it returns different results.</p>
<p>table with employee data:
... | <p>You can use <code>ROW_NUMBER()</code> to assign a row number based on country and year, ranked by the length of the name descending:</p>
<pre><code>SELECT ID_Country, Year_, Employee_ID, Employee_Name
FROM
(
SELECT ID_Country, Year_, Employee_ID, Employee_Name,
rn = ROW_NUMBER() OVER
(
PARTITION BY... | SQL Server group by max string column | sql-server | -2 | 125 | 1 | 72,154,782 | 72,154,782 | 1 | true | 2022-05-07T16:43:37.087Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SQL Server group by max string column<p>I am trying to make a query that groups me by the ID_Country, Year_, Employee_ID columns and applying a max to the Em... |
72,155,516 | Javascript : How convert existing JSON Object into custom key based Object?<p>I need to convert/destructure my existing JSON object into a new form with key-based JSON,
please look at the below input JSON</p>
<p><strong>Note : Below array has n numbers of Objects.</strong></p>
<p>INPUT JSON:</p>
<pre><code>[
{
... | <ol>
<li>reduce the array into the object you are looking for as output</li>
<li>set new key for object based on the received <code>pid</code></li>
<li>then remove that <code>pid</code> from its original position</li>
</ol>
<p>In terms of code:</p>
<pre><code>const result = input.reduce((finalObject, obj) => {
f... | Javascript : How convert existing JSON Object into custom key based Object? | javascript|arrays|json | -2 | 33 | 1 | 72,155,572 | 72,155,572 | 1 | true | 2022-05-07T18:48:34.853Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Javascript : How convert existing JSON Object into custom key based Object?<p>I need to convert/destructure my existing JSON object into a new form with key-... |
72,155,703 | How the output is upto 4 when there is a condition is less than(<)4?<h4>my output is coming along with 4 why</h4>
<pre><code>public class whileProgram {
public static void main(String[] args) {
int counter = 0;
while(counter<4){
counter = counter+1;
System.out.println(counter);
}
}
</code... | <p>I think the other answer is not exactly explaining the 'why'. Here is my attempt at that part of the question.</p>
<p>Consider the code:</p>
<pre><code>while(counter<4){
counter = counter+1;
System.out.println(counter);
}
</code></pre>
<p>We start with <code>counter</code> equal to 0. 0 is less than 4, s... | How the output is upto 4 when there is a condition is less than(<)4? | java|while-loop | -2 | 35 | 1 | 72,157,844 | 72,157,844 | 1 | true | 2022-05-07T19:13:35.170Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How the output is upto 4 when there is a condition is less than(<)4?<h4>my output is coming along with 4 why</h4>
<pre><code>public class whileProgram {
publ... |
72,159,909 | How to make python faster?<p>I'm working on a python project which is required to do a lot of tasks in the shortest amount of time.</p>
<p>Done some tests, and a <code>print("Hello World!")</code> takes about 0.7 seconds to run with python.</p>
<p>In c++, <code>cout<<"Hello World!";</code> tak... | <p>This doesn't really answer the question but shows (proves?) that there must be something wrong with OP's Python runtime setup / environment</p>
<pre><code>import time
start = time.perf_counter()
print('Hello world!')
end = time.perf_counter()
print(f'Duration={end-start:6f}s')
</code></pre>
<p><strong>Output:</stro... | How to make python faster? | python|c++|performance | -2 | 146 | 1 | 72,160,084 | 72,160,084 | 1 | true | 2022-05-08T10:02:48.323Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to make python faster?<p>I'm working on a python project which is required to do a lot of tasks in the shortest amount of time.</p>
<p>Done some tests, a... |
72,161,318 | While Insert Records To MySQL, get in Error Code 1054<p>I'm new to MySQL & I try to enter records to mysql table. I'm getting following error</p>
<blockquote>
<p>INSERT INTO advertising.discountauthorizationrequst SET DARDateTime=cast('2003-01-13 16:50:32' as datetime), `DARPubCode`=trim('DD'), `DARPubDate`=cast('2... | <p>You are actually confusing the SQL commands and coming up with a hybrid of them. The INSERT command most commonly is done in two ways..</p>
<pre><code>insert into SomeTable
( these, columns )
values
( oneValue, anotherValue)
</code></pre>
<p>or</p>
<pre><code>insert into SomeTable( these, columns )
s... | While Insert Records To MySQL, get in Error Code 1054 | mysql | -2 | 41 | 2 | 72,162,118 | 72,162,118 | 1 | true | 2022-05-08T13:08:55.347Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
While Insert Records To MySQL, get in Error Code 1054<p>I'm new to MySQL & I try to enter records to mysql table. I'm getting following error</p>
<blockq... |
72,163,609 | I have some errors in this source<p>I need run this code and solv all problems in it.
tell me the problems , and how to solv it.
project:
How do I show the number of the letter's place in English, for example, if the user wrote a and pressed the button, the number 1 appears, and if wrote b, it appears 2 and so on.
the ... | <p>You need to make the marked changes below for your code work. Read about <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf" rel="nofollow noreferrer">Array.indexOf</a> to understand how it works.</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-c... | I have some errors in this source | javascript|html|css | -2 | 32 | 1 | 72,163,751 | 72,163,751 | 1 | true | 2022-05-08T17:37:49.283Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I have some errors in this source<p>I need run this code and solv all problems in it.
tell me the problems , and how to solv it.
project:
How do I show the n... |
72,164,084 | List change after copy Python<p>I'm coding the final part of a clustering program, I want to parse a file like</p>
<pre><code>--
COLOR
-
POINT COLOR
...
</code></pre>
<p>where</p>
<pre><code>COLOR = (R,G,B)
POINT = (X,Y)
</code></pre>
<p>Example:</p>
<pre><code>--
(255,0,4)
-
(0,0) (255,0,4)
(0,1) (255,0,4)
(0,2) (255,... | <p>You need Cluster instance's attribute named pixels:</p>
<pre><code>def printCluster(cl):
print("---------------")
print("(" + str(cl.meanColor.r) + "," + str(cl.meanColor.g) + "," + str(cl.meanColor.b) + ")")
print("I have " + str(len(pixels)) +... | List change after copy Python | python|list|copy|deep-copy | -2 | 41 | 1 | 72,164,431 | 72,164,431 | 1 | true | 2022-05-08T18:39:06.540Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
List change after copy Python<p>I'm coding the final part of a clustering program, I want to parse a file like</p>
<pre><code>--
COLOR
-
POINT COLOR
...
</co... |
72,166,021 | What would be the best way to filter grouped table by its max values?<p>I have this following table, which tells me how many rentals a certain film had in a certain month. Here's the top 10 rows:</p>
<pre><code>| month | title | rentals |
+-------+-------------------+---------+
| 2 | ACE GOLDFINGER |... | <p>I think you can try to use <code>EXISTS</code> subquery to get <code>Max</code> rentals for each month rows.</p>
<pre><code>SELECT t1.*
FROM film_per_month t1
WHERE EXISTS (
SELECT 1
FROM film_per_month tt
WHERE tt.month = t1.month
GROUP BY tt.month
HAVING MAX(tt.rentals) = t1.rentals
)
</code><... | What would be the best way to filter grouped table by its max values? | mysql|group-by | -2 | 25 | 1 | 72,166,056 | 72,166,056 | 1 | true | 2022-05-09T00:44:48.417Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What would be the best way to filter grouped table by its max values?<p>I have this following table, which tells me how many rentals a certain film had in a ... |
72,165,932 | Create a new table in SQL based on two other tables<p>I have two tables against which I would like to create new table with the output.</p>
<p>For example;</p>
<p>Table 1</p>
<pre><code>Column 1 Column 2 Column 3
a b c
</code></pre>
<p>Table 2</p>
<pre><code>Column 4 Column5 Column6
... | <p>for creating <em>a new table</em>, use <code>INTO</code> statement that provide a new table. it should be place in the first select</p>
<pre><code>SELECT column1,
column2,
column3
INTO newtable --creating new table
FROM table1
UNION
SELECT column4,
column5,
column6
FROM table2
</c... | Create a new table in SQL based on two other tables | sql|sql-server|union|create-table | -2 | 65 | 1 | 72,167,025 | 72,167,025 | 1 | true | 2022-05-09T00:24:23.297Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Create a new table in SQL based on two other tables<p>I have two tables against which I would like to create new table with the output.</p>
<p>For example;</... |
72,167,912 | Reverse Engineering to find where a given operation in a python library is executed<p>There is an interesting notebook on <a href="https://github.com/Trusted-AI/adversarial-robustness-toolbox/blob/main/notebooks/expectation_over_transformation_classification_rotation.ipynb" rel="nofollow noreferrer">https://github.com/... | <p>One option is to add a deliberate error into the function, such as <code>0/0</code> (division by zero). That will tell you whether it's called, and where from...</p> | Reverse Engineering to find where a given operation in a python library is executed | python|deep-learning|neural-network|conv-neural-network|adversarial-attack | -2 | 32 | 1 | 72,168,069 | 72,168,069 | 1 | true | 2022-05-09T06:47:03.927Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Reverse Engineering to find where a given operation in a python library is executed<p>There is an interesting notebook on <a href="https://github.com/Trusted... |
72,169,121 | JavaScript getting array index from promise<p>The script below returns promise, there is an array inside it with two index, i want to get index=0 and index=1 separately and output them, how can i do it without using console.log?</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel... | <p>In javascript, async functions always return promise.</p>
<p>I am not entirely sure about your intentions here, but looking at your drawing I would assume that you need to add an extra <code>await</code> on lines 3 and 9.
This code should work for you:</p>
<pre class="lang-js prettyprint-override"><code>async functi... | JavaScript getting array index from promise | javascript | -2 | 156 | 3 | 72,169,280 | 72,169,280 | 1 | true | 2022-05-09T08:36:48.463Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
JavaScript getting array index from promise<p>The script below returns promise, there is an array inside it with two index, i want to get index=0 and index=1... |
72,169,801 | How to match a whole word or sentence after a specific character with regexp<p>I have an object that contains other objects, some of these have a key that is a string that starts with column like this: ':Campaign':{data}
I need to loop through that object and save all the keys that start with column (:) into strings. F... | <p>Here are 2 options depending on whether you want to include the colon in the pattern that you are capturing.</p>
<ul>
<li>with the colon
<code>^:\w*</code></li>
<li>with a lookback for the colon
<code>(?<=^:)\w*</code><br />
This will match a word after the colon.<br />
You may want any number of any character <c... | How to match a whole word or sentence after a specific character with regexp | javascript|regex | -2 | 50 | 2 | 72,170,035 | 72,170,035 | 1 | true | 2022-05-09T09:32:38.420Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to match a whole word or sentence after a specific character with regexp<p>I have an object that contains other objects, some of these have a key that is... |
72,171,693 | Does git merge make changes only in local?<p>If you make</p>
<pre><code>git merge branchA branchB
</code></pre>
<p>but you intended to do right the opposite way, that is,</p>
<pre><code>git merge branchB branchA
</code></pre>
<p>does this merge affect only your local repository, or by contrary, does it affect the remot... | <h1>TL;DR</h1>
<p>The new commit is purely local. But you have your commands wrong.</p>
<h1>Long</h1>
<p>If you run:</p>
<pre><code>git merge branchA branchB
</code></pre>
<p>you're merging <em>three</em> things, in what Git calls an <em>octopus merge</em>. Don't do that!<sup>1</sup> The syntax is actually:</p>
<pre... | Does git merge make changes only in local? | git | -2 | 111 | 3 | 72,173,254 | 72,173,254 | 1 | true | 2022-05-09T12:02:33Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Does git merge make changes only in local?<p>If you make</p>
<pre><code>git merge branchA branchB
</code></pre>
<p>but you intended to do right the opposite ... |
72,176,755 | Duplicating Files in same folder<p>Hello Powershell Noob here, I am trying to write a script that will take paths from my clipboard and just duplicate them right in their parent folder.</p>
<p>Lets say my clipboard looks like this:</p>
<pre><code>"C:\Users\User1\New Folder\Image A.jpg"
"C:\Users\User1\Ne... | <p>Something like this should work:</p>
<pre><code>$objectList = Get-Clipboard
Foreach ($Object in $ObjectList) {
$File = Get-Item -Path $Object
$NewName = Join-Path -Path $File.Directory -ChildPath ($File.BaseName + '1' + $File.Extension)
Copy-Item -Path $File.FullName -Destination $NewName
}
</code></pre> | Duplicating Files in same folder | powershell | -2 | 57 | 1 | 72,177,017 | 72,177,017 | 1 | true | 2022-05-09T18:36:54.520Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Duplicating Files in same folder<p>Hello Powershell Noob here, I am trying to write a script that will take paths from my clipboard and just duplicate them r... |
72,177,485 | Open a file in python from 2 directory back<p>I want to read a file from 2 folders back..</p>
<pre><code>with open('../../test.txt', 'r') as file:
lines = file.readlines()
file.close()
</code></pre>
<p>I want to read from <code>../../</code> two folders back. but not work..
How i can do that ?</p> | <p>Opening files in python is relative to the current working directory. This means you would have to change <code>cd</code> to the directory where this python file is located.</p>
<p>If you want a more robust solution:</p>
<p>To be able to run this from any directory, there is a simple trick:</p>
<pre class="lang-py p... | Open a file in python from 2 directory back | python | -2 | 32 | 1 | 72,177,662 | 72,177,662 | 1 | true | 2022-05-09T19:48:27.800Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Open a file in python from 2 directory back<p>I want to read a file from 2 folders back..</p>
<pre><code>with open('../../test.txt', 'r') as file:
lines ... |
72,178,904 | Accessing local variable within actionPerformed Java eclipse<p>i am trying to reach the value within an int variable from within the actionPerformed class, the integer comes from another class where its passed as an argument "asd" and holds the value "1". I obviously deleted some lines from the code... | <p>Starting with...</p>
<pre><code>public int asd,id;
public customerAppointmentScreen(int asd) {
System.out.println("asd ");
System.out.println(asd);
id=asd;
System.out.println(id);
}
</code></pre>
<p>The parameter <code>asd</code> is never assigned to the instance field <code>asd</code... | Accessing local variable within actionPerformed Java eclipse | java|eclipse | -2 | 40 | 1 | 72,179,117 | 72,179,117 | 1 | true | 2022-05-09T22:40:11.493Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Accessing local variable within actionPerformed Java eclipse<p>i am trying to reach the value within an int variable from within the actionPerformed class, t... |
72,185,474 | Scale border width depending on text length<p>im learning css and not very good at it at the moment. Is there a way to scale the border width depending on the text width as a user could input a short name or a long one. This is the CSS of the border. Thanks for any help in advance.</p>
<pre><code>#summonerInfo{
borde... | <p>set width to auto; width:auto; it will try to keep the contents inside the allocated box.</p> | Scale border width depending on text length | css | -2 | 53 | 1 | 72,185,605 | 72,185,605 | 1 | true | 2022-05-10T11:23:19.120Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Scale border width depending on text length<p>im learning css and not very good at it at the moment. Is there a way to scale the border width depending on th... |
72,189,017 | Looping through a multidimensional array error<p>Im making a sudoku game. The Multidimensional array is called <code>array</code>. I basically flattening the array and search for dublicates. I cannot seem to turn this unefficient piece of code:</p>
<pre class="lang-cs prettyprint-override"><code>if(true)
re... | <p>It might be that you got your condition wrong in the second piece of code.</p>
<p>In the first snippet, you return <code>true</code> if all the <code>findDoublicates()</code> return <code>true</code>, and <code>false</code> on the first <code>findDoublicates()</code> that's <code>false</code>.</p>
<p>In the second s... | Looping through a multidimensional array error | c# | -2 | 59 | 2 | 72,189,240 | 72,189,240 | 1 | true | 2022-05-10T15:22:16.807Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Looping through a multidimensional array error<p>Im making a sudoku game. The Multidimensional array is called <code>array</code>. I basically flattening the... |
72,191,207 | keras model makes very inaccurate predictions<p>I never worked with KI before and recently got a task to make a model which can predict two specific rooms in an building and outdoor asap. -.-</p>
<p>For learning and testing I created an dataset with three classes: bedroom, kitchen, outdoor and tried to create a model w... | <p>Your model looks too lightweight for the task. Try increasing number of convolutional-maxpool blocks from 2 to 5-6, convolutional filters from 32 to 64. Also, increase number of training epochs to 10-20. This should improve accuracy.</p> | keras model makes very inaccurate predictions | python|tensorflow|keras|deep-learning|neural-network | -2 | 94 | 1 | 72,191,651 | 72,191,651 | 1 | true | 2022-05-10T18:14:04.877Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
keras model makes very inaccurate predictions<p>I never worked with KI before and recently got a task to make a model which can predict two specific rooms in... |
72,187,600 | Sql Exists on same table with sub query deletes all records?<p><strong>QUERY</strong></p>
<pre><code>Delete from Image
where Exists
(
SELECT x.ImageId, ParentId, occurrences
from Image li
inner join
(
SELECT
ImageId,
COUNT(*) occurrences
FROM Image
GROUP BY ImageId
HAVING ... | <p>Your subquery is not correlated, so it is simply deleting every row, as long as there is at least one row in the unrelated subquery.</p>
<p>The join is not necessary anyway, you just need to correlate it.</p>
<pre class="lang-sql prettyprint-override"><code>DELETE FROM Image
WHERE EXISTS (SELECT 1
FROM Image li... | Sql Exists on same table with sub query deletes all records? | sql|sql-server | -2 | 87 | 1 | 72,192,917 | 72,192,917 | 1 | true | 2022-05-10T13:50:44.433Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Sql Exists on same table with sub query deletes all records?<p><strong>QUERY</strong></p>
<pre><code>Delete from Image
where Exists
(
SELECT x.ImageId, Pa... |
72,192,853 | AWS Lambda function not running concurrently<p>I have an AWS Lambda function that gets invoked from another function. The first function processes the data and invokes the other when it is finished. The second function will get n instances to run at the same time.</p>
<p>For example the second function takes about 5 se... | <p>As you can see in <a href="https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/lambda.html#Lambda.Client.invoke" rel="nofollow noreferrer">boto3 docs</a> about invoke function:</p>
<blockquote>
<p>Invokes a Lambda function. You can invoke a function synchronously (and wait for the response), o... | AWS Lambda function not running concurrently | python|amazon-web-services|aws-lambda | -2 | 60 | 1 | 72,193,082 | 72,193,082 | 1 | true | 2022-05-10T20:57:04.860Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
AWS Lambda function not running concurrently<p>I have an AWS Lambda function that gets invoked from another function. The first function processes the data a... |
72,200,241 | How to set the type on enum in swift?<p>I am attempting to create a property on a struct that accepts a size param (small, med, large) where each size enumerates a CGFloat value to be used in a modifier.</p>
<pre><code>Struct CoolView: View {
enum Size: CGFloat {
case large = 100
case medium = 200
... | <p>You have to access the <code>rawValue</code> of the enum case:</p>
<p><code>.cornerRadius(size.rawValue)</code></p> | How to set the type on enum in swift? | swift | -2 | 39 | 1 | 72,200,280 | 72,200,280 | 1 | true | 2022-05-11T11:27:48.927Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to set the type on enum in swift?<p>I am attempting to create a property on a struct that accepts a size param (small, med, large) where each size enumer... |
72,143,020 | Using Postman to access Google Indexing APIs<p>I would like to test Google Indexing API with Postman.
I have already configured the api correctly on <a href="https://console.cloud.google.com/" rel="nofollow noreferrer">https://console.cloud.google.com/</a> for using it on a wordpress site with the plugin Instant indexi... | <p>For anyone interested I managed to make it work by following these steps:</p>
<ul>
<li><p>To obtain the authentication token with Postman first go to <a href="https://console.cloud.google.com/apis/credentials" rel="nofollow noreferrer">https://console.cloud.google.com/apis/credentials</a> and in your web application... | Using Postman to access Google Indexing APIs | google-cloud-platform|google-indexing-api | -2 | 421 | 2 | 72,202,709 | 72,202,709 | 1 | true | 2022-05-06T14:20:56.020Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Using Postman to access Google Indexing APIs<p>I would like to test Google Indexing API with Postman.
I have already configured the api correctly on <a href=... |
72,203,610 | SQL - Add Column Indicating if it's the first time an entry is seen<p>I have an existing table (call it FruitOrders) with many columns, one of which is fruit:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>Fruit</th>
<th>Order Time</th>
</tr>
</thead>
<tbody>
<tr>
<td>Apple</td>
<td>2022-0... | <p>The window function row_number() within a CASE is an option</p>
<p><strong>Example</strong></p>
<pre><code>Select *
,Flag = case when row_number() over (partition by Fruit order by [Order Time]) = 1 then 1 else 0 end
From YourTable
Order by [Order Time]
</code></pre>
<p><strong>Results</strong></p>
<p><a hre... | SQL - Add Column Indicating if it's the first time an entry is seen | sql|sql-server | -2 | 52 | 1 | 72,203,811 | 72,203,811 | 1 | true | 2022-05-11T15:20:50.050Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SQL - Add Column Indicating if it's the first time an entry is seen<p>I have an existing table (call it FruitOrders) with many columns, one of which is fruit... |
72,208,322 | How do I get a index from a OrderedDictionary in C# by key?<p>I'm inserting values into an <code>OrderedDictionary</code> and need a way to obtain the index for a given key. Is this possible?</p>
<pre class="lang-cs prettyprint-override"><code>var groups = new OrderedDictionary();
groups.Add("group1", true); ... | <p>If you really have to get the index, you could write an extension method to return the index:</p>
<pre><code>public static int IndexOfKey(this OrderedDictionary dictionary, object keyToFind)
{
int currentIndex = 0;
foreach (var currentKey in dictionary.Keys)
{
if (currentKey.Equals(keyToFind)) re... | How do I get a index from a OrderedDictionary in C# by key? | c#|.net | -2 | 95 | 2 | 72,208,545 | 72,208,545 | 1 | true | 2022-05-11T22:38:15.100Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I get a index from a OrderedDictionary in C# by key?<p>I'm inserting values into an <code>OrderedDictionary</code> and need a way to obtain the index ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.