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,911,571 | Terraform Enterprise is not triggered for commits in bitbucket<p>I have a TFE workspace with proper Version Control details.
Whenever I commit any change in Bitbucket, nothing is triggered in TFE.</p>
<p><a href="https://i.stack.imgur.com/3kWY1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3kWY1.pn... | <p>In my case, TFE service account needed admin access to bitbucket for the version control integration to work.</p> | Terraform Enterprise is not triggered for commits in bitbucket | version-control|terraform|bitbucket|terraform-enterprise | 0 | 60 | 1 | 72,976,058 | 72,976,058 | 0 | true | 2022-07-08T12:39:26.193Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Terraform Enterprise is not triggered for commits in bitbucket<p>I have a TFE workspace with proper Version Control details.
Whenever I commit any change in ... |
72,979,282 | SceneKit Draw Infinite Grid View in XZ Plane similar to XCode Scene Editor<p>I tried using the SCNFloor and Material, but it draws with limited width and length.</p>
<p>Is there any way I can generate an infinite grid.</p> | <p>Probably this could be the issue: Have you checked the zFar value of your SCNCamera? the Default is: 100m (this means everything that's more fare away is clipped by the renderer) - you might want to set it to a really high value and also disable the automaticallyAdjustZRange property (what should be the default). Ho... | SceneKit Draw Infinite Grid View in XZ Plane similar to XCode Scene Editor | ios|scenekit|metal | 0 | 60 | 1 | 72,982,105 | 72,982,105 | 0 | true | 2022-07-14T10:50:08.987Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SceneKit Draw Infinite Grid View in XZ Plane similar to XCode Scene Editor<p>I tried using the SCNFloor and Material, but it draws with limited width and len... |
72,981,580 | Append array replaces items<p>I'm trying to append an array on a tap gesture, but it seems that it replaces any item in the array with the current one.</p>
<p>The Array and functions:</p>
<pre><code>class ChipsViewModel: ObservableObject {
@Published var selectedCategories = [String]()
func appendAr... | <p>It looks like you are trying to keep state in sync in two places at the same time, it is usually not a good idea. It is best to keep it your view model</p>
<pre><code>class ChipsViewModel: ObservableObject {
@Published var selectedCategories = [String]()
func isSelected(_ title: String) -> Bool ... | Append array replaces items | swift|swiftui | 0 | 60 | 2 | 72,983,367 | 72,983,367 | 0 | true | 2022-07-14T13:46:09.610Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Append array replaces items<p>I'm trying to append an array on a tap gesture, but it seems that it replaces any item in the array with the current one.</p>
<... |
72,980,753 | Why do some HalconDotNet procedures produce HTuple instead of preferred type?<p>One example is: <code>HOperatorSet.RigidTransObjectModel3d()</code></p>
<p>It expects <code>HTuple</code> but also accept <code>objectModel3D</code> as model input. The model output is <code>HTuple</code>, even tho it should (imo) be object... | <p>You don't need to use HOperatorSet, it can be done directly from HObjectModel3D:</p>
<pre><code> HObjectModel3D hObjectModel3D = new HObjectModel3D(HTuple.TupleRand(10), HTuple.TupleRand(10), HTuple.TupleRand(10));
HPose hPose = new HPose(0.0, 0.0, 0.0, 90.0, 90.0, 90.0, "Rp+T", "gba&q... | Why do some HalconDotNet procedures produce HTuple instead of preferred type? | c#|3d|halcon | 0 | 60 | 1 | 72,984,719 | 72,984,719 | 0 | true | 2022-07-14T12:46:06.843Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why do some HalconDotNet procedures produce HTuple instead of preferred type?<p>One example is: <code>HOperatorSet.RigidTransObjectModel3d()</code></p>
<p>It... |
72,983,635 | Python program crashing when printing blob names for large blob container<p>Recently I've been writing a Python program that prints out the names of all the blobs within a blob container. The program seems to work fine for blob containers that have a decent amount of files.</p>
<p>However, one of the blob containers ha... | <p>The <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/List-Blobs?redirectedfrom=MSDN" rel="nofollow noreferrer">List-Blobs</a> has a limit to list maximum 5000 results. If you want to get more than 5000 results you have to use the <strong>NextMarker</strong> to get the continuous token and the resul... | Python program crashing when printing blob names for large blob container | python|azure|azure-devops|azure-blob-storage | 0 | 60 | 1 | 72,984,883 | 72,984,883 | 0 | true | 2022-07-14T16:13:32.030Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python program crashing when printing blob names for large blob container<p>Recently I've been writing a Python program that prints out the names of all the ... |
72,984,897 | Arduino is giving a weird output when using toInt()<p>I'm trying to convert a string to an integer (which is actually a binary number) so that I can output the DEC value, but where the answer SHOULD be 63 (00111111), it's giving me -19961 as an output? It would be great if someone can help me correctly convert the stri... | <p>Your code currently does the following:</p>
<ul>
<li>Concatenates all your integers together to make a string "00111111"</li>
<li>Attempts to convert it (as a string holding a base <em>10</em> integer) to the integer 111,111 (one hundred eleven thousand, one hundred eleven)</li>
<li>Hits integer overflow. ... | Arduino is giving a weird output when using toInt() | arduino|arduino-uno|arduino-c++|tinkercad | 0 | 60 | 1 | 72,984,980 | 72,984,980 | 0 | true | 2022-07-14T18:03:44.323Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Arduino is giving a weird output when using toInt()<p>I'm trying to convert a string to an integer (which is actually a binary number) so that I can output t... |
72,984,709 | Loop through variable in python<p>Please forgive me... new to python and first question on stack.</p>
<p>I'm trying to accomplish two things with while loop:</p>
<ol>
<li>increment round number (i'm doing this successfully)</li>
<li>have the loop iterate over my variable "fruits" to print the first fruit on r... | <p>If you must use the <em>while-loop</em> then you can write your code as this:</p>
<pre><code>fruit = ['apple', 'orange', 'banana']
round_number = 0
while round_number < len(fruit):
round_number += 1
print("Round Number: ", round_number, fruit[round_number-1])
</code></pre>
<p>and for the <em>f... | Loop through variable in python | python|for-loop|while-loop | 0 | 60 | 5 | 72,985,041 | 72,985,041 | 0 | true | 2022-07-14T17:48:40.650Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Loop through variable in python<p>Please forgive me... new to python and first question on stack.</p>
<p>I'm trying to accomplish two things with while loop:... |
72,988,292 | When I change the variable name in a lambda function, the result changes<p>I defined some lambdas and attempt to execute them. These are the lambda functions I have defined.</p>
<pre><code>a = []
for i in range(3):
a.append(lambda a:i+a)
</code></pre>
<p>When I execute the following code :</p>
<pre><code>for j in r... | <p>You're not saving the variable's value inside the lambda. You're saving a variable defined outside of the lambda. It's not necessarily a global variable, but to the scope of the lambda, it is declared outside of it. When the iteration terminates, the value of <code>i</code> is 2. That's why when you iterate with for... | When I change the variable name in a lambda function, the result changes | python|python-3.x|lambda | -2 | 60 | 1 | 72,988,359 | 72,988,359 | 0 | true | 2022-07-15T01:48:48.697Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
When I change the variable name in a lambda function, the result changes<p>I defined some lambdas and attempt to execute them. These are the lambda functions... |
72,993,208 | JMeter - OutSystems - Login Once Controller<p>We are testing an OutSystems application sitting on an Azure infrastructure. When performing a recording all of the requests captured are AJAX calls. And not in the traditional HTML format.</p>
<p>I'm trying to set up a scenario whereby if a transaction fails within the mai... | <p>I don't know what is "Run Once Controller", there is <a href="https://jmeter.apache.org/usermanual/component_reference.html#Once_Only_Controller" rel="nofollow noreferrer">Once Only Controller</a> which runs its children only for the 1st iteration of the <a href="https://jmeter.apache.org/usermanual/compon... | JMeter - OutSystems - Login Once Controller | azure|jmeter|jmeter-plugins|outsystems | 0 | 60 | 1 | 72,993,472 | 72,993,472 | 0 | true | 2022-07-15T11:21:27.533Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
JMeter - OutSystems - Login Once Controller<p>We are testing an OutSystems application sitting on an Azure infrastructure. When performing a recording all of... |
72,993,313 | How to assign values from array to strings java<p>Hello i have an array that is filled with values from database and those values i want to assign them to strings i did this code but its making error:</p>
<pre><code> String[] options = s.split(",");
String visible = options[0];
String s... | <p>You could use this Technique.</p>
<pre><code>String s = "1000";
String[] options = new String[s.length()];
for(int i=0; i< s.length(); i++)
options[i] = Character.toString(s.charAt(i));
</code></pre>
<p>But since you are storing chars the array could be declared as char array</p> | How to assign values from array to strings java | java|android | -2 | 60 | 2 | 72,993,521 | 72,993,521 | 0 | true | 2022-07-15T11:31:32.200Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to assign values from array to strings java<p>Hello i have an array that is filled with values from database and those values i want to assign them to st... |
72,997,397 | Cypress get the text of an API response parameter<p>I want to get the number from the URL located in an API response.
For that I get the URL, but I don't know how to convert that in to text to extract the number.</p>
<pre><code>cy.intercept('GET', 'http://viasphere.localhost/documents/page_elements/client/**',).as('res... | <p>You have to add <code>.replace(/^\D+/g, '')</code> to extract the number from the url.</p>
<pre class="lang-js prettyprint-override"><code>cy.intercept(
'GET',
'http://viasphere.localhost/documents/page_elements/client/**'
).as('response')
goTo.plusClientsButton()
cy.wait('@response', {timeout: 10000})
cy.get('... | Cypress get the text of an API response parameter | api|cypress | 0 | 60 | 2 | 72,997,562 | 72,997,562 | 0 | true | 2022-07-15T16:58:11.153Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Cypress get the text of an API response parameter<p>I want to get the number from the URL located in an API response.
For that I get the URL, but I don't kno... |
72,997,996 | Typing in a text input field shakes the view of my web app<p>I have a webpage using bootstrap. On this webpage, anytime I type a character into a text field, the page fluctuates in horizontal size. I would like there to be no change in size of any of the divs on the page when a character is typed into a text field, and... | <p>I hope one of these will work :</p>
<p>1.Try lowering the font size that you are using in the text field</p>
<p>2.Try Removing the "align" property in the html file because it will override the properties in the css file ...</p>
<p>3.Try giving the content div a</p>
<pre><code>display: flex
align-items: ce... | Typing in a text input field shakes the view of my web app | html|css|twitter-bootstrap | 0 | 60 | 1 | 72,998,411 | 72,998,411 | 0 | true | 2022-07-15T17:56:00.503Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Typing in a text input field shakes the view of my web app<p>I have a webpage using bootstrap. On this webpage, anytime I type a character into a text field,... |
73,001,337 | my data renders twice and returns empty on the first<p>For a project, I am getting multiple objects that all contain specific football match details, so I filter the matches by matchday but I keep getting an empty array on my first render, and then when I leave the tab and come back it then renders the objects I need, ... | <p>From react official documentation.</p>
<blockquote>
<p>If you want to run an effect and clean it up only once (on mount and unmount), you can pass an empty array ([]) as a second argument. This tells React that your effect doesn’t depend on any values from props or state, so it never needs to re-run.</p>
</blockquot... | my data renders twice and returns empty on the first | javascript|reactjs | 0 | 60 | 2 | 73,001,439 | 73,001,439 | 0 | true | 2022-07-16T03:36:20.873Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
my data renders twice and returns empty on the first<p>For a project, I am getting multiple objects that all contain specific football match details, so I fi... |
72,995,975 | How to configure a Spring Boot Application that uses tomcat and has a dependency to another Application uses tomcat<p>I have a Spring Boot application (App1) that uses an embedded Tomcat. To specify the Port I added <code>server.port=8080</code> to the application.properties in my main application
and it works fine.</p... | <p>I see two options, depending on which one suits your use case conceptually:</p>
<ul>
<li>you have two Spring Boot applications that need to <strong>share the same code</strong>: extract this code to a separate project (a regular Java library), build it as a jar file and include into both projects as a dependency; an... | How to configure a Spring Boot Application that uses tomcat and has a dependency to another Application uses tomcat | java|spring|spring-boot|tomcat | 0 | 60 | 1 | 73,002,876 | 73,002,876 | 0 | true | 2022-07-15T15:02:18.140Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to configure a Spring Boot Application that uses tomcat and has a dependency to another Application uses tomcat<p>I have a Spring Boot application (App1)... |
73,004,945 | Redux Toolkit middleware with react-redux connector fails<p>I migrated <code>redux</code> to <code>@reduxjs/toolkit</code> but I'm having an issue.
Everything worked fine without the toolkit middlewares applied. When I started applying some, I got errors.</p>
<p>I have a component:</p>
<pre><code>import React from 'rea... | <p>Copying the answer I provided in the issue thread:</p>
<p>The <em>best</em> fix is <strong>don't use <code>connect</code> any more - use the hooks API instead</strong> :)</p>
<p>The second-best option is to use the object form of <code>mapDispatch</code>, not the function form.</p>
<p>The <em>third</em> option is to... | Redux Toolkit middleware with react-redux connector fails | reactjs|typescript|redux|react-redux|redux-toolkit | 0 | 60 | 1 | 73,005,633 | 73,005,633 | 0 | true | 2022-07-16T14:20:19.473Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Redux Toolkit middleware with react-redux connector fails<p>I migrated <code>redux</code> to <code>@reduxjs/toolkit</code> but I'm having an issue.
Everythin... |
73,015,247 | In which way can i pass through a method call in JavaScript class<p>Assume we have some classes A and B:</p>
<pre><code>Class A {
constructor(a) {
this.a = a;
};
showInfo() {
console.log(this.a)
};
};
Class B {
constructor(b) {
this.b = b;
};
printText() {
con... | <p>Just a little warning at the start: this might make your program harder to debug, and it also might be a little complicated for something like this. As others have suggested, you should probably investigate other options which may be simpler and also less in the way of everything else your code does.</p>
<p>Here's t... | In which way can i pass through a method call in JavaScript class | javascript|oop|javascript-objects|prototype | 0 | 60 | 1 | 73,015,723 | 73,015,723 | 0 | true | 2022-07-17T20:46:27.373Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
In which way can i pass through a method call in JavaScript class<p>Assume we have some classes A and B:</p>
<pre><code>Class A {
constructor(a) {
... |
73,021,782 | Exact match with filter() Flask<p>I'am new to python and iam coding a small webapp to search in a database. Its fonctionnal but doesnt function well.</p>
<p>Example : If i search for a 'lieu', a 'Annee' and a 'Signataire' it doesnt give me the exact matches, instead it gives me every 'Signataire' even if its not the 'A... | <p>This is because you are using "if" the second time and not "elif". So if there exists the Signataire, then your results are always all the signataire.
To resolve this you should use something like this:</p>
<pre><code>def search_results(search):
results = []
lieu = search.data['Lieu']
annee = se... | Exact match with filter() Flask | python|flask-sqlalchemy|flask-wtforms | 0 | 60 | 2 | 73,021,904 | 73,021,904 | 0 | true | 2022-07-18T11:41:40.570Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Exact match with filter() Flask<p>I'am new to python and iam coding a small webapp to search in a database. Its fonctionnal but doesnt function well.</p>
<p>... |
72,820,896 | How to create tensorflow dataset from runtime generated images?<p>So, I start a small project based on tensorflow and could not understand how to prepare dataset generated from memory input.
I have a random number of sources, that generate images. Than I pass it to python script. Images created as bytes array with png ... | <p>Correct solution was simple.</p>
<pre><code>fp = io.BytesIO(bytes(img)) # our bytes array
with fp:
im = Image.open(fp)
im = im.convert('L') # do grayscale or set corrent shape for flatten layer
numpydata = np.asarray(im) # tf could consume numpy
global_feeded_images.appen... | How to create tensorflow dataset from runtime generated images? | python|tensorflow|machine-learning|keras | 0 | 60 | 2 | 73,023,189 | 73,023,189 | 0 | true | 2022-06-30T19:08:03.537Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to create tensorflow dataset from runtime generated images?<p>So, I start a small project based on tensorflow and could not understand how to prepare dat... |
73,022,127 | Python - Getting text using selenium from text node<p>I'm trying to scrape some information from a website using Selenium and Python and sometimes there's texts like this <strong>HZS stonks remaining...</strong> that does not have any name or label that I can get the text by:</p>
<p><img src="https://i.stack.imgur.com/... | <p>As per the HTML:</p>
<p><img src="https://i.stack.imgur.com/1KwMr.png" alt="snapshot" /></p>
<p>the desired element is within a text node and is within it's parent element <code><div class="mkt-card"></code></p>
<hr />
<h2>Solution</h2>
<p>To print the text <em><strong>HZS stonks remaining 0.14</stro... | Python - Getting text using selenium from text node | python|selenium|xpath|css-selectors|textnode | 1 | 60 | 2 | 73,023,751 | 73,023,751 | 0 | true | 2022-07-18T12:10:51.833Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python - Getting text using selenium from text node<p>I'm trying to scrape some information from a website using Selenium and Python and sometimes there's te... |
73,022,294 | How to pass Data in Route State React js<p>I am trying to pass data in Route State from link.
I want to open Contact Detail Page. My code is</p>
<pre><code>import React from 'react'
import Me from "../images/blank-profile-picture-973460__340.webp"
import {Link,useNavigate} from "react-router-dom"
co... | <h1>Issue</h1>
<p>The issue here is that you are sending <em><strong>all</strong></em> the data in the route state. In other words, the code is passing the entire array, the <code>id</code>, <code>name</code>, and <code>email</code> properties are undefined in this array.</p>
<p>A second issue is that that the <code>Co... | How to pass Data in Route State React js | reactjs|react-router | 1 | 60 | 2 | 73,026,032 | 73,026,032 | 0 | true | 2022-07-18T12:25:46.333Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to pass Data in Route State React js<p>I am trying to pass data in Route State from link.
I want to open Contact Detail Page. My code is</p>
<pre><code>i... |
73,030,649 | How to define a new ForEach struct to implement the index function while keeping its original syntax in Swift?<p>I'm trying to define a new struct called <code>ForEach</code> to implement the index function which has the similar syntax to the SwiftUI <code>ForEach</code>.</p>
<pre><code>struct ForEach<Data: RandomAc... | <p>Do not use this. It will confuse people because nothing is mentioning what the <code>id</code> is.</p>
<p>This is what you were looking for:</p>
<p><a href="https://github.com/apple/swift-algorithms/blob/main/Guides/Indexed.md" rel="nofollow noreferrer">https://github.com/apple/swift-algorithms/blob/main/Guides/Inde... | How to define a new ForEach struct to implement the index function while keeping its original syntax in Swift? | swift|swiftui | -2 | 60 | 1 | 73,031,675 | 73,031,675 | 0 | true | 2022-07-19T03:03:10.460Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to define a new ForEach struct to implement the index function while keeping its original syntax in Swift?<p>I'm trying to define a new struct called <co... |
73,011,559 | Mudblazor - How to use InputFile on a MudTable?<p>I am trying to add an image upload functionality for each element of a list of objects displayed using <code>MudTable</code>. Here's how I tried doing it:</p>
<pre><code><MudTable Items="Data" Dense="true">
<HeaderContent>
<... | <p>You could define a <code>InputFile</code> for each of your row items in your table. Just be sure to use unique <code>id</code> and <code>for</code> values:</p>
<pre class="lang-cs prettyprint-override"><code><RowTemplate>
...
<MudTd DataLabel="Image">
<InputFile
id="@($&qu... | Mudblazor - How to use InputFile on a MudTable? | .net|blazor|mudblazor | 1 | 60 | 1 | 73,032,500 | 73,032,500 | 0 | true | 2022-07-17T11:58:48.823Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Mudblazor - How to use InputFile on a MudTable?<p>I am trying to add an image upload functionality for each element of a list of objects displayed using <cod... |
73,028,751 | Spring/Thymeleaf - is it possible to intercept a controller response before the Thymeleaf engine kicks in, and bypass Thymeleaf?<p>Spring version: 4.1.6, Thymeleaf version: 3.0.0</p>
<p>Essentially, in certain scenarios, I want to render HTML using something other than Thymeleaf. So if my controller looks like this:</p... | <p>The view name interpretation is handled by <code>ViewResoler</code>'s. Spring creates some of them by default and other ones are added to the application context by project dependencies. This is the case with Thymeleaf - it autoconfigures a <code>ThymeleafViewResolver</code> which in fact has some useful properties ... | Spring/Thymeleaf - is it possible to intercept a controller response before the Thymeleaf engine kicks in, and bypass Thymeleaf? | java|spring|thymeleaf | 0 | 60 | 1 | 73,036,233 | 73,036,233 | 0 | true | 2022-07-18T21:18:39.373Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Spring/Thymeleaf - is it possible to intercept a controller response before the Thymeleaf engine kicks in, and bypass Thymeleaf?<p>Spring version: 4.1.6, Thy... |
73,001,555 | Unable to transfer NEAR tokens between accounts using near-api-js<p>I am trying to transfer NEAR tokens between 2 testnet wallets using the near-api-js library in NextJS</p>
<p>Running send money function of the account, I am getting the following error</p>
<pre><code>import { connect, keyStores } from "near-api-j... | <p>Found this after one week of struggle: <a href="https://docs.antisociallabs.io/knowledge-base/connect-fullaccess-account-with-near-api-js" rel="nofollow noreferrer">Connect FullAccess account with near-api-js</a></p>
<pre><code>const PENDING_ACCESS_KEY_PREFIX = "pending_key";
const loginFullAccess = async... | Unable to transfer NEAR tokens between accounts using near-api-js | next.js|nearprotocol|near-api-js | 1 | 60 | 1 | 73,049,773 | 73,049,773 | 0 | true | 2022-07-16T04:36:58.240Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Unable to transfer NEAR tokens between accounts using near-api-js<p>I am trying to transfer NEAR tokens between 2 testnet wallets using the near-api-js libra... |
73,030,830 | shark failing to compile: static assert failed _DISABLE_EXTENDED_ALIGNED_STORAGE<p>I followed the installation guide with Visual Studio 2022 as described <a href="https://www.shark-ml.org/sphinx_pages/build/html/rest_sources/installation.html" rel="nofollow noreferrer">here</a>. I am able to clone from git and then use... | <p>Seems like Shark has left it to the person compiling the it to choose weather to define <code>_ENABLE_EXTENDED_ALIGNED_STORAGE</code> or <code>_DISABLE_EXTENDED_ALIGNED_STORAGE</code>. I chose the latter.</p> | shark failing to compile: static assert failed _DISABLE_EXTENDED_ALIGNED_STORAGE | c++|visual-studio-2022|shark-ml | 0 | 60 | 1 | 73,059,267 | 73,059,267 | 0 | true | 2022-07-19T03:38:57.957Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
shark failing to compile: static assert failed _DISABLE_EXTENDED_ALIGNED_STORAGE<p>I followed the installation guide with Visual Studio 2022 as described <a ... |
73,022,927 | alpaca data not streaming<p>I am trying to stream data by using an Alpaca paper trading account on a Windows 10 terminal, but instead of streaming data it returns empty. Does anybody know what I am doing wrong?</p>
<p>note: I have installed wscat by typing <code>npm install -g wscat</code> and i have also downloaded <c... | <p>The reason it didn't work for me was because I was using a paper trading account instead of a live trading account. If you want to stream on a paper trading account follow these steps:</p>
<p>Firstly download <code>node.js</code> on the internet.</p>
<p>After you have downloaded <code>node.js</code> open up your ter... | alpaca data not streaming | terminal|windows-10|data-stream|wscat | 0 | 60 | 1 | 73,143,500 | 73,143,500 | 0 | true | 2022-07-18T13:16:07.443Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
alpaca data not streaming<p>I am trying to stream data by using an Alpaca paper trading account on a Windows 10 terminal, but instead of streaming data it re... |
73,030,819 | swift read xls(excel) content + Hindi + Gujarati Character Encoding issue<p>read xls(Excel) file with non english character(**not xlsx file)</p>
<p>i have tried all the encoding option but i am unable to read xls file content.</p>
<pre><code>let data = try Data(contentsOf: url)// Document Directory file path
let dataEn... | <p>resolved my issue through below SDK:</p>
<p><a href="https://github.com/QuetzalMX/QuetzalXLSReader" rel="nofollow noreferrer">https://github.com/QuetzalMX/QuetzalXLSReader</a></p> | swift read xls(excel) content + Hindi + Gujarati Character Encoding issue | ios|swift|iphone|encoding|read.csv | -2 | 60 | 1 | 73,147,620 | 73,147,620 | 0 | true | 2022-07-19T03:37:37.710Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
swift read xls(excel) content + Hindi + Gujarati Character Encoding issue<p>read xls(Excel) file with non english character(**not xlsx file)</p>
<p>i have tr... |
72,782,077 | Set Height, Width the popup window explorer<p>I am trying to set a specific width and height of the popup window explorer but the window explorer did not set accordingly. Any help would be greatly appreciated</p>
<pre><code>
Process.Start(Directory.GetCurrentDirectory() + @\Setting);
string dir = Directory.GetCurrentDi... | <p>The code below could only return the file name of the specified path string without extension. Hence, if you are using the code to open the window explorer, it would only return "explorer".</p>
<pre><code>Path.GetFileNameWithoutExtension(window.FullName)
</code></pre>
<p>Suggested code</p>
<pre><code>Pro... | Set Height, Width the popup window explorer | c#|wpf | -2 | 60 | 1 | 72,823,478 | 72,823,478 | 0 | true | 2022-06-28T07:09:07.063Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Set Height, Width the popup window explorer<p>I am trying to set a specific width and height of the popup window explorer but the window explorer did not set... |
72,951,236 | Extracting values from a csv file<p>So I'm working on taking a txt file and converting it into a csv data table.</p>
<p>I have managed to convert the data into a csv file and put it into a table, but I have a problem with extracting the numbers. In the data table that I made, it's giving me text as well as the value (i... | <p>you can try this</p>
<pre><code>def fun_eq(x):
x = x.split(' = ')
return x[1]
def fun_hash(x):
x = x.split(' # ')
return x[1]
df = df.iloc[::2]
df['Intensity'] = df['Intensity'].apply(fun_eq)
df['Mass/Position'] = df['Mass/Position'].apply(fun_eq)
df['Packet Number'] = df['Packet Number'].apply(fun... | Extracting values from a csv file | python|python-3.x|pandas|dataframe|csv | 0 | 60 | 1 | 72,951,412 | 72,951,412 | 0 | true | 2022-07-12T11:00:35.923Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Extracting values from a csv file<p>So I'm working on taking a txt file and converting it into a csv data table.</p>
<p>I have managed to convert the data in... |
72,916,274 | Changing pysimplegui.Combo displayed value from code, not user<p>Note: I had this question and couldn't find a good response, so I started drafting the question and then figured it out. I will post it anyway as reference (<a href="https://stackoverflow.com/help/self-answer">https://stackoverflow.com/help/self-answer</a... | <p>I baked the answer into the question, but I'll elaborate a little more here:</p>
<p>The way to update sg.Combo and other PySimpleGUI elements is with the Update() function. You can use the Update() function to go and change its attributes. For example, is you wanted to edit the value and list of a Combo element, you... | Changing pysimplegui.Combo displayed value from code, not user | python|python-2.7|pysimplegui | 0 | 60 | 1 | 72,916,430 | 72,916,430 | 0 | true | 2022-07-08T19:42:18.893Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Changing pysimplegui.Combo displayed value from code, not user<p>Note: I had this question and couldn't find a good response, so I started drafting the quest... |
72,931,508 | UNIQUE constraint failed SQL<p>I want to create two Tables, but it does not work because of "UNIQUE constraint failed".</p>
<p>Can someone explain to me what is wrong with my querees?</p>
<pre><code>CREATE TABLE A (
ka INT PRIMARY KEY,
a2 VARCHAR(1)
);
INSERT INTO A VALUES (1,'s');
INSERT INTO A VALUES (2,'s... | <p>(Edited: there is more than one issue here.)</p>
<p>A primary key for table B must be unique. In your case, it needs to be something other than <code>a2</code>. If you need a primary key (usually you do just as a part of good design), you likely need a separate dedicated column.</p>
<p>Something like:</p>
<pre><code... | UNIQUE constraint failed SQL | sql | -1 | 60 | 1 | 72,931,580 | 72,931,580 | 0 | true | 2022-07-10T19:59:34.797Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
UNIQUE constraint failed SQL<p>I want to create two Tables, but it does not work because of "UNIQUE constraint failed".</p>
<p>Can someone explain ... |
72,885,308 | How to perform image augmentation for sequence of images representing a sample<p>I want to know how to perform image augmentaion for sequence image data.</p>
<p>The shape of my input to the model looks as below.
(None,30,112,112,3)
Where 30 is the number of images present in one sample. 112*112 are heigth and width,3 i... | <p>Here is an illustration of using <a href="https://imgaug.readthedocs.io/en/latest/source/examples_basics.html" rel="nofollow noreferrer">imgaug library</a> for a single image</p>
<p><a href="https://i.stack.imgur.com/17ydf.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/17ydf.jpg" alt="enter image... | How to perform image augmentation for sequence of images representing a sample | machine-learning|image-processing|deep-learning|computer-vision|data-augmentation | 0 | 60 | 1 | 72,922,643 | 72,922,643 | 0 | true | 2022-07-06T14:27:02.540Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to perform image augmentation for sequence of images representing a sample<p>I want to know how to perform image augmentaion for sequence image data.</p>... |
72,877,575 | How to find the bar which is the highest high green bar within 5 bars, excluding the current bar?<p>I would like to find the green bar which is the highest high bar of last 5 bars, and not the current bar (the current bar may be the highest green one, so I need to exclude it)</p>
<p>I tried this but it seems not correc... | <p>This should do what you want.</p>
<pre><code>//@version=5
indicator("My script")
i_bars = input.int(5, "Bars back")
var float green_hi = 0
var float green_lo = 0
var label lbl = label.new(na, na, "")
if barstate.islast
green_hi := 0
for i = 1 to i_bars
... | How to find the bar which is the highest high green bar within 5 bars, excluding the current bar? | charts|pine-script|trading|indicator|pine-script-v4 | 0 | 60 | 1 | 72,879,325 | 72,879,325 | 0 | true | 2022-07-06T03:13:26.570Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to find the bar which is the highest high green bar within 5 bars, excluding the current bar?<p>I would like to find the green bar which is the highest h... |
72,966,414 | React input validation with onChange<p>I have a numeric input, which I want to validate with an onChange, but when said input is cleared, react throws <code>ReferenceError: value is not defined</code> which is understandable - it has nothing to validate.</p>
<p>I'm using this approach <a href="https://stackoverflow.com... | <p>There is no a <code>checkedValue</code> property in the number <code>input</code> element, Use <code>valueAsNumber</code> or <code>value</code> instead.</p>
<pre><code>function handleNumeric(event) {
const { name, valueAsNumber, min, max } = event.target
const result = Math.max(+min, Math.min(+max, !Number.i... | React input validation with onChange | javascript|reactjs|forms|validation|input | 0 | 60 | 4 | 72,966,585 | 72,966,585 | 0 | true | 2022-07-13T12:36:05.557Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
React input validation with onChange<p>I have a numeric input, which I want to validate with an onChange, but when said input is cleared, react throws <code>... |
72,892,580 | Foreman pages fail to load<p>I just installed Foreman 3.3 with Katello 4.5 in an offline environment.</p>
<p>And in the pages below, I have a blank screen with some console output errors (see screenshots below).</p>
<p>It's seems that the pages fail to load due to Bastion UI or an error in the JSON. But I still don't u... | <p>The syntax error in the console log refers to the wrong file. The error was in the Katello dictionary, <code>/usr/share/gems/gems/katello-4.5.0.rc1/local/fr</code>.</p>
<p>In French, we use this special character <code>'</code> and it causes this bug; so I removed it (see screenshot) and restarted foreman: <code>fo... | Foreman pages fail to load | json|foreman|offlineapps|bastion | 0 | 60 | 1 | 72,935,412 | 72,935,412 | 0 | true | 2022-07-07T05:13:07.410Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Foreman pages fail to load<p>I just installed Foreman 3.3 with Katello 4.5 in an offline environment.</p>
<p>And in the pages below, I have a blank screen wi... |
72,850,412 | Vim: How to map yank till to multiple characters<p>I want to do something like map</p>
<p><code>df</code> to these all these commands</p>
<pre><code>yt) //yank till the ")" character
yt}
yt]
</code></pre>
<p>Example:</p>
<pre><code>111)
222}
333]
</code></pre>
<p>Starting from the beginning of any of these l... | <pre><code>$y0
</code></pre>
<p>would do what you ask in the given sample in an agnostic way:</p>
<ul>
<li><code>$</code> moves the cursor to the last character of the line, whatever it is,</li>
<li><code>y0</code> yanks the text from the current character (<em>exclusive</em>) to the first character (<em>inclusive</em>... | Vim: How to map yank till to multiple characters | vim | 0 | 60 | 2 | 72,852,327 | 72,852,327 | 0 | true | 2022-07-03T22:51:04.950Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Vim: How to map yank till to multiple characters<p>I want to do something like map</p>
<p><code>df</code> to these all these commands</p>
<pre><code>yt) //ya... |
72,909,140 | How to let second select put data according to first option<p>I try to when I choose the first select and second select will according to the first option and put data into second select</p>
<p>It can put the data into first select but the second select still can't run
<br>
I think maybe my emit does't work but I still... | <p>You can try like this:</p>
<pre class="lang-html prettyprint-override"><code><template>
<select v-model="selectedCity" name="city">
<option v-for="city in cities" :key="city.id" :value="city.id">{{ city.name }}</option>
</select>... | How to let second select put data according to first option | json|vue.js|select|vue-cli | 0 | 60 | 1 | 72,909,416 | 72,909,416 | 0 | true | 2022-07-08T09:08:50.363Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to let second select put data according to first option<p>I try to when I choose the first select and second select will according to the first option an... |
72,927,929 | Error message when doing unit test in flutter<p>I am a beginer in flutter and I have to write some unit test for a project but I get an error and can't find the solution to solve it.</p>
<p>Here is the function that I want to test:</p>
<pre><code> addUser(name, password) async{
if (name.toString().isEmpty || passw... | <p>There is a missing <code>await</code> in the <code>auth.addUser</code> call and also a missing <code>async</code> in the test function.</p>
<p>It should look like this:</p>
<pre class="lang-dart prettyprint-override"><code>void main() {
text('Emtpy field', () async { // <- Here
var auth = Aut... | Error message when doing unit test in flutter | flutter|unit-testing | 2 | 60 | 1 | 72,927,978 | 72,927,978 | 0 | true | 2022-07-10T10:51:59.503Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Error message when doing unit test in flutter<p>I am a beginer in flutter and I have to write some unit test for a project but I get an error and can't find ... |
72,854,855 | How to print a new array from existing array of object javascript<p>I need to create a new array of objects from the existing array on vuejs.</p>
<p>example first array :</p>
<pre><code>import { ref } from 'vue';
const base_array = ref([
{id: 1, name: Pill, timing: [morning, noon, evening, night]},
{id: 2, name: T... | <p>This code should work</p>
<pre><code>const modified_array = ref(
base_array.value.flatMap(({timing, ...r}) =>
timing.map(timing => ({...r, timing:[timing]}))
)
);
</code></pre>
<p>However, if you want <code>modified_array</code> to be reactive to changes in <code>base_array</code> - you'd want ... | How to print a new array from existing array of object javascript | javascript|arrays|vue.js | 0 | 60 | 3 | 72,855,175 | 72,855,175 | 0 | true | 2022-07-04T09:54:34.763Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to print a new array from existing array of object javascript<p>I need to create a new array of objects from the existing array on vuejs.</p>
<p>example ... |
72,973,056 | SQL function to return formatted list of phone numbers<p>Looking to build an SQL Server function that pulls a list of phone numbers from a table and formats them in a specific way so that they can be passed into a paging systems API.</p>
<p>The value returned could contain any number of phone numbers and each one needs... | <p>Cursors are slow, don't use them for simple things.</p>
<p>EDIT: As some people said, don't use this "clever" way, due to unexpected results possible:</p>
<pre><code>-- DECLARE @MyRESULT varchar(max)=''
-- SELECT @MyRESULT = @MyRESULT + '"%2B' + ISNULL(PHONE_NUMBER, '') + '",'
-- FROM CONTACTS W... | SQL function to return formatted list of phone numbers | sql-server|function|tsql|sql-function | 0 | 60 | 2 | 72,973,482 | 72,973,482 | 0 | true | 2022-07-13T21:57:15.453Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SQL function to return formatted list of phone numbers<p>Looking to build an SQL Server function that pulls a list of phone numbers from a table and formats ... |
72,967,060 | Saving continuously generated simulation data with Python3<p>So my question is how I should save a large amount of simulation data to a file using Python (or update new data rows to the existing file).</p>
<p>Lets say I have <code>NN=1000</code> particles, and I want to save the position and velocity data of each parti... | <p>That highly depends on what you intend to use the output for. If it's stored for further calculations, <code>.npy</code> or some other binary format is always the way to go as it is faster, takes less space, and doesn't lose precision between loads and saves, instead of serializing it into a human readable format. I... | Saving continuously generated simulation data with Python3 | python|numpy|format|save|simulation | 0 | 60 | 2 | 72,968,431 | 72,968,431 | 0 | true | 2022-07-13T13:22:31.960Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Saving continuously generated simulation data with Python3<p>So my question is how I should save a large amount of simulation data to a file using Python (or... |
72,781,438 | Laravel 7: How to add numeric value with date?<p>I'm calculating the difference between two dates. I want to make addition/subtraction a numeric/decimal value with the date.</p>
<pre><code>Example:
Start = 2022-06-28
end = 2022-06-29
total= (start - 0.5) - ( end - 0)
= 1.5
or
total= (start - 0) - ( end - 0)... | <p>Can you test please the followind code?</p>
<pre class="lang-php prettyprint-override"><code> $startDate = '2022-06-28';
$endDate = '2022-06-29';
$second_half = 0.5;
$first_half = 0.5;
$start = \Carbon\Carbon::parse($startDate);
$end = \Carbon\Carbon::parse($endDate);
$total_days = (float... | Laravel 7: How to add numeric value with date? | laravel|datetime-format|laravel-7|php-carbon | 0 | 60 | 2 | 72,785,069 | 72,785,069 | 0 | true | 2022-06-28T06:05:00.010Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Laravel 7: How to add numeric value with date?<p>I'm calculating the difference between two dates. I want to make addition/subtraction a numeric/decimal valu... |
72,778,380 | $request->validated() returns not only validated items, but everything<p>I am using <code>FormRequest</code> to validate data, which looks like this:</p>
<pre><code>public function authorize(): bool
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function ... | <p>The problem was in nesting, I was accepting data with following structure:</p>
<pre><code>$rules = [
'userDetails' => ['required', 'array'],
'userDetails.firstName' => ['required', 'string'],
'userDetails.lastName' => ['required', 'string']
]
</code></pre>
<p>And whatever was passed in <code>userDe... | $request->validated() returns not only validated items, but everything | php|laravel|validation | 1 | 60 | 1 | 72,804,472 | 72,804,472 | 0 | true | 2022-06-27T21:15:34.050Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
$request->validated() returns not only validated items, but everything<p>I am using <code>FormRequest</code> to validate data, which looks like this:</p>
<pr... |
72,790,108 | How can i write a function that generates children from parents in a recursive way?<p>I want to recursevly generate a graph thath starts from (for example) [0,0,0] and generate his children: [1,0,0], [0,1,0] and [0,0,1].
Then theese children will become parents so we'll have (from [1,0,0]) -> [2,0,0], [1,1,0], [1,0,... | <p>I created a script to simulate your idea. However, I don't know wether you can repeat nodes in the graph or they must be unique. As you didn't specify it must be a tree, the problem becomes ambiguous.</p>
<p>In order to solve this problem, I've placed a flag that allows you to choose wether the nodes that will be ge... | How can i write a function that generates children from parents in a recursive way? | python|list|recursion | 0 | 60 | 1 | 72,863,840 | 72,863,840 | 0 | true | 2022-06-28T16:27:20.977Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can i write a function that generates children from parents in a recursive way?<p>I want to recursevly generate a graph thath starts from (for example) [... |
72,808,823 | Python extract text between regex matches<p>I have a text file that I want to extract data from using Python. An example of the file is as follows:</p>
<pre><code>123
text I want to extract is here.
456
I also need this part
789
and this
</code></pre>
<p>Now, if I use a regular expression as follows:</p>
<pre><code>r... | <p>If you want the line after the 3 digits, and that line should not start with a digit you can use a capture group:</p>
<pre><code>^\d{3}((?:\n(?!\d{3}$).*)*)
</code></pre>
<p><a href="https://regex101.com/r/ItXeRN/1" rel="nofollow noreferrer">Regex demo</a></p>
<p><strong>Example</strong></p>
<pre><code>import re
pa... | Python extract text between regex matches | python|regex | 0 | 60 | 2 | 72,811,807 | 72,811,807 | 0 | true | 2022-06-29T23:24:56.413Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python extract text between regex matches<p>I have a text file that I want to extract data from using Python. An example of the file is as follows:</p>
<pre>... |
72,876,123 | Gitlab Runner : The current Flutter SDK version is 0.0.0-unknown. - CI/CD<p>I am trying to execute a .gitlabci.yml file with Gitlab Runner.
But I am getting this error message.</p>
<pre><code>No dependencies changed.
1 package is discontinued.
57 packages have newer versions incompatible with dependency constraints.
Tr... | <p>Solved this problem. Perhaps, the GitLab runner cannot detect my flutter version because of the flutter SDK location. I moved the SDK from drive <code>D</code> to drive <code>C</code> and specified the new environment variable path. It works fine now.</p> | Gitlab Runner : The current Flutter SDK version is 0.0.0-unknown. - CI/CD | flutter|gitlab|gitlab-ci-runner|cicd | 0 | 60 | 1 | 73,136,712 | 73,136,712 | 0 | true | 2022-07-05T22:19:39.757Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Gitlab Runner : The current Flutter SDK version is 0.0.0-unknown. - CI/CD<p>I am trying to execute a .gitlabci.yml file with Gitlab Runner.
But I am getting ... |
72,997,648 | How to make two arrays into a single key-value pair dictionary to pass to HTML from JS<p>I am making a program in which the user presses a button to get a random question and then can press another button to get the answer. I wanted to make a dictionary in JS to contain the questions and answers but couldn't figure out... | <p>Melih's answer is correct but without using classes just do this:</p>
<pre><code>const questions = [
{ question: "Question one", answer: "Answer one" },
{ question: "Question two", answer: "Answer two" },
{ question: "Question three", answer: "Answer three"... | How to make two arrays into a single key-value pair dictionary to pass to HTML from JS | javascript|html|arrays|dictionary|getelementbyid | 1 | 60 | 2 | 72,997,920 | 72,997,920 | 0 | true | 2022-07-15T17:21:14.323Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to make two arrays into a single key-value pair dictionary to pass to HTML from JS<p>I am making a program in which the user presses a button to get a ra... |
73,008,671 | tk.Text: Tag Font<p>Is there a way to get a proper <code>Font</code> instance out of a tag, so I can change just the size? I know I can dump it in <code>tk.font.Font</code> but that seems really inefficient.</p>
<pre><code>for tag in self.tag_names():
#I need `f` to be a Font instance, not just a string
f = sel... | <p>One method is to premake all of the <code>Font</code> instances and assign the instances to the applicable tag's <code>font</code> option. When you want to change the sizes, loop over the stored <code>Font</code> instances, and change their sizes directly. Every tag that uses your <code>Font</code> instances will ch... | tk.Text: Tag Font | python-3.x|tkinter | 0 | 60 | 2 | 73,008,907 | 73,008,907 | 0 | true | 2022-07-17T01:18:23.283Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
tk.Text: Tag Font<p>Is there a way to get a proper <code>Font</code> instance out of a tag, so I can change just the size? I know I can dump it in <code>tk.f... |
73,002,189 | Split list of objects by delimiter in Kotlin<p>I have a <code>List</code> of objects I want to split by a delimiter into sublists, e.g:</p>
<pre class="lang-kotlin prettyprint-override"><code>val tokens = listOf(
Token(name = "lorem", val = "ipsum"),
Token(name = "dolor", val = &qu... | <p>In such cases I suggest <strong>not going</strong> with too much functional transformations. We can for example do it by folding/reducing, we can also first find indices of all delimiters and then <code>zipWithNext()</code> between them to get ranges, etc. This way we get the solution in a very few lines of code, bu... | Split list of objects by delimiter in Kotlin | list|kotlin|split | 1 | 60 | 3 | 73,003,210 | 73,003,210 | 0 | true | 2022-07-16T06:59:38.810Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Split list of objects by delimiter in Kotlin<p>I have a <code>List</code> of objects I want to split by a delimiter into sublists, e.g:</p>
<pre class="lang-... |
72,823,660 | Call a model not from database to list ASP.NET Core 5 MVC<p>I have these 3 models:</p>
<pre><code>public class Example1
{
public int ID_Ex1 { get; set; }
public int Attr1 { get; set; }
public int Attr2 { get; set; }
public int Attr3 { get; set; }
}
public class Example2
{
public int ID_Ex2 { get; s... | <p>In Generally, When using <code>ViewModel</code>, We just put the Model we need in ViewModel instead of their properties. <code>ViewModel</code> is just a model passed data between controller and View, You can't just use <code>ExampleViewModel.ToList()</code> directly.</p>
<p>From your question, I think you just wan... | Call a model not from database to list ASP.NET Core 5 MVC | c#|asp.net-core-mvc|asp.net-core-5.0 | 0 | 60 | 1 | 72,825,284 | 72,825,284 | 0 | true | 2022-07-01T01:53:46.947Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Call a model not from database to list ASP.NET Core 5 MVC<p>I have these 3 models:</p>
<pre><code>public class Example1
{
public int ID_Ex1 { get; set; }... |
72,849,077 | C#: Removing an Item from List<String>... and the item is not recognized as a String?<p>newbie to C# here. In my code, I want to build a list of strings, then later pop the first element off the front of the list:</p>
<pre><code> 1 public class foo
2 {
3 public List<String> listo;
4
5 pub... | <p>In your code,</p>
<pre><code>listo.RemoveAt(0)
</code></pre>
<p>will remove the 0th element from the list. It won't remove all elements.</p>
<p>As a simple test, you can use this code to test:</p>
<pre><code> private static void RemoveElementsFromList()
{
var list = new List<string>() { "a... | C#: Removing an Item from List<String>... and the item is not recognized as a String? | c#|list|syntax-error | -1 | 60 | 2 | 72,849,266 | 72,849,266 | 0 | true | 2022-07-03T18:44:45.967Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
C#: Removing an Item from List<String>... and the item is not recognized as a String?<p>newbie to C# here. In my code, I want to build a list of strings, th... |
72,847,503 | Appium Server is not getting started in CircleCI MacOS image<p>I am trying to run my Appium test on CircleCI Mac OS image on an iPhone simulator. Code is written in Python with Behave. Here is my config.yml file</p>
<pre><code>version: 2.1
orbs:
macos: circleci/macos@2.2.0
jobs:
example-job:
macos:
... | <p>As mentioned in this link <a href="https://discuss.circleci.com/t/unable-to-start-appium-server/39144" rel="nofollow noreferrer">https://discuss.circleci.com/t/unable-to-start-appium-server/39144</a>, I was able to run the code.</p>
<p>Use the below code to start Appium. Posting it here if anyone is also stuck</p>
<... | Appium Server is not getting started in CircleCI MacOS image | python|appium|circleci | 1 | 60 | 1 | 72,860,118 | 72,860,118 | 0 | true | 2022-07-03T14:56:50.307Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Appium Server is not getting started in CircleCI MacOS image<p>I am trying to run my Appium test on CircleCI Mac OS image on an iPhone simulator. Code is wri... |
73,007,556 | incrementing a global variable within a recursive function<p>I know it sounds like a duplicate question- I know because I've clicked on like 10 SO posts labeled the same thing, but hear me out.</p>
<p>I have a function like below</p>
<pre><code>class Solution:
def confusingNumberII(self, N: int) -> int:
... | <p>You can avoid the global variable by letting <code>dfs</code> calculate the count for its own given input only, and <em>return</em> that. The caller is then responsible of accumulating the counts that are returned from the recursive calls:</p>
<pre><code>class Solution:
def confusingNumberII(self, N: int) -> ... | incrementing a global variable within a recursive function | python|recursion|scope | 0 | 60 | 1 | 73,007,661 | 73,007,661 | 0 | true | 2022-07-16T20:45:39.613Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
incrementing a global variable within a recursive function<p>I know it sounds like a duplicate question- I know because I've clicked on like 10 SO posts labe... |
72,875,948 | How to call a post handler from a ajax render function and pass the value<p>Here's my code. The post handler in the render function does not get called. It keeps going to the GET handler when clicked. The a href tag works fine but i dont want to pass the id value in the url. So, I want to call a post and then do a redi... | <p>You need to use html code rather than tag helper in <code>DataTable</code>.It will not be generated to html code automatically.When using action in post form,the AntiForgeryToken will not be included in the form.So you need to add it to the forms in <code>initComplete</code>.Try to use the following code:
html:</p>
... | How to call a post handler from a ajax render function and pass the value | ajax|asp.net-core|post|datatable|razor-pages | 0 | 60 | 1 | 72,877,000 | 72,877,000 | 0 | true | 2022-07-05T21:53:55.273Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to call a post handler from a ajax render function and pass the value<p>Here's my code. The post handler in the render function does not get called. It k... |
72,873,318 | Decoding/Converting a hex string to specific format<p>I have been tasked with converting a hex string to a specific format but the developer of the software is not being of much assistance to the necessary steps to convert the string. I have managed to get the "before" and "after" formats of the str... | <p>Based on the spec, this is a quick method that should match the C# code above. This doesn't match your output though, so I'm wondering if your output example data matches your input data.</p>
<pre class="lang-py prettyprint-override"><code>import struct
def convert(hex_string):
raw_data = bytearray.fromhex(hex_... | Decoding/Converting a hex string to specific format | c#|python-3.x|hex | -1 | 60 | 1 | 72,874,663 | 72,874,663 | 0 | true | 2022-07-05T17:19:38.347Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Decoding/Converting a hex string to specific format<p>I have been tasked with converting a hex string to a specific format but the developer of the software ... |
72,863,426 | Output of model after serving different with keras model output<p>I have a model with input that has a shape like (145, 24, 24, 3)</p>
<p>With model load by tensorflow keras output will have a shape like (145, 4)</p>
<p>But when I convert input from tensor to list and POST it into model serving.</p>
<p>Output return (,... | <p>My mistake was I did not get all predictions in output</p>
<pre><code>res = res.json()['predictions'][0]
</code></pre>
<p>it should be:</p>
<pre><code>res = res.json()['predictions']
</code></pre>
<p>, output is an array dictionary I need to concat them by the same keys I will get output as I want.
<code>{'predictio... | Output of model after serving different with keras model output | python|docker|tensorflow|tensorflow-serving|serving | 0 | 60 | 1 | 72,863,611 | 72,863,611 | 0 | true | 2022-07-05T02:24:19.983Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Output of model after serving different with keras model output<p>I have a model with input that has a shape like (145, 24, 24, 3)</p>
<p>With model load by ... |
73,026,328 | Flutter: Show snackbar on firebaseAuth error<p>I have a screen with text fields that when a button is pressed, they are sent to a cubit for a signin function. What im trying to do is that when an auth error occurs, id like to create a relevant snackbar or dialog, but im having trouble implementing it.</p>
<p>Text field... | <p>I would catch the error inside your <code>SigninCubit</code> and <code>emit</code> the corresponding state.
Actually, you're already doing it with <code>emit(state.copyWith(status: SigninStatus.error));</code></p>
<p>Then you can use a <code>BlocListener<SigninCubit, SigninState></code> and listen for state ch... | Flutter: Show snackbar on firebaseAuth error | flutter|firebase|error-handling|firebase-authentication | 0 | 60 | 1 | 73,027,332 | 73,027,332 | 0 | true | 2022-07-18T17:31:26.960Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Flutter: Show snackbar on firebaseAuth error<p>I have a screen with text fields that when a button is pressed, they are sent to a cubit for a signin function... |
72,885,285 | Trying to order rows by timestamps from two different tables Snowflake<p>I have two tables as follows</p>
<p>TABLE_1</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>PERSON_ID</th>
<th>LDTS</th>
</tr>
</thead>
<tbody>
<tr>
<td>45</td>
<td>2022-03-03 15:41:05.685</td>
</tr>
<tr>
<td>72</td>
<... | <p>Getting the rows where the key in the other table is null reciprocally could be handled as a set-based issue:</p>
<pre><code>select T1.PERSON_ID, T1.LDTS as T1_LDTS, T2.LDTS as T2_LDTS, CURRENCY from TABLE_1 T1 left join TABLE_2 T2 on T1.LDTS = T2.LDTS
union
select T2.PERSON_ID, T1.LDTS as T1_LDTS, T2.LDTS as T2_LD... | Trying to order rows by timestamps from two different tables Snowflake | join|datatable|timestamp|snowflake-cloud-data-platform|sql-order-by | 1 | 60 | 3 | 72,885,788 | 72,885,788 | 0 | true | 2022-07-06T14:25:02.397Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Trying to order rows by timestamps from two different tables Snowflake<p>I have two tables as follows</p>
<p>TABLE_1</p>
<div class="s-table-container">
<tab... |
72,911,553 | class defined in trait cannot be serialized<p>I tried to cache some objects in binaries these days. But when I try to serialize my case classes defined in a trait, exception happens as bellow:</p>
<p><em>Exception in thread "main" java.io.NotSerializableException: tests.DataStore$
at java.base/java.io.ObjectO... | <p>The reason you get an exception is that in your code, you have the class that is being serialized a member of a trait, which is not marked as <code>Serializable</code>.</p>
<p>Objects in Scala are treated in a similar way, they behave like an anonymous
instance of some unknown class, but the difference is that defin... | class defined in trait cannot be serialized | scala|slick|slick-codegen | 0 | 60 | 1 | 72,914,110 | 72,914,110 | 0 | true | 2022-07-08T12:38:14.947Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
class defined in trait cannot be serialized<p>I tried to cache some objects in binaries these days. But when I try to serialize my case classes defined in a ... |
72,970,614 | Using Scala ClassTags in Collections<p>I'm trying to create an enum-like type in Scala with a generic type, later doing operations on the instances of the type that depend on what the generic is using Scala's <code>reflect.ClassTag</code> to get information on the generic type. Something like this:</p>
<pre class="lan... | <p>From the documentation, <a href="https://dotty.epfl.ch/api/scala/reflect/ClassTag.html" rel="nofollow noreferrer">ClassTag</a>:</p>
<blockquote>
<p>A <code>ClassTag[T]</code> stores the erased class of a given type <code>T</code>, accessible
via the <code>runtimeClass</code> field.</p>
</blockquote>
<p>You do not av... | Using Scala ClassTags in Collections | scala|reflection|scala-3 | 0 | 60 | 1 | 72,973,020 | 72,973,020 | 0 | true | 2022-07-13T17:52:24.770Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Using Scala ClassTags in Collections<p>I'm trying to create an enum-like type in Scala with a generic type, later doing operations on the instances of the ty... |
72,922,199 | Is there any function to transform my txt file with "missing fields" to a pandas data frame? The data is a chat transcript and textual data<p>I have a txt file containing the following fields:</p>
<p><code>"Timestamp", "Unread", "Visitor ID", 'Visitor Name', 'Visitor Email', 'Visitor Notes... | <p>What you can do is create a custom parser using <strong>re</strong> module built in python and then separate out the values and keys using capturing groups. And finally use the pattern.findall(...) or someother iter method</p>
<p>Assuming your file looks something like :
<strong>sample.txt</strong></p>
<pre><code>==... | Is there any function to transform my txt file with "missing fields" to a pandas data frame? The data is a chat transcript and textual data | python|pandas|dataframe|text|data-preprocessing | 0 | 60 | 1 | 72,922,882 | 72,922,882 | 0 | true | 2022-07-09T14:31:07.130Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is there any function to transform my txt file with "missing fields" to a pandas data frame? The data is a chat transcript and textual data<p>I have a txt fi... |
72,926,890 | 403 From Google Drive API When Using API Key<p>I've got a Kotlin application that retrieves publicly availably PDFs stored on Google drive. To download the PDFs, I do the following</p>
<pre><code>@Throws(IOException::class)
fun download(url: String?, destination: File?) {
val connection: URLConnection = URL(url).o... | <p>You should be using Oauth2 to request that much data tbh. However if you insist on using an api key try adding quotaUser and userIp as part of your request.</p>
<p><a href="https://developers.google.com/drive/api/guides/query-parameters" rel="nofollow noreferrer">Standard Query Parameters </a></p>
<blockquote>
<p>No... | 403 From Google Drive API When Using API Key | kotlin|google-drive-api|http-status-code-403 | 0 | 60 | 1 | 72,930,547 | 72,930,547 | 0 | true | 2022-07-10T07:40:59.130Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
403 From Google Drive API When Using API Key<p>I've got a Kotlin application that retrieves publicly availably PDFs stored on Google drive. To download the ... |
72,784,459 | Find popular pairs from table with transcations<p>I have an already simplified table of transactions with the customers and the unique items they purchased. Example:</p>
<pre><code>| Customer email | Item |
| ---------------- | ---------------- |
| First | row |
| a@hotmail.com ... | <p>Consider below query:</p>
<pre class="lang-sql prettyprint-override"><code>WITH purchased AS (
SELECT customer_email, ARRAY_AGG(DISTINCT item ORDER BY item) items
FROM sample GROUP BY 1
),
associations AS (
SELECT customer_email, STRUCT(first, second) AS item_pair
FROM purchased,
UNNEST(items) f... | Find popular pairs from table with transcations | sql|google-bigquery | 1 | 60 | 3 | 72,785,032 | 72,785,032 | 0 | true | 2022-06-28T10:04:14.813Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Find popular pairs from table with transcations<p>I have an already simplified table of transactions with the customers and the unique items they purchased. ... |
72,888,077 | Julia QPDAS: No method matching QuadraticProgram<p>I'm trying to solve a mathematical problem via the package QPDAS. Howevery, every time I call the function to do that, I get the following error:</p>
<pre><code> ERROR: LoadError: MethodError: no method matching QuadraticProgram(::Array{Float64,2}, ::Array{Float64,1... | <p>The end of the (long) line for the first "Candidate" method says what the problem is:</p>
<blockquote>
<p>got unsupported keyword arguments "z", "P"</p>
</blockquote>
<p>In Julia, positional arguments cannot be passed by name, even if they're in the correct position. I.e., in this call<... | Julia QPDAS: No method matching QuadraticProgram | methods|error-handling|package|julia | 1 | 60 | 1 | 72,888,261 | 72,888,261 | 0 | true | 2022-07-06T18:03:04.543Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Julia QPDAS: No method matching QuadraticProgram<p>I'm trying to solve a mathematical problem via the package QPDAS. Howevery, every time I call the function... |
72,914,999 | SQLAlchemy subquery access outer tables<p>I'm having trouble converting this SQL into a valid SQLAlchemy query:</p>
<pre class="lang-sql prettyprint-override"><code>select *
from A
join B on B.Id = (
select top 1 Id
from B
where B.name = A.name
order by B.date
)
</code></pre>
<p>I've tried using the sub... | <p>By using <code>correlate(A)</code> in the subquery we tell the SQLAlchemy that reuses <code>A</code> from the outer query.</p>
<p>For making the join work we should access the <code>Id</code> of the subquery, so we should return only <code>Id</code> and use <code>scalar_subquery()</code> to convert the subquery to a... | SQLAlchemy subquery access outer tables | python|sqlalchemy | 0 | 60 | 1 | 72,927,878 | 72,927,878 | 0 | true | 2022-07-08T17:31:07.453Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SQLAlchemy subquery access outer tables<p>I'm having trouble converting this SQL into a valid SQLAlchemy query:</p>
<pre class="lang-sql prettyprint-override... |
72,775,215 | Express.js how to allow multiple requests to be executed without blocking them<p>I have a website made with express js that receives numerous post requests.
These requests do not take that long to satisfy (despite interacting with a sql database) so no problem here.
However, when a request is made that runs a query tha... | <p>I modified the code with the changes you suggested but nothing changed.</p>
<p>(I also removed MachineDataAnalysis.js)</p>
<p><strong>Server.js</strong></p>
<pre><code>var QuerySettings = require('./SqlConfig.js');
var databaseTest = require('./lib/SQL');
databaseTest.connect(QuerySettings.configMachineDatabase()).t... | Express.js how to allow multiple requests to be executed without blocking them | javascript|node.js|express|tedious | 0 | 60 | 1 | 72,784,727 | 72,784,727 | 0 | true | 2022-06-27T16:11:41.597Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Express.js how to allow multiple requests to be executed without blocking them<p>I have a website made with express js that receives numerous post requests.
... |
72,954,097 | Reverse for 'topic' not found. 'topic' is not a valid view function or pattern name (another one)<p>I'm aware that there are quite a few similar posts like this one, but I still can't figure it out.
This is the code in the 'topics' template that links each individual 'topic' to it (also the code causing the error):</p>... | <p>Look at second path - you need name <code>topic</code>, not <code>topics</code></p>
<pre><code> path('topics/', views.topics, name='topics'),
path('topics/<int:topic_id>/', views.topic, name='topic') <<<---THIS
</code></pre>
<p>And in <code>views</code> maybe with <code>topic_id</code>:</p>
<p... | Reverse for 'topic' not found. 'topic' is not a valid view function or pattern name (another one) | python|django|django-views|django-urls | -3 | 60 | 1 | 72,954,297 | 72,954,297 | 0 | true | 2022-07-12T14:37:02.777Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Reverse for 'topic' not found. 'topic' is not a valid view function or pattern name (another one)<p>I'm aware that there are quite a few similar posts like t... |
73,000,126 | Unity, Updating score without update method<p>I am trying to update the different scores under different conditions. Here, I have 2 options: blue_ball matches with blue_rectangle and blue_ball matches with red_rectangle. Each condition calls theirs own function in order to increase the points however. it works only one... | <p>This doesn't work because this script is attached to a bullet (which can be understood from the class name) and when it hits, it increments scores <code>scoreBlue</code> or <code>scoreRed</code>. But the problem is once there's a trigger and the collision is not null, the game object to which this script is attached... | Unity, Updating score without update method | c#|unity3d|game-engine | 0 | 60 | 1 | 73,000,932 | 73,000,932 | 0 | true | 2022-07-15T22:24:34.893Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Unity, Updating score without update method<p>I am trying to update the different scores under different conditions. Here, I have 2 options: blue_ball matche... |
72,909,382 | Cockroach connection best practice?<p>I am using npgsql to connect to a CockroachDb cluster, in code with each command I want to execute I create a new connection and open it! I wonder if creating a private field variable holding the connection and opening it then closing it is much better than my current approach?</p>... | <p>Not really: although possible, it's a bit of an anti pattern.</p>
<p><a href="https://www.npgsql.org/doc/api/Npgsql.NpgsqlConnection.html" rel="nofollow noreferrer"><code>NpgsqlConnection</code></a> inherits from <a href="https://docs.microsoft.com/en-us/dotnet/api/system.data.common.dbconnection" rel="nofollow nore... | Cockroach connection best practice? | c#|npgsql|cockroachdb | 0 | 60 | 1 | 72,909,601 | 72,909,601 | 0 | true | 2022-07-08T09:29:23.060Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Cockroach connection best practice?<p>I am using npgsql to connect to a CockroachDb cluster, in code with each command I want to execute I create a new conne... |
72,947,658 | Extracting Last Character of a TypeScript String Literal<p>Is it possible to extract the last character of a string? I'm doing with numeric digits right now so I don't need to write the whole alphabet as an enum.</p>
<p>I'm also somewhat confused about why what I wrote isn't working properly.</p>
<pre><code>type Digit ... | <p>This does not work because because using <code>${infer L}${infer R}</code> on a string longer than two characters will always infer the first char as <code>L</code> and the rest as <code>R</code>. So for <code>"123456"</code>, <code>L</code> would be <code>"1"</code> and <code>R</code> would be <... | Extracting Last Character of a TypeScript String Literal | typescript | 1 | 60 | 1 | 72,948,356 | 72,948,356 | 0 | true | 2022-07-12T06:00:28.417Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Extracting Last Character of a TypeScript String Literal<p>Is it possible to extract the last character of a string? I'm doing with numeric digits right now ... |
72,770,821 | Azure Blueprint deny read access to some admins<p>I need to allow only a couple of administrators access to a ressource group, I tried blueprints using the UI but I am only able to lock delete.</p>
<ol>
<li>Is it possible to block reading a ressource or ressource group?</li>
<li>do I need to use REST API for that?</li>... | <blockquote>
<p>Is it possible to block reading a resource or ressource group?</p>
</blockquote>
<p>No, we cannot block the access to read a particular resource or a resource group.</p>
<p>Currently these are all the list of supported resource group locks as mentioned here in the <a href="https://docs.microsoft.com/en-... | Azure Blueprint deny read access to some admins | azure|azure-policy|azure-rbac|azure-blueprints | 0 | 60 | 1 | 72,774,391 | 72,774,391 | 1 | true | 2022-06-27T10:45:20.237Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Azure Blueprint deny read access to some admins<p>I need to allow only a couple of administrators access to a ressource group, I tried blueprints using the U... |
72,774,735 | How to reduce the time complexity of the Travelling salesman problem?<pre><code>path_distance = lambda r,c: np.sum([np.linalg.norm(c[r[p]]-c[r[p-1]]) for p in range(len(r))])
two_opt_swap = lambda r,i,k: np.concatenate((r[0:i],r[k:-len(r)+i-1:-1],r[k+1:len(r)]))
def two_opt(cities,improvement_threshold): # 2-opt Algor... | <p>Using the CPython <strong>interpreter</strong> for that is not efficient. Consider using a native language, a JIT like <strong>Numba</strong>, <strong>Cython</strong> or a <strong>natively compiled</strong> module that does that for you (if any). Using Numpy functions (like <code>np.linalg.norm</code>) on scalar ite... | How to reduce the time complexity of the Travelling salesman problem? | python|numpy|for-loop|optimization | 0 | 60 | 1 | 72,775,423 | 72,775,423 | 1 | true | 2022-06-27T15:34:17.340Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to reduce the time complexity of the Travelling salesman problem?<pre><code>path_distance = lambda r,c: np.sum([np.linalg.norm(c[r[p]]-c[r[p-1]]) for p i... |
72,775,942 | Is there a way to cut up a string by whitespace?<p>I'm trying to automatically split up a string by line, and then by whitespace for use in a Vec of Vec3.</p>
<pre><code>v 0.500000 0.500000 -0.500000
v 0.500000 -0.500000 -0.500000
v 0.500000 0.500000 0.500000
v 0.500000 -0.500000 0.500000
v -0.500000 0.500000 -0.500000... | <p>You can use <code>str::split_whitespace()</code>. Here's a simple parser. It does not handle errors (instead panics), but it should be a good starting point:</p>
<pre class="lang-rust prettyprint-override"><code>#[derive(Debug)]
struct Vec3(f32, f32, f32);
fn main() {
let str = "v 0.500000 0.500000 -0.5000... | Is there a way to cut up a string by whitespace? | rust | -1 | 60 | 2 | 72,776,168 | 72,776,168 | 1 | true | 2022-06-27T17:11:14.693Z | 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 cut up a string by whitespace?<p>I'm trying to automatically split up a string by line, and then by whitespace for use in a Vec of Vec3.</p... |
72,785,791 | xml soap response parse pdf file oracle<p>I am consuming a SOAP base service which is returning a pdf file in response, i want to parse response into a blob type. I have below code to consume soap service , however i am getting pdf file but its failed open or download as its invalid file.</p>
<pre><code>declare
p_ref_n... | <p>I think the issue is in your <code>parse_xml_clob</code> call. If you look at your l_pdf values which are getting saved in the table, I think they will look like this:</p>
<pre><code><getPDFResult xmlns="http://track.smsaexpress.com/secom/SMSAWebserviceIntl">...your base64Binary...</getPDFResult&g... | xml soap response parse pdf file oracle | sql|xml|oracle|soap|oracle-apex | 0 | 60 | 1 | 72,791,260 | 72,791,260 | 1 | true | 2022-06-28T11:43:44.693Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
xml soap response parse pdf file oracle<p>I am consuming a SOAP base service which is returning a pdf file in response, i want to parse response into a blob ... |
72,862,446 | How to define PyTorch3D plane geometry?<p>I'm new to <a href="https://pytorch3d.org/" rel="nofollow noreferrer">PyTorch3D</a> and I'm trying to define a (subdivided) plane.</p>
<p>What I've tried to do is mirror the structure I found in <a href="https://github.com/facebookresearch/pytorch3d/blob/main/pytorch3d/utils/ic... | <p>The solution is to remove this line: <code>verts /= verts.norm(p=2, dim=1, keepdim=True)</code></p>
<p>In more detail:</p>
<pre class="lang-py prettyprint-override"><code>import torch
from pytorch3d.ops.subdivide_meshes import SubdivideMeshes
from pytorch3d.structures.meshes import Meshes
# Vertex coordinates for ... | How to define PyTorch3D plane geometry? | python|pytorch|pytorch3d | 0 | 60 | 1 | 73,668,933 | 73,668,933 | 0 | true | 2022-07-04T22:15:31.077Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to define PyTorch3D plane geometry?<p>I'm new to <a href="https://pytorch3d.org/" rel="nofollow noreferrer">PyTorch3D</a> and I'm trying to define a (sub... |
72,238,958 | Select max value from table by category<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>Bought X times</th>
<th>Name</th>
<th>Manufacturer</th>
</tr>
</thead>
<tbody>
<tr>
<td>19</td>
<td>Олівець Faber-Castell, Castell 9000 F</td>
<td>FaberCastell</td>
</tr>
<tr>
<td>14</td>
<td>Набір акрило... | <p>An old fashioned solution is to filter rows where another row with greater value does <code>not exists</code>:</p>
<pre><code>SELECT *
FROM Query1 AS t
WHERE NOT EXISTS (
SELECT 1
FROM Query1 AS x
WHERE x.Manufacturer = t.Manufacturer
AND x.[Bought X times] > t.[Bought X times]
)
</code></pre>
<... | Select max value from table by category | sql|ms-access | 0 | 60 | 1 | 72,239,259 | 72,239,259 | 0 | true | 2022-05-14T09:34:54.520Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Select max value from table by category<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>Bought X times</th>
<th>Name</th>
<th>Manuf... |
72,239,406 | How I can only print the visible cells (filtered) in a column with openpyxl<p>I am working with a excel sheet and want to print only the value of cells which are visible in a particular column. Below is the example, I'm expecting it to print as second image but it is printing all the values
Excel_Example
<a href="https... | <p>You can use the below code to achieve what you are looking for.... Note that I have given code for both printing the data as well as writing the filtered data to a dataframe <code>df</code> in case you want to use the data for further processing</p>
<pre><code>from openpyxl import load_workbook
wb = load_workbook('... | How I can only print the visible cells (filtered) in a column with openpyxl | python|openpyxl | -1 | 60 | 1 | 72,241,223 | 72,241,223 | 0 | true | 2022-05-14T10:36:06.667Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How I can only print the visible cells (filtered) in a column with openpyxl<p>I am working with a excel sheet and want to print only the value of cells which... |
72,244,010 | In my MongoDB project i'm facing this problem: "DELETE http://localhost:5000/user/undefined 404 (Not Found)"<p>I am calling a <em><strong>DELETE request</strong></em> using <em><strong>fetch</strong></em>. But The request is not working. How can i solve this? Please help me!.</p> | <p>Can you try to put the params manual it is looking like you didn't send correct params into the methods <strong>(/user/undifined)</strong> the undifined mean you didn't send the id for deleting the user</p> | In my MongoDB project i'm facing this problem: "DELETE http://localhost:5000/user/undefined 404 (Not Found)" | mongodb|fetch | 0 | 60 | 1 | 72,244,097 | 72,244,097 | 0 | true | 2022-05-14T21:33:00.860Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
In my MongoDB project i'm facing this problem: "DELETE http://localhost:5000/user/undefined 404 (Not Found)"<p>I am calling a <em><strong>DELETE request</str... |
72,245,689 | Convert a Canvas element into Image element<p>I have a website where I need to generate dynamic images specific to the user. The approach I found was using <code>canvas</code>. I have text information and image file which need to be copied to the canvas and then, later on, can be converted to the image file which the u... | <p>Loading an Image can take some time. In your code, <code>toDataURL</code> is returned before image is loaded and painted on canvas.</p>
<p>To <em>resolve</em> this, you can use <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise" rel="nofollow noreferrer">Promise</a> to ... | Convert a Canvas element into Image element | javascript|html|canvas | 1 | 60 | 1 | 72,245,763 | 72,245,763 | 0 | true | 2022-05-15T05:18:18.200Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Convert a Canvas element into Image element<p>I have a website where I need to generate dynamic images specific to the user. The approach I found was using <... |
72,257,119 | How to read data from SQL and put it into an array in VB with code and no boxes<p>im doing a project where i need to read data from a SQL Table (Called Table_IDs_Name). In that table i have to read the column (Variable_Name) and get every row in an array ( Called in the code as Names_Array). Im trying the following cod... | <p>John suggested that you can use <a href="https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.list-1?view=net-6.0" rel="nofollow noreferrer"><code>List</code> of string</a> which comes from <code>System.Collection.Generic</code>.</p>
<pre><code>Import System.Collection.Generic
.... 'rest of the co... | How to read data from SQL and put it into an array in VB with code and no boxes | arrays|sql-server|vb.net | 0 | 60 | 2 | 72,258,376 | 72,258,376 | 0 | true | 2022-05-16T09:39:15.870Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to read data from SQL and put it into an array in VB with code and no boxes<p>im doing a project where i need to read data from a SQL Table (Called Table... |
72,259,404 | Fuzzy match on a left join<p>I am looking to join two tables where there's a 90% match for example.</p>
<p>Taking the example below, I want to join table A and table B on the phone number. You can see that the phone numbers differ slightly (the international code). I'd like the end result to show as table C.</p>
<p>I i... | <p>You can try something like this, but I don't like it, as Demeteor says you should have an ID to join on. Note that I use a left join here, in case there is no data in table #T2. I was also considering a computed column where it removes the + and then you could join that way too. I will also get told off for SQL inje... | Fuzzy match on a left join | mysql|sql|sql-server|presto | 1 | 60 | 1 | 72,261,030 | 72,261,030 | 0 | true | 2022-05-16T12:43:48.587Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Fuzzy match on a left join<p>I am looking to join two tables where there's a 90% match for example.</p>
<p>Taking the example below, I want to join table A a... |
72,260,902 | Android Webview does not open CSS/JAVASCRIPT server side php<p>i am using xamarin android but if you provide java code is also good.
I noticed when i open certain url pages, i get a blank page but if i open thesame webpage in google chrome on my test device it opens nicey.</p>
<p>I have done the following with no luck:... | <p>I have fixed this issue...
First create a webviewclient class :</p>
<pre><code>public class MyBabyclient : WebViewClient
{
public override bool ShouldOverrideUrlLoading(WebView view, IWebResourceRequest request)
{
view.LoadUrl(request.Url.ToString());
return false;
... | Android Webview does not open CSS/JAVASCRIPT server side php | java|android|xamarin|webview|loading | 0 | 60 | 1 | 72,264,266 | 72,264,266 | 0 | true | 2022-05-16T14:32:04.800Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Android Webview does not open CSS/JAVASCRIPT server side php<p>i am using xamarin android but if you provide java code is also good.
I noticed when i open ce... |
72,269,625 | Next value prediction using LSTM or other methods?<p>I have a csv file with many patients' health measurement data. Each patient has a different number of measurements. (Some patients come frequently, some don't.) I am trying to do a next value prediction model to predict the patients' risk of specific incidences.
Sinc... | <p>Regarding the different lengths of your data, you can use Padding and Masking to make your data evenly lengthed (<a href="https://www.tensorflow.org/guide/keras/masking_and_padding" rel="nofollow noreferrer">Description of Padding/Masking with Tensorflow)</a>. Predicting sequence based data using LSTMs is generally ... | Next value prediction using LSTM or other methods? | machine-learning|deep-learning|data-science|lstm|random-forest | 0 | 60 | 1 | 72,270,392 | 72,270,392 | 0 | true | 2022-05-17T07:13:52.410Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Next value prediction using LSTM or other methods?<p>I have a csv file with many patients' health measurement data. Each patient has a different number of me... |
72,272,587 | How can I continue to iterate in a while controller even if I have a failed assertion in Jmeter?<p>This is what I am doing.
I am using a While controller to iterate a CSV data file. I set "STOP THREAD ON EOF" to true in the element "CSV Data Set Config" because I want to read all the data in the fil... | <p>I solved the issue putting <code>${__javascript("false")}</code> in the While Controller condition</p> | How can I continue to iterate in a while controller even if I have a failed assertion in Jmeter? | java|while-loop|jmeter|controller|assertion | 0 | 60 | 2 | 72,275,422 | 72,275,422 | 0 | true | 2022-05-17T10:41:57.970Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I continue to iterate in a while controller even if I have a failed assertion in Jmeter?<p>This is what I am doing.
I am using a While controller to ... |
72,287,383 | Doubly Linked List adding null<p>I'm new to Java. I want to make student information system, but whenever I used the <code>addStudent</code> method, I get a list with null values.</p>
<p>This is the student class for getting names telephone numbers and student ID.</p>
<pre class="lang-java prettyprint-override"><code>i... | <p>Your "display" function only prints the "line" member of the nodes irrespective of whether you set the "line" member or not.
And your "liste2" variable is populated with "Student" instances and not "String"s. Which means that only the "student" me... | Doubly Linked List adding null | java|class|nodes|doubly-linked-list | 0 | 60 | 1 | 72,287,780 | 72,287,780 | 0 | true | 2022-05-18T10:23:52.597Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Doubly Linked List adding null<p>I'm new to Java. I want to make student information system, but whenever I used the <code>addStudent</code> method, I get a ... |
72,290,932 | Mongo DB how to find orphans in a tree?<p>I have the <code>trees</code> collection with objects which have a tree like structure. I'm using <a href="https://www.mongodb.com/docs/manual/tutorial/model-tree-structures-with-child-references/" rel="nofollow noreferrer">child references pattern</a> actually, but in my case ... | <p>As per the <a href="https://www.mongodb.com/docs/manual/reference/limits/#mongodb-limit-Nested-Depth-for-BSON-Documents" rel="nofollow noreferrer">documentation</a> of latest version</p>
<blockquote>
<pre><code>Nested Depth for BSON Documents
MongoDB supports no more than 100 levels of nesting for BSON
documents... | Mongo DB how to find orphans in a tree? | mongodb|tree|mongodb-query | 0 | 60 | 1 | 72,291,266 | 72,291,266 | 0 | true | 2022-05-18T14:19:53.947Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Mongo DB how to find orphans in a tree?<p>I have the <code>trees</code> collection with objects which have a tree like structure. I'm using <a href="https://... |
72,275,667 | Deserialize inner json string property with GSON<p>I'm using Springboot and Gson for my backend.
I have these two classes in a many to many relation:</p>
<p><strong>Order class</strong></p>
<pre><code>@Getter
@Setter
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table( name = "orders")
public class... | <p>I resolved in this way, I think this is <strong>NOT</strong> a good approach and I hope that there is a more automatic approach to solve this.</p>
<p><strong>Product Class</strong></p>
<pre><code>public class Product {
@Expose
@Id
@NotBlank
private String sapCode;
@Expose
@NotBlank
privat... | Deserialize inner json string property with GSON | java|json|spring-boot|gson|json-deserialization | 0 | 60 | 2 | 72,291,319 | 72,291,319 | 0 | true | 2022-05-17T14:16:32.933Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Deserialize inner json string property with GSON<p>I'm using Springboot and Gson for my backend.
I have these two classes in a many to many relation:</p>
<p>... |
72,293,658 | pandas one-hot-encoding column containing a list of feature and each feature can be negative<p>So i have the following dataset</p>
<pre><code>d = {'user': ['a','a','b','b'], 'item':[1, 2, 1, 3], 'features': [[2], [-2, -1], [-137, -1, 2], [-137, 2, 1]]}
df = pd.DataFrame(data=d)
user item features
0 ... | <p>In pandas this can be done as follows:</p>
<pre><code>df1 = df.explode('features')
df1['f1'] = abs(df1.features)
df1['f2'] = np.sign(df1.features)
df1.pivot(['user', 'item'], 'f1', 'f2').fillna(0).reset_index()
f2 user item 1 2 137
0 a 1 0 1 0
1 a 2 -1 -1 0
2 b 1 -1 1 -1
3 ... | pandas one-hot-encoding column containing a list of feature and each feature can be negative | python|pandas|dataframe|scikit-learn|one-hot-encoding | 0 | 60 | 1 | 72,293,896 | 72,293,896 | 0 | true | 2022-05-18T17:36:26.723Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
pandas one-hot-encoding column containing a list of feature and each feature can be negative<p>So i have the following dataset</p>
<pre><code>d = {'user': ['... |
72,307,325 | How to avoid printing empty array elements?<p>I know how to do this for numeric datatypes but please tell my for string arrays.</p>
<p>Say I have a string array of 10 elements in java. Some elements contain words but others contain NOTHING.</p>
<p>How do I run a for loop which prints only the non empty elements?</p> | <p>To print empty elements:</p>
<pre><code>for (int i = 0; i < arr.length; i++) {
if (arr[i] == null || arr[i].trim().isEmpty()) {
System.out.println("Element " + i " + " is null or empty.");
}
}
</code></pre>
<p>The print non-empty elements:</p>
<pre><code>for (int i = 0; i &... | How to avoid printing empty array elements? | java|arrays|string | -7 | 60 | 1 | 72,307,437 | 72,307,437 | 0 | true | 2022-05-19T15:33:22.723Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to avoid printing empty array elements?<p>I know how to do this for numeric datatypes but please tell my for string arrays.</p>
<p>Say I have a string ar... |
72,307,341 | Matplotlib - Delete lines from a 3d quiver plot<p>I would like to graphically represent the time trend of a three-dimensional reference frame using Matplotlib and the quiver function. In an event, I simulated the data representing the reference frame through the definition of a 3x3 rotation matrix. Each time the event ... | <p>If you keep track of the quiver artists, you can use them to remove the previously plotted quivers:</p>
<pre><code>import random as rnd
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.animation import FuncAnimation
quivers_artist = []
def timerTick_Event(i):
global quivers_artist
#%% DAT... | Matplotlib - Delete lines from a 3d quiver plot | python|matplotlib|plot | 0 | 60 | 1 | 72,307,687 | 72,307,687 | 0 | true | 2022-05-19T15:34:37.400Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Matplotlib - Delete lines from a 3d quiver plot<p>I would like to graphically represent the time trend of a three-dimensional reference frame using Matplotli... |
72,308,423 | Tkinter LabelFrame not appearing when using .grid<p>I am trying to create a UI using Tkinter that uses LabelFrames and I want to lay them out in a grid. However, they are only appearing when I use the .pack method. I'm not sure if this is because they are a container more than a widget but if someone could help me out ... | <p>The frame <em>is</em> appearing. Because there's nothing in the frame, and because you haven't set a size for the frame, it is only 1 pixel wide and 1 pixel tall.</p> | Tkinter LabelFrame not appearing when using .grid | python|python-3.x|user-interface|tkinter | 0 | 60 | 1 | 72,308,485 | 72,308,485 | 0 | true | 2022-05-19T16:57:48.013Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Tkinter LabelFrame not appearing when using .grid<p>I am trying to create a UI using Tkinter that uses LabelFrames and I want to lay them out in a grid. Howe... |
72,309,915 | SwiftUI: How can I deselect a button programmatically after the user completes a long press?<p>I have a button that can be long pressed for a different action. Here's the problem: if I release after the long press, while still hovering the button, the tap action still fires off. Is there a way I can automatically untap... | <p>Your tap action just needs to be conditional. The <code>LongPressGesture</code> will always fire first as it reacts to the press. <code>Tap</code> reacts to the left, so that comes after the press. In <code>LongPressGesture</code>, you set a flag that causes the action to skip in <code>Tap</code>, and then you reset... | SwiftUI: How can I deselect a button programmatically after the user completes a long press? | swift|swiftui | 0 | 60 | 2 | 72,310,808 | 72,310,808 | 0 | true | 2022-05-19T19:07:56.630Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SwiftUI: How can I deselect a button programmatically after the user completes a long press?<p>I have a button that can be long pressed for a different actio... |
72,326,173 | why input value don't change in real time<p>I make a code about calculator with React. I use useRef for change value about firstref and secondref, resultref. resultref.current is correctly changed in console. But in the page, resultref.current in input tag don't change in real time. I want to know why this is happen. I... | <p>The issue is that <code>ref</code>s do not cause a React component to <em>re-render</em>, which means that the <code>return</code> statement is not "called" again with the updated values.</p>
<p>In order to make it work, you should use the <code>useState()</code> hook to hold the result:</p>
<pre><code>con... | why input value don't change in real time | javascript|reactjs | 0 | 60 | 2 | 72,326,305 | 72,326,305 | 0 | true | 2022-05-21T02:06:56.050Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
why input value don't change in real time<p>I make a code about calculator with React. I use useRef for change value about firstref and secondref, resultref.... |
72,353,410 | Why foreign key is not created when defined at column level in MySQL?<p>I created a parent Table named 'Student' having two columns as 'rollno' and 'name' using the following SQL command:</p>
<p>create table Student
(
rollno int primary key,
name char(30)
);</p>
<p>I defined primary constraint at the column level and t... | <p>This is a feature request in MySQL that dates back to 2004, but it has never been implemented. <a href="https://bugs.mysql.com/bug.php?id=4919" rel="nofollow noreferrer">https://bugs.mysql.com/bug.php?id=4919</a></p>
<p>The workaround is to use table-level foreign key constraint syntax, even if your case would allow... | Why foreign key is not created when defined at column level in MySQL? | mysql|foreign-keys | 0 | 60 | 1 | 72,353,669 | 72,353,669 | 0 | true | 2022-05-23T18:40:14.223Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why foreign key is not created when defined at column level in MySQL?<p>I created a parent Table named 'Student' having two columns as 'rollno' and 'name' us... |
72,354,307 | Can one create a distribution characterizing the multiplication of two distributions in Python?<p>I have two distributions and I would like to know the properties of the multiplication of these distributions.</p>
<p>For example, if I had the distribution of properties velocity and time, I want the characteristics of th... | <p>The solution took a bit of time to understand the <code>rv_continuous</code>. Cobbling together knowledge from a bunch of examples (I should have documented them--sorry) I think I got a working solution.</p>
<p>The only issue is that the domain needs to be known in advance, but I can work with that. If someone has i... | Can one create a distribution characterizing the multiplication of two distributions in Python? | python|scipy|scipy.stats | 0 | 60 | 1 | 72,355,811 | 72,355,811 | 0 | true | 2022-05-23T20:09:35.037Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Can one create a distribution characterizing the multiplication of two distributions in Python?<p>I have two distributions and I would like to know the prope... |
72,340,864 | Extracting numbers from a string not working in production<p>I am having an issue with extracting a number from a string in react. The solution I used works fine on the local machine but doesn't work as required when push into production. I tried on netlify and heroku but getting same result.</p>
<p>I fetch the data fr... | <p>Thanks everyone for the help and suggestions. There was a line break ('\n') on those indexes as can be seen in the first picture. I figured that out by using console.log(headings) in the code and deploying that to Netlify/Heroku and after visiting the link, I found that in the console of the browser.</p>
<p>The issu... | Extracting numbers from a string not working in production | javascript|reactjs|filter|split|netlify | 0 | 60 | 1 | 72,355,936 | 72,355,936 | 0 | true | 2022-05-22T19:52:22.870Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Extracting numbers from a string not working in production<p>I am having an issue with extracting a number from a string in react. The solution I used works ... |
72,356,859 | Calculate the average date every x rows<p>Previously I posted a question to calculate the average value for every 10 rows. It was successful in Zero's coding.
<a href="https://stackoverflow.com/questions/72298713/calculating-the-average-value-for-every-10-cells-in-each-column-by-pandas">Calculating the average value fo... | <p>Assuming column <code>0</code> in the provided example, convert the timestamps to integer, group by the floor division of the index by 10 and aggregate:</p>
<pre><code>import numpy as np
out = pd.to_datetime(pd.to_datetime(df[0])
.astype(np.int64)
.groupby(df.index//10)
... | Calculate the average date every x rows | python|excel|pandas | 1 | 60 | 2 | 72,357,385 | 72,357,385 | 0 | true | 2022-05-24T03:21:22.773Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Calculate the average date every x rows<p>Previously I posted a question to calculate the average value for every 10 rows. It was successful in Zero's coding... |
72,358,115 | Why function output doesn't return an expected array<p>This should be something simple, but I miss why this code outputs 'undefined', while I expect to get an array with numbers: [1, 2]. I tried to debug it in console step by step, but still don't understand why newArr doesn't return from the function. Could someone ex... | <p>The first <code>return</code> that is reached inside a function will end the function call and will return whatever you set there.</p>
<p>In your case, you are pushing 2 values in the array, but as soon as you reach the third one <code>a</code> you are just using <code>return</code>. This means that you are returnin... | Why function output doesn't return an expected array | javascript | 0 | 60 | 3 | 72,358,166 | 72,358,166 | 0 | true | 2022-05-24T06:27:57.797Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why function output doesn't return an expected array<p>This should be something simple, but I miss why this code outputs 'undefined', while I expect to get a... |
72,321,816 | Problem installing Python requirement in WSL with venv<p>I have a code repository from a vendor and I'm trying to set up my local system in the exact same way that they did (as much as possible)</p>
<p>I'm running Ubuntu in WSL for Windows already so I figured I would try to also use this system for this vendor repo. ... | <p>The problem was in line 3 of the shell script:</p>
<pre><code>#!/bin/bash
cd /home/vendorname/vendor-app
. /home/vendorname/.virtualenvs/vendor-app/bin/activate
. /home/vendorname/vendor-app/vendor-environment.sh
python3 /home/vendorname/vendor-app/vendor_script.py
</code></pre>
<p>Which should have looked like this... | Problem installing Python requirement in WSL with venv | ubuntu|pip|wsl-2|python-venv | 0 | 60 | 1 | 72,371,364 | 72,371,364 | 0 | true | 2022-05-20T16:03:20.193Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Problem installing Python requirement in WSL with venv<p>I have a code repository from a vendor and I'm trying to set up my local system in the exact same wa... |
72,371,599 | how to explode array in php<p>i have data array, and this my array</p>
<pre><code>Array
(
[0] => Array
(
[id] => 9,5
[item] => Item A, Item B
)
[1] => Array
(
[id] => 3
[item] => Item C
)
)
</code></pre>
<p>in arr... | <p>The code down below should do the job. But I didn't understand why you didn't create those items seperately in the first place.</p>
<pre><code>foreach ($arr as $i => $data) {
if (!str_contains($data['id'], ',')) continue;
$items = explode(',', $data['item']);
foreach(explode(',', $data['id']) as $i ... | how to explode array in php | php|arrays | 0 | 60 | 2 | 72,371,727 | 72,371,727 | 0 | true | 2022-05-25T03:14:35.330Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to explode array in php<p>i have data array, and this my array</p>
<pre><code>Array
(
[0] => Array
(
[id] => 9,5
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.