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,812,598 | How do I configure Talend Open Studio to connect to a Cassandra cluster?<p>I referred this Documentation</p>
<p><a href="https://www.javatpoint.com/talend-jdbc-connection" rel="nofollow noreferrer">https://www.javatpoint.com/talend-jdbc-connection</a></p>
<p>For how to config DB connection on Talend. In the documentati... | <p>I suspect the problem is that you're using the wrong JDBC driver although I'm unable to confirm that since you didn't actually say which one you're using.</p>
<p>You will need to download the Simba JDBC Driver for Apache Cassandra from <a href="https://downloads.datastax.com/#odbc-jdbc-drivers" rel="nofollow norefer... | How do I configure Talend Open Studio to connect to a Cassandra cluster? | cassandra|talend|cassandra-jdbc | 0 | 45 | 1 | 72,824,612 | 72,824,612 | 0 | true | 2022-06-30T08:30:18.517Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I configure Talend Open Studio to connect to a Cassandra cluster?<p>I referred this Documentation</p>
<p><a href="https://www.javatpoint.com/talend-jd... |
72,806,706 | Subtracting timecode in Excel<p>I've got a big csv with head movement data that I need to combine with an audio recording. The timecode in the csv doesn't start at 0, so I need to subtract the starting time from all entries.</p>
<p>The starting timecode looks like: <code>00:36:16:15.295</code></p>
<p>It's a bit confusi... | <p>This is not a satisfying answer, but it is a solution to the problem at hand:</p>
<p>Using <code>Data > Text to Columns...</code> I split the timecode <code>00:36:16:15.295</code> into four separate columns: <code>00 | 36 | 15 | 15.295</code>.</p>
<p>I then deleted the last column and created a new column with th... | Subtracting timecode in Excel | excel|csv|excel-formula|timecodes | 0 | 45 | 2 | 72,826,809 | 72,826,809 | 0 | true | 2022-06-29T19:13:56.603Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Subtracting timecode in Excel<p>I've got a big csv with head movement data that I need to combine with an audio recording. The timecode in the csv doesn't st... |
72,824,312 | Why does the compiler allow instantiation of generic class both with a nullable and non-nullable generic parameter?<p>I have a project in ASP.NET Core 6.</p>
<p>I have the <code><Nullable>enable</Nullable></code> setting in the project.</p>
<p>I have the following class:</p>
<pre><code>public class Response... | <p>This is the expected behaviour. I don't see why it should be a problem.</p>
<p>For <code><WeatherForecast></code>, <code>T</code> is <code>WeatherForecast</code> and <code>T?</code> is <code>WeatherForecast?</code>.</p>
<p>For <code><WeatherForecast?></code>, both <code>T</code> and <code>T?</code> are <... | Why does the compiler allow instantiation of generic class both with a nullable and non-nullable generic parameter? | c#|generics|nullability | 0 | 45 | 1 | 72,828,880 | 72,828,880 | 0 | true | 2022-07-01T04:16:04.023Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why does the compiler allow instantiation of generic class both with a nullable and non-nullable generic parameter?<p>I have a project in ASP.NET Core 6.</p>... |
72,830,630 | Alternative to Thread. Sleep with different hardware<p>I am writing a autologin script in Powershell. With main purpose of doing autologon with keystrokes on remote clients in our environment after installation, with the desired AD and password entered.</p>
<p>Works fine on my i9. But most people using Tablets and Elit... | <p>I don't have enough on your current code to produce a more accurate answer but the idea, in all cases, remains the same.</p>
<p>You should periodically wake up the thread to check whether or not the machine is in the state you want it in and from there, you either go back to sleep or exit the loop and continue.</p>
... | Alternative to Thread. Sleep with different hardware | powershell|wait|thread-sleep|pause | 0 | 45 | 1 | 72,833,157 | 72,833,157 | 0 | true | 2022-07-01T14:16:45.337Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Alternative to Thread. Sleep with different hardware<p>I am writing a autologin script in Powershell. With main purpose of doing autologon with keystrokes on... |
72,835,566 | What can I do to add a list and sort out all the prime numbers in the list? Python 3<p>I am creating a program that</p>
<ul>
<li>accepts an inputted list</li>
<li>finds all the prime numbers and only displays them.</li>
</ul>
<p>I tried many different methods, many derived from existing prime filters, but they have har... | <p>When you get input, you're getting a string. You can't cast a string to a list immediately. Maybe you can request the user to use a separator between the numbers then use split method and cast strings to integers like this:</p>
<pre><code>my_list = input("Please enter the list of numbers and use space seperator... | What can I do to add a list and sort out all the prime numbers in the list? Python 3 | python-3.x|list|filter|primes | 1 | 45 | 2 | 72,835,718 | 72,835,718 | 0 | true | 2022-07-02T00:02:45.647Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What can I do to add a list and sort out all the prime numbers in the list? Python 3<p>I am creating a program that</p>
<ul>
<li>accepts an inputted list</li... |
72,835,463 | How can I clip a curve in pyqtgraph?<p>I am trying to work with pyqt and create a "UI". The main idea is to plot a graph/curve and clip the selected area with placing the widget (blue area) and clicking on the button: clip.</p>
<p>I tried to write a function <code>def clicked(self):</code>, which should chang... | <p>It took me some time, but I found a solution.
First: I created a new instance with an attribute:
<code>win.curve_plot(name_df="BetaPinen4MSAlleParikel.csv")</code></p>
<p>Second: I change the function <code>def clicked(self)</code> a bit.</p>
<pre><code>def clicked(self):
self.df = self.df[(self.df... | How can I clip a curve in pyqtgraph? | python|pyqt5|pyqtgraph | 0 | 45 | 1 | 72,838,841 | 72,838,841 | 0 | true | 2022-07-01T23:35:54.227Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I clip a curve in pyqtgraph?<p>I am trying to work with pyqt and create a "UI". The main idea is to plot a graph/curve and clip the selecte... |
72,834,354 | HTML CSS horizontal and vertical overflow scroll with flexbox gets cut off<p>Hello I have the following code in a Next-component:</p>
<pre><code>const Canvas: NextPage = () => {
const x: number[] = Array.from(Array(1617).keys());
return (
<div className={styles.canvas}>
<div className={styles.... | <p>After some try and error I searched for flexbox alternatives and found display table. With display table everything worked fine. Since I couldn't find a proper solution online, I decided to keep this question and post my solution here.
My Next-component-code:</p>
<pre><code>import { NextPage } from 'next';
import st... | HTML CSS horizontal and vertical overflow scroll with flexbox gets cut off | html|css|flexbox|overflow | 0 | 45 | 1 | 72,840,315 | 72,840,315 | 0 | true | 2022-07-01T20:29:47.050Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
HTML CSS horizontal and vertical overflow scroll with flexbox gets cut off<p>Hello I have the following code in a Next-component:</p>
<pre><code>const Canvas... |
72,839,966 | Adding Entities to Vault Namespaces,Groups, or Policies Terraform<p>I'm having an issue with the Vault Terraform. I am able to create Entities, Namespaces, Groups, and policies but linking them together is not happening for me. I can get the policy added to the group just fine, but adding members to that group I cannot... | <pre><code>
resource "vault_policy" "namespace" {
depends_on = [module.namespace]
name = "namespace"
policy = file("policies/namespace.hcl")
namespace = "devops"
}
resource "vault_identity_group" "devops" {
depends_on = [
mo... | Adding Entities to Vault Namespaces,Groups, or Policies Terraform | terraform|vault|terraform-provider-vault | 0 | 45 | 1 | 72,841,291 | 72,841,291 | 0 | true | 2022-07-02T14:45:11.697Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Adding Entities to Vault Namespaces,Groups, or Policies Terraform<p>I'm having an issue with the Vault Terraform. I am able to create Entities, Namespaces, G... |
72,834,347 | How do I Retry an observable returned via a SelectMany call from another observable<p>I want to retry an observable when an error occurs. In the two cases below, I only see the Retry work in case 1. However, in case 2, the Retry does not happen.</p>
<p>What is the difference between these two cases? Is it because th... | <p>In your case 1 the <code>.Retry()</code> retries the observable returned by the <code>ErrorProducer</code> method.</p>
<p>In case 2 the <code>.Retry()</code> retries the <code>SelectMany</code> which only produces a value when the <code>subject</code> produces a value.</p>
<p><code>Retry</code> simply ignores errors... | How do I Retry an observable returned via a SelectMany call from another observable | c#|system.reactive | 1 | 45 | 1 | 72,844,346 | 72,844,346 | 0 | true | 2022-07-01T20:29:07.013Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I Retry an observable returned via a SelectMany call from another observable<p>I want to retry an observable when an error occurs. In the two cases b... |
72,846,463 | Finding similarity of 1 paragraph in different documents with Doc2vec<p>how to find one target paragraph or document similar to other lists of documents to the target paragraph that is semantically similar.</p>
<pre><code>import os
import gensim
import smart_open
import random
from nltk.tokenize import word_tokenize
# ... | <p>Despite the class name <code>Doc2Vec</code>, and the fact that it is based on an algorithm called 'Paragraph Vectors', this algorithm for modeling text has no inherent idea what 'paragraphs' or 'documents' are.</p>
<p>It simply takes whatever <em>texts</em> you give it – where each text is a list-of-words – & le... | Finding similarity of 1 paragraph in different documents with Doc2vec | python|nlp|doc2vec|opensemanticsearch | 0 | 45 | 1 | 72,846,857 | 72,846,857 | 0 | true | 2022-07-03T12:22:18.660Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Finding similarity of 1 paragraph in different documents with Doc2vec<p>how to find one target paragraph or document similar to other lists of documents to t... |
72,847,641 | Range of int as keys for dict<p>I have a column which rejected amounts (these are just 5 exmaples)</p>
<p><a href="https://i.stack.imgur.com/jDidf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jDidf.png" alt="enter image description here" /></a></p>
<p>I want to add a column, given points based on ... | <p>You can use replace to apply the dict values</p>
<pre><code>new['reject_amount_points'] = df['rejected_int'].replace(dict_reject_amount)
</code></pre> | Range of int as keys for dict | python|pandas|dictionary | 0 | 45 | 2 | 72,847,716 | 72,847,716 | 0 | true | 2022-07-03T15:15:43.003Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Range of int as keys for dict<p>I have a column which rejected amounts (these are just 5 exmaples)</p>
<p><a href="https://i.stack.imgur.com/jDidf.png" rel="... |
72,846,415 | How to access the Istio loadbalancer running in a VM from the host machine<p>In a KVM Vagrant VM (Ubuntu 20.04), I have setup a Kubernetes Cluster with Knative and Istio. The intent is to deploy functions to the cluster inside the VM be able to call them from my host machine (PopOs 22.04). The loadbalancer has an exter... | <p>If you're running Kubernetes inside a Vagrant VM, you need to think a bit about what the network routing on your host machine (Linux) looks like. You'll probably want to route some set of IPs from your Linux machine to the Vagrant VM, and then install or use something like <a href="https://metallb.universe.tf/" rel=... | How to access the Istio loadbalancer running in a VM from the host machine | linux|kubernetes|networking|vagrant|virtual-machine | 1 | 45 | 1 | 72,848,019 | 72,848,019 | 0 | true | 2022-07-03T12:14:59.727Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to access the Istio loadbalancer running in a VM from the host machine<p>In a KVM Vagrant VM (Ubuntu 20.04), I have setup a Kubernetes Cluster with Knati... |
72,854,549 | warning: `auto-ref` (bin "auto-ref") generated 1 warning<p>I get this warnig from the rust compiler, when running the following code:</p>
<pre class="lang-rust prettyprint-override"><code>fn main() {
let test = 3;
let bar = Bar(test);
(&bar).foo();
}
#[derive(Debug, Copy, Clone)]
struct Bar(i32);
impl... | <p>Ok, I understand now. What I thought was a warning was just the warnings summary. I got confused because I tried to test a rule that says that a &self method argument can automatically be referenced when using it on type self. The warning mentions auto-ref -- hence my confusion
-- but I think is actually about t... | warning: `auto-ref` (bin "auto-ref") generated 1 warning | rust|rust-cargo | -2 | 45 | 1 | 72,855,362 | 72,855,362 | 0 | true | 2022-07-04T09:30:01.427Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
warning: `auto-ref` (bin "auto-ref") generated 1 warning<p>I get this warnig from the rust compiler, when running the following code:</p>
<pre class="lang-ru... |
72,832,111 | Why extra string in AWS Cloud watch logs generated by Lambda function?<p>I have golang based lambda function which does some work and logs the information during execution.</p>
<p>I'm using zapcore Golang logger as below</p>
<pre><code>func NewLogger(logLevel string) (*zap.SugaredLogger, error) {
encoderConfig := ... | <p>To disable colors you can remove <a href="https://en.wikipedia.org/wiki/ANSI_escape_code" rel="nofollow noreferrer">ASCII Escape Codes</a>:</p>
<pre><code>- EncodeLevel: zapcore.CapitalColorLevelEncoder
+ EncodeLevel: zapcore.CapitalLevelEncoder
</code></pre>
<p>I don't think you need to repeat time informatio... | Why extra string in AWS Cloud watch logs generated by Lambda function? | amazon-web-services|go|logging|aws-lambda | 1 | 45 | 1 | 72,855,893 | 72,855,893 | 0 | true | 2022-07-01T16:19:13.107Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why extra string in AWS Cloud watch logs generated by Lambda function?<p>I have golang based lambda function which does some work and logs the information du... |
72,861,079 | positioning several background layers<p>I have a div container that takes up 100% of the width of the browser window. The height of the container changes with the window width. I want to use two images as background images. Horizontally: The first image should occupy the left half of the background, and the second imag... | <p>The background image set at 50% will be centered (so part of it is hidden under the first background image).</p>
<p>This snippet positions the second background image to the right and the first to the left.</p>
<p>[This snippet uses linear-gradients as images just to prove that it works OK].</p>
<p><div class="snipp... | positioning several background layers | html|css|background-image | 0 | 45 | 2 | 72,861,419 | 72,861,419 | 0 | true | 2022-07-04T19:07:13.783Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
positioning several background layers<p>I have a div container that takes up 100% of the width of the browser window. The height of the container changes wit... |
72,862,367 | How to display the added element in an array in my html document?<p>What I'm trying to do here is to display only the added element in the array on the HTML page?
But whenever I add an element using the unshift array method it displays other elements of the array too.</p>
<p><div class="snippet" data-lang="js" data-hid... | <p>to only display the new element ("Hey") you would use <code>greetings[0]</code> to get the first element of the array</p> | How to display the added element in an array in my html document? | html|css | 0 | 45 | 3 | 72,862,426 | 72,862,426 | 0 | true | 2022-07-04T22:04:06.403Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to display the added element in an array in my html document?<p>What I'm trying to do here is to display only the added element in the array on the HTML ... |
72,864,106 | How to list files in a directory, sorted by size, but without listing folder sizes?<p>I'm writing a bash script that should output the first 10 heaviest files in a directory and all subfolders (the directory is passed to the script as an argument).
And for this I use the following command:
<a href="https://i.stack.imgu... | <p>Would you please try the following:</p>
<pre><code>dir="../../src/"
sudo find "$dir" -type f -printf "%s\t%p\n" | sort -nr | head -n 10 | cut -f2-
</code></pre>
<ul>
<li><code>find "$dir" -type f</code> searches <code>$dir</code> for files recursively.</li>
<li>The <code>-prin... | How to list files in a directory, sorted by size, but without listing folder sizes? | linux|bash|du | 1 | 45 | 2 | 72,864,560 | 72,864,560 | 0 | true | 2022-07-05T04:44:06.227Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to list files in a directory, sorted by size, but without listing folder sizes?<p>I'm writing a bash script that should output the first 10 heaviest file... |
72,867,224 | XSD schema not validating in basex<p>I am tasked with adding type="DeptType" to an xsd file and validating it in basex against an xml document. I have validated both in notepad++ but I get an error in basex when trying to validate.</p>
<p>XSD</p>
<pre><code><?xml version="1.0"?>
<xs:schema
... | <p>I think it's because of this part:</p>
<pre><code><xs:element name="dept" type="DeptType" maxOccurs="unbounded">
<xs:complexType>
</code></pre>
<p>Since the <code>complexType</code> is defined within the <code>element</code>, you shouldn't specify the <code>type</code> a... | XSD schema not validating in basex | xml|xsd|xsd-validation|basex | 1 | 45 | 1 | 72,867,287 | 72,867,287 | 0 | true | 2022-07-05T09:41:16.803Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
XSD schema not validating in basex<p>I am tasked with adding type="DeptType" to an xsd file and validating it in basex against an xml document. I h... |
72,863,587 | How to configure endpoint for Saga when multiple consumer<p>I need to configure endpoint on Saga 'Consumer' such as "queue:send-notification" to move from Publish to Send, because I have redundancy on my service (and right now) each email is sent twice.</p>
<p>How can I do that for both test:</p>
<pre><code> ... | <p>Well, first, if you have a "redundancy" where you are using the same message type for two separate things, you should resolve that issue. Or if you have two consumers that are sending email notifications in response to the same event, fix that problem.</p>
<p><em>The use of EndpointConvention is NEVER reco... | How to configure endpoint for Saga when multiple consumer | masstransit | 0 | 45 | 1 | 72,868,785 | 72,868,785 | 0 | true | 2022-07-05T03:02:45.747Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to configure endpoint for Saga when multiple consumer<p>I need to configure endpoint on Saga 'Consumer' such as "queue:send-notification" to mo... |
72,865,453 | How do you display data when you have multiple machine learning models<p>I have developed a program that finds the probabilities of around 500 classes based on some training data that involves a few thousand features.</p>
<p>It works by training about 500 logistic regression models that take these few thousand features... | <p>Are you saying that you have 500 classes which each have been assigned 500 probabilities? Does the mean accuracy refer to the mean accuracy for a particular class ( i.e. there are 500 different mean accuracies ) or is the mean accuracy refer to the accuracy of the probability assigned to each class?</p>
<p>Suggesti... | How do you display data when you have multiple machine learning models | python|machine-learning|graph|artificial-intelligence | -2 | 45 | 1 | 72,870,357 | 72,870,357 | 0 | true | 2022-07-05T07:22:36.653Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do you display data when you have multiple machine learning models<p>I have developed a program that finds the probabilities of around 500 classes based ... |
72,871,077 | Java: How can I efficiently match 2 classes member values partially?<p>I have 2 classes (3rd party): one is representing a GET endpoint response, and the second one is representing a PUT endpoint body.</p>
<p>My aim is to get the resource current state using the get endpoint, and update it using the put endpoint.</p>
<... | <p>I would just make a second constructor for <code>A</code> which takes a <code>B</code> instance.</p>
<pre><code>class A {
int a;
int b;
int c;
public A(B b) {
this(b.a, b.b, b.c);
}
public A(int a, int b, int c) {
this.a = a;
this.b = b;
this.c = c;
}
}
</c... | Java: How can I efficiently match 2 classes member values partially? | java | 1 | 45 | 1 | 72,872,062 | 72,872,062 | 0 | true | 2022-07-05T14:24:45.833Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Java: How can I efficiently match 2 classes member values partially?<p>I have 2 classes (3rd party): one is representing a GET endpoint response, and the sec... |
72,875,565 | Can I send email verification every time the user login instead of using password in firebase (Flutter)?<p>For some reason, I don't want the users to register and login with password in my Flutter application using Firebase, Is there any way to let the user enter his email only, then I send email verification to his em... | <p>What you're describing is known as the <a href="https://firebase.google.com/docs/auth/flutter/email-link-auth" rel="nofollow noreferrer">email link provider</a> in Firebase, which sends an email message with a link to sign-in.</p> | Can I send email verification every time the user login instead of using password in firebase (Flutter)? | flutter|firebase|dart|firebase-authentication | 0 | 45 | 2 | 72,876,664 | 72,876,664 | 0 | true | 2022-07-05T21:09:39.073Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Can I send email verification every time the user login instead of using password in firebase (Flutter)?<p>For some reason, I don't want the users to registe... |
72,879,499 | How do I multiply each member of an array by a variable scalar in javascript?<p>I'm writing a code that multiply each item in array with a variable scalar ( 2**i)</p>
<pre><code>a=[1, 2, 3, 4]
for (let i=0; i<a.length; i++) {
let output = //
}
console.log(output) // **output = [1*(2**0), 2*(2**1), 3(2**2), 4(... | <p>Just create an array out of the for and push the values.</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>a = [1, 2, 3, 4];
output = [];
for (let i = 0; i < a.length; i++)... | How do I multiply each member of an array by a variable scalar in javascript? | javascript|for-loop|multiplication|converters | -4 | 45 | 2 | 72,879,554 | 72,879,554 | 0 | true | 2022-07-06T07:32:35.800Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I multiply each member of an array by a variable scalar in javascript?<p>I'm writing a code that multiply each item in array with a variable scalar ( ... |
72,879,804 | How to Implement Many to Many Relationship with Different Database in Laravel 8?<p>I have 3 tables:</p>
<ol>
<li>subdistrict (in database B)</li>
<li>users (in database A)</li>
<li>admin_area (in database A).</li>
</ol>
<p>and now, i want to insert or display data for user with area. below is the code i have made:</p>
... | <p>Barring any design considerations, you can try by including the database name in front of the table. I'm assuming that the databases are in the same server.
Try alternating database_a or database_b (I'm not 100% clear on how the relationship was created).</p>
<pre class="lang-php prettyprint-override"><code>class Us... | How to Implement Many to Many Relationship with Different Database in Laravel 8? | php|laravel|eloquent|laravel-8 | 0 | 45 | 1 | 72,880,173 | 72,880,173 | 0 | true | 2022-07-06T07:58:09.393Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to Implement Many to Many Relationship with Different Database in Laravel 8?<p>I have 3 tables:</p>
<ol>
<li>subdistrict (in database B)</li>
<li>users (... |
72,883,951 | Rendering datatables in a for-loop<p>I want to display multiple tables in a shiny-app, and as they should all behave the same, I thought I could render them in a for-loop:</p>
<pre><code>library(shiny)
getData = function(name){
if(name=='foo'){
return(data.frame(foo=c('foo')))
}else{
return(dat... | <p>You can use <code>local</code> as shown below</p>
<pre><code>server <- function(input, output) {
for(item in c('foo','bar')){
local({
item <- item
output[[item]] = DT::renderDT(getData(item))
})
}
}
</code></pre> | Rendering datatables in a for-loop | shiny|dt | 0 | 45 | 1 | 72,884,173 | 72,884,173 | 0 | true | 2022-07-06T12:56:03.300Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Rendering datatables in a for-loop<p>I want to display multiple tables in a shiny-app, and as they should all behave the same, I thought I could render them ... |
72,883,998 | How to let spacing between buttons take up all available screen space in Flutter/Dart?<p>Right now my screen looks like this:</p>
<p><a href="https://i.stack.imgur.com/PJAQz.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PJAQz.jpg" alt="enter image description here" /></a></p>
<p>This is the part of... | <p>Your button widget with Stack is unnecessary. And You can wrap the button with another column and use mainAxisAlignment of parent property like this. I created a button widget for you. So your code will look clean and minimalized.</p>
<pre><code>class MyStatelessWidget extends StatelessWidget {
const MyStatelessWi... | How to let spacing between buttons take up all available screen space in Flutter/Dart? | flutter|dart|flutter-layout | 0 | 45 | 3 | 72,884,303 | 72,884,303 | 0 | true | 2022-07-06T12:59:18.530Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to let spacing between buttons take up all available screen space in Flutter/Dart?<p>Right now my screen looks like this:</p>
<p><a href="https://i.stack... |
72,883,805 | IntelliJ http client save JSON value as variable not working for variable names with - character<p>My GET Request:</p>
<pre><code>### Bank token idclaim
GET {{IdClaimEndpoint}}/tokens/v1/id
Content-Type: application/json
> {% client.log(response.body.id-claim); %}
</code></pre>
<p>Response body:</p>
<pre><code>{
... | <p>It is JavaScript. You can use response.body['id-claim'] syntax. <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Property_Accessors#syntax" rel="nofollow noreferrer">https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Property_Accessors#syntax</a></p>
<p>Fo... | IntelliJ http client save JSON value as variable not working for variable names with - character | json|intellij-idea|environment-variables|intellij-14 | 0 | 45 | 2 | 72,884,832 | 72,884,832 | 0 | true | 2022-07-06T12:45:11.817Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
IntelliJ http client save JSON value as variable not working for variable names with - character<p>My GET Request:</p>
<pre><code>### Bank token idclaim
GET ... |
72,889,380 | Getting [Object Object] in local storage<p>I am currently busy with a registration form, I got everything set up nicely, however, I am running into 2 local storage issues.</p>
<ol>
<li><p>I get the <code>VM6858:1 Uncaught SyntaxError: Unexpected token o in JSON at position 1 at JSON.parse (<anonymous>)</code> err... | <p>You are creating your <code>formEl</code> object on page load, and all the fields will be blank, you need to move your declaration inside of your <code>validate()</code> function to actually populate <code>formEl</code> with the data you want.</p>
<p>The other issue is what Ryan mentioned, I suggest clearing your lo... | Getting [Object Object] in local storage | javascript | 0 | 45 | 3 | 72,889,588 | 72,889,588 | 0 | true | 2022-07-06T20:15:26.160Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Getting [Object Object] in local storage<p>I am currently busy with a registration form, I got everything set up nicely, however, I am running into 2 local s... |
72,891,291 | Why can't you format the date?<p>I have a dataframe with different dates with the following format 15 January 2012 and want to pass it with a format 15/01/2012</p>
<p>My code</p>
<pre><code>data['Last Date'] = pd.to_datetime(data['Last Date'], format="%d/%B/%Y")
print(data.info())
</code></pre>
<p>but I get a... | <p>Convert the column to datetime in the parsed format and then convert it to the format you want</p>
<pre><code>
date = pd.to_datetime(data["Last Date"], format="%d %B %Y")
data['Last Date'] = date.dt.strftime("%d/%m/%Y")
</code></pre>
<p>Example:</p>
<pre><code>import pandas as pd
time... | Why can't you format the date? | python|python-3.x|pandas|dataframe|date | 0 | 45 | 1 | 72,891,508 | 72,891,508 | 0 | true | 2022-07-07T01:10:04.223Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why can't you format the date?<p>I have a dataframe with different dates with the following format 15 January 2012 and want to pass it with a format 15/01/20... |
72,893,330 | Why Laravel Passport does not generate oauth routes?<p>I have a clean installation of Laravel 9.2.</p>
<pre><code>composer require laravel/passport
</code></pre>
<p>Then I run the migrations and install passport.</p>
<pre><code>php artisan migrate
php artisan passport:install
</code></pre>
<p>All of that should genera... | <p>after <code>php artisan passport:install</code> you should call the <code>Passport::routes</code> method within the <strong>boot</strong> method of your <code>App\Providers\AuthServiceProvider</code>. This method will register the routes necessary to issue access tokens and revoke access tokens, clients, and persona... | Why Laravel Passport does not generate oauth routes? | laravel|laravel-passport | 0 | 45 | 1 | 72,893,575 | 72,893,575 | 0 | true | 2022-07-07T06:43:12.690Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why Laravel Passport does not generate oauth routes?<p>I have a clean installation of Laravel 9.2.</p>
<pre><code>composer require laravel/passport
</code></... |
72,801,545 | How do I remove ScriptObjectMirror(jdk.nashorn.api.scripting.ScriptObjectMirror) since it is Deprecated?<p>I have recently started working on this new project where we are decoding our message using <strong>ScriptEngine</strong> & <strong>ScriptEngineManager</strong>. Here we have used ScriptObjectMirror which is d... | <p>Simply replaced it with Bindings</p>
<p><code>bindings = (Bindings) inv.invokeFunction("DecodeElsysPayload", inv.invokeFunction("hexToBytes", encodeString));</code></p> | How do I remove ScriptObjectMirror(jdk.nashorn.api.scripting.ScriptObjectMirror) since it is Deprecated? | java|spring|binding|nashorn|scriptengine | 0 | 45 | 1 | 72,898,729 | 72,898,729 | 0 | true | 2022-06-29T12:36:24.537Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I remove ScriptObjectMirror(jdk.nashorn.api.scripting.ScriptObjectMirror) since it is Deprecated?<p>I have recently started working on this new projec... |
72,896,530 | Is it possible to track time spent on an individual issue in JetBrains YouTrack Cloud?<p>I want to track time I've spent on a single issue in my JetBrains YouTrack Cloud in such a way, that I declare work on a specific issue and YouTrack is dealing with time tracking by itself. When I consider issue as done YouTrack st... | <p>It seems you are looking for functionality similar to the <a href="https://www.jetbrains.com/help/youtrack/cloud/Workflow-Work-Timer.html" rel="nofollow noreferrer">In Progress Work Timer</a> workflow. It automatically starts a timer when the issue's State field value is changed to "In progress" and stops ... | Is it possible to track time spent on an individual issue in JetBrains YouTrack Cloud? | cloud|jetbrains-ide|agile|youtrack|time-tracking | 1 | 45 | 1 | 72,900,627 | 72,900,627 | 0 | true | 2022-07-07T10:52:50.523Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is it possible to track time spent on an individual issue in JetBrains YouTrack Cloud?<p>I want to track time I've spent on a single issue in my JetBrains Yo... |
72,902,580 | React state does not update accordingly when popping an array<p>I wrote a simple component in React which is supposed to remove the last element of an array when a button is clicked, but despite console logging the correct value, my React state is not being updated accordingly (when viewing the components with React De... | <p>See the state is not getting updated because arrays are mutable data types and when you pop an element, it is not going to change the address of the array in the memory. Since the array(address) has not changed, react will figure the state hasn't changed and that's why a re-render won't be triggered</p>
<p>Try this ... | React state does not update accordingly when popping an array | javascript|reactjs|state | 0 | 45 | 1 | 72,902,759 | 72,902,759 | 0 | true | 2022-07-07T18:22:46.190Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
React state does not update accordingly when popping an array<p>I wrote a simple component in React which is supposed to remove the last element of an array ... |
72,871,865 | Camera2API on manual mode takes super low quality pictures<p>I've been for several days struggling with Camera2 API and apparently I'm stuck. I have an android app which uses Camera2 API to take pictures. It must run on a Samsung galaxy Tab A SM-T510 with Android 11. The app uses a call to camera2 API which after takin... | <p>I don't see anything obviously wrong here - the difference in your exposure values is small enough (~10% brightness difference expected) that it shouldn't cause a blown-out image.</p>
<p>Have you tried using another manual-control camera app (like OpenCamera) to see if that works correctly?</p>
<p>It's also possible... | Camera2API on manual mode takes super low quality pictures | android|camera|android-camera2 | 0 | 45 | 1 | 72,902,780 | 72,902,780 | 0 | true | 2022-07-05T15:20:06.617Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Camera2API on manual mode takes super low quality pictures<p>I've been for several days struggling with Camera2 API and apparently I'm stuck. I have an andro... |
72,887,753 | Find cell value in a column<p>Cell A3 has a LEFT formula that extracts first 3 characters of another cell with a dropdown.
Need VBA to search the result of A3 formula in column A, and select that cell.</p>
<p>Getting a Compile error:</p>
<blockquote>
<p>Object required on "strSearch =" in 3d line of below cod... | <p>Here's what works for me now - Thanks, in part, to @BigBen:</p>
<p>This code calls the find macro upon change in ComboBox:</p>
<pre><code>Private Sub ComboBox1_Change()
Call findAA
End Sub
</code></pre>
<p>This is the working find code:</p>
<pre><code>Sub findAA()
Dim rng1 As Range
Dim strSearch As String
strSearc... | Find cell value in a column | excel|vba | 0 | 45 | 1 | 72,902,997 | 72,902,997 | 0 | true | 2022-07-06T17:33:27.010Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Find cell value in a column<p>Cell A3 has a LEFT formula that extracts first 3 characters of another cell with a dropdown.
Need VBA to search the result of A... |
72,887,011 | Python array from image is single digits, not RGB values<p>I have an image that I've processed through PIL that I'm trying to recover to an array, but my output is coming to be single digits per pixel where I'm expecting an RGB value. Any thoughts? I have a sneaking suspicion that it's the bitmap file but would love no... | <p><code>color_image.quantize(palette=src, dither=1)</code> will convert the image to ‘P’ mode with the specified number of colors. P mode image is a palletised image i.e instead of storing RGB, only 1 byte is stored and this 1 byte is the index into the color palette. So you will need to convert back the ‘P’ mode imag... | Python array from image is single digits, not RGB values | python|arrays|numpy|python-imaging-library|rgb | 0 | 45 | 1 | 72,903,600 | 72,903,600 | 0 | true | 2022-07-06T16:29:57.473Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python array from image is single digits, not RGB values<p>I have an image that I've processed through PIL that I'm trying to recover to an array, but my out... |
72,904,219 | How to convert mouse movement to android movement in unity<p>Hey guys im new to game development on android, and i have this dilema. The problem is that i dont know how to convert my "void OnMouseDown" to android syntax. Here is the code:</p>
<pre><code>using System.Collections;
using System.Collections.Gene... | <p>You need to use <a href="https://docs.unity3d.com/ScriptReference/Input.GetTouch.html" rel="nofollow noreferrer">Input.GetTouch</a></p>
<p>Instead of the events <code>OnWhatever</code> for the mouse you check for the <a href="https://docs.unity3d.com/ScriptReference/TouchPhase.html" rel="nofollow noreferrer">touchPh... | How to convert mouse movement to android movement in unity | c#|android|unity3d | 1 | 45 | 1 | 72,906,991 | 72,906,991 | 0 | true | 2022-07-07T21:06:44.217Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to convert mouse movement to android movement in unity<p>Hey guys im new to game development on android, and i have this dilema. The problem is that i do... |
72,777,151 | How can a containerized JAR (Java) access the default system mixer?<p>I previously took this question down, it's going back up since it's still a problem we're encountering. We have a JAR that we're resurrecting from three years ago. Back then (before I joined the project), it ran bare-metal (presumably on an RPM-based... | <p>In Linux accessing the audio devices is all done via the filesystem. So if you mount the necessary files (/dev/audio?) into the container and give suitable privileges you should be good to go.</p> | How can a containerized JAR (Java) access the default system mixer? | java|docker|audio|device|mixer | 1 | 45 | 1 | 72,911,477 | 72,911,477 | 0 | true | 2022-06-27T19:00:48.187Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can a containerized JAR (Java) access the default system mixer?<p>I previously took this question down, it's going back up since it's still a problem we'... |
72,905,087 | Cannot run multiple instance of JPYPE (JVM) when running Selenium tests in Python<p>I am currently developing an automation testing framework using Selenium and Python. The project needs to use an Oracle database and because of that I decided to use <a href="https://pypi.org/project/JayDeBeApi/" rel="nofollow noreferre... | <p>After some introspection I decided to place the JVM part inside the suite file which executes all the test cases.</p>
<p>So based in previous example</p>
<pre><code>try:
jpype.startJVM(jpype.getDefaultJVMPath(), Constant.ojdbcpath)
test1 = TestLoader().loadTestsFromtestCase(...)
test2 = TestLoader().loa... | Cannot run multiple instance of JPYPE (JVM) when running Selenium tests in Python | python|selenium|multiple-instances|jpype|jaydebeapi | 0 | 45 | 1 | 72,912,218 | 72,912,218 | 0 | true | 2022-07-07T23:05:47.207Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Cannot run multiple instance of JPYPE (JVM) when running Selenium tests in Python<p>I am currently developing an automation testing framework using Selenium ... |
72,914,244 | Error message : SyntaxError: Unexpected token < in JSON at position 0<p>i was trying to fetch a data for a project but everytime i'm converting the fetch data to json it returns me</p>
<blockquote>
<p>SyntaxError: Unexpected token < in JSON at position 0</p>
</blockquote>
<p>i don't understand why it's showing me th... | <p>Doing</p>
<pre><code>fetch('www.thecocktaildb.com/')
</code></pre>
<p>will fetch not <em>that</em> website, but that path <em>relative to the current path</em>. For example, doing so here on Stack Overflow results in the URL being fetched being</p>
<pre class="lang-none prettyprint-override"><code>https://stackoverf... | Error message : SyntaxError: Unexpected token < in JSON at position 0 | javascript|reactjs|json|react-hooks|fetch-api | -1 | 45 | 1 | 72,914,302 | 72,914,302 | 0 | true | 2022-07-08T16:16:15.050Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Error message : SyntaxError: Unexpected token < in JSON at position 0<p>i was trying to fetch a data for a project but everytime i'm converting the fetch dat... |
72,913,793 | Test multiple parsing outputs instead of hardcoding each of them into a constant Node js<p>So in my application I am cron parsing multiple database data and I have it right now to where I create a const run for each data to find the dag_id and test the determineCron one at a time manually. How would I make an array so ... | <p>You could create an array with the references of the constants, but it's tricky after that, because if you use any built-in array method like map, forEach, reduce... to execute the function it will not await the previous finish to execute the next call. Therefore, what you should do is to use <a href="https://develo... | Test multiple parsing outputs instead of hardcoding each of them into a constant Node js | javascript|node.js | -1 | 45 | 3 | 72,914,553 | 72,914,553 | 0 | true | 2022-07-08T15:35:37.963Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Test multiple parsing outputs instead of hardcoding each of them into a constant Node js<p>So in my application I am cron parsing multiple database data and ... |
72,915,083 | Iterating over rows to find mean of a data frame in Python<p>I have a dataframe of 100 random numbers and I would like to find the mean as follows:</p>
<p>mean0 should have mean of 0,5,10,... rows</p>
<p>mean1 should have mean of 1,6,11,16,.... rows</p>
<p>.</p>
<p>.</p>
<p>.
mean4 should have mean of 4,9,14,... rows.<... | <p>I would use the underlying numpy array:</p>
<pre><code>df[0].to_numpy().reshape(-1, 5).mean(0)
</code></pre>
<p>output: <code>array([40.8 , 52.75, 43.2 , 55.05, 47.45])</code></p> | Iterating over rows to find mean of a data frame in Python | python|pandas|dataframe|numpy | 0 | 45 | 2 | 72,915,324 | 72,915,324 | 0 | true | 2022-07-08T17:39:40.293Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Iterating over rows to find mean of a data frame in Python<p>I have a dataframe of 100 random numbers and I would like to find the mean as follows:</p>
<p>me... |
72,921,333 | react on change check if equal to array of object<p>i have input and array of object
i need when i type it will display the object. "airplaneCompany" is the object property that i need to compare
i was doing only if the input is equal to the "airplaneCompany" it will return it by the filter method
b... | <p>You can use @Patrick answer, but JavaScript has its own <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith" rel="nofollow noreferrer">startsWith</a> function you can use.</p>
<p>Also, consider wrapping the filter with the <code>useMemo</code> hook to run it on... | react on change check if equal to array of object | javascript|reactjs|arrays|object|onchange | 0 | 45 | 3 | 72,921,428 | 72,921,428 | 0 | true | 2022-07-09T12:24:50.687Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
react on change check if equal to array of object<p>i have input and array of object
i need when i type it will display the object. "airplaneCompany&quo... |
72,922,241 | Is it better to use a pointer instead of returning a value?<p>I was wondering what is the best way to get a value from a function.
A function can return a value like an int for example.
But you can also change the value of a variable with a pointer passed as a parameter to the function.
See below, two examples of codes... | <p>Side effects should be avoided if not absolutely needed. If you can return the value - return it. Basically, the function should a black-box which does something with parameters and returns the value.</p>
<p>Why:</p>
<ol>
<li>It is much safer. You definitely will not invoke undefined behaviour.</li>
<li>It helps the... | Is it better to use a pointer instead of returning a value? | c|pointers|return-value | 0 | 45 | 2 | 72,922,376 | 72,922,376 | 0 | true | 2022-07-09T14:36:50.223Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is it better to use a pointer instead of returning a value?<p>I was wondering what is the best way to get a value from a function.
A function can return a va... |
72,899,549 | how to set a value to list or text box using wxWidgets library<p>I've been struggling with converting the numbers on my buttons to the text box for my assignment. Basically what I'm trying to do is when a user presses for example when I click on 7 it should appear in the text box but currently in my Button Pressed meth... | <p>You need to use <code>wxTextCtrl::SetValue()</code> (or <code>ChangeValue()</code>, which is very similar, but doesn't generate any events about the change in the text control) to change the <em>value</em> (<em>not</em> the label) of <code>wxTextCtrl</code>.</p> | how to set a value to list or text box using wxWidgets library | c++|wxwidgets | 0 | 45 | 1 | 72,922,555 | 72,922,555 | 0 | true | 2022-07-07T14:24:32.860Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to set a value to list or text box using wxWidgets library<p>I've been struggling with converting the numbers on my buttons to the text box for my assign... |
72,924,165 | Placing a transparent div with borders on top of another transparent div with borders<p>Please see the image below.</p>
<p><a href="https://i.stack.imgur.com/6LCjl.png" rel="nofollow noreferrer">contact-image</a></p>
<p>I want to make a contact container that has a square Contact header. I want the contact header in th... | <p>Just use <code><fieldset></code> and <code><legend></code>.</p>
<p>the legend is a title in a fieldset and the border of a fieldset will not go through the legend. The legend can be aligned with the margin.</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false... | Placing a transparent div with borders on top of another transparent div with borders | html|css | 0 | 45 | 2 | 72,924,221 | 72,924,221 | 0 | true | 2022-07-09T19:44:07.093Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Placing a transparent div with borders on top of another transparent div with borders<p>Please see the image below.</p>
<p><a href="https://i.stack.imgur.com... |
72,927,581 | Code throws random target frame detached in selenium/python<p>As it says in the title, when trying to scrape the site <a href="https://www.fragrantica.com/search/" rel="nofollow noreferrer">https://www.fragrantica.com/search/</a> while looping through filters, it throws a WebDriverException: Message: target frame detac... | <p>There was an issue that was introduced in Chrome 99 <a href="https://bugs.chromium.org/p/chromedriver/issues/detail?id=4048" rel="nofollow noreferrer">bugs.chromium</a> <code>Issue 4048: target frame detached</code>. See comment #53</p>
<blockquote>
<p>Status: Fixed (was: Assigned)</p>
<p>Frame detached issue is fix... | Code throws random target frame detached in selenium/python | python|selenium|web-scraping | 0 | 45 | 1 | 72,927,664 | 72,927,664 | 0 | true | 2022-07-10T09:50:42.623Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Code throws random target frame detached in selenium/python<p>As it says in the title, when trying to scrape the site <a href="https://www.fragrantica.com/se... |
72,860,836 | Telegram Bot not responding after 3rd function call<p>The issue is that the third function never seems to respond.
I haven't been able to find a reason why this happens in the telegram documentation.
Please let me know if you have this issue or seen it and know the solution.
Even a post that references an issue like th... | <p>I found that using "if <strong>name</strong> == '<strong>main</strong>':" and keeping all the functions in "main():" as a function handler everything ran smoothly.
I'm still trying to figure out why this works.</p> | Telegram Bot not responding after 3rd function call | python|html|bots|telegram | 0 | 45 | 2 | 72,930,538 | 72,930,538 | 0 | true | 2022-07-04T18:37:07.573Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Telegram Bot not responding after 3rd function call<p>The issue is that the third function never seems to respond.
I haven't been able to find a reason why t... |
72,936,623 | sum of column using nan as break point with if statement<p>Sir,</p>
<p>example date column A header name column B header sold data in</p>
<pre><code> column A clumn B
header Name Sold
ABC NAN
FP 200
FP 300
XYZ... | <p>here is my way:</p>
<p>sample input:</p>
<pre><code>import pandas as pd
import numpy as np
df = pd.DataFrame({'col1':['abc','c1','c2','xyz','c3','c4'], 'col2':[np.nan,100,200,np.nan,10,20]})
col1 col2
abc NaN
c1 100.0
c2 200.0
xyz NaN
c3 10.0
c4 20.0
</code></pre>
<p>create groups separate... | sum of column using nan as break point with if statement | python-3.x|pandas | 0 | 45 | 1 | 72,937,157 | 72,937,157 | 0 | true | 2022-07-11T09:50:02.567Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
sum of column using nan as break point with if statement<p>Sir,</p>
<p>example date column A header name column B header sold data in</p>
<pre><code> ... |
72,937,065 | How to use HStack to fill equally to the very edge of the View?<p>How can I make the HStack fill equally to the very edge of the View like yellow arrows indicate in the screenshot?</p>
<p><a href="https://i.stack.imgur.com/NZIu7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NZIu7.png" alt="" /></a>... | <p>Add Spacer after Text</p>
<pre><code>var labelList = ["0", "6", "12", "6", "0"]
HStack {
ForEach(labelList, id: \.self) { item in
Text(item)
.frame(maxWidth: .infinity)
.font(.system(size: 8))
if labelList.last != item {
... | How to use HStack to fill equally to the very edge of the View? | swift|swiftui|apple-watch|watchos|apple-watch-complication | 0 | 45 | 1 | 72,937,281 | 72,937,281 | 0 | true | 2022-07-11T10:23:16.443Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to use HStack to fill equally to the very edge of the View?<p>How can I make the HStack fill equally to the very edge of the View like yellow arrows indi... |
72,940,460 | Is there a regex to capture a directory, without the whole line?<p>I would like to try automating the compiling of a python app I made using PowerShell.
In order to achieve, I have to get the directory name of where my python packages are installed as a variable.
I'll use the exemple of matplotlib.</p>
<pre><code>pip s... | <p>You might for example use a capture group matching 1 or more non whitespace chars:</p>
<pre><code>^Location:\s*(\S+)'
</code></pre>
<p><a href="https://regex101.com/r/WCvOO0/1" rel="nofollow noreferrer">Regex demo</a></p>
<p>Example code</p>
<pre><code>$Str = @"
Name: matplotlib
Version: 3.5.2
Summary: Python p... | Is there a regex to capture a directory, without the whole line? | python|regex|powershell|pip | 0 | 45 | 1 | 72,941,303 | 72,941,303 | 0 | true | 2022-07-11T14:50:53.247Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is there a regex to capture a directory, without the whole line?<p>I would like to try automating the compiling of a python app I made using PowerShell.
In o... |
72,943,789 | Why aren't jQuery functions being called sequentially?<p>I have a function that, when the Start button is pressed, a cycle is called for 10 iterations, where it generates a number from 1 to 7, which is substituted in the switch, where functions should be called in turn on the object. First change css, then call animate... | <p>Maybe you want each animation to occur 1s after the previous?</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>case 1:
setTimeout(
function(){
$('.SightReading_co... | Why aren't jQuery functions being called sequentially? | javascript|jquery | 0 | 45 | 1 | 72,944,036 | 72,944,036 | 0 | true | 2022-07-11T19:37:44.703Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why aren't jQuery functions being called sequentially?<p>I have a function that, when the Start button is pressed, a cycle is called for 10 iterations, where... |
72,946,147 | How to parse csv into dictionary in Python without saving file?<p>CSV file uploaded by user and then I want to parse it to dictionary without actually saving the uploaded file.</p>
<p>I found this reference and tried it
<a href="https://riptutorial.com/flask/example/32038/parse-csv-file-upload-as-list-of-dictionaries-i... | <p>Your error says your file is encoded, decode it.</p>
<p><code>fstring = f.read().decode("utf8")</code></p> | How to parse csv into dictionary in Python without saving file? | python|csv|flask | -1 | 45 | 2 | 72,946,172 | 72,946,172 | 0 | true | 2022-07-12T01:30:39.103Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to parse csv into dictionary in Python without saving file?<p>CSV file uploaded by user and then I want to parse it to dictionary without actually saving... |
72,950,624 | Set personalized body for sending mail in django<p>I want to send a message with personalized SMTP mail-in Django. Where I want to send the Name, email, and contact information with the dynamic text input value.</p>
<p>Here is my code</p>
<pre><code> if request.method == 'POST':
name = request.POST.get('name')... | <p>The commas in this line don't look right:</p>
<pre><code>allinfo = "Name : " + name, "E-Mail" + email, "Contact:" + contact, textmess
</code></pre>
<p>You might want:</p>
<pre><code>allinfo = "Name: " + name + " E-Mail: " + email + "Contact: " + contact + t... | Set personalized body for sending mail in django | python|django|smtp | 1 | 45 | 2 | 72,950,758 | 72,950,758 | 0 | true | 2022-07-12T10:12:45.040Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Set personalized body for sending mail in django<p>I want to send a message with personalized SMTP mail-in Django. Where I want to send the Name, email, and ... |
72,951,572 | LARAVEL 9 - Session conditions if admin or not<p>I'm doing a Laravel 9 project and I would like to realize a user management.
I made a template with a basic header and I would like to know how to make a condition for this link (user management). If the session has an iduser with an administrator type, then I want it to... | <p>you can retrieve the user id through <code>request()->user()->id</code> to check if the user is an admin. Or you can create an <code>isAdmin()</code> method in your User model to see if an user is an admin and then call it this way:</p>
<p><code>@if(request()->user()->isAdmin())</code></p> | LARAVEL 9 - Session conditions if admin or not | laravel|if-statement|laravel-9 | 0 | 45 | 1 | 72,951,857 | 72,951,857 | 0 | true | 2022-07-12T11:27:46.947Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
LARAVEL 9 - Session conditions if admin or not<p>I'm doing a Laravel 9 project and I would like to realize a user management.
I made a template with a basic ... |
72,952,138 | Swift - Can't use the object that initialized in closure<p>as a newbie I got a problem.
This is my custom model for API that I use which is called Poke API.</p>
<pre><code>import UIKit
struct Pokemon: Codable {
var results: [PokemonEntry]
}
struct PokemonEntry: Codable {
var name: String
var url: String
}... | <p>Try this instead:</p>
<pre><code>class ViewController: UIViewController {
var pokeList: Pokemon? {
didSet {
print("I can use pokeList out of the Webservice closure, it is: \(pokeList?.results ?? "<nil>")")
}
}
override func viewDidLoad() {
sup... | Swift - Can't use the object that initialized in closure | arrays|json|swift|api|object | 1 | 45 | 1 | 72,952,430 | 72,952,430 | 0 | true | 2022-07-12T12:14:07.283Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Swift - Can't use the object that initialized in closure<p>as a newbie I got a problem.
This is my custom model for API that I use which is called Poke API.<... |
72,950,990 | How to process a dataframe column based on another dataframe column in PySpark?<p>Let's say that I have these two dataframes</p>
<pre class="lang-none prettyprint-override"><code>df1 : | Name| Surname | email
John Smith JohnSmith@gmail.com
Jake Smith JakeSmith@... | <p>Join the dataframes, but use <code>alias</code> on them. Then you will be able to choose between columns of the same name.</p>
<pre class="lang-py prettyprint-override"><code>df3 = (df1.alias('a')
.join(df2.alias('b'),['Name', 'Surname'], 'left')
.select(
'Name',
'Surname',
F.coalesce... | How to process a dataframe column based on another dataframe column in PySpark? | python|apache-spark|join|pyspark|apache-spark-sql | 1 | 45 | 1 | 72,952,633 | 72,952,633 | 0 | true | 2022-07-12T10:40:45.297Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to process a dataframe column based on another dataframe column in PySpark?<p>Let's say that I have these two dataframes</p>
<pre class="lang-none pretty... |
72,951,260 | Why my response from flask api is multipled?<p>I am learning to build an API with Python and Flask. I don't know why, but sometimes and I get response which is multipled. Now I have 67 records in my database, but the response from API has much more items.
Here's the api code:</p>
<pre><code>from flask import Flask, jso... | <p>Try the following portion of code as below:</p>
<pre><code>#Initialize the MySQL extension
mysql.init_app(app)
keys_dict = ["id", "link", "title", "date", "image", "description", "tag"]
class PostList(Resource):
def get(self):
final_d... | Why my response from flask api is multipled? | python|api|flask|flask-restful | -1 | 45 | 1 | 72,956,228 | 72,956,228 | 0 | true | 2022-07-12T11:02:31.280Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why my response from flask api is multipled?<p>I am learning to build an API with Python and Flask. I don't know why, but sometimes and I get response which ... |
72,951,952 | Boost serialization base class without default constructor<p><strong>How to serialize/deserialize derived class inheriting base class without default constructor?</strong><br />
Please offer serializing boost functions for the following classes</p>
<pre><code>struct Base
{
Base(int b) : b(b) {}
const int b;
}
stru... | <p>Your use-case straddles two of the "special considerations" documented by Boost Serialization:</p>
<ul>
<li><a href="https://www.boost.org/doc/libs/1_79_0/libs/serialization/doc/serialization.html#constructors" rel="nofollow noreferrer">Non-default constructors</a></li>
<li><a href="https://www.boost.org/d... | Boost serialization base class without default constructor | c++|serialization|boost | 1 | 45 | 2 | 72,959,254 | 72,959,254 | 0 | true | 2022-07-12T11:59:46.487Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Boost serialization base class without default constructor<p><strong>How to serialize/deserialize derived class inheriting base class without default constru... |
72,959,924 | System call: does Read function change process?<p><a href="https://i.stack.imgur.com/bAnDX.png" rel="nofollow noreferrer">enter image description here</a></p>
<p>I learned that when a system call function is called, the process changes. But what is process B if I call the read function without the fork() function? isn'... | <p>On x86-64, there is one specific instruction to do system calls: <code>syscall</code> (<a href="https://www.felixcloutier.com/x86/syscall.html" rel="nofollow noreferrer">https://www.felixcloutier.com/x86/syscall.html</a>). When you call <code>read()</code> in C, it is compiled to placing the proper syscall number in... | System call: does Read function change process? | c|io|operating-system|system|system-calls | 0 | 45 | 2 | 72,960,185 | 72,960,185 | 0 | true | 2022-07-13T01:19:14.513Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
System call: does Read function change process?<p><a href="https://i.stack.imgur.com/bAnDX.png" rel="nofollow noreferrer">enter image description here</a></p... |
72,963,747 | Android Studio shortcut lightbulb<p>Is there a shortcut to show the lightbulb help window?
Thanks.</p>
<p><a href="https://i.stack.imgur.com/VaQPs.png" rel="nofollow noreferrer">help lightbulb</a></p> | <p>In general, all you have to do is to select a line of code from Android Studio and press <strong>ALT + ENTER</strong> for showing lightbulb's recommendations.</p> | Android Studio shortcut lightbulb | android|android-studio | 0 | 45 | 1 | 72,965,990 | 72,965,990 | 0 | true | 2022-07-13T09:15:34.817Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Android Studio shortcut lightbulb<p>Is there a shortcut to show the lightbulb help window?
Thanks.</p>
<p><a href="https://i.stack.imgur.com/VaQPs.png" rel="... |
72,960,049 | Do I need to buy an SSL certificate for my new domain?<p>I was hosting my app on Heroku and it said it was "secure" in the domain bar with no problem. I have the following setting on:</p>
<pre><code>SECURE_SSL_REDIRECT = True
</code></pre>
<p>Now I added my own domain and reconfigured my app to point to the d... | <p>Maybe.</p>
<p>Heroku provides HTTPS automatically for default <code>myapp.herokuapp.com</code> domains, but for custom domains you'll have to do a bit of extra work.</p>
<h2>ACM</h2>
<p>The easiest solution is to use <a href="https://devcenter.heroku.com/articles/automated-certificate-management" rel="nofollow noref... | Do I need to buy an SSL certificate for my new domain? | django|heroku|https|dns|namecheap | 0 | 45 | 1 | 72,966,868 | 72,966,868 | 0 | true | 2022-07-13T01:47:18.743Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Do I need to buy an SSL certificate for my new domain?<p>I was hosting my app on Heroku and it said it was "secure" in the domain bar with no probl... |
72,966,850 | reorder linked list without creating a new one<p>community! My problem is that I must <strong>order a linked list</strong> in such a way that a new one is not created, but the same one is returned. For example, if I have:
Head --> [8] --> [15] --> [1] should I return Head --> [1] --> [8] --> [15]
My c... | <p>I did the classic simple sort (or bubble Sort). The one where <code>i</code> goes to <code>n - 1</code> and <code>j</code> goes from <code>i + 1</code> to <code>n</code>. It worked.</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre cl... | reorder linked list without creating a new one | javascript|linked-list | 1 | 45 | 1 | 72,967,061 | 72,967,061 | 0 | true | 2022-07-13T13:05:45.247Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
reorder linked list without creating a new one<p>community! My problem is that I must <strong>order a linked list</strong> in such a way that a new one is no... |
72,969,824 | Static Files or Images doesn't load ( 404 ) using C# NET AngularJS project<p>I'm new into AngularJS project in .NET 6.0 or Core. I just put a images into a folder like <code>wwwroot/imgs</code></p>
<p>Then images are called from a custom static css referenced in: <code>angular.json</code> like:</p>
<pre><code> &... | <p>Finally I discover the problem. In development the project works through a reverse proxy, so we need to configure every folder in the file <code>proxy.conf.js</code> in order to the proxy let the project serve the static files.</p>
<p>For example, to add <code>/imgs</code> files in my case:</p>
<pre><code>const PROX... | Static Files or Images doesn't load ( 404 ) using C# NET AngularJS project | c#|angularjs|asp.net-core|.net-6.0 | 0 | 45 | 2 | 72,970,845 | 72,970,845 | 0 | true | 2022-07-13T16:44:34.723Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Static Files or Images doesn't load ( 404 ) using C# NET AngularJS project<p>I'm new into AngularJS project in .NET 6.0 or Core. I just put a images into a f... |
72,971,172 | Stack smashing detected while applying stack & register on the remote identical process<p>Let us consider that I have an application that is to be executed on 1st node. This application however, cannot execute some function on this 1st node as the node lacks such capabilities. Hence, in order to make this application e... | <p>if you want to do this you need to at least disable stack canaries, because those will 100% mismatch when carrying over the execution to another machine even if you copied the entire address space.</p>
<p>-fno-stack-protector will do</p> | Stack smashing detected while applying stack & register on the remote identical process | linux|memory|memory-management|stack-overflow|ptrace | 0 | 45 | 1 | 72,973,565 | 72,973,565 | 0 | true | 2022-07-13T18:43:42.500Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Stack smashing detected while applying stack & register on the remote identical process<p>Let us consider that I have an application that is to be executed o... |
72,973,541 | Google sheets VLOOKUP DROP DOWN DISPLAY<p>Can someone help me with this?</p>
<p>As you can see, I want to display the top 10 products but must be in condition with the Name and Month dropdown. For Example, if I choose Name John and January as the month, it should display the top products which are located in Sheet 5. ... | <p>I'm not going to talk about proper database structure instead solving the problem as is.<br></p>
<p>1 - you need a helper columns for employees and monthes Like so highlighted with yellow.<br></p>
<p><a href="https://i.stack.imgur.com/WfKNh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WfKNh.png... | Google sheets VLOOKUP DROP DOWN DISPLAY | google-sheets|vlookup | 0 | 45 | 1 | 72,974,259 | 72,974,259 | 0 | true | 2022-07-13T23:03:15.850Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Google sheets VLOOKUP DROP DOWN DISPLAY<p>Can someone help me with this?</p>
<p>As you can see, I want to display the top 10 products but must be in conditi... |
72,972,821 | Using Measure as Variable<p>The following measure works, but rather than making separate measures for each year, I want to use a variable in place of 2022.<br />
Q1FY22 Cost = CALCULATE(
SUM('Invoice Amounts'[CLIN Total]),'Calendar'[Fiscal Year]=2022,'Calendar'[Fiscal Quarter]=1)</p>
<p>I created another measure,</p>
<... | <p>This is a lineage issue.</p>
<p>Try this.</p>
<pre><code>Q1FY22 Cost = CALCULATE(
SUM('Invoice Amounts'[CLIN Total]), TREATAS( {[ThisFY]}, 'Calendar'[Fiscal Year]),'Calendar'[Fiscal Quarter]=1)
</code></pre> | Using Measure as Variable | powerbi|dax | 1 | 45 | 1 | 72,976,256 | 72,976,256 | 0 | true | 2022-07-13T21:27:15.797Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Using Measure as Variable<p>The following measure works, but rather than making separate measures for each year, I want to use a variable in place of 2022.<b... |
72,976,421 | Javascript + compare 2 array of objects and assign value from one o<p>I have an array of objects in the below format.</p>
<pre><code>let selectedCols =
[
{
"table" :
{
"id" : "bafc1af7-e2c5-ec11-a7b6-00224818a168",
"name" : "test1"
}
visib... | <pre class="lang-js prettyprint-override"><code>selectedCols.forEach((column,i) => {
if(column.table.id===copyOfSelectedColsObj[i].table.id) {
column.visible = copyOfSelectedColsObj[i].visible;
}
})
</code></pre> | Javascript + compare 2 array of objects and assign value from one o | javascript|arrays|json | 0 | 45 | 4 | 72,976,706 | 72,976,706 | 0 | true | 2022-07-14T06:56:43.220Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Javascript + compare 2 array of objects and assign value from one o<p>I have an array of objects in the below format.</p>
<pre><code>let selectedCols =
[
{... |
72,978,156 | How to put alias column name of a query in another query while creating view<pre><code>SELECT Address_1, Address_2,Address_3 ,Address_4,
ISNULL(Address_1,'') + ' ' + ISNULL(Address_3,'') + ' ' + ISNULL(Address_2,'') + ISNULL(Address_4,'') AS Full_Address
FROM landing_doctor_det
------------------------------------... | <p>You can simply select all columns in one statement, like this:</p>
<pre><code>SELECT
clinic_institute_name,
doctor_Name,
Mobile_1,
Address_1,
category,
City,
specilisation,
State,
email_id,
Address_1,
Address_2,
Address_3,
Address_4,
ISNULL(Address_1, '')
+ ' ' + ISNULL(Address_3, ... | How to put alias column name of a query in another query while creating view | sql|sql-server | -3 | 45 | 1 | 72,978,427 | 72,978,427 | 0 | true | 2022-07-14T09:21:46.980Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to put alias column name of a query in another query while creating view<pre><code>SELECT Address_1, Address_2,Address_3 ,Address_4,
ISNULL(Address_1... |
72,980,150 | Prisma: Can I combine two models into one db?<p>I have two separate model in <code>Prisma</code> schema.</p>
<p>And I need to combine these two models and sort by <code>createdAt</code>.</p>
<p>These two models both have createdAt.</p>
<p>So that I want to get two data sorted by createdAt.</p>
<p>Is that possible to co... | <p>If the two models do not share a relationship, you would need to query for them separately, combine the arrays, and then sort by <code>createdAt</code>.</p>
<pre class="lang-js prettyprint-override"><code>const [feeds, poems] = await Promise.all([
prisma.feed.findMany(), // add whatever filters you need to the &qu... | Prisma: Can I combine two models into one db? | react-native|prisma|gql | 0 | 45 | 1 | 72,981,442 | 72,981,442 | 0 | true | 2022-07-14T12:00:49.417Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Prisma: Can I combine two models into one db?<p>I have two separate model in <code>Prisma</code> schema.</p>
<p>And I need to combine these two models and so... |
72,984,346 | Does Switching off the Android Phone destroys the activity?<p>I was playing with the activity life cycle today. I had logged all the lifecycle methods. I was on the <code>MainActivity</code> and then switched off the phone suddenly. I noticed 2 methods being called:</p>
<p><code>onPause</code>,</p>
<p><code>onStop</cod... | <p>If by "switched off the phone" you mean you turned off the screen, your results are fairly common. There will be differences between devices, due to OS version and manufacturer changes, so you should not make any assumptions. However, I would not expect your activity to be destroyed.</p>
<p>If by "swi... | Does Switching off the Android Phone destroys the activity? | java|android|kotlin|mobile | 1 | 45 | 2 | 72,984,547 | 72,984,547 | 0 | true | 2022-07-14T17:16:34.257Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Does Switching off the Android Phone destroys the activity?<p>I was playing with the activity life cycle today. I had logged all the lifecycle methods. I was... |
72,985,167 | How to shift a column based on other columns in pyspark<p>I need to shift Col4 left based on columns Col2 and Col3 in the dataframe in pyspark. Col4 value should be changed when consecutive col2 changes. Col3 mainly track new sequence of Col2 value. Col1 should also partition the final output. The output should look li... | <p>I don't know if you need just to see if Col2 changes to shift (push) Col4, need more info, but I did this based on every time Col2 changes it will push the value of Col4 foward.</p>
<pre><code>w = Window.partitionBy('Col1').orderBy('ID', 'Col1')
df = df.withColumn('shift_4', f.when(f.lag('Col2').over(w) != f.col('Co... | How to shift a column based on other columns in pyspark | python|dataframe|pyspark | 0 | 45 | 1 | 72,985,355 | 72,985,355 | 0 | true | 2022-07-14T18:30:05.700Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to shift a column based on other columns in pyspark<p>I need to shift Col4 left based on columns Col2 and Col3 in the dataframe in pyspark. Col4 value sh... |
72,985,422 | I want to loop through an array but I don't want to use for<pre><code>function CreateSuspectObjects(name){
return {
name: name,
color: name.split(' ')[1],
speak(){
console.log("my name is" , name);
}
};
};
</code></pre>
<p>A function that takes name as val... | <p>You can use <code>Array.prototype.map</code> for this. In your case:</p>
<pre><code>suspects.map((name) => {
let suspectObj= CreateSuspectObjects(name);
suspectsList.push(suspectObj);
});
</code></pre>
<p>If you need the index in the future you can also do:</p>
<pre><code>suspects.map((name, idx) => {
... | I want to loop through an array but I don't want to use for | javascript|each | -6 | 45 | 2 | 72,985,477 | 72,985,477 | 0 | true | 2022-07-14T18:56:28.827Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I want to loop through an array but I don't want to use for<pre><code>function CreateSuspectObjects(name){
return {
name: name,
color: na... |
72,939,747 | 2 questions regarding Implementation of org.springframework.kafka.support.serializer.JsonTypeResolver<p>Im trying to implement this resolve method for Kafka's JsonTypeResolver. However I have run into 2 issues.</p>
<p>How do I register my class so that kafka will use it when deserializing?</p>
<p>How do I use JavaType... | <p>We were able to get the functionality we wanted by:</p>
<p>setting the TYPE_ID_MAPPINGS mappings on the consumer properties</p>
<pre><code> // format is similar to JsonDeserializer.TYPE_MAPPINGS - comma separated list of key:value
// for each pair, key is type id used by message producer, value is type id use... | 2 questions regarding Implementation of org.springframework.kafka.support.serializer.JsonTypeResolver | java|json|apache-kafka|jackson|spring-kafka | 0 | 45 | 1 | 72,985,489 | 72,985,489 | 0 | true | 2022-07-11T13:56:09.167Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
2 questions regarding Implementation of org.springframework.kafka.support.serializer.JsonTypeResolver<p>Im trying to implement this resolve method for Kafka'... |
72,964,682 | how to save/upload my result as json file into the sub folders of S3 bucket via python<p>I have a dictionary as:</p>
<pre><code>My_dict is:
{'folder_1/folder_2/folder_3/file_1.csv': 'value_1',
'folder_1/folder_4/folder_5/file_2.csv': 'value_2'}
</code></pre>
<p>I would like to add a json file to each folder in S3 wh... | <p>The following snippet uses <code>os.path.dirname()</code> to turn a filename like <code>folder_1/folder_2/folder_3/file_1.csv</code> into <code>folder_1/folder_2/folder_3/value.json</code>. It also creates a temporary dictionary value for the content of that particular <code>value.json</code> file.</p>
<pre class="l... | how to save/upload my result as json file into the sub folders of S3 bucket via python | python|json|dictionary|amazon-s3|boto3 | 0 | 45 | 1 | 72,986,267 | 72,986,267 | 0 | true | 2022-07-13T10:23:31.087Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to save/upload my result as json file into the sub folders of S3 bucket via python<p>I have a dictionary as:</p>
<pre><code>My_dict is:
{'folder_1/fold... |
72,987,829 | "Error putting S3 policy: Invalid Syntax"<p>I am trying to set up an S3 bucket policy in Terraform. I have written the following code in a module. The goal is to conditionally create the S3 bucket and the policy. The S3 bucket created just fine. However, I get this error for the aws_s3_bucket_policy. What am I doing wr... | <p>The <code>aws_s3_bucket.bucket[*].arn</code> returns a <strong>list</strong> of arn values, not the actual arn. Thus it should be:</p>
<pre><code>resource "aws_s3_bucket_policy" "bucket" {
bucket = "${aws_s3_bucket.bucket[0].id}"
count = var.account != "" ? 1 : 0
... | "Error putting S3 policy: Invalid Syntax" | amazon-web-services|amazon-s3|terraform|terraform-provider-aws | 1 | 45 | 1 | 72,987,859 | 72,987,859 | 0 | true | 2022-07-15T00:10:25.737Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
"Error putting S3 policy: Invalid Syntax"<p>I am trying to set up an S3 bucket policy in Terraform. I have written the following code in a module. The goal i... |
72,988,662 | Need to get data from fixture JSON<p>I am struggling hard since yesterday getting the data from JSON, I don't understand why the fixture is not accessible. When I tried to get the <code>ID</code>, it gives me an error saying <code>id isn't defined</code>.</p>
<p>This gives me an error saying <code>ID</code> is not defi... | <p>From the json data response body above, data.response is an array of objects of multiple fixtures. So, <code>data.response.fixture</code> would always return undefined. To access a particular fixture, depending on what you want to do to with, you'd have to access the index of the response first. As such:</p>
<pre cl... | Need to get data from fixture JSON | node.js|json|api|node-api | 0 | 45 | 1 | 72,989,164 | 72,989,164 | 0 | true | 2022-07-15T03:09:30.590Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Need to get data from fixture JSON<p>I am struggling hard since yesterday getting the data from JSON, I don't understand why the fixture is not accessible. W... |
72,938,071 | Is it possible to add a custom spellchecker function to an HTML textarea?<h1>Question:</h1>
<p>I'd like to know if it is possible to add a custom spellchecker function to a Textarea.</p>
<h1>Background:</h1>
<p>I am currently using bootstrap-vue's <code>b-form-textarea</code> component to display a textarea that accept... | <p>From what I've read, it does not seem possible to add the spellchecker functionality I required to a textarea. What I ended up using instead was a package, found in npm, called "<a href="https://www.npmjs.com/package/vue-codemirror" rel="nofollow noreferrer">vue-codemirror</a>". It is an extension of the <... | Is it possible to add a custom spellchecker function to an HTML textarea? | javascript|html|vue.js|bootstrap-vue | 1 | 45 | 2 | 72,992,465 | 72,992,465 | 0 | true | 2022-07-11T11:45:37.837Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is it possible to add a custom spellchecker function to an HTML textarea?<h1>Question:</h1>
<p>I'd like to know if it is possible to add a custom spellchecke... |
72,992,893 | How to write data to an existing Excel doc in C#<p>I have a document that I need to update on a monthly basis and I'm writing an automation to do so. This is my first time attempting to update a document with C# as opposed to simply creating a new one. I have researched and tried implementing a few libraries that I've ... | <p>Here is a simple example to write a string value to the first WorkSheet.</p>
<pre><code>public void WriteToCell(string fileName, int row, int col, string value)
{
using var workbook = new XLWorkbook(fileName);
var worksheet = workbook.Worksheets.Worksheet(1);
worksheet.Cell(row, col).Value = value;
w... | How to write data to an existing Excel doc in C# | c#|visual-studio|closedxml | 0 | 45 | 1 | 72,993,268 | 72,993,268 | 0 | true | 2022-07-15T10:54:02.710Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to write data to an existing Excel doc in C#<p>I have a document that I need to update on a monthly basis and I'm writing an automation to do so. This is... |
72,993,470 | Can't load local images with HTML<p>I am developing a simple site with Django, and wanted to load some images locally to some pages. But it doesn't load for some reason. I know there are similar questions, and from what I understand;</p>
<p><strong>a-)</strong> It can be a directory problem, html file and img file is i... | <h5>settings.py</h5>
<pre><code># add this to your settings.py
import os
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static/')
</code></pre>
<p>Then create a folder named <code>static</code> inside your app's folder. Then create another folder with the same name as your app inside that <code>static</... | Can't load local images with HTML | python|html|django | -1 | 45 | 2 | 72,993,572 | 72,993,572 | 0 | true | 2022-07-15T11:44:34.237Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Can't load local images with HTML<p>I am developing a simple site with Django, and wanted to load some images locally to some pages. But it doesn't load for ... |
72,994,315 | Python: for loop that drops a column to meet condition<p>I have a dataframe that looks as follows:</p>
<pre><code>alpha_0 alpha_1 alpha_2 alpha_3
1 2 1 4
2 0 3 8
0 0 0 9
</code></pre>
<p>Beta is calculated as ((sum of each row)^2)/10. I want to keep dro... | <p>First of all, if you want to calculate the power of a number, do not use <code>^</code> operator. It is an XOR Boolean operator. Instead, use <code>**</code> operator.</p>
<p>This code should work. However, this will also delete last remaining column from the dataframe, if the condition of Beta is not met.</p>
<pre>... | Python: for loop that drops a column to meet condition | python|pandas | 0 | 45 | 2 | 72,994,784 | 72,994,784 | 0 | true | 2022-07-15T12:53:43.830Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python: for loop that drops a column to meet condition<p>I have a dataframe that looks as follows:</p>
<pre><code>alpha_0 alpha_1 alpha_2 alpha_3
1 ... |
72,987,624 | Is there a way to store fake attributes as an array instead of JSON?<p>I am using Laravel Backpack's fake field attribute to store clicked checkboxes into the database. But I don't want it stored as JSON but as an array for example:</p>
<p>Not:</p>
<pre><code>{ "key" : "value }
</code></pre>
<p>But as:</... | <p>Found it! I just have to override the update method.</p>
<p>For example:</p>
<pre><code>public function update($id)
{
// Logic after update is done.
}
</code></pre> | Is there a way to store fake attributes as an array instead of JSON? | php|laravel|laravel-backpack|laravel-9 | 0 | 45 | 2 | 72,998,389 | 72,998,389 | 0 | true | 2022-07-14T23:29:31.467Z | 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 store fake attributes as an array instead of JSON?<p>I am using Laravel Backpack's fake field attribute to store clicked checkboxes into th... |
72,951,479 | Error in trying to parse youtube with htmlagility pack to c#<p>I am building an application when i want to parse some data from youtube playlist using <code>HtmlAbilityPack</code>:
<a href="https://www.youtube.com/playlist?list=PLDx6vxaCLeUTw0NRQhgYwCaWVf9j-N02Q" rel="nofollow noreferrer">https://www.youtube.com/playli... | <p>You get always <code>null</code> because the document you loaded in <code>docFirst</code> variable doesn't have the node you are looking for. That happens because the html page must be rendered first, using a JS engine. A common way to go is to use Selenium (or any other automation framework, e.g Playwright).</p>
<p... | Error in trying to parse youtube with htmlagility pack to c# | c#|.net|parsing|html-agility-pack | 0 | 45 | 1 | 72,998,607 | 72,998,607 | 0 | true | 2022-07-12T11:20:43.070Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Error in trying to parse youtube with htmlagility pack to c#<p>I am building an application when i want to parse some data from youtube playlist using <code>... |
72,998,856 | What could be the best way of extracting substrings of varying length in c#<p>I looked up a lot and to be honest I even know how to do this but I want a smarter dynamic method in order to extract substrings of varying lengths from a string. For instance I have these 2 strings as follows 1. ML 49420220831LDHRJP 2. Y6456... | <pre><code> int[] array = new int[] { 2, 4, 8, 3, 3 };
List<string> someList = new List<string>();
int j = 0;
for (int i = 0; i < array.Length; i ++)
{
string str = delta.Substring(j, array[i]);
someList.Add(str);
j += str.Length... | What could be the best way of extracting substrings of varying length in c# | c#|string|substring | -7 | 45 | 1 | 72,999,714 | 72,999,714 | 0 | true | 2022-07-15T19:33:49.977Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What could be the best way of extracting substrings of varying length in c#<p>I looked up a lot and to be honest I even know how to do this but I want a smar... |
73,001,302 | Creating a dictionary from another dictionary where keys' = (values in previous dictionary) and value' = (shared values in previous dictionary)<p>I have a dictionary set up as movie: {actors}. Below is a snippet of this dictionary</p>
<pre><code>movie_dict = {
'Sleepers': {'Brad Pitt', 'Kevin Bacon', 'Dustin Hoffma... | <p>You could use <a href="https://docs.python.org/3/library/collections.html#collections.defaultdict" rel="nofollow noreferrer"><code>collections.<b>defaultdict</b></code></a>:</p>
<pre><code>>>> from collections import defaultdict
>>> movie_dict = {
... 'Sleepers': {'Brad Pitt', 'Kevin Bacon', 'D... | Creating a dictionary from another dictionary where keys' = (values in previous dictionary) and value' = (shared values in previous dictionary) | python|dictionary | -1 | 45 | 3 | 73,001,344 | 73,001,344 | 0 | true | 2022-07-16T03:25:05.757Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Creating a dictionary from another dictionary where keys' = (values in previous dictionary) and value' = (shared values in previous dictionary)<p>I have a di... |
72,982,709 | how to get EOD price for a token for the last 30 days<p>I have a table which sources token prices from multiple exchanges throughout the day, I want to get last updated price at end of each day for all tokens, for the last 30 days. I can use max(date) function with inner join to get prices for each day as below -</p>
<... | <p>Figured it out, just had to group all tokens by date in the inner join query and then select prices without any grouping</p>
<pre><code>select tokenid, price, source_exchange, datetime from token_prices sp
inner join
(select tokenid, max(datetime) as maxdate from token_prices
where datetime::date between current_... | how to get EOD price for a token for the last 30 days | sql|postgresql | 1 | 45 | 1 | 73,004,865 | 73,004,865 | 0 | true | 2022-07-14T15:04:15.907Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to get EOD price for a token for the last 30 days<p>I have a table which sources token prices from multiple exchanges throughout the day, I want to get l... |
73,005,836 | How to put data from DRF form in function<p>thank you for reading, i have problem in Django Rest Framework project, i wrote only backend, and i must return url with user info from fields:</p>
<p>models.py</p>
<pre><code>class Payment(models.Model):
user = models.ForeignKey(
settings.AUTH_USER_MODEL,
... | <p>You can simply access the form data like so:</p>
<pre><code>amount = serializer.validated_data['amount']
</code></pre>
<p>or</p>
<pre><code>amount = self.request.data["amount"]
</code></pre>
<p>Then you can do whatever you want with those variables, like to use it to search in the database</p> | How to put data from DRF form in function | python|django|rest|frameworks|payment | 0 | 45 | 1 | 73,007,314 | 73,007,314 | 0 | true | 2022-07-16T16:20:09.303Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to put data from DRF form in function<p>thank you for reading, i have problem in Django Rest Framework project, i wrote only backend, and i must return u... |
72,987,760 | ls not dereferencing symlink directories by default<p>When I <code>ls</code> a symlink to a directory, <code>ls</code> just echoes the directory name.</p>
<pre><code>➜ java-tutorial git:(main) ls -al
...
lrwxr-xr-x 1 josalvatorre staff 124 Jul 9 16:17 bazel-bin -> /private/var/tmp/_bazel_josalvatorre/0614f10b8... | <p>It turned out that <code>ls</code> was aliasing <code>ls -G</code>. I just had to run <code>unalias ls</code>.</p>
<pre><code>➜ java-tutorial git:(main) ✗ unalias ls
➜ java-tutorial git:(main) ✗ type ls
ls is /bin/ls
➜ java-tutorial git:(main) ✗ ls bazel-bin
ProjectRunner Projec... | ls not dereferencing symlink directories by default | macos|shell|command-line|zsh|oh-my-zsh | 0 | 45 | 1 | 73,008,361 | 73,008,361 | 0 | true | 2022-07-14T23:55:52.097Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
ls not dereferencing symlink directories by default<p>When I <code>ls</code> a symlink to a directory, <code>ls</code> just echoes the directory name.</p>
<p... |
72,934,960 | PyInstaller main.exe can't import PySide2.QtQuick<p>I packaged my Qt/QML application that uses Pyside2 using pyinstaller and I run into the following error:</p>
<pre><code>C:\WorkDir\Development\Source\App\dist\main>main
Traceback (most recent call last):
File "main.py", line 9, in <module>
File ... | <p>A user over at Qt Forum pointed me to an <a href="https://forum.qt.io/topic/137810/pyinstaller-main-exe-can-t-import-pyside2-qtquick/3" rel="nofollow noreferrer">answer</a>:</p>
<p>You can try the hidden import option. <code>--hidden-import=PySide2.QtQuick</code> for CLI or <code>hiddenimports=['PySide2.QtQuick']</c... | PyInstaller main.exe can't import PySide2.QtQuick | python|qt|pyqt|pyinstaller|pyside | 0 | 45 | 1 | 73,009,543 | 73,009,543 | 0 | true | 2022-07-11T07:18:26.197Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
PyInstaller main.exe can't import PySide2.QtQuick<p>I packaged my Qt/QML application that uses Pyside2 using pyinstaller and I run into the following error:<... |
73,008,686 | VirtualQueryEx returning impossible mbi.RegionSize value in ctypes<p>I'm building a Memory Scanner and in the middle of it I use VirtualQueryEx to get the size in bytes of the process.
This is my VirtualQueryEx and MEMORY_BASIC_INFORMATION structure setups:</p>
<pre><code> VirtualQueryEx = windll.kernel32.VirtualQue... | <p>Here's a verified working version. The numbers printed for my Python process agree with the <a href="https://docs.microsoft.com/en-us/sysinternals/downloads/vmmap" rel="nofollow noreferrer">SysInternals vmmap utility</a>:</p>
<pre class="lang-py prettyprint-override"><code>import ctypes as ct
from ctypes import win... | VirtualQueryEx returning impossible mbi.RegionSize value in ctypes | ctypes|virtual-memory|virtualquery | 0 | 45 | 1 | 73,009,749 | 73,009,749 | 0 | true | 2022-07-17T01:23:56.273Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
VirtualQueryEx returning impossible mbi.RegionSize value in ctypes<p>I'm building a Memory Scanner and in the middle of it I use VirtualQueryEx to get the si... |
73,012,789 | how to shuffle an array list depending on the order of another array<p>I am trying to solve the travelling salesman problem by combining two algorithms to return the best path</p>
<p>The first algorithm uses the environment ArrayList to produce the best path</p>
<p>The second algorithm will optimize the route obtained ... | <p>Because you define the ArrayList as static once you have the best path and apply the shuffle on it will erase the information from the best path step.</p>
<p>You can clone another array once you get the array sorted and shuffle this array list, this will keep the information in <code>environment</code> and <code>shu... | how to shuffle an array list depending on the order of another array | java | 0 | 45 | 2 | 73,013,104 | 73,013,104 | 0 | true | 2022-07-17T14:50:35.383Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to shuffle an array list depending on the order of another array<p>I am trying to solve the travelling salesman problem by combining two algorithms to re... |
73,014,524 | How to scrape part of a page node.js<p>I'm fairly new to coding and I don't understand why my code isn't working. It is suppose to output <code>"Dominus Empyreus"</code>
Though it only outputs <code>[]</code></p>
<p>Here is my current code:</p>
<pre class="lang-js prettyprint-override"><code>const axios = req... | <p>An alternative solution is to use the full selector path to the element directly that you want to scrape from a web page as such:</p>
<pre class="lang-js prettyprint-override"><code>const axios = require('axios');
const cheerio = require('cheerio');
const extractLinks = $ => [
...new Set(
$("... | How to scrape part of a page node.js | javascript|node.js | -3 | 45 | 2 | 73,014,625 | 73,014,625 | 0 | true | 2022-07-17T18:54:11.637Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to scrape part of a page node.js<p>I'm fairly new to coding and I don't understand why my code isn't working. It is suppose to output <code>"Dominus... |
73,015,358 | How to remove duplicates from list of strings based on timestamp<p>I have the following list:</p>
<pre><code>ls = ["2022-07-17 16:00:02 txt xyz", "2022-07-17 15:00:02 txt xyz", "2022-07-17 16:00:02 txt abc"]
</code></pre>
<p>I only want to keep entries where the text is unique (xyz and abc... | <p>Use a dictionary to keep track of the most recent date per text:</p>
<pre><code>d = {}
for x in ls:
# get txt (NB. you can also use a regex)
ts, txt = x.split(' txt ', 1)
if txt not in d or x > d[txt]:
d[txt] = x
out = list(d.values())
</code></pre>
<p><em>NB. I used a simple <code>split</cod... | How to remove duplicates from list of strings based on timestamp | python | 2 | 45 | 1 | 73,015,420 | 73,015,420 | 0 | true | 2022-07-17T21:07:32.363Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to remove duplicates from list of strings based on timestamp<p>I have the following list:</p>
<pre><code>ls = ["2022-07-17 16:00:02 txt xyz", &... |
73,015,070 | Flying Saucer: Arabic text in the footer of generated PDF is positioned incorrectly<p>I am using Flying Saucer to generate PDF in my project for long time already. My documents have header and footer repeated on each page. Everything is working fine.</p>
<p>Now I got a requirement to add support of arabic texts in the ... | <p>I think <a href="https://github.com/igorbljahhin/flying-saucer-issue-with-arabic-in-footer/blob/fad7888681941961cbee6ba328358d86d9588393/src/main/java/RTLText.java#L222" rel="nofollow noreferrer">RTLText.java:222</a> should be:</p>
<pre class="lang-java prettyprint-override"><code>float dist = box.getAbsY(); //from ... | Flying Saucer: Arabic text in the footer of generated PDF is positioned incorrectly | java|flying-saucer|openpdf | 1 | 45 | 1 | 73,017,465 | 73,017,465 | 0 | true | 2022-07-17T20:17:03.333Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Flying Saucer: Arabic text in the footer of generated PDF is positioned incorrectly<p>I am using Flying Saucer to generate PDF in my project for long time al... |
73,008,004 | Do I need a property to bind server code to input events in Blazor?<p>Here's what I imagine I need:</p>
<pre class="lang-html prettyprint-override"><code><input type="text" @bind="this.ConceptSearch" @bind:event="oninput" />
</code></pre>
<pre class="lang-cs prettyprint-override"><co... | <p>Using <em><strong>@onchange</strong></em> instead of <em><strong>@bind</strong></em> to solve it</p> | Do I need a property to bind server code to input events in Blazor? | asp.net-core|blazor | 0 | 45 | 1 | 73,018,945 | 73,018,945 | 0 | true | 2022-07-16T22:21:28.760Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Do I need a property to bind server code to input events in Blazor?<p>Here's what I imagine I need:</p>
<pre class="lang-html prettyprint-override"><code><... |
73,013,921 | Unattached web component cannot call class methods if created before definition<p>Looks like if a custom element is created before it's been defined, it will have the <code>HTMLElement</code> constructor, and retain this even after the definition is completed.</p>
<p>Creating that element again will have the correct co... | <p>If you are sure you have now defined the component, you can use
<code>!customElements.get(comp) && customElements.upgrade(comp)</code> to upgrade the component so that its constructor is changed to the custom element's class.</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" da... | Unattached web component cannot call class methods if created before definition | javascript|html|web-component | 0 | 45 | 1 | 73,022,765 | 73,022,765 | 0 | true | 2022-07-17T17:27:47.690Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Unattached web component cannot call class methods if created before definition<p>Looks like if a custom element is created before it's been defined, it will... |
73,019,610 | FutureBuilder with Icon placeholder flickers<p>I'm using a <code>FutureBuilder</code> to load album thumbnails into a <code>ListTile</code>, as follows:</p>
<pre class="lang-dart prettyprint-override"><code> ListTile _albumTile(Album album, BuildContext context) {
return ListTile(
leading: FutureBuilder<U... | <p>I solved it by using <code>frameBuilder</code>. The <a href="https://api.flutter.dev/flutter/widgets/Image/frameBuilder.html" rel="nofollow noreferrer">documentation</a> says:</p>
<blockquote>
<p>If this is null, this widget will display an image that is painted as soon as the first image frame is available (and wil... | FutureBuilder with Icon placeholder flickers | flutter | 2 | 45 | 2 | 73,023,459 | 73,023,459 | 0 | true | 2022-07-18T08:49:48.953Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
FutureBuilder with Icon placeholder flickers<p>I'm using a <code>FutureBuilder</code> to load album thumbnails into a <code>ListTile</code>, as follows:</p>
... |
73,023,688 | Multiple nginx locations<p>I have multiple nginx locations via the same route</p>
<pre><code> location ~^/(v1) {
proxy_pass http://localhost:8000/;
}
location = /v1/smth {
}
</code></pre>
<p>Does the proxy_pass would be applied for <code>/v1/smth</code>?</p> | <p>The nginx <a href="https://nginx.org/en/docs/http/ngx_http_core_module.html#location" rel="nofollow noreferrer">http-core-module</a> documentation describes the order of precedence when evaluating a match. Specifically:</p>
<blockquote>
<p>Also, using the “=” modifier it is possible to define an exact match of URI a... | Multiple nginx locations | nginx-config | 0 | 45 | 1 | 73,024,751 | 73,024,751 | 0 | true | 2022-07-18T14:07:25.093Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Multiple nginx locations<p>I have multiple nginx locations via the same route</p>
<pre><code> location ~^/(v1) {
proxy_pass http://localhost:8000/;
... |
73,028,256 | shiny: editable table not shown when reactive initial values depending on input value<p>I need to output a table that depends on an input value and is editable. But the output shows <strong>"no data available in table"</strong>. I cannot figure out why. The ideal output will be like the <code>verbatimTextOutp... | <p>Try this</p>
<pre><code>cars_df<-mtcars%>%
tibble::rownames_to_column(var = "brand")%>%
select(brand,mpg,cyl)%>%
mutate(eff = ifelse(mpg>20, "he","le"))
ui <- dashboardPage(
dashboardHeader(title = "test"),
dashboardSidebar(),
dashboardBody(
... | shiny: editable table not shown when reactive initial values depending on input value | r|input|shiny|reactive|interactive | 0 | 45 | 1 | 73,029,469 | 73,029,469 | 0 | true | 2022-07-18T20:29:37.240Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
shiny: editable table not shown when reactive initial values depending on input value<p>I need to output a table that depends on an input value and is editab... |
73,029,781 | Terraform policy document generated as json<p>I am trying to create a iam role with terraform. Instead of providing the role with inline JSON I am trying to create it using terraform and then attach it to the role. I am following the documentation given <a href="https://registry.terraform.io/providers/hashicorp/aws/lat... | <p>You <strong>can't use</strong> <code>aws_iam_policy</code> to create <code>assume_role_policy</code>. From <a href="https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role" rel="nofollow noreferrer">docs</a>:</p>
<blockquote>
<p>The assume_role_policy is very similar to but slightly diff... | Terraform policy document generated as json | amazon-web-services|terraform|terraform-provider-aws | 0 | 45 | 1 | 73,029,813 | 73,029,813 | 0 | true | 2022-07-19T00:05:29.270Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Terraform policy document generated as json<p>I am trying to create a iam role with terraform. Instead of providing the role with inline JSON I am trying to ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.