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,197,225 | tortoisegit: Setting path to git.exe to an invariable destination<p>we are using tortoisegit 2.11.0 and the PATH variable at windows is pointing to the standard installation path at c:\Program Fles..... Can't change this because of system rights!</p>
<p>Now, our git.exe to use is located on a network storage! So I cha... | <p>As of TortoiseGit 2.13 there is no way to disable the Git.exe detection mechanism.</p>
<p>It tries to find a git.exe on the path and looks for the installation path of the Git for Windows bundle if not Git.exe is configured yet.</p>
<p>The path is stored in registry, maybe you can create a <code>.reg</code> file to ... | tortoisegit: Setting path to git.exe to an invariable destination | tortoisegit | 0 | 73 | 1 | 72,197,398 | 72,197,398 | 1 | true | 2022-05-11T07:44:13.073Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
tortoisegit: Setting path to git.exe to an invariable destination<p>we are using tortoisegit 2.11.0 and the PATH variable at windows is pointing to the stand... |
72,139,152 | How to slice a XGBClassifier/XGBRegressor model into sub-models?<p><a href="https://xgboost.readthedocs.io/en/stable/python/model.html" rel="nofollow noreferrer">This document</a> shows that a XGBoost API trained model can be sliced by following code:</p>
<pre><code>from sklearn.datasets import make_classification
impo... | <p>The problem is with the type hint you are giving <code>clf_xgb.Booster</code> which does not match an existing argument. Try:</p>
<pre class="lang-py prettyprint-override"><code>clf_xgb_sliced: xgb.Booster = clf_xgb.get_booster()[3:7]
</code></pre>
<p>instead.</p> | How to slice a XGBClassifier/XGBRegressor model into sub-models? | python|scikit-learn|slice|xgboost | 0 | 175 | 1 | 72,140,356 | 72,140,356 | 1 | true | 2022-05-06T09:26:46.107Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to slice a XGBClassifier/XGBRegressor model into sub-models?<p><a href="https://xgboost.readthedocs.io/en/stable/python/model.html" rel="nofollow norefer... |
72,223,819 | How to enable sign-in with Google on Backstage?<p>On Backstage, after following all the steps on <a href="https://backstage.io/docs/auth/google/provider" rel="nofollow noreferrer">https://backstage.io/docs/auth/google/provider</a>, I get the message "The Google provider is not configured to support sign-in" a... | <p>It seems you missed the backend app's auth plugin configuration as <a href="https://backstage.io/docs/auth/#sign-in-configuration" rel="nofollow noreferrer">mentioned in the docs</a></p>
<p>You should create a resolver function to map the google's user identity to a backstage's user identity or, optionally, skip the... | How to enable sign-in with Google on Backstage? | google-oauth|single-sign-on|backstage | 0 | 369 | 1 | 72,295,934 | 72,295,934 | 1 | true | 2022-05-13T02:21:30.900Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to enable sign-in with Google on Backstage?<p>On Backstage, after following all the steps on <a href="https://backstage.io/docs/auth/google/provider" rel... |
72,153,548 | Firestore uid not available after page reload<p>I am exporting a function returning firestore data useing the uid as identifier. The uid however is not available after reloading the page, causing af can't read null value error. I tried researching and happened upon the shown onAuthStateChanged, but this is causing the ... | <p>You should ideally run those queries only when the user state is loaded and initialize <code>onAuthStateChanged()</code> in <code>useEffect()</code>. Try refactoring the code as shown below:</p>
<pre><code>export const GetAppointmentsFromFirebase = () => {
const [user, setUser] = useState({});
let [schedulerD... | Firestore uid not available after page reload | javascript|reactjs|firebase|google-cloud-firestore|firebase-authentication | 0 | 71 | 1 | 72,153,589 | 72,153,589 | 1 | true | 2022-05-07T14:41:42.743Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Firestore uid not available after page reload<p>I am exporting a function returning firestore data useing the uid as identifier. The uid however is not avail... |
72,160,274 | Will a query of a big number of docs cause a read on all the doc in the collection even if they don't meet the condition?<p>Basically, I want to query a collection of data that could have 100 docs or 200.000 docs.
Since I want to target, let's say max of 50 in a query, will this query cost me to read the total number o... | <p>You are charged only for the number of documents returned by the query. If there are 50 documents where client ID matches, you'll be charged 50 reads irrespective of how many documents are present in the collection.</p>
<p>You can additionally <a href="https://firebase.google.com/docs/firestore/query-data/order-limi... | Will a query of a big number of docs cause a read on all the doc in the collection even if they don't meet the condition? | google-cloud-firestore | 0 | 26 | 1 | 72,160,291 | 72,160,291 | 1 | true | 2022-05-08T10:52:56.430Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Will a query of a big number of docs cause a read on all the doc in the collection even if they don't meet the condition?<p>Basically, I want to query a coll... |
72,166,120 | How to read FileNames in a given Folder on MAC?<p>My goal is to read the FileNames of all png files in a given folder.</p>
<p>I've Windows VBA code which uses the ActiveX FileSystemObject.</p>
<p>On a MAC This code results in</p>
<blockquote>
<p>"runtime error 429 activex component can't create object"</p>
</... | <p>Here is a sub, using the native VBA DIR command, listing EXCEL workbooks in a folder by printing their names on the debug window:</p>
<pre><code>Public Sub DirXlList()
Const cstrPath As String = "c:\users\xxxx\misc\"
Dim strDirItem As String
strDirItem = Dir(cstrPath & "*.xlsx")
... | How to read FileNames in a given Folder on MAC? | vba|macos|filenames | 0 | 93 | 2 | 72,179,633 | 72,179,633 | 1 | true | 2022-05-09T01:13:19.617Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to read FileNames in a given Folder on MAC?<p>My goal is to read the FileNames of all png files in a given folder.</p>
<p>I've Windows VBA code which use... |
72,146,581 | When I try to rename a favicon in a react project to "favicon.ico" the icon changes to react logo<p><a href="https://i.stack.imgur.com/KKZkr.png" rel="nofollow noreferrer">before renaming </a></p>
<p><a href="https://i.stack.imgur.com/gieJO.png" rel="nofollow noreferrer">After renaming same file </a></p>
<p>without nam... | <p>This is a problem that can occur when in development. When building the project, it will load at the new favicon. If that doesn't work the case may be with browser cookies, try erasing your cookies and then the new favicon will show.</p> | When I try to rename a favicon in a react project to "favicon.ico" the icon changes to react logo | reactjs | 0 | 62 | 2 | 72,146,742 | 72,146,742 | 1 | true | 2022-05-06T19:35:08.137Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
When I try to rename a favicon in a react project to "favicon.ico" the icon changes to react logo<p><a href="https://i.stack.imgur.com/KKZkr.png" rel="nofoll... |
72,190,336 | How to update React properties after a delay in time and constantly sort an array to the nearest specific number X?<p>I'm working on a elevator simulator in React JS with typescript. It's quite simple, there are 6 buttons on every floor for the 6 floors to go to the chosen floor. And when you click on one of the button... | <p>Calculate the distance from the starting floor to all the floors clicked and sort the array from closest to farthest.</p>
<pre class="lang-js prettyprint-override"><code>clickedButtons.sort(function(a, b){
return Math.abs(floorNumber-a) - Math.abs(floorNumber-b);
});
</code></pre>
<p>Just to elaborate, it calcu... | How to update React properties after a delay in time and constantly sort an array to the nearest specific number X? | javascript|reactjs|typescript | 0 | 74 | 1 | 72,190,576 | 72,190,576 | 1 | true | 2022-05-10T16:59:15.980Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to update React properties after a delay in time and constantly sort an array to the nearest specific number X?<p>I'm working on a elevator simulator in ... |
72,219,831 | create image in React from backend dataURL<p>I'm trying to get a snapshot of HTML canvas like so:</p>
<pre><code> const canvas = canvasRef.current
let image = canvas.toDataURL('image/jpeg');
await axios.post('/api/entries/', { dataURL: image })
</code></pre>
<p>which seems to be working, and connected proper... | <p>Put the images into a state and put the fetch into a <code>useEffect()</code> function.</p>
<pre class="lang-jsx prettyprint-override"><code>const [pic,setPics] = useState();
useEffect(() => {
const getPics = async () => await axios.get('/api/entries/')
.then(res => {
setPics(res.data);
})
... | create image in React from backend dataURL | javascript|reactjs|canvas|axios|html5-canvas | 0 | 179 | 1 | 72,219,880 | 72,219,880 | 1 | true | 2022-05-12T17:25:07.837Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
create image in React from backend dataURL<p>I'm trying to get a snapshot of HTML canvas like so:</p>
<pre><code> const canvas = canvasRef.current
let... |
72,222,326 | How to handle events on the extra space in a flexbox?<p>How to handle the events when someone clicks(mouse click) on the violet color space around the elements ?
Putting a general onclick on the container is overriding the individual item behaviors (they all have their internal onclick handlers). Any other way to solve... | <p>The stopPropagation() method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases. It does not, however, prevent any default behaviors from occurring; for instance, clicks on checkboxes are still processed.</p>
<pre class="lang-jsx prettyprint-override"><code>... | How to handle events on the extra space in a flexbox? | html|css|reactjs|flexbox|material-ui | 0 | 87 | 2 | 72,222,586 | 72,222,586 | 1 | true | 2022-05-12T21:37:54.160Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to handle events on the extra space in a flexbox?<p>How to handle the events when someone clicks(mouse click) on the violet color space around the elemen... |
72,232,458 | Input component > feeds Forms component - how to handle submit?<p>I am missing how to bring the input value out of the child component.</p>
<p>I have an <em>Input</em> component that I want to re-use, there I can see what happens <code>onChange</code>, and I see every change on the input field.</p>
<p>Then on the paren... | <p>This is the perfect case to use the <code>useRef</code> function from react.</p>
<p>In <strong>Form.js</strong></p>
<pre class="lang-jsx prettyprint-override"><code>import React, { useRef } from 'react'
</code></pre>
<p>create a reference constant and pass it as a prop into the input component. and change the input... | Input component > feeds Forms component - how to handle submit? | reactjs|react-hooks|react-forms | 0 | 42 | 2 | 72,233,116 | 72,233,116 | 1 | true | 2022-05-13T16:05:10.147Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Input component > feeds Forms component - how to handle submit?<p>I am missing how to bring the input value out of the child component.</p>
<p>I have an <em>... |
72,163,157 | RasPi Remote GPIO pizero Problems<p>I am trying to controll motors and a servos connected to a Raspberry Pi Zero 2w from a windows machine via python. I dont have much expierience with RasPi but I managed to get an Led to blink via remote GPIO, changed the code a little bit so my H-Bridge turned the motor:</p>
<pre><co... | <p>Found the problem on github. For anyone wondering the gpiozero lib was missing a parameter. In the output_devices.py the class Motor __init __ function it has to say:
<code>super(Motor, self).__init__(_order=devices.keys(), pin_factory=pin_factory, **devices)</code>
instead of
<code>super(Motor, self).__init__(_orde... | RasPi Remote GPIO pizero Problems | python|raspberry-pi | 0 | 94 | 1 | 72,207,592 | 72,207,592 | 1 | true | 2022-05-08T16:42:10.270Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
RasPi Remote GPIO pizero Problems<p>I am trying to controll motors and a servos connected to a Raspberry Pi Zero 2w from a windows machine via python. I dont... |
72,165,202 | Flutter 500 error on API when trying to make authenticated requests<p>I'm trying to make authenticated requests, but I get 500 errors. when I change my token, I get 401 error which is not authenticated meaning.</p>
<p>Here is my code:</p>
<pre><code>import 'dart:convert';
import 'dart:io';
import 'myapp/models/apis/st... | <p>Your header is wrong. I have a simple code for this:</p>
<pre><code>import 'package:wnetworking/wnetworking.dart';
class CollectApi {
final _url = 'https://api.collectapi.com/economy';
final _token = '1111111111111111111111111111111';
/* -----------------------------------------------------------------------... | Flutter 500 error on API when trying to make authenticated requests | flutter|api|rest|flutter-layout|flutter-dependencies | 0 | 61 | 1 | 72,165,734 | 72,165,734 | 1 | true | 2022-05-08T21:25:01.917Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Flutter 500 error on API when trying to make authenticated requests<p>I'm trying to make authenticated requests, but I get 500 errors. when I change my token... |
72,146,691 | longest subsequence: missing last element<p>Hi guys I'm working on the longest subsequence algorithm, the idea is to find the subsequence of numbers from an array. I'm using Ruby, so far I'm missing the last number of the subsequence, this is my code:</p>
<pre><code>def sequence_length1(array)
array.sort!
secuenci... | <p>To use the approach you have taken you need to save the longest known sequence found so far (or its starting index and length) as you loop through the elements of the array. Here is one way to do that.</p>
<pre><code>def sequence_length1(array)
array.sort!
secuencia_mayor = []
candidate = []
array.each do |n... | longest subsequence: missing last element | ruby|algorithm|data-structures | 0 | 63 | 1 | 72,148,536 | 72,148,536 | 1 | true | 2022-05-06T19:48:30.897Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
longest subsequence: missing last element<p>Hi guys I'm working on the longest subsequence algorithm, the idea is to find the subsequence of numbers from an ... |
72,164,527 | Getting the subject_id for the subject_type GitHub User API<p>Using the GitHub API via Octokit.js and looking at the docs for <code>getContextForUser</code> (<a href="https://docs.github.com/en/rest/users/users#get-contextual-information-for-a-user" rel="nofollow noreferrer">https://docs.github.com/en/rest/users/users#... | <p>The <code>subject_id</code> is the ID of the thing you want to have information about. For example, if you want to have information about a repository (in this case the subject type), you'd have to pass the ID of the repository you want to have information about.</p>
<p>In my opinion, it's a bit confusing that the A... | Getting the subject_id for the subject_type GitHub User API | javascript|github-actions|github-api | 0 | 42 | 1 | 72,167,680 | 72,167,680 | 1 | true | 2022-05-08T19:37:50.530Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Getting the subject_id for the subject_type GitHub User API<p>Using the GitHub API via Octokit.js and looking at the docs for <code>getContextForUser</code> ... |
72,178,607 | Mock a method that returns a static variable<p>I am trying to mock the following line:</p>
<pre><code>for (S3ObjectSummary objectSummary : S3Objects.withPrefix(s3, s3URI.getBucket(), s3URI.getKey())) {
// some code
}
</code></pre>
<p>How do I go about mocking S3Objects.withPrefix? As per AWS documentation, the ret... | <pre class="lang-java prettyprint-override"><code>.thenReturn(any(S3Objects.class)) /* bad */
</code></pre>
<p>In Mockito syntax, including in PowerMockito, you can't use <code>any</code> in <code>thenVerb</code> or <code>doVerb</code> methods like <code>thenReturn</code>. <code>any</code> can only stand in for an arg... | Mock a method that returns a static variable | java|amazon-web-services|amazon-s3|mockito|powermockito | 0 | 78 | 1 | 72,179,418 | 72,179,418 | 1 | true | 2022-05-09T21:58:43.800Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Mock a method that returns a static variable<p>I am trying to mock the following line:</p>
<pre><code>for (S3ObjectSummary objectSummary : S3Objects.withPref... |
72,174,178 | Filtering on columns partitioning on unique id without duplicates<p>I am trying to create a rule to filter on events based on a partition, and I am trying to do it in a better way than the one I am doing:</p>
<p>I have the following events table:</p>
<pre class="lang-sql prettyprint-override"><code>EVENT_ID,USER_PROPER... | <p>You can try <code>first_value</code> ordered by the priority requested. Also you can flag the rows you want with <code>case</code> and <code>row_number</code></p>
<pre><code>select
EVENT_ID,
USER_PROPERTIES_KEY,
USER_PROPERTIES_VALUE,
country_code
from (
select
EVENT_ID,
USER_PROPERTIES_KEY... | Filtering on columns partitioning on unique id without duplicates | sql|aggregation | 0 | 51 | 1 | 72,176,126 | 72,176,126 | 1 | true | 2022-05-09T15:05:38.533Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Filtering on columns partitioning on unique id without duplicates<p>I am trying to create a rule to filter on events based on a partition, and I am trying to... |
72,176,282 | Use Local Variables with a DB2 Query?<p>I am trying to write a DB2 query that makes use of local variables. I really just want the query to be easier to maintain and run.</p>
<p>Here is the base query:</p>
<pre><code>WITH MYTAB (CustomerId, VisitID, Sale, DateTime)
AS
(
VALUES
(1, 1, 'Y', '2021-04-23 20:16:00'::TIME... | <p>Not sure if that is what you are asking but you can have several CTE's in one query:</p>
<pre><code>WITH MYTAB (CustomerId, VisitID, Sale, DateTime) AS
(
VALUES
(1, 1, 'Y', '2021-04-23 20:16:00'::TIMESTAMP)
, (1, 3, 'N', '2021-04-23 21:16:00'::TIMESTAMP)
, (2, 2, 'N', '2021-04-24 20... | Use Local Variables with a DB2 Query? | sql|db2 | 0 | 119 | 1 | 72,176,509 | 72,176,509 | 1 | true | 2022-05-09T17:52:57.997Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Use Local Variables with a DB2 Query?<p>I am trying to write a DB2 query that makes use of local variables. I really just want the query to be easier to main... |
72,162,647 | I can't add the value of an int of a JFrame class with the value of an int of another class "Empresa" in the class "Empresa"<p>here is what I have in the JFrame class</p>
<pre><code> private void btnLLamada1ActionPerformed(java.awt.event.ActionEvent evt) {
empresa = new E... | <p>Regarding,</p>
<blockquote>
<p>"I only call new Empresa() once"</p>
</blockquote>
<p>No, you call <code>new Empresa()</code> <em>whenever</em> the ActionListener code is called, and so each time you try to add minutos to the minT field, you're doing this on a <em>new</em> instance, and leaving the old prev... | I can't add the value of an int of a JFrame class with the value of an int of another class "Empresa" in the class "Empresa" | java | 0 | 40 | 2 | 72,162,855 | 72,162,855 | 1 | true | 2022-05-08T15:44:25.617Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I can't add the value of an int of a JFrame class with the value of an int of another class "Empresa" in the class "Empresa"<p>here is what I have in the JFr... |
72,165,030 | Selenium script searches previous tab's HTML after opening a new tab<p>After opening a new tab using selenium, I tried to look for an element in the new tab – but the script is still searching on the html script from the previous tab. How do I make it so that after I open a new tab, it searches the open tab's HTML inst... | <pre><code>driver.execute_script("window.open('https://www.tunestotube.com/', 'new window')")
driver.switch_to.window( driver.window_handles[1])
theText = driver.find_element(By.XPATH, "/html/body/div[2]/div[2]/div[2]").text
</code></pre>
<p>When you open a tab you get a handle you need to switch b... | Selenium script searches previous tab's HTML after opening a new tab | python|selenium|selenium-webdriver|selenium-chromedriver | 0 | 133 | 2 | 72,165,316 | 72,165,316 | 1 | true | 2022-05-08T20:55:26.120Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Selenium script searches previous tab's HTML after opening a new tab<p>After opening a new tab using selenium, I tried to look for an element in the new tab ... |
72,208,350 | Difficulty in getting elements from a pop up window when using selenium in python<p>I am trying to extract the authors name and his affiliation from the webpage (given below in the code). In some cases, the number of authors can be large and there is a button 'Show_all' which we can click to see all the authors name.</... | <pre><code>names=[x.text for x in driver.find_elements(By.XPATH,"//div[@class='ant-modal-body']//a[@data-test-id]")]
</code></pre>
<p>Should grab all 9 names in that popup without the brackets if that's what you want.</p>
<p>or for with brackets</p>
<pre><code>//div[@class='ant-modal-content']//div[@class='di... | Difficulty in getting elements from a pop up window when using selenium in python | python|python-3.x|selenium|selenium-webdriver|web-scraping | 0 | 39 | 1 | 72,209,339 | 72,209,339 | 1 | true | 2022-05-11T22:42:08.080Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Difficulty in getting elements from a pop up window when using selenium in python<p>I am trying to extract the authors name and his affiliation from the webp... |
72,159,093 | How to print this objects from start() function<p>I created 3 classes: Books, autors and main class. I created start() method and objects in it(the task is requiring). Here my cod please can someone explain it or is there better way to do it?
I create array lists, is there better way to do it? I'm very grateful for any... | <p>Create parameterized constructor for <code>Book</code> & <code>Author</code> with all member variables & then initialize both classes in <code>BookAuthorStorage</code> something like:</p>
<pre><code> Author(String name, String surname, int age, String gender,String email, String book){
this.name=name;
... | How to print this objects from start() function | java|list|class | 0 | 41 | 2 | 72,159,397 | 72,159,397 | 1 | true | 2022-05-08T07:56:57.633Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to print this objects from start() function<p>I created 3 classes: Books, autors and main class. I created start() method and objects in it(the task is r... |
72,186,780 | Spring Boot Data JPA: Oracle error:- ORA-01867: the interval is invalid<p>For the below query, I am getting an error, <strong>ORA-01867: the interval is invalid</strong></p>
<pre><code> @Query(value="select * from Customer s where s.CUS_ID=:customerid and s.INSERT_TM < systimestamp - INTERVAL ':threshold' MINU... | <p>You might want to do below trick like below to make it work:</p>
<pre><code>@Query"select * from Customer s where s.CUS_ID=:customerid and s.INSERT_TM < systimestamp - :threshold*INTERVAL '1' MINUTE"
@List<Customers> getCustomers(@Param("customerid") String customerid, @Param("thre... | Spring Boot Data JPA: Oracle error:- ORA-01867: the interval is invalid | oracle|spring-boot|spring-data-jpa | 0 | 160 | 1 | 72,187,458 | 72,187,458 | 1 | true | 2022-05-10T12:58:58.807Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Spring Boot Data JPA: Oracle error:- ORA-01867: the interval is invalid<p>For the below query, I am getting an error, <strong>ORA-01867: the interval is inva... |
72,213,067 | Convert a list of Patterns into Predicates using stream<p>I am trying to convert a list of patterns (whose type is <code>string</code>) into predicates and for some reasons my brain keeps ending up with something close to the following code:</p>
<pre><code> List<Predicate> predicates = patterns.stream()
... | <p>You have mentioned that <code>patterns</code> are String, i.e. it might be <code>List<String></code>, so you might want to try below:</p>
<pre><code>List<Predicate> predicates = patterns.stream().map(Pattern::compile).map(Pattern::asPredicate)
.collect(Collectors.toList());
</code></pre>
... | Convert a list of Patterns into Predicates using stream | java-8|java-stream | 0 | 113 | 1 | 72,213,558 | 72,213,558 | 1 | true | 2022-05-12T09:23:21.917Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Convert a list of Patterns into Predicates using stream<p>I am trying to convert a list of patterns (whose type is <code>string</code>) into predicates and f... |
72,194,722 | Converting string to Array (Aggregate mongodb)<p>Im getting random data from my database using the aggregate but apparently some of them have their genre values in string not in array, How can i convert those random data genre from string to array?</p>
<pre><code>const book = await Book.aggregate([
/* This is ju... | <p><code>$sample</code> is for documents instead of embedded array.</p>
<p><strong>Update</strong></p>
<pre><code>db.collection.update({
genre: {
$type: "string"
}
},
[
{
$set: { genre: [ "$genre" ] }
}
],
{
multi: true
})
</code></pre>
<p><a href="https://mongoplayground.net/p/Lim... | Converting string to Array (Aggregate mongodb) | javascript|reactjs|mongodb | 0 | 32 | 1 | 72,194,766 | 72,194,766 | 1 | true | 2022-05-11T02:24:03.150Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Converting string to Array (Aggregate mongodb)<p>Im getting random data from my database using the aggregate but apparently some of them have their genre val... |
72,197,582 | Angular 13 How to Unit Test Interceptor catchError method<p>i'm working on an existing Angular Project and i have the following intercepter with Error Handling.
this is the code :</p>
<pre><code>public intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
const send... | <p>Assuming you're using jasmine for testing:</p>
<ol>
<li>Inject all your test dependencies:</li>
</ol>
<pre class="lang-js prettyprint-override"><code>// Necessary to inject the right HTTP interceptor
const interceptorOf = <T>(type: Type<T>) =>
TestBed
.inject(HTTP_INTERCEPTORS)
.find(interce... | Angular 13 How to Unit Test Interceptor catchError method | angular|unit-testing | 0 | 130 | 1 | 72,197,742 | 72,197,742 | 1 | true | 2022-05-11T08:11:34.863Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Angular 13 How to Unit Test Interceptor catchError method<p>i'm working on an existing Angular Project and i have the following intercepter with Error Handli... |
72,193,617 | how to make a fully generic MUX in VHDL 93<p>I would like to synthesis a generic MUX with two generics :</p>
<ul>
<li>addressSize (in number of words)</li>
<li>wordSize (in bits)</li>
</ul>
<p>This seems fairly easy as per these very similar question : <a href="https://stackoverflow.com/questions/34590157/generic-mux-a... | <p>I understand what you think you want, however, for a small combinational logic block like this, I would use a function instead and then use overloading to define the a Mux function for each Mux size you need:</p>
<pre><code>function Mux (
sel : std_logic ;
A1 : std_logic_vector ;
A2 : std_logic_vect... | how to make a fully generic MUX in VHDL 93 | vhdl | 0 | 93 | 1 | 72,194,099 | 72,194,099 | 1 | true | 2022-05-10T22:37:20.257Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to make a fully generic MUX in VHDL 93<p>I would like to synthesis a generic MUX with two generics :</p>
<ul>
<li>addressSize (in number of words)</li>
<... |
72,146,339 | How can I add line breaks to the prompt in a google apps script dialogue box?<p>I'm attempting to provide a multi-line prompt message in a dialogue box using g-app script.</p>
<p>The resulting dialogue box would be:</p>
<hr />
<p>Content of line 1.</p>
<p>Content of line 2.</p>
<p>Content of line 3.</p>
<p>Are you sure... | <p><strong>Try:</strong></p>
<pre><code>function myFunction() {
const ui = DocumentApp.getUi();
const line1 = 'Content of line 1.';
const line2 = 'Content of line 2.';
const line3 = 'Content of line 3';
const dialogueMessage = `${line1}\n${line2}\n${line3}`
const result = ui.alert(
`${dialogueMe... | How can I add line breaks to the prompt in a google apps script dialogue box? | google-apps-script | 0 | 64 | 1 | 72,146,502 | 72,146,502 | 1 | true | 2022-05-06T19:10:39.893Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I add line breaks to the prompt in a google apps script dialogue box?<p>I'm attempting to provide a multi-line prompt message in a dialogue box using... |
72,218,901 | Get value by key from json array<p>I have a few json arrays</p>
<pre><code>[{"key":"country","value":"aaa"},{"key":"region","value":"a"},{"key":"city","value":"a1"}]
[{"key":"city"... | <p>Using UDF we can handle this easily. In the below code I have created a map using a UDF. I hope this will suffice the need</p>
<pre><code>import org.apache.spark.sql.types._
import org.apache.spark.sql.functions._
val df1 = spark.read.format("text").load("file path")
val schema = ArrayType(Struct... | Get value by key from json array | json|scala|apache-spark | 0 | 82 | 1 | 72,221,574 | 72,221,574 | 1 | true | 2022-05-12T16:09:02.840Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Get value by key from json array<p>I have a few json arrays</p>
<pre><code>[{"key":"country","value":"aaa"},{"ke... |
72,139,570 | Flutter User ColorFiltered to dark image with matrix<p>I want in flutter to user ColorFiltered, so i can make jpg image dark here is my code but i didn't get the right result, i don't understand matrix and how to change color this code was from internet, please any idea will be welcome.</p>
<pre><code>ColorFiltered(
... | <p>If you just want to make your image darker the better solution is probably just putting a transparent black <code>Container</code> over your image with a <code>Stack</code> widget:</p>
<pre class="lang-dart prettyprint-override"><code>Stack(children: <Widget>[
Image.network('https://picsum.photos/250?image=9... | Flutter User ColorFiltered to dark image with matrix | flutter | 0 | 217 | 1 | 72,142,611 | 72,142,611 | 1 | true | 2022-05-06T09:54:53.170Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Flutter User ColorFiltered to dark image with matrix<p>I want in flutter to user ColorFiltered, so i can make jpg image dark here is my code but i didn't get... |
72,175,524 | Can I create Windows Desktop x86 application on M1 mac?<p>I own M1 MacBook and I need to create windows desktop app that will work also on windows surface and other intel machines as desktop application. I know there is WPF and windows forms (used them on windows machines in the past) to do that or some others like xam... | <p>After further research it look like it's not possible to create intel windows executable on M1 cpu at all. So basically you need two computers to do that.</p>
<blockquote>
<p>As @adv12 wrote in comment looks like Avalonia is good choice but I
didn't tested it yet or .NET MAUI and also possibly Flutter desktop
could ... | Can I create Windows Desktop x86 application on M1 mac? | wpf|windows|winforms|xamarin.forms|apple-m1 | 0 | 435 | 1 | 72,177,053 | 72,177,053 | 1 | true | 2022-05-09T16:46:03.420Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Can I create Windows Desktop x86 application on M1 mac?<p>I own M1 MacBook and I need to create windows desktop app that will work also on windows surface an... |
72,156,365 | Which function will be called a second time when a firebase transcation fails the first time?<p>The <a href="https://firebase.google.com/docs/firestore/manage-data/transactions#transactions" rel="nofollow noreferrer">Firebase documentation</a> claims:</p>
<blockquote>
<p>A function calling a transaction (transaction fu... | <p>There's no way the Firestore SDK can invoke your <code>outerFunc</code> (let alone multiple times), but your <code>innerFunc</code> callback may be called multiple times by the Firestore SDK indeed.</p>
<p>If you find the documentation confusing, please file feedback on the page itself. There should be a link for th... | Which function will be called a second time when a firebase transcation fails the first time? | javascript|firebase|google-cloud-firestore | 0 | 30 | 1 | 72,157,697 | 72,157,697 | 1 | true | 2022-05-07T21:04:16.020Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Which function will be called a second time when a firebase transcation fails the first time?<p>The <a href="https://firebase.google.com/docs/firestore/manag... |
72,148,542 | SwiftUI, AppStorage and using Picker in TabViews<p>I am trying to save a small amount of data with picker using AppStorage across multiple views. However the issue I'm running into is that when I select one value and link to AppStorage it changes the value for all the others. What I want is to save the value for each s... | <p>I see that you have decided to create a property on your <code>Animals</code> class called <code>id</code>. Happily, this is the perfect thing to use to save unique <code>UserDefaults</code> values for each <code>Animals</code> object.</p>
<p>You can do something like this:</p>
<pre><code>struct AnimalSelectionView:... | SwiftUI, AppStorage and using Picker in TabViews | swiftui|picker|tabview|swiftui-tabview|appstorage | 0 | 146 | 1 | 72,148,905 | 72,148,905 | 1 | true | 2022-05-07T00:23:34.243Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SwiftUI, AppStorage and using Picker in TabViews<p>I am trying to save a small amount of data with picker using AppStorage across multiple views. However the... |
72,230,851 | What is the best mechanism to send data through queues in a multithreaded program?<p>I am making a multi-threaded application, where a main process sends messages to the appropriate thread through a queue. My doubt is in the part of the thread: the solution that I have found listens constantly (up to a limit, that's wh... | <p>Your code is spinning and waiting for no reason, which is naturally going to hurt performance; you should not be doing this in your own code at all. Instead use the timeout functionality in <code>queue.Queue</code> to handle your timeouts.</p>
<p>For example, <code>getUpdateFromQueue</code> doesn't need to loop and... | What is the best mechanism to send data through queues in a multithreaded program? | python|multithreading|queue|message-queue | 0 | 40 | 1 | 72,240,896 | 72,240,896 | 1 | true | 2022-05-13T14:02:12.787Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What is the best mechanism to send data through queues in a multithreaded program?<p>I am making a multi-threaded application, where a main process sends mes... |
72,193,832 | In Spark Scala, how to create a column with substring() using locate() as a parameter?<p>I have a dataset that is like the following:</p>
<pre><code>val df = Seq("samb id 12", "car id 13", "lxu id 88").toDF("list")
</code></pre>
<p><a href="https://i.stack.imgur.com/OlLej.png" re... | <p>It is not clear if you want <em>the third item</em> or <em>the first number</em> from the list, but here are a couple of examples which should help:</p>
<pre><code>// Assign sample data to dataframe
val df = Seq("samb id 12", "car id 13", "lxu id 88").toDF("list")
df
.wit... | In Spark Scala, how to create a column with substring() using locate() as a parameter? | scala|apache-spark|apache-spark-sql|databricks | 0 | 369 | 1 | 72,193,966 | 72,193,966 | 1 | true | 2022-05-10T23:12:03.200Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
In Spark Scala, how to create a column with substring() using locate() as a parameter?<p>I have a dataset that is like the following:</p>
<pre><code>val df =... |
72,232,271 | Get average of sum of grouped values with LINQ<p>I have an IEnumerable with fields Name(string) and Amount(ulong).
I want to get a single LINQ query to group those elements by Name and then get their sum and average of that sum.</p>
<p>To get a sum of groupped elements I did something like this</p>
<pre><code>collectio... | <p>You should be able to add another member to the anonymous type to return the average, similar to how you return the sum.</p>
<pre><code>collection.GroupBy(x => x.Name)
.Select(x => new {
Key = x.Key,
Sum = x.Sum(e => Int32.Parse(e.Amount.ToString()),
Avg = x.Average(e => Int3... | Get average of sum of grouped values with LINQ | c#|linq | 0 | 42 | 1 | 72,232,352 | 72,232,352 | 1 | true | 2022-05-13T15:48:21.550Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Get average of sum of grouped values with LINQ<p>I have an IEnumerable with fields Name(string) and Amount(ulong).
I want to get a single LINQ query to group... |
72,146,075 | Find the total amount for each day. Amount calculated from all previous days if day is not Monday<p>This was a question asked in a BI Engineer interview. I could not solve it and still scratching my head around it. Although, I used lag window function using case statements, but the interviewer did not seem to get impre... | <p>The window function <code>sum() over()</code> should help here. Also note that I use <code>SET DATEFIRST 1</code> to set Monday as the the first day of the week.</p>
<p><strong>Example or <a href="https://dbfiddle.uk/?rdbms=sqlserver_2016&fiddle=d956624b9ef5eaf5b286dda7c66462ba" rel="nofollow noreferrer">dbFid... | Find the total amount for each day. Amount calculated from all previous days if day is not Monday | sql|sql-server|business-intelligence | 0 | 43 | 2 | 72,146,175 | 72,146,175 | 1 | true | 2022-05-06T18:43:48.257Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Find the total amount for each day. Amount calculated from all previous days if day is not Monday<p>This was a question asked in a BI Engineer interview. I c... |
72,180,944 | How to plot a figure of power and true value of unknown parameter in R?<p>Assume that iid random sample <code>X_i\sim Bernoulli(\pi)</code> for <code>i=1,\dots, 100</code> and sample size is 100. We want to do a hypothesis test that
<code>H_0: \pi\ge 0.6,\, H_a: \pi<0.6</code>
I want to get a plot of the relation be... | <p>This is more like a code-review.</p>
<p>I <em>think</em> that you thought that you could vectorise over <code>N</code>, <code>pi</code>, and <code>alpha</code>.
I don't think you can that with your current implementation.</p>
<p>Following @Limey's advice:</p>
<pre class="lang-r prettyprint-override"><code>#' Power f... | How to plot a figure of power and true value of unknown parameter in R? | r|plot|hypothesis-test | 0 | 43 | 1 | 72,183,601 | 72,183,601 | 1 | true | 2022-05-10T05:00:50.007Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to plot a figure of power and true value of unknown parameter in R?<p>Assume that iid random sample <code>X_i\sim Bernoulli(\pi)</code> for <code>i=1,\do... |
72,171,186 | How to get the width of an element using ref in react<p>I'm trying to get the width of an element, and to do this I'm using the following...</p>
<pre><code>export default () => {
const { sidebarOpen } = useContext(AuthContext)
const containerRef = useRef()
const getWidth = () => myRef.current.getBoun... | <p>By default, a <code>div</code> element takes the full width of its parent.</p>
<p>I guess you're using flexbox for the sidebar, so when it closes, the element that contains the content (not the sidebar) expands to the full width of the available space.</p>
<p>This might be the issue that you're facing.</p>
<p>The <c... | How to get the width of an element using ref in react | reactjs | 0 | 136 | 1 | 72,171,382 | 72,171,382 | 1 | true | 2022-05-09T11:24:00.760Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to get the width of an element using ref in react<p>I'm trying to get the width of an element, and to do this I'm using the following...</p>
<pre><code>e... |
72,168,096 | forwardRef with custom component and custom hook<p>Edit: Small changes for readability.</p>
<p>I'm new to react and I may be in at the deep end here but I'll go ahead anyway..</p>
<p>I have a Login component in which I want to give the users feedback when the input elements lose focus and/or when the user clicks submit... | <p>One issue that I'm seeing is that in the <code>Input</code> component, you're using <code>props.input</code>, why?</p>
<pre><code>const Input = forwardRef((props, ref) => {
return <input ref={ref} {...props}></input>;
});
</code></pre>
<p>You want exactly the props that you're sending to be assigned... | forwardRef with custom component and custom hook | reactjs|react-forwardref|react-custom-hooks | 0 | 462 | 1 | 72,172,539 | 72,172,539 | 1 | true | 2022-05-09T07:04:52.457Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
forwardRef with custom component and custom hook<p>Edit: Small changes for readability.</p>
<p>I'm new to react and I may be in at the deep end here but I'll... |
72,232,493 | How to make jump faster when player is running?<p>I have a character controller movement where the player can walk, run and jump. However, I facing an issue with the jumping. When jumping while walking, the jump speed looks good. But when jumping while running, the jump speed is too slow compared to the run speed. How ... | <p>I optimized the above code and removed some dublicate. I also noticed that the speed problem was due to the presence of <code>isGrounded</code> in the body of the running condition, which made running dependent on being on the ground. This is the player script:</p>
<pre class="lang-cs prettyprint-override"><code> ... | How to make jump faster when player is running? | unity3d | 0 | 86 | 2 | 72,233,315 | 72,233,315 | 1 | true | 2022-05-13T16:08:12.863Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to make jump faster when player is running?<p>I have a character controller movement where the player can walk, run and jump. However, I facing an issue ... |
72,208,683 | What standard libraries do I need to link to use Raylib with Windows and Clang?<p>I am trying to compile some C++ code with Clang; I am using Raylib. In an attempt to get things working, I have the basic window demo. All my Raylib header files are in a folder called "include" and my libraries are in a folder ... | <h1>Context</h1>
<p><em>I did some digging regarding what happens when you use the Raylib for Windows installer to compile your program. As it turns out, when building a program using the included instance of Notepad++, it literally shows you what it does. For some reason, the compiled program was mistakenly flagged as... | What standard libraries do I need to link to use Raylib with Windows and Clang? | c++|windows|clang|raylib | 0 | 386 | 1 | 72,333,289 | 72,333,289 | 1 | true | 2022-05-11T23:42:53.030Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What standard libraries do I need to link to use Raylib with Windows and Clang?<p>I am trying to compile some C++ code with Clang; I am using Raylib. In an a... |
72,169,122 | How to sort numpy.recarray based on datetime field<p>I have built a recarray with <code>np.rec.fromarrays</code> and following structure :</p>
<pre><code>dtype=np.dtype([('layers', 'U256'), ('hours', datetime.datetime), ('points', 'U256')]))
</code></pre>
<p>I get an object like this :</p>
<pre><code>[('image1.jpg', da... | <p>I tried to reproduce your data</p>
<pre><code>x1=np.array(['image1.jpg', 'image2.jpg'])
x2=np.array([datetime.datetime(1900, 1, 1, 21, 10), datetime.datetime(1900, 1, 1, 21, 9)])
x3=np.array(['mypoints.points', 'mypoints.points'])
array = np.rec.fromarrays([x1, x2, x3], dtype=np.dtype([('layers', 'U256'), ('hou... | How to sort numpy.recarray based on datetime field | python-3.x|numpy|sorting|datetime|recarray | 0 | 33 | 1 | 72,169,729 | 72,169,729 | 1 | true | 2022-05-09T08:36:49.710Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to sort numpy.recarray based on datetime field<p>I have built a recarray with <code>np.rec.fromarrays</code> and following structure :</p>
<pre><code>dty... |
72,225,346 | sass merge selectors on ampersand<p>assuming I have an existing SASS rule like:</p>
<pre class="lang-css prettyprint-override"><code>[dir] .foo {
background-image: ...;
// ... some more
}
</code></pre>
<p>And I want to add specific behaviors for ltr / rtl like:</p>
<pre class="lang-css prettyprint-override"><code... | <p>There is no way that I know to merge selectors as requested.</p>
<p>As you're not allowed to change the parent selector, the only solution I see would be to use the <code>@at-root</code> rule.</p>
<h3>@at-root</h3>
<blockquote>
<p>The @at-root rule is usually written @at-root { ... } and causes everything within it... | sass merge selectors on ampersand | sass|css-selectors | 0 | 29 | 1 | 72,227,706 | 72,227,706 | 1 | true | 2022-05-13T06:35:10.290Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
sass merge selectors on ampersand<p>assuming I have an existing SASS rule like:</p>
<pre class="lang-css prettyprint-override"><code>[dir] .foo {
backgrou... |
72,114,461 | Output list of for loop as variable<p>I am trying to get the output of hostnames based on OS type (want only RedHat server hostnames) set as a variable.</p>
<p>but my code keeps spitting out the string <em>RedHat</em> along with each hostname.</p>
<pre><code>minions=$(salt-run manage.up | cut -a " " -f2)
hos... | <p>By default <code>grep</code> will ouput the results of the pattern match.</p>
<p>If your version of <code>grep</code> supports it ... the <code>-q</code> flag will suppress the output:</p>
<pre><code>... | grep -q RedHat && echo ${minion}; done)
</code></pre>
<p>Alternatively, redirect the output to <code>/... | Output list of for loop as variable | bash|loops|variables | 0 | 25 | 1 | 72,114,581 | 72,114,581 | 1 | true | 2022-05-04T14:11:35.850Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Output list of for loop as variable<p>I am trying to get the output of hostnames based on OS type (want only RedHat server hostnames) set as a variable.</p>
... |
72,144,109 | Extract string in brackets using grep/sed/etc?<p>I am trying to obtain a file location for PHP-FPM, using the following piped commands works:</p>
<pre><code>ps aux | grep php-fpm | grep master
</code></pre>
<p>Results:</p>
<pre class="lang-none prettyprint-override"><code>root 80 0.0 0.6 334912 26072 ? ... | <p>Setup a couple variables to simulate the <code>ps/grep/grep</code> (<code>pgg_out</code>) and <code>ps</code> (<code>ps_out</code>) output:</p>
<pre><code>$ pgg_out='root 80 0.0 0.6 334912 26072 ? Ss 14:18 0:00 php-fpm: master process (/root/.symfony/php/2b1b88a9c9ed1cd796c66569d386096e96bbe2bc/fpm-7.3.33.ini)'
$ ps... | Extract string in brackets using grep/sed/etc? | bash|sed|grep | 0 | 51 | 2 | 72,144,234 | 72,144,234 | 1 | true | 2022-05-06T15:39:01.913Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Extract string in brackets using grep/sed/etc?<p>I am trying to obtain a file location for PHP-FPM, using the following piped commands works:</p>
<pre><code>... |
72,172,185 | increment a number at the end of a string using regex Python<p>I would like to add a regex to this code that will allow me to find that the reference ends with -FT(NUMBER) for example CHB-16236-FT-FT045 and increment this reference to have CHB-16236-FT046</p>
<pre><code>import re
pattern_poteaux = r"(POT|PHT)+[-]... | <p>You need to make use of a replacement callback:</p>
<pre><code># coding=utf8
import re
# Regex to find "-FT{digits}{end of line}
regex = r"(?<=-FT)(\d+)$"
# Increment the digit by one and maintain left pad zeros
def subst(m):
return format(int(m.group(1))+1, '0'+str(len(m.group(1))))
# Test ... | increment a number at the end of a string using regex Python | python|regex | 0 | 92 | 3 | 72,172,396 | 72,172,396 | 1 | true | 2022-05-09T12:39:53.810Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
increment a number at the end of a string using regex Python<p>I would like to add a regex to this code that will allow me to find that the reference ends wi... |
72,145,537 | Exact orthogonalization of vectors in Wolfram<p>What I have is a matrix, I need to orthogonolize its eigen vectors.</p>
<p>That is basically all I need, but in exact form.</p>
<p>So here is my wolfram input</p>
<pre><code>(orthogonolize(eigenvectors({{146, 112, 78, 17, 122}, {112, 86, 60, 13, 94}, {78, 60, 42 , 9, 66},... | <p>Wolfram Mathematica, not WolframAlpha which is a completely different product with different rules and gives different results, given this</p>
<pre><code>FullSimplify[Orthogonalize[Eigenvectors[{
{146, 112, 78, 17, 122}, {112, 86, 60, 13, 94}, {78, 60, 42 , 9, 66},
{17, 13, 9, 2, 14}, {122, 94, 66, 14, 104}}]]]... | Exact orthogonalization of vectors in Wolfram | wolfram-mathematica|linear-algebra | 0 | 65 | 1 | 72,148,787 | 72,148,787 | 1 | true | 2022-05-06T17:48:14.290Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Exact orthogonalization of vectors in Wolfram<p>What I have is a matrix, I need to orthogonolize its eigen vectors.</p>
<p>That is basically all I need, but ... |
72,157,521 | Segfault when employing strtok to split my string (delimited by spaces) into a 2D array of strings, how to avoid?<p>I am writing a program, and I have a need for a 2D array of the different words found in a string. It takes the starting string from a linked list.</p>
<p>At the moment, this is what I have and it is offe... | <p>When <code>strtok</code> returns <code>NULL</code>, The variable <code>token</code> will be <code>NULL</code>.
Then you using <code>token</code> (it might be <code>NULL</code>) as an argument for strcpy.</p> | Segfault when employing strtok to split my string (delimited by spaces) into a 2D array of strings, how to avoid? | c | 0 | 30 | 1 | 72,157,581 | 72,157,581 | 1 | true | 2022-05-08T01:47:07.567Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Segfault when employing strtok to split my string (delimited by spaces) into a 2D array of strings, how to avoid?<p>I am writing a program, and I have a need... |
72,197,979 | Number of palindromic subsequences of length 5<p>Given a String <code>s</code>, return the number of palindromic subsequences of length 5.</p>
<p>Test case 1:</p>
<pre><code>input : "abcdba"
Output : 2
"abcba" and "abdba"
</code></pre>
<p>Test case 2:</p>
<pre><code>input : "aabccba&q... | <ul>
<li>Whenever 2 characters match, we only have to find how many palindromes of length 3 are possible in between these 2 characters.</li>
</ul>
<p><strong>For example:</strong></p>
<pre><code>a bcbc a
^ ^
|_ _ _ |
</code></pre>
<p>In the above example, you can find 2 palindromes of length <code>3</code> which i... | Number of palindromic subsequences of length 5 | string|algorithm | 0 | 6,061 | 1 | 72,210,623 | 72,210,623 | 1 | true | 2022-05-11T08:42:43.600Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Number of palindromic subsequences of length 5<p>Given a String <code>s</code>, return the number of palindromic subsequences of length 5.</p>
<p>Test case 1... |
72,212,787 | Best way to check if database already exists with flask-sqlalchemy, otherwise create<p>I have a database app, and want to create the tables and database on the fly when starting the app for the first time. If the app is restarted, it should only create the database and tables if they do not exist, otherwise ignore this... | <p>You don't have to import os and check whether the DB file is there or not.
Call db.create_all() method inside here:-</p>
<pre class="lang-py prettyprint-override"><code>if __name__ == "__main__":
db.create_all()
Do something here
</code></pre>
<p>It will create sqlite3 DB once. If you are using anoth... | Best way to check if database already exists with flask-sqlalchemy, otherwise create | python|sql|flask|sqlalchemy|flask-sqlalchemy | 0 | 338 | 1 | 72,284,696 | 72,284,696 | 1 | true | 2022-05-12T09:03:20.513Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Best way to check if database already exists with flask-sqlalchemy, otherwise create<p>I have a database app, and want to create the tables and database on t... |
72,221,343 | HYPERLINK not working with particular sheet names<p>I have a workbook - lets call it <code>Book1</code></p>
<p><code>Book1</code> contains 5 worksheets; <code>Sheet1</code>, <code>Sheet1A</code>, <code>Sheet2</code>, <code>Sheet2A</code>, <code>Summary</code></p>
<p>Within the <code>Summary</code> worksheet there is a ... | <p>If they're in the same workbook, then try adding the <code>#</code> & <code>'</code></p>
<pre><code>=HYPERLINK("#'"&"Sheet1A'!A1", "Sheet1A")
=HYPERLINK("#'"&"Sheet2A'!A1", "Sheet2A")
</code></pre> | HYPERLINK not working with particular sheet names | excel|hyperlink|worksheet | 0 | 81 | 1 | 72,221,530 | 72,221,530 | 1 | true | 2022-05-12T19:46:22.093Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
HYPERLINK not working with particular sheet names<p>I have a workbook - lets call it <code>Book1</code></p>
<p><code>Book1</code> contains 5 worksheets; <cod... |
72,190,885 | Pandas: How to evalueate equations in a column<p>Consider the following table:</p>
<pre><code>Obj Bits Eq Result
A 5 5*Bits+20 45
B 10 7*Bits+8 78
C 11 12*Bits+100 232
</code></pre>
<p>I would like to create a column Result which evaluates the expression in column ... | <p>A solution:</p>
<pre><code>df["Result"] = df.apply(lambda x : eval(x["Eq"].replace(r"Bits", str(x["Bits"]))),axis=1)
</code></pre>
<p>Here I interpolate the values of bits in the equation column. So for every row. the string replaces <code>"Bits"</code> in the equati... | Pandas: How to evalueate equations in a column | python|pandas | 0 | 41 | 1 | 72,191,235 | 72,191,235 | 1 | true | 2022-05-10T17:46:58.363Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pandas: How to evalueate equations in a column<p>Consider the following table:</p>
<pre><code>Obj Bits Eq Result
A 5 5*Bits+20 ... |
72,178,570 | Snowflake Precision Problems in Query Result<p><strong>Question:</strong> How do I fix this? Tried casting and all sorts of tricks but nothing seems to fix it while keeping the table the same.</p>
<p><strong>Bonus Question:</strong> Why is this happening, and does it happen in other RDBMS? Should I be regretting Snowfl... | <p>So packing it into one block:</p>
<pre><code>
with testbug(id, val) as (
select * from values
(1, 0.000::float),
(2, 0.000::float),
(3, 0.001::float),
(4, 0.000::float),
(5, 0.000::float),
(6, 0.000::float),
(7, 0.000::float),
(8, 0.000::float),
(9, 0.000::float),
... | Snowflake Precision Problems in Query Result | sql|snowflake-cloud-data-platform|nested-queries | 0 | 49 | 1 | 72,178,673 | 72,178,673 | 1 | true | 2022-05-09T21:53:59.303Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Snowflake Precision Problems in Query Result<p><strong>Question:</strong> How do I fix this? Tried casting and all sorts of tricks but nothing seems to fix i... |
72,195,217 | Snowflake call a stored procedure inside a loop N times<p>I have a snowflake sproc that runs on 4 hours of data at a time and outputs entries for the first hour.</p>
<p>It has 3 params i.e start_hour, end_hour and output table name.</p>
<p>I want to run this for a full day in a loop and I am trying to write the followi... | <p>You call does not have a closing parent and semicolon, and your times are not recognized</p>
<p>try:</p>
<pre><code>create procedure abc_daily()
returns varchar
language sql
as
$$
declare
iteration_limit integer default 24;
counter integer default 0;
begin
for i in 0 to iteration_limit do
... | Snowflake call a stored procedure inside a loop N times | sql|loops|stored-procedures|snowflake-cloud-data-platform | 0 | 146 | 1 | 72,195,241 | 72,195,241 | 1 | true | 2022-05-11T03:52:49.193Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Snowflake call a stored procedure inside a loop N times<p>I have a snowflake sproc that runs on 4 hours of data at a time and outputs entries for the first h... |
72,197,148 | Snowflake/SQL: create a time-series table such that every ID is visible, and if ID is null, it uses the previous value? (similar to shift)<p>Suppose I have the following table:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th style="text-align: center;">Day</th>
<th style="text-align: center... | <h2>Way One:</h2>
<ul>
<li>first we start with some <code>data</code></li>
<li>then we find <code>the_days</code> in the period we are interested in</li>
<li>then we find the <code>data_start</code> for each id</li>
<li>then we join those values together, and use <code>LAG</code> with the <code>IGNORE NULLS OVER</code>... | Snowflake/SQL: create a time-series table such that every ID is visible, and if ID is null, it uses the previous value? (similar to shift) | sql|snowflake-cloud-data-platform | 0 | 152 | 1 | 72,197,609 | 72,197,609 | 1 | true | 2022-05-11T07:38:31.367Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Snowflake/SQL: create a time-series table such that every ID is visible, and if ID is null, it uses the previous value? (similar to shift)<p>Suppose I have t... |
72,211,012 | Dropping df 's rows inside an iterrows() function does'nt work<p>I have a pandas dataframe df1 and I want to create a new df2 with columns created from df1 's rows values :</p>
<pre><code> DAT_RUN DAT_FORECAST LIB_SOURCE TEMPERATURE_PREDITE NUM_DEVICE_ID_VISIOGREEN DIFF_HOURS TEMPERATURE_OBSERVEE MonthNum... | <blockquote>
<p>a second line is created : I think that iterrows() does not well managed rows dropped inside loop !?</p>
</blockquote>
<p>Generally speaking, trying to modify an index (or any structure) in an iterative way is a risky exercise, as the structure will change from iteration to iteration, and references won... | Dropping df 's rows inside an iterrows() function does'nt work | python|pandas | 0 | 61 | 1 | 72,212,853 | 72,212,853 | 1 | true | 2022-05-12T06:32:22.690Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Dropping df 's rows inside an iterrows() function does'nt work<p>I have a pandas dataframe df1 and I want to create a new df2 with columns created from df1 '... |
72,183,191 | js react converting dropdown to checkbox filter<p>Hej!</p>
<p>I am a newbie to javascript but was able to implement a dropdown menu filtering my json-data (everything works fine) but when I convert/change it into checkboxes I won't get any results in my result list.</p>
<pre><code>// dropdown
const ContentBuilder = ()... | <p>I hope this solution will be work for you , check this live example</p>
<p><a href="https://codesandbox.io/s/beautiful-hoover-ifvuwz?file=/src/contentBuilder.js:0-2202" rel="nofollow noreferrer">Sandox</a></p>
<p>Use filter logic like this</p>
<pre><code>const filteredData = data.filter(
(x) => x.Sektor === c... | js react converting dropdown to checkbox filter | javascript|reactjs|json|filter|checkbox | 0 | 162 | 2 | 72,198,655 | 72,198,655 | 1 | true | 2022-05-10T08:43:04.123Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
js react converting dropdown to checkbox filter<p>Hej!</p>
<p>I am a newbie to javascript but was able to implement a dropdown menu filtering my json-data (e... |
72,199,730 | QEMU semihosting doesn't produce output<p>I'm trying to set up a testing environment for my project using semihosting within QEMU.
So far I had no issues with <code>hello.c</code> following <a href="https://stackoverflow.com/a/60557319/9836412">this answer</a>, however I'm having trouble getting it to work with CMake.<... | <p>I was unable to find the <code>CMakeLists.lst</code> you are using, but I was able to produce/run <code>hello.elf</code> using the following files:</p>
<p><code>hello.c</code>:</p>
<pre><code>#include <stdlib.h>
#include <stdio.h>
int main(int argc, char** argv)
{
printf("Hello, World!\n")... | QEMU semihosting doesn't produce output | cmake|arm|embedded|qemu|semihosting | 0 | 137 | 1 | 72,209,093 | 72,209,093 | 1 | true | 2022-05-11T10:51:22.580Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
QEMU semihosting doesn't produce output<p>I'm trying to set up a testing environment for my project using semihosting within QEMU.
So far I had no issues wit... |
72,206,666 | Handling forms with multiple actions<p>Let's say I have an Admin page with a list of items, and I have various capabilities to modify those records -- Change its name, Delete it, Clear its contents, etc. For example a row would be rendered similar to the following:</p>
<pre><code>const row =`<tr id="id${this.id... | <p>The short answer is that you can have a</p>
<ol>
<li>The <code>form</code> inside a cell <code>td</code>.</li>
</ol>
<pre class="lang-html prettyprint-override"><code><table>
<tr><td><form>...</form></td></tr>
<tr><td><form>...</form></td>... | Handling forms with multiple actions | javascript|html | 0 | 31 | 1 | 72,207,499 | 72,207,499 | 1 | true | 2022-05-11T19:31:30.313Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Handling forms with multiple actions<p>Let's say I have an Admin page with a list of items, and I have various capabilities to modify those records -- Change... |
72,182,309 | Type checking with an array in Typescript<p>I'm attempting to call the api = <a href="https://pokeapi.co/api/v2/type" rel="nofollow noreferrer">https://pokeapi.co/api/v2/type</a></p>
<p>I wish to display the array in the data using the async pipe.</p>
<p>I'm doing this via the html:</p>
<pre><code><option *ngFor=&qu... | <p>pokemonTypes$ is expected to be an observable, yet your'e initializing it as an empty list.</p>
<p>if you want to init it with empty list, you should init it as an observable which contains empty list like this:</p>
<pre><code>pokemonTypes$ = of([]) as Observable<Filter[]>;
</code></pre> | Type checking with an array in Typescript | angular|rxjs | 0 | 29 | 1 | 72,182,452 | 72,182,452 | 1 | true | 2022-05-10T07:34:26.050Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Type checking with an array in Typescript<p>I'm attempting to call the api = <a href="https://pokeapi.co/api/v2/type" rel="nofollow noreferrer">https://pokea... |
72,226,161 | C# LINQ single query to complete an incomplete model<p>I have a list of incomplete product models. Everyone is missing an owner and a price.
Can these deficiencies be filled with a single query to context? Without this foreach loop?</p>
<pre><code>foreach(var item in products)
{
item.Owner = context.Products.Where(... | <pre class="lang-csharp prettyprint-override"><code>
// build list of Id for which we need data
var idsToUpdate = products.Select(o => o.Id).ToList();
var dataById = Context.Products
// get matching entries (server side)
.Where(x => idsToUpdate.Contains(x.Id))
... | C# LINQ single query to complete an incomplete model | c#|.net|entity-framework|linq | 0 | 118 | 3 | 72,226,310 | 72,226,310 | 1 | true | 2022-05-13T07:53:00.747Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
C# LINQ single query to complete an incomplete model<p>I have a list of incomplete product models. Everyone is missing an owner and a price.
Can these defici... |
72,160,716 | How to comment near environment variable in colab<p>In my colab notebook I would like add some custom parameters and for this I need <code>#@param ecc</code> near to them.</p>
<p>I'm using Jupyter magic commands environment variable <code>%env</code> and the system takes the whole line (comment included) and not only t... | <p>You can not comment inside Collab forms.</p>
<p>But you can combine a comment, slider and env. variable like this:</p>
<pre><code>#@markdown Checkpoint iteration
checkpoint_iter = 30 #@param {type:"integer"}
%env checkpoint_iter = $checkpoint_iter
#@markdown Weight of content image
content_weight = 21.4 ... | How to comment near environment variable in colab | python|google-colaboratory | 0 | 91 | 1 | 72,212,909 | 72,212,909 | 1 | true | 2022-05-08T11:51:56.520Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to comment near environment variable in colab<p>In my colab notebook I would like add some custom parameters and for this I need <code>#@param ecc</code>... |
72,144,340 | How to return the range of values shared between two data frames in R?<p>I have several data frames that have the same columns names, and <code>ID</code>
, the following to are the start <code>from</code> and end <code>to</code> of a range and <code>group</code> label from each of them.</p>
<p>What I want is to find wh... | <p>We can play with the idea that the starting and ending points are in different columns and the ranges for the same group (a and b) do not overlap. This is my solution. I have called 'point_1' and 'point_2' your mutated 'from' and 'to' for clarity.</p>
<p>You can bind the two dataframes and compare the <code>from</co... | How to return the range of values shared between two data frames in R? | r|dataframe|dplyr|range|tidyr | 0 | 71 | 1 | 72,146,508 | 72,146,508 | 1 | true | 2022-05-06T15:56:24.393Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to return the range of values shared between two data frames in R?<p>I have several data frames that have the same columns names, and <code>ID</code>
, t... |
72,201,663 | R: Sumif equivalent from one dataframe to another<p>I have two dataframes that look somewhat like this (they're much bigger)</p>
<pre><code>df1 <- data.frame(center = c("5012","5012","5025"),
product = c("Apple","Grape","Apple"),
... | <p>Similar to @MrFlick commented but I would prefer to <em>first</em> <code>summarise</code> in/works with <code>df2</code> and <em>then</em> add the resulting column to <code>df1</code>. But outcome and performance are the same. As @r2evans pointed out:</p>
<pre><code>library(tidyverse)
df2 %>%
group_by(center, ... | R: Sumif equivalent from one dataframe to another | r|dataframe|dplyr|sum | 0 | 54 | 1 | 72,202,952 | 72,202,952 | 1 | true | 2022-05-11T13:09:46.847Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
R: Sumif equivalent from one dataframe to another<p>I have two dataframes that look somewhat like this (they're much bigger)</p>
<pre><code>df1 <- data.fr... |
72,183,544 | Plotly and ggplot2<p>I am working with Plotly library. Below you can see the code for producing Treemap.</p>
<pre><code>library(plotly)
library(dplyr)
dt=data.frame(
types= rep("stories",10),
kind= c('kind_1','kind_2','kind_3','kind_1','kind_2','kind_3','kind_1','kind_2','kind_3','kind_1'... | <p>So the default font for <code>ggplot</code> is Arial/Helvetica. You can change the font in <code>plotly</code> by adding <code>font</code> in your <code>layout</code>. You can use the following code:</p>
<pre><code>library(plotly)
t <- list(
family = "Arial")
Treemap<-plot_ly(data = dt,
... | Plotly and ggplot2 | r|ggplot2|plotly | 0 | 30 | 1 | 72,183,789 | 72,183,789 | 1 | true | 2022-05-10T09:08:25.587Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Plotly and ggplot2<p>I am working with Plotly library. Below you can see the code for producing Treemap.</p>
<pre><code>library(plotly)
library(dplyr)
dt=da... |
72,197,326 | Using VBA's onboard sort function<p>I want to sort an array and since I am lazy I wanted to use the onboard sort function of EXCEL/VBA.
According to the official MS Office support worksheetfunctions.sort should also be working with arrays, see <a href="https://support.microsoft.com/en-us/office/sort-function-22f63bd0-c... | <p>Your problem is connected to the fourth function parameter...</p>
<p>It is <code>Optional</code>, but its makes sorting <strong>by rows</strong> if not used (<code>False</code>). Since you try sorting <strong>a 1D array</strong> not having any row, it does not sort anything.</p>
<p>You should use:</p>
<pre><code> ... | Using VBA's onboard sort function | vba|sorting|worksheet-function | 0 | 55 | 1 | 72,197,694 | 72,197,694 | 1 | true | 2022-05-11T07:51:49.450Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Using VBA's onboard sort function<p>I want to sort an array and since I am lazy I wanted to use the onboard sort function of EXCEL/VBA.
According to the offi... |
72,035,755 | Mount ADLS Gen2 Storage - File must be dbfs or s3n: /<p>I want to mount ADLS Gen2 Storage in Databricks with this code:</p>
<pre><code>%python
configs = {
"fs.azure.account.key.<storage-account-name>.dfs.core.windows.net": <storage-account-key>,
"spark.hadoop.fs.azure.account.key.<sto... | <blockquote>
<p><strong>Mount ADLS Gen2 Storage in Databrick</strong></p>
</blockquote>
<p>There are two scenarios you can Mount and implement ADLS Gen2 Storage in Databrick.</p>
<blockquote>
<p><strong>Scenario 1:</strong></p>
</blockquote>
<p>Directly take the Access key from ADLS Gen2 Blob Storage past in <code><... | Mount ADLS Gen2 Storage - File must be dbfs or s3n: / | apache-spark|pyspark|azure-databricks | 0 | 265 | 1 | 72,036,988 | 72,036,988 | 1 | true | 2022-04-27T21:58:22.400Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Mount ADLS Gen2 Storage - File must be dbfs or s3n: /<p>I want to mount ADLS Gen2 Storage in Databricks with this code:</p>
<pre><code>%python
configs = {
... |
72,204,816 | Displaying multiple graphs from networkx in a table<p>I've been playing around with the random graph feature of networkx as seen here with the Erdos-Renyi graph:</p>
<pre><code>G = nx.gnp_random_graph(n, p, seed=None, directed=False)
</code></pre>
<p>I can then draw the graph with</p>
<pre><code>nx.draw
</code></pre>
... | <p>If I understand correclty, you can use subplots to achieve what you want:</p>
<pre><code>fig, axes = plt.subplots(nrows=3, ncols=3)
for ax in axes.ravel():
G = nx.gnp_random_graph(10,10, seed=None, directed=False)
nx.draw_networkx(G, ax=ax)
</code></pre>
<p>Edit:</p>
<p>You can change the size of the figure... | Displaying multiple graphs from networkx in a table | python|plot|networkx | 0 | 34 | 1 | 72,205,168 | 72,205,168 | 1 | true | 2022-05-11T16:49:47.033Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Displaying multiple graphs from networkx in a table<p>I've been playing around with the random graph feature of networkx as seen here with the Erdos-Renyi gr... |
72,210,368 | React Ref null on conditional render<p>React ref animationRef is null whenever I conditionally render an element. It works fine outside of the condition. Is there any way to get the ref to have a value?</p>
<pre><code>const When =
(props: { children: React.ReactElement, condition: boolean })
: React.ReactEl... | <p>React state updates are not synchronous.</p>
<p>When you call setState, you're requesting that React update the state. The actual state update happens later. This means that immediately after the <code>setState</code> call, the element</p>
<pre><code><span className="cursor" ref={this.animationRef} />... | React Ref null on conditional render | reactjs|typescript | 0 | 634 | 2 | 72,211,384 | 72,211,384 | 1 | true | 2022-05-12T05:08:54.267Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
React Ref null on conditional render<p>React ref animationRef is null whenever I conditionally render an element. It works fine outside of the condition. Is ... |
72,229,892 | Upgrade Odoo V12 --> V15 (CE)<p>Currently, I'm using Odoo 12 community version on my local system now I want to upgrade from Odoo 12.0 to Odoo 15.0 (CE).</p>
<p>I tried online but it's asking Enterprise subscription code.</p>
<p>When I tried with command as given below giving me following error.
python3.7 <(curl -s ... | <p>Follow the steps described in <a href="https://oca.github.io/OpenUpgrade/migration_details.html#running-the-migration" rel="nofollow noreferrer">Running the migration</a>.</p>
<p>For versions earlier than 14.0, you will need to run the OpenUpgrade fork rather than Odoo itself.</p>
<p>First, you will need to upgrade ... | Upgrade Odoo V12 --> V15 (CE) | python-3.x|odoo|odoo-12|odoo-15 | 0 | 420 | 2 | 72,286,181 | 72,286,181 | 1 | true | 2022-05-13T12:49:51.153Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Upgrade Odoo V12 --> V15 (CE)<p>Currently, I'm using Odoo 12 community version on my local system now I want to upgrade from Odoo 12.0 to Odoo 15.0 (CE).</p>... |
72,222,242 | Change the keyboard type for a TextFormField in a Form<p>I have a text form that accepts letters and numbers and the keyboard changes dynamically. It's working but when I delete the code, the numeric keyboard remains <a href="https://drive.google.com/file/d/1i4K1P8H-Rq11Nq84c99rYNYhPrF23E07/view?usp=sharing" rel="nofol... | <p>That's because it's already open. you will have to do the same steps you did to show it as a numeric keyboard</p>
<p>i.e</p>
<pre><code>else {
FocusScope.of(context).unfocus();
setState(() {
keyboardType = TextInputType.text;
});
Future.delayed(Duration(milliseconds: 150)).then((value) {
FocusScope.of(context).... | Change the keyboard type for a TextFormField in a Form | flutter|dart | 0 | 39 | 1 | 72,222,823 | 72,222,823 | 1 | true | 2022-05-12T21:28:36.677Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Change the keyboard type for a TextFormField in a Form<p>I have a text form that accepts letters and numbers and the keyboard changes dynamically. It's worki... |
72,162,926 | I need to find n best students overall and m best students of each country will group together to form their national group<p>I managed to get the 32 best points. Now I am trying to get the index of 32 best students so that I can show who they are.
The link to my json file is here:</p>
<p><a href="https://drive.google.... | <p>Using the data from your link and downloading to file 'olympiad.json'</p>
<p><strong>Code</strong></p>
<pre><code>import json
def best_students(lst, n=1):
'''
Top n students
'''
return sorted(lst,
key = lambda d: d['point'], # sort based upon points
reverse ... | I need to find n best students overall and m best students of each country will group together to form their national group | python|json|list|loops|sorting | 0 | 105 | 4 | 72,164,684 | 72,164,684 | 1 | true | 2022-05-08T16:14:51.310Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I need to find n best students overall and m best students of each country will group together to form their national group<p>I managed to get the 32 best po... |
72,167,523 | Serilog ExpressionTemplate rename log level and apply formatting<p>I'm trying to use serilog's <code>ExpressionTemplate</code> and write the log level in the following way:</p>
<pre><code>{ "level": "INF", ... }
</code></pre>
<p>I know how to alias <code>@l</code> to level - <code>level: @l</code>
a... | <p>At the time of writing this is <a href="https://github.com/serilog/serilog-expressions/issues/69" rel="nofollow noreferrer">a limitation in Serilog.Expressions</a>, which will hopefully be addressed soon.</p>
<blockquote>
<p><strong>Update:</strong> version 3.4.0-dev-* now on NuGet supports <code>ToString(@l, 'u3')<... | Serilog ExpressionTemplate rename log level and apply formatting | serilog | 0 | 116 | 1 | 72,180,614 | 72,180,614 | 1 | true | 2022-05-09T05:58:08.763Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Serilog ExpressionTemplate rename log level and apply formatting<p>I'm trying to use serilog's <code>ExpressionTemplate</code> and write the log level in the... |
72,154,536 | Parse an Array into a Recycler view from Json with Retrofit<p>Hello i am practicing my kotlin skills with retrofit and recycler views, and i found this type of data in some JSON i found for my practice</p>
<pre><code>"capital":[
"Montevideo"
]
</code></pre>
<p>I know this is an array, and... | <p>Capital is a list so doing a toString() on a list will give you a string of an array like this : "[a,b,c,d,e]".</p>
<p>If you want to print the first item you can just get it and use toString on it : <code>country.capital?.get(0)?.toString()</code>.</p>
<p>If you want to print the entire list without the h... | Parse an Array into a Recycler view from Json with Retrofit | kotlin|android-recyclerview|retrofit | 0 | 104 | 2 | 72,154,599 | 72,154,599 | 1 | true | 2022-05-07T16:40:56.913Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Parse an Array into a Recycler view from Json with Retrofit<p>Hello i am practicing my kotlin skills with retrofit and recycler views, and i found this type ... |
72,139,753 | Cancellation doesn't go as expected<p>The <code>while</code> loop currently blocks the thread as it retries forever until the connection is established. I expect it to retry forever but it shouldn't block the thread (just like if we call StartAsync without awaiting it) and make it possible for us to call StopAsync duri... | <blockquote>
<p>The while loop currently blocks the thread</p>
</blockquote>
<p>Are you sure? because <code>ClientWebSocket.ConnectAsync</code> explicitly states</p>
<blockquote>
<p>This operation will not block. The returned Task object will complete
after the connect request on the ClientWebSocket instance has
comple... | Cancellation doesn't go as expected | c#|.net|cancellationtokensource | 0 | 117 | 1 | 72,141,135 | 72,141,135 | 1 | true | 2022-05-06T10:08:18.820Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Cancellation doesn't go as expected<p>The <code>while</code> loop currently blocks the thread as it retries forever until the connection is established. I ex... |
72,222,613 | How can I create a 2D array of chars with POINTERS in C?<p>I'm trying to create a program which the user inputs the number of items (rows) and give each one of them a name (scanf) with the max of 30 characters.</p>
<p>I want to create this code with pointers of pointers, once that I'm learning this on C.</p>
<p>I'm hav... | <p><code>items</code> was allocated and not <code>columns</code>. And use <code>strcpy</code> to copy the characters.</p>
<pre><code>#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX 31
int main()
{
char **items = NULL, *columns = NULL, name[MAX];
int rows, aux_rows;
... | How can I create a 2D array of chars with POINTERS in C? | arrays|c|string|pointers | 0 | 66 | 2 | 72,222,745 | 72,222,745 | 1 | true | 2022-05-12T22:16:51.773Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I create a 2D array of chars with POINTERS in C?<p>I'm trying to create a program which the user inputs the number of items (rows) and give each one ... |
72,189,945 | Shadow dom children not appeared in DOM<p><strong>My goal there is I want to create a shadow DOM in test ID. However, the problem there is children of my shadow DOM was not appeared in DOM</strong></p>
<pre><code><body>
<p>
The application of braces moves the teeth as a result of force and
p... | <p><code> <div id="test">Test</div></code></p>
<pre class="lang-js prettyprint-override"><code>let test = document.getElementById("test");
test.attachShadow({ mode: "open" });
let shadowHeader = document.createElement("p");
shadowHeader.className = "kit-hea... | Shadow dom children not appeared in DOM | javascript|shadow-dom|chrome-extension-manifest-v3 | 0 | 43 | 1 | 72,191,170 | 72,191,170 | 1 | true | 2022-05-10T16:29:19.357Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Shadow dom children not appeared in DOM<p><strong>My goal there is I want to create a shadow DOM in test ID. However, the problem there is children of my sha... |
72,233,585 | attributeChangedCallback() always called twice ending up with multiple event listeners<p>Playing around with custom elements, I'm trying to get a click event fired depending on custom element attribute's value. But using the <code>attributeChangedCallback()</code> method (along with the <code>connectedCallback()</code>... | <p>It is called <code>attributeChangedCallback</code>, so fires on every <strong>single</strong> attribute change, including init when the element is added to the DOM</p>
<p>Attach listeners in the <code>connectedCallback</code>, but that <strong>can</strong> run again if you move the element in the DOM, so you have to... | attributeChangedCallback() always called twice ending up with multiple event listeners | javascript|html|custom-element | 0 | 137 | 1 | 72,239,316 | 72,239,316 | 1 | true | 2022-05-13T17:45:32.197Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
attributeChangedCallback() always called twice ending up with multiple event listeners<p>Playing around with custom elements, I'm trying to get a click event... |
72,231,375 | how to pass parameter to execute in chef?<p>I'm new to chef. Recently, I'm studying the resources, I got a problem on how to pass parameter to command in execute in chef. Here's the details --
I searched this page -- <a href="https://discourse.chef.io/t/pass-parameter-to-bash-script-and-call-bash-scripts-in-chef-cookbo... | <p>The main issue is the use of single quotes (<code>''</code>) in the <code>command</code>. Single quotes in Ruby don't allow for interpolation of the variable <code>#{execf}</code>. You should rewrite it as:</p>
<pre class="lang-rb prettyprint-override"><code>execute 'e.sh' do
command "/tmp/e.sh #{execf}"... | how to pass parameter to execute in chef? | chef-infra | 0 | 91 | 1 | 72,272,951 | 72,272,951 | 1 | true | 2022-05-13T14:40:35.867Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to pass parameter to execute in chef?<p>I'm new to chef. Recently, I'm studying the resources, I got a problem on how to pass parameter to command in exe... |
72,214,884 | Can I filter by apiVersion in kubectl?<p>I want to find all the kubernetes ingresses that are still <code>apiVersion: networking.k8s.io/v1beta1</code>, because I'm upgraded my kubernetes cluster (EKS) from 1.21 to 1.22 and we should be using <code>networking.k8s.io/v1</code> instead.</p>
<p>I tried</p>
<pre><code>kubec... | <p>You may use <code>go-template</code> to avoid piping to other tools like <code>jq</code>:</p>
<pre><code>kubectl get ingress -A -o go-template='{{range .items}}{{if (eq .apiVersion "networking.k8s.io/v1")}}{{ .metadata.name }}{{"\n"}}{{end}}{{end}}'
</code></pre>
<p>In a bit more readable format... | Can I filter by apiVersion in kubectl? | kubectl | 0 | 88 | 2 | 72,220,660 | 72,220,660 | 1 | true | 2022-05-12T11:40:09.193Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Can I filter by apiVersion in kubectl?<p>I want to find all the kubernetes ingresses that are still <code>apiVersion: networking.k8s.io/v1beta1</code>, becau... |
72,188,238 | Histogram function - Python<p>Looking for someone who can explain this to me:</p>
<pre><code>phase = mod(phase,Nper*2*pi)
cl_phase = arange(0,Nper*2*pi+step,step)
c,p = histogram(phase,cl_phase)
while 0 in c:
step = step*2
cl_phase = arange(0,Nper*2*pi+step,step)
c,p = histogram(phase,cl_phase)
</code></pr... | <p><a href="https://numpy.org/doc/stable/reference/generated/numpy.histogram.html" rel="nofollow noreferrer"><code>histogram()</code></a> function is from <code>numpy</code> library. It doesn't come as a default function in Python.</p>
<p>You can use it by:</p>
<pre><code>import numpy as np
np.histogram(phase,cl_phase)... | Histogram function - Python | python|numpy|histogram | 0 | 57 | 1 | 72,188,345 | 72,188,345 | 1 | true | 2022-05-10T14:30:31.293Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Histogram function - Python<p>Looking for someone who can explain this to me:</p>
<pre><code>phase = mod(phase,Nper*2*pi)
cl_phase = arange(0,Nper*2*pi+step,... |
72,160,987 | Django Rest Framework: TypeError - Direct assignment to the forward side of a many-to-many set is prohibited<p>I have a custom <code>User</code> model and a <code>Group</code> model that are linked by a <code>UserGroup</code> through model (Many to Many relationship):</p>
<p><strong>models.py</strong></p>
<pre><code>cl... | <p>You should specify instance of updated object when you create serializer otherwise serializer's save method will call <code>create</code> not <code>update</code>:</p>
<pre><code>def perform_update(self, serializer):
instance = self.get_object()
serializer=GroupSerializer(instance, data=self.request.data, pa... | Django Rest Framework: TypeError - Direct assignment to the forward side of a many-to-many set is prohibited | python|django|serialization|django-rest-framework|many-to-many | 0 | 262 | 1 | 72,161,854 | 72,161,854 | 1 | true | 2022-05-08T12:29:38.463Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Django Rest Framework: TypeError - Direct assignment to the forward side of a many-to-many set is prohibited<p>I have a custom <code>User</code> model and a ... |
72,222,508 | python regex to print text from a specific pattern to another pattern, but in condition that a specific string should exist in between<p>So I have a file like :</p>
<pre><code><html>
<div>
<h1>HOiihilasdl</h1>
</div>
<script src=https://example.com/file.js></sc... | <p>I am not completely certain what you are going for here. If you are simply going for scenarios such as those you explicitly present in your question, a solution could look as follows, in which you iterate through each line of the file, and keep track of opening/closing tags. Whenever you meet a closing tag, you begi... | python regex to print text from a specific pattern to another pattern, but in condition that a specific string should exist in between | python|html|python-3.10 | 0 | 37 | 1 | 72,222,743 | 72,222,743 | 1 | true | 2022-05-12T22:02:05.247Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
python regex to print text from a specific pattern to another pattern, but in condition that a specific string should exist in between<p>So I have a file lik... |
72,053,561 | Issue on Getting PHP Generated Image By jQuery Ajax Call<p>Can you please take a look at this code and let me know why I am not able to get a PHP generated captcha (image) by Ajax call in jQuery?</p>
<p>What I have in <code>captcha.php</code> is simply this</p>
<pre><code><?php
session_start();
$random_alpha... | <p>The PHP script is sending image headers not the base64 encoded data that you are expecting so try:</p>
<pre><code><?php
session_start();
$random_alpha = md5(rand());
$captcha_code = substr($random_alpha, 0, 6);
$_SESSION["captcha_code"] = $captcha_code;
$target_layer = imagecre... | Issue on Getting PHP Generated Image By jQuery Ajax Call | php|jquery|ajax | 0 | 35 | 2 | 72,053,901 | 72,053,901 | 1 | true | 2022-04-29T06:15:45.707Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Issue on Getting PHP Generated Image By jQuery Ajax Call<p>Can you please take a look at this code and let me know why I am not able to get a PHP generated c... |
72,139,407 | React: Uncaught (in promise) Error: Request failed with status code 400<p>I'm sending a uid a token and two form inputs from formik to my django rest api for a password reset. When i do so i receive a 400 error with a response that i'm missing the new_password1 and new_password2:</p>
<pre><code>{"new_password1&quo... | <p>To un-nest <code>values</code> you can use the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax#spread_in_object_literals" rel="nofollow noreferrer">spread syntax</a>.</p>
<pre class="lang-js prettyprint-override"><code>console.log({ uid, token, ...values });
// {
//... | React: Uncaught (in promise) Error: Request failed with status code 400 | javascript|reactjs|axios | 0 | 250 | 1 | 72,139,796 | 72,139,796 | 1 | true | 2022-05-06T09:42:59.480Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
React: Uncaught (in promise) Error: Request failed with status code 400<p>I'm sending a uid a token and two form inputs from formik to my django rest api for... |
72,140,669 | Vue web component prop not being set through html attribute<p>I've got a vue web component with a numeric prop on it, and through some testing have found that doing something like this doesn't work in setting the prop value...</p>
<pre><code><script src="https://unpkg.com/vue@2"></script>
<scri... | <p>HTML attributes often do not match 1 to 1 with JavaScript
properties. In this scenario the HTML attribute to Vue.js
property translation is similar to that of <code>data-*</code>
attributes.</p>
<blockquote>
<h2><a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/dataset#name_conversion" rel="nofol... | Vue web component prop not being set through html attribute | javascript|vue.js|web-component | 0 | 208 | 2 | 72,147,376 | 72,147,376 | 1 | true | 2022-05-06T11:21:08.773Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Vue web component prop not being set through html attribute<p>I've got a vue web component with a numeric prop on it, and through some testing have found tha... |
72,211,973 | Springboot 2.5.6 gives java.time.temporal.UnsupportedTemporalTypeException: Unsupported field: OffsetSeconds issues<p>Since migration to <code>springboot 2.5.6</code> I have to register our <code>ObjectMapper</code> with <code>JavaTimeModule</code>. However, I am getting the below error for the format <code>"yyyy-... | <p><code>LocalDateTime</code> does not support timezones by definition. Therefore it doesn't support OffsetSeconds.</p>
<p>You should leave off the <code>+0000</code> in the input and the <code>Z</code> in the format. Alternatively, use <code>ZonedDateTime</code> instead.</p>
<p>I don't know which version of Spring B... | Springboot 2.5.6 gives java.time.temporal.UnsupportedTemporalTypeException: Unsupported field: OffsetSeconds issues | java|spring-boot | 0 | 77 | 1 | 72,212,731 | 72,212,731 | 1 | true | 2022-05-12T07:58:43.590Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Springboot 2.5.6 gives java.time.temporal.UnsupportedTemporalTypeException: Unsupported field: OffsetSeconds issues<p>Since migration to <code>springboot 2.5... |
72,182,707 | OData v7 & 8 - Should Composite Keys be in Alpha Order or HasKey when key value binding?<p>Odata seems to want keys in alpha order when using key value binding convention.</p>
<p>The below document suggests it should be in the order defined in HasKeys, as the keys aren't in alpha order.
<a href="https://docs.microsoft.... | <p>Here's the implementation in the OData modelbuilder:</p>
<pre><code>var keys = ((IEnumerable<PropertyConfiguration>)config.Keys)
.Concat(config.EnumKeys)
.OrderBy(p => p.Order)
.ThenBy(p => p.Na... | OData v7 & 8 - Should Composite Keys be in Alpha Order or HasKey when key value binding? | c#|odata|asp.net-core-webapi | 0 | 104 | 1 | 72,208,275 | 72,208,275 | 1 | true | 2022-05-10T08:04:43.983Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
OData v7 & 8 - Should Composite Keys be in Alpha Order or HasKey when key value binding?<p>Odata seems to want keys in alpha order when using key value bindi... |
72,231,301 | JPA-Eclipselink caching nested tables (entities)<p>I am using Java JPA-Eclipselink persistence (v2.6.9) in combination with Apache Tomcat Web Server. I am fetching from database large amount of data from nested tables on each web service invocation. Data in the database is constantly being expanded with new data.
We pr... | <p>The settings you have put on your entity are for entity caching, but complex queries still need to use the database to figure out which entities match read all/list queries. You should still see improvements though as executing this query multiple times will use that entity cache - while the data is still 'fetched' ... | JPA-Eclipselink caching nested tables (entities) | jpa|caching|eclipselink | 0 | 48 | 1 | 72,233,667 | 72,233,667 | 1 | true | 2022-05-13T14:35:54.687Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
JPA-Eclipselink caching nested tables (entities)<p>I am using Java JPA-Eclipselink persistence (v2.6.9) in combination with Apache Tomcat Web Server. I am fe... |
72,236,820 | How to check if all elements in an array are equal using recursion in Python?<p>I am practising recursion and am not sure why my code is failing.</p>
<pre><code>def isEqual(arr, n):
if(n==1):
return arr[n]
return arr[n-1]==isEqual(arr, n-1)
</code></pre>
<p>The logic is quite generic. I assume that I ha... | <p>You are mixing up returning a value v.s equality check. There are many ways to correct it, but here is an example</p>
<pre><code>def isEqual(arr, n):
if(n<=0):
return True
return arr[n-1]==arr[n] and isEqual(arr,n-1)
arr = [5,5,5,5,5,5]
print(isEqual(arr, len(arr)-1))
brr = [1,2,3,4,5]
print(isEqu... | How to check if all elements in an array are equal using recursion in Python? | recursion | 0 | 29 | 1 | 72,236,858 | 72,236,858 | 1 | true | 2022-05-14T02:07:10.507Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to check if all elements in an array are equal using recursion in Python?<p>I am practising recursion and am not sure why my code is failing.</p>
<pre><c... |
72,157,369 | Login system Java and postgresql<p>I've been trying for a week to make it work but I can not find anything good to help me solve the problem.</p>
<p>I try to make an ATM program, the connection with the database is working but I don't know how to check if what I introduced in the program username and password are the s... | <p>So, the core problem is, you're still thinking in a procedural manner, <code>C</code> follows <code>B</code> which follows <code>A</code>, where as most GUIs work in a "event driven" manner, something happens and then you respond to it.</p>
<p>What I mean is, currently you're doing:</p>
<ul>
<li>Show windo... | Login system Java and postgresql | java|postgresql | 0 | 175 | 1 | 72,157,680 | 72,157,680 | 1 | true | 2022-05-08T00:55:43.943Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Login system Java and postgresql<p>I've been trying for a week to make it work but I can not find anything good to help me solve the problem.</p>
<p>I try to... |
72,226,233 | UNDO/REDO for JTextArea<p>I am writing a text editor. And here I ran into a problem. I need to implement UNDO and Redo function for JTextArea. For this I use UndoManager. But, if I cancel or return, then the actions will be canceled or returned one character at a time. How to make it so that actions are canceled or ret... | <p>I did a little bit of googling and I came across <a href="https://stackoverflow.com/questions/11767130/jtextpane-undo-and-redo-whole-words">JTextPane undo and redo whole words</a>, which lead me to <a href="http://java-sl.com/tip_merge_undo_edits.html" rel="nofollow noreferrer">Merging UndoableEdits in one to be und... | UNDO/REDO for JTextArea | java|swing|text | 0 | 35 | 1 | 72,227,594 | 72,227,594 | 1 | true | 2022-05-13T07:58:56.687Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
UNDO/REDO for JTextArea<p>I am writing a text editor. And here I ran into a problem. I need to implement UNDO and Redo function for JTextArea. For this I use... |
72,158,319 | Convert list of phrases into corresponding number<p>I’m working on a GPA calculator and I have a list of each grade a student has in their classes. I need to convert the letter grade (A+, B-, etc.) to it’s corresponding numerical value (4.3, 2.7, etc.)
this is what i have so far:</p>
<pre class="lang-py prettyprint-ove... | <p>You can use <a href="https://pandas.pydata.org/docs/reference/api/pandas.Series.map.html" rel="nofollow noreferrer"><code>Series.map</code></a> to generate numeric grades based on the alpha ones. For example:</p>
<pre class="lang-py prettyprint-override"><code>import pandas as pd
df = pd.DataFrame({ 'name' : ['John'... | Convert list of phrases into corresponding number | python|pandas|list|dictionary | 0 | 51 | 1 | 72,158,337 | 72,158,337 | 1 | true | 2022-05-08T05:24:10.447Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Convert list of phrases into corresponding number<p>I’m working on a GPA calculator and I have a list of each grade a student has in their classes. I need to... |
72,181,761 | Invoke-Command doesn't see local network drives<p>I have two computers: A and B. I'm trying to automate some CI\CD tasks, and my task is to start some process on B remotely, from A. The .exe file itself is on the <code>R</code> drive, which is a local network drive. So I do this:</p>
<pre><code># here $cred has encrypt... | <p>PowerShell Remoting can only access drives by default that are mapped within the system context. Most commonly, this will be letter drives based on attached hardware (whether this be USB, SATA, SCSI, etc.).</p>
<p>Drives mapped in the <em>user</em> context, such as remote drives, are not mapped because a full logon ... | Invoke-Command doesn't see local network drives | windows|powershell|process|remote-access|invoke-command | 0 | 136 | 1 | 72,191,061 | 72,191,061 | 1 | true | 2022-05-10T06:46:19.123Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Invoke-Command doesn't see local network drives<p>I have two computers: A and B. I'm trying to automate some CI\CD tasks, and my task is to start some proces... |
72,234,693 | Modified row spacing in Bootstrap 5<p>I have the following markup.</p>
<pre><code><div class="row">
<div class="col-md-12">
<div class="form-group">
<label class="control-label" for="Truck_Notes">Notes</label>
... | <p>One solution would be to use the <code>my</code> class from Bootstrap for the top and bottom <code>margin</code>. In your example, I added <code>my-3</code> for <code>1rem</code> of top and bottom <code>margin</code> on your <code>textarea</code> element.</p>
<p>The reason the spacing is different on B5 is because <... | Modified row spacing in Bootstrap 5 | html|css|twitter-bootstrap|bootstrap-5 | 0 | 68 | 1 | 72,234,751 | 72,234,751 | 1 | true | 2022-05-13T19:42:46.217Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Modified row spacing in Bootstrap 5<p>I have the following markup.</p>
<pre><code><div class="row">
<div class="col-md-12"&g... |
72,210,084 | Need to filter an JavaScript object<p>I need to filter an JS object as below format. I have some array of Object. every object contain title and data. I need to filter the object. title will not repet in object it will make an array of data and store every data in that.
Object</p>
<pre><code> let results = [
... | <p>This isn't really a <em>filter</em> operation, more of a <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce" rel="nofollow noreferrer"><em>reduce</em></a> job where you want to collect <code>data</code> for the same <code>title</code>.</p>
<p>For that, I'd recommen... | Need to filter an JavaScript object | javascript | 0 | 66 | 3 | 72,210,169 | 72,210,169 | 1 | true | 2022-05-12T04:17:56.603Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Need to filter an JavaScript object<p>I need to filter an JS object as below format. I have some array of Object. every object contain title and data. I need... |
72,176,278 | RegEx for String Validation [x_name1_zded|we3e_name2_235|yyy_name3_3435]<p>I have requirement to check, is getting valid input in the product</p>
<p>Example Product String = "x_name1_zded|we3e_name2_235|yyy_name3_3435"</p>
<p>each protect is delimited with "|".</p>
<p>each productInfo is delimited w... | <p>Suppose, each details section can contain a-z letters and 0-9 digits, at least 1 symbol. Detail section will be <code>[a-z0-9]+</code>. We have to have at least 3 section divided by <code>_</code> - there is one section, then at least 2 sequences of "delimiter + section" (pseudocode):</p>
<pre><code>sectio... | RegEx for String Validation [x_name1_zded|we3e_name2_235|yyy_name3_3435] | regex|string|json-schema-validator | 0 | 36 | 1 | 72,176,704 | 72,176,704 | 1 | true | 2022-05-09T17:52:29.667Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
RegEx for String Validation [x_name1_zded|we3e_name2_235|yyy_name3_3435]<p>I have requirement to check, is getting valid input in the product</p>
<p>Example ... |
72,152,556 | Ignoring a substring/linebreak character in CLI arguments using argparse<p>I'm using the argparse module in Python for the first time, and I haven't touched the language in over a year.
I need to solve a bug in a todo list where, if a new task is inputted with a line break, it creates two entries instead of one, e.g.:<... | <p>Remove every newline from the arguments then pass them to <code>parse_args</code> or <code>parse_known_args</code>:</p>
<pre><code>ArgumentParser.parse_args([arg.replace("\n", "") for arg in sys.argv[1:]])
</code></pre>
<p>As <code>ArgumentParser</code> uses <code>sys.argv</code> by default (<a h... | Ignoring a substring/linebreak character in CLI arguments using argparse | python|python-3.x|argparse | 0 | 28 | 1 | 72,153,470 | 72,153,470 | 1 | true | 2022-05-07T12:36:19.030Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Ignoring a substring/linebreak character in CLI arguments using argparse<p>I'm using the argparse module in Python for the first time, and I haven't touched ... |
72,200,607 | HOWTO configure some settings by default using a silent/unattended msi installer on WIX<p>I have an msi installer which i have created using <a href="https://wixtoolset.org/" rel="nofollow noreferrer">wixtoolset</a>.</p>
<p>Now what I am trying to do is to configure some settings of my app just in the moment I launch t... | <p>This is a very broad question. Your title says settings but your question mentions features. Windows Installer has a property called ADDLOCAL which can be used to set which features to install.</p>
<p>msiexec /i foo.msi ADDLOCAL=ALL /qn <- install all features silently</p>
<p>msiexec /i foo.msi ADDLOCAL=A,B,C... | HOWTO configure some settings by default using a silent/unattended msi installer on WIX | wix|windows-installer | 0 | 58 | 1 | 72,204,667 | 72,204,667 | 1 | true | 2022-05-11T11:54:35.217Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
HOWTO configure some settings by default using a silent/unattended msi installer on WIX<p>I have an msi installer which i have created using <a href="https:/... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.