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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
73,030,943 | How to draw a rectangle on a circular barplot using matplotlib<p>I am trying to draw a rectangle on a circular barplot generated by matplotlib. There are numerous tutorials online but they only cover regular 2D plots, the same code creates circles in circular bar plots rather than rectangles.</p>
<p>This is what I am t... | <p>Here's one way:</p>
<pre><code>import matplotlib.patches as patches
fig, ax = plt.subplots(subplot_kw={'projection': 'polar'})
axin = ax.inset_axes([0.0, 0.0, 1, 1])
axin.axis('off')
rect = patches.Rectangle((0.5, 0.25), 0.5, 0.25, linewidth=2, edgecolor='r', facecolor='none')
axin.add_patch(rect)
</code></pre>
<p>... | How to draw a rectangle on a circular barplot using matplotlib | python|matplotlib|bar-chart|plot-annotations | 0 | 45 | 1 | 73,031,479 | 73,031,479 | 0 | true | 2022-07-19T03:54:33.330Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to draw a rectangle on a circular barplot using matplotlib<p>I am trying to draw a rectangle on a circular barplot generated by matplotlib. There are num... |
73,026,928 | Include<Eigen/Dense> lead to fatal error: 'Eigen/Dense' file not found<p>I am faced with the problem that VSCode does not see Eigen
when I run the program in the debug mode, I get the following error</p>
<pre><code>fatal error: 'eigen/Eigen/Dense' file not found
</code></pre>
<p>However, I have added the appropriate pa... | <p>Lol
Guys I just made a space between the "-I" and the "/Users/..." in the task.json</p> | Include<Eigen/Dense> lead to fatal error: 'Eigen/Dense' file not found | visual-studio-code|include|eigen|vscode-debugger | 0 | 45 | 1 | 73,033,877 | 73,033,877 | 0 | true | 2022-07-18T18:24:06.813Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Include<Eigen/Dense> lead to fatal error: 'Eigen/Dense' file not found<p>I am faced with the problem that VSCode does not see Eigen
when I run the program in... |
73,027,479 | Odd behavior in Java EE Web App when using PrimeFaces Components<h2>The issue:</h2>
<p>I have two <code><p:selectOneMenu></code> and when I drop the first menu down, I can not select any items in the menu, and once I click out of the menu I can not open the menu again. Then, if I open the second <code><p:selec... | <h2>The solution</h2>
<p>If you see in <code>index.xhtml</code>, I am including a javascript file from datatables. That particular version of the JS file from data tables included its own jQuery version, which was conflicting with primefaces. I re-downloaded the datatables java script with out jQuery selected and it is... | Odd behavior in Java EE Web App when using PrimeFaces Components | jsf|primefaces | 1 | 45 | 1 | 73,051,937 | 73,051,937 | 0 | true | 2022-07-18T19:13:12.177Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Odd behavior in Java EE Web App when using PrimeFaces Components<h2>The issue:</h2>
<p>I have two <code><p:selectOneMenu></code> and when I drop the fi... |
73,000,949 | Mongoose pre/post middleware not getting called for model.save<p>I looked at the <a href="https://mongoosejs.com/docs/middleware.html#pre" rel="nofollow noreferrer">documentation</a> and can't figure out the problem. The pre & post middleware doesn't seem to be working. I have updated node and all of my modules.</p... | <p>I figured it out. I wasn't filling all of the <code>required</code> fields, and I was going planning on doing so in the <code>pre.save</code> middleware function. I was getting an error "Path <code>fieldName</code> is required" but there was no stack trace, so I didn't know that the issue was with the <cod... | Mongoose pre/post middleware not getting called for model.save | javascript|node.js|mongoose|mongoose-schema | 0 | 45 | 1 | 73,115,124 | 73,115,124 | 0 | true | 2022-07-16T01:33:12.700Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Mongoose pre/post middleware not getting called for model.save<p>I looked at the <a href="https://mongoosejs.com/docs/middleware.html#pre" rel="nofollow nore... |
72,916,140 | Object is possibly 'null'.ts(2531) - React Typescript<p>I fetch API data by axios. Everything is working correct. I try to convert js to tsx. The code for fetching data is briefly as below:</p>
<pre><code>let list = null;
...
list = response.data
...
console.log(list.list[2]) //here the problem, first "list"... | <p>I think you want to define an interface for list then passing the type when you initialize list. Then do a check to make sure that list exists.</p>
<pre><code>type Codes = "200" | "400" | "500"
type City = {
city: string;
address: string;
state: string;
}
interface ListResponse ... | Object is possibly 'null'.ts(2531) - React Typescript | reactjs|typescript | 0 | 45 | 2 | 72,916,421 | 72,916,421 | 0 | true | 2022-07-08T19:25:07.717Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Object is possibly 'null'.ts(2531) - React Typescript<p>I fetch API data by axios. Everything is working correct. I try to convert js to tsx. The code for fe... |
72,837,514 | How to move reusable JavaScript code in separate file, than the main and use it several times?<p>I have a DataTable with a lot of properties. Every time I want to use it, I have to copy all of them. It makes my view's code behind a huge mess. So I decide to create a separate .js file and copy the reusable code there b... | <p>My preferred way to accomplish this is with <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules" rel="nofollow noreferrer">ECMAscript modules</a>.</p>
<p>You can place each of those functions into a separate file. You can name the files what every you like, but I usually name them after th... | How to move reusable JavaScript code in separate file, than the main and use it several times? | javascript|jquery|asp.net-core|razor-pages|code-reuse | 0 | 45 | 2 | 72,838,018 | 72,838,018 | 0 | true | 2022-07-02T08:09:06.980Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to move reusable JavaScript code in separate file, than the main and use it several times?<p>I have a DataTable with a lot of properties. Every time I wa... |
72,984,109 | bash read a file containing an array and save it as a new file list<p>I have a file that contains an array file.txt=["0", "1", "2", "3"] and I want to create a bash that reads the file and creates a new one as a list
file2.txt=</p>
<pre><code>0
1
2
3
</code></pre>
<pre><code>#!/b... | <p>You can use <a href="https://manpages.ubuntu.com/manpages/trusty/man1/json_pp.1.html" rel="nofollow noreferrer"><code>json_pp</code></a> to pretty print the array, then simply print only the digits using <a href="https://help.ubuntu.com/community/grep" rel="nofollow noreferrer"><code>grep</code></a>.</p>
<pre class=... | bash read a file containing an array and save it as a new file list | linux|bash | -1 | 45 | 1 | 73,043,329 | 73,043,329 | 0 | true | 2022-07-14T16:53:22.720Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
bash read a file containing an array and save it as a new file list<p>I have a file that contains an array file.txt=["0", "1", "2&qu... |
72,770,350 | Retrieve values of an array of object Angular<p>I'm trying to retrieve the values of dynamic inputs and to sum up them afterwards.</p>
<p>this is my html with the form and the stepper</p>
<pre><code> <form
clrStepper
clrForm
#allocationForm="ngForm"
(ngSubmit)="submit(allocationForm.value)&quo... | <p>I got this to work:</p>
<pre><code>let singularPercentage = allocationForm?.value.Department
const myArr: number[] = Object.values(singularPercentage);
const sum = myArr.reduce((acc, cur) => acc + cur, 0);
console.log(sum)
</code></pre>
<p>it does what I want, just the "Department" should b... | Retrieve values of an array of object Angular | angular | 0 | 45 | 2 | 72,776,611 | 72,776,611 | 0 | true | 2022-06-27T10:10:48.880Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Retrieve values of an array of object Angular<p>I'm trying to retrieve the values of dynamic inputs and to sum up them afterwards.</p>
<p>this is my html wit... |
72,881,280 | How to Change the label of an existing chip in flutter?<p>I'm using chips in my code when I tap on chip a counter is displayed, I want to update the chip label with when count is added.</p>
<pre><code>Widget returnWidget() {
return InkWell(
child: Chip(
label: Text(temp!),
),
onTap: () {
... | <p>Hello here I have a solution, I did not see more details about your code but here I did a working solution, the variable you want to update should be located inside the classed where is used but you can also use state management or InheritedWidget to update variables globally:</p>
<p><a href="https://i.stack.imgur.c... | How to Change the label of an existing chip in flutter? | flutter|dart|nativeapplication | 0 | 45 | 1 | 72,883,731 | 72,883,731 | 0 | true | 2022-07-06T09:44:54.707Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to Change the label of an existing chip in flutter?<p>I'm using chips in my code when I tap on chip a counter is displayed, I want to update the chip lab... |
72,960,317 | Pandas GroupBy ["A"] Every Nth Row of ["B"] and Compute Difference of ["C"]<p>I have a dataframe that represents several different machine <code>ids</code>, their <code>job</code> number, and the <code>value</code> they output, as follows:</p>
<pre><code> id job value
0 1 1 42
1 1 2 42
2 ... | <p>Thanks to @quang hoang answer, I was able to reach my goal. Here's my code:</p>
<pre class="lang-py prettyprint-override"><code>JOB_DURATION_SECONDS = 10
print(df)
# Compute the number of changes
df["num_of_changes"] = df.groupby("id").value.apply(
lambda x: x.rolling(2).apply(lambda x: x.il... | Pandas GroupBy ["A"] Every Nth Row of ["B"] and Compute Difference of ["C"] | python|pandas|dataframe | 1 | 45 | 2 | 73,030,059 | 73,030,059 | 0 | true | 2022-07-13T02:36:55.027Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pandas GroupBy ["A"] Every Nth Row of ["B"] and Compute Difference of ["C"]<p>I have a dataframe that represents several different machine <code>ids</code>, ... |
72,967,131 | linq where condition matched then create a new record using profile information in c#?<p>Need to create a new list for the below list.</p>
<p>if UniqueID= "10345" then i need to create new record like this <strong>{ rowno = 3, sid = 12, snmae = Mark ,isDataFromProfile = 1}</strong> means that need to use Prof... | <p>I think this is what you are looking for?<br />
Select has an overload that handles indexes.</p>
<pre><code>var sdata = studentList.Select((Value, Index) => new { Value, Index })
.Select(x => new { rowno = x.Index, sid = x.Value.StudentID, snmae = x.Value.StudentName, isDataFromProfile = x.Value.UniqueID =... | linq where condition matched then create a new record using profile information in c#? | c#|linq|select | 0 | 45 | 1 | 72,967,382 | 72,967,382 | 0 | true | 2022-07-13T13:28:10.300Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
linq where condition matched then create a new record using profile information in c#?<p>Need to create a new list for the below list.</p>
<p>if UniqueID= &q... |
72,821,385 | page.evaluate runs for hours<p>I am trying to crawl the contents of a website and it works most of the time (finishes in minutes) but sometimes it takes up to 8 hours. I've managed to pinpoint the issue and it is fired in the page.evaluate part. Looking at the website in headless mode=false it just loads infinitely (af... | <p>You should <code>await page.waitForSelector(sel, { waitUntil:timeout })</code> first then evaluate</p> | page.evaluate runs for hours | javascript|node.js|puppeteer | 0 | 45 | 1 | 72,823,805 | 72,823,805 | 0 | true | 2022-06-30T19:59:20.373Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
page.evaluate runs for hours<p>I am trying to crawl the contents of a website and it works most of the time (finishes in minutes) but sometimes it takes up t... |
73,027,416 | Why does killing a task with taskkill return so many errors?<p>I am just wondering, why does my code return so many errors, even after successfully killing a task.</p>
<pre><code>import subprocess
subprocess.call("taskkill /IM chrome.exe")
</code></pre>
<p>This is what I did, and it does the job. But I wish t... | <p>personnaly i prefer</p>
<pre class="lang-py prettyprint-override"><code>import os
import signal
import psutil
def get_pids(name):
for proc in psutil.process_iter():
if name in proc.name():
yield proc.pid
for pid in get_pids("chrome"):
os.kill(pid, signal.SIGTERM) #or signal.SIGK... | Why does killing a task with taskkill return so many errors? | python|taskkill | 0 | 45 | 1 | 73,027,502 | 73,027,502 | 0 | true | 2022-07-18T19:07:54.983Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why does killing a task with taskkill return so many errors?<p>I am just wondering, why does my code return so many errors, even after successfully killing a... |
72,878,030 | I styled focus state for my webpage. But even after I'm done clicking button/link, the focus stays, unless I click whitespaces. How do I make it go?<p>I've styled the focus state for my webpage to my liking. But now it stays on the buttons/links even when I'm done clicking them. I have to click the blank spaces to make... | <p>try using this css selector instead of <code>*:focus</code></p>
<pre><code>*:focus-visible{
outline: none;
box-shadow: 0 0 0 0.5rem rgba(61, 112, 46, 0.5);
}
</code></pre> | I styled focus state for my webpage. But even after I'm done clicking button/link, the focus stays, unless I click whitespaces. How do I make it go? | javascript|html|css|frontend | 0 | 45 | 1 | 72,878,077 | 72,878,077 | 0 | true | 2022-07-06T04:40:48.643Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I styled focus state for my webpage. But even after I'm done clicking button/link, the focus stays, unless I click whitespaces. How do I make it go?<p>I've s... |
72,940,990 | Why does setting my Rotate.z change all variables?<p>Im trying to make a sprite rotate onscreen to show the player how their Jet is rotated while they fly.</p>
<p>Here is my code</p>
<pre><code>using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class AircraftScr... | <p>I don't understand your code: Aircraft and AircraftImage are GameObjects, and GameObjects don't have the Rotate method, so that code should throw an exception.
Anyway I try to help you anyway.
Try using this code:</p>
<pre><code>AircraftImage.GetComponent<RectTransform>().eulerAngles = new Vector3(0, 0, Aircra... | Why does setting my Rotate.z change all variables? | c#|unity3d | -1 | 45 | 1 | 72,941,312 | 72,941,312 | 0 | true | 2022-07-11T15:27:53.727Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why does setting my Rotate.z change all variables?<p>Im trying to make a sprite rotate onscreen to show the player how their Jet is rotated while they fly.</... |
72,960,123 | Getting a Value from the inside of a Coroutine outside of the Coroutine?<p>I'm pretty new with kotlin programming and have to complete a tourguide project. I have a hopefully simple problem, but I'm too stupid to fix it, I guess.</p>
<p>In the following code segment I want to use the val "loc" (that's coming ... | <p>Add to build.gradle (app):</p>
<pre><code> implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-play-services:1.6.2'
</code></pre>
<p>Your code will look like this:</p>
<pre><code>override fun onMapReady(googleMap: GoogleMap) = CoroutineScope(Dispatchers.IO).launch {
try {
mMap = googleMap
... | Getting a Value from the inside of a Coroutine outside of the Coroutine? | kotlin|coroutine | 0 | 45 | 1 | 72,961,538 | 72,961,538 | 0 | true | 2022-07-13T02:02:09.607Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Getting a Value from the inside of a Coroutine outside of the Coroutine?<p>I'm pretty new with kotlin programming and have to complete a tourguide project. I... |
72,892,868 | XPathSelectElements in a confusing XML file<p>This is silly but I am tapping out here guys...</p>
<p>I have this XML file, and I need to get the value of 2021 out of the following line: <strong><A:product-version>2021</A:product-version></strong></p>
<p>And here is my full XML file</p>
<pre><code><?xml v... | <p>It seem to be that the elements not prefixed with an <code>A:</code> such as <code><link></code> element is in the document's default namespace, the Atom namespace, not the autodesk namespace. XPath 1.0 has no notion of a non-empty default namespace, so you will need to add a prefix to the namespace manager fo... | XPathSelectElements in a confusing XML file | c#|xml | 0 | 45 | 1 | 72,894,755 | 72,894,755 | 0 | true | 2022-07-07T05:54:27.783Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
XPathSelectElements in a confusing XML file<p>This is silly but I am tapping out here guys...</p>
<p>I have this XML file, and I need to get the value of 202... |
72,849,427 | The using of visual studio compiler by cmd.exe + batch file<p>Could you help me please with the using of visual studio compiler by cmd.exe + batch file?</p>
<p>I need to create batch file that will be executed in cmd.exe (C:\WINDOWS\system32\cmd.exe).
The body of .bat-script is:</p>
<pre><code>"C:\ProgramData\Micr... | <blockquote>
<p>During the execution I see that only first line is handled.</p>
</blockquote>
<p>If you want to run a batch file from another batch file you have to <code>call</code> it. Unlike an executable code run from a batch file, if you just run another batch file, the system does not return control to the callin... | The using of visual studio compiler by cmd.exe + batch file | c|visual-studio|batch-file|cmd|compilation | 0 | 45 | 1 | 72,849,807 | 72,849,807 | 0 | true | 2022-07-03T19:45:44.657Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
The using of visual studio compiler by cmd.exe + batch file<p>Could you help me please with the using of visual studio compiler by cmd.exe + batch file?</p>
... |
73,012,633 | Vert.x address already in use: bind - Not kill processes (Windows)<p>I'm creating a simple <em><strong>REST Server</strong></em> using <em><strong>Vert.x</strong></em> on <em><strong>intelliJ IDEA</strong></em>. When I run to test it, <strong>processes never are stopped</strong> after clicking the stop button from inte... | <p>I resolved changing in my <em>build.gradle.kts</em> this line of code:</p>
<pre><code>tasks.withType<JavaExec> { args = listOf("run", mainVerticleName, "--redeploy=$watchForChange", "--launcher-class=$launcherClassName", "--on-redeploy=$doOnChange")}
</code></pre>
<p>Wit... | Vert.x address already in use: bind - Not kill processes (Windows) | windows|rest|intellij-idea|runtime-error|vert.x | 0 | 45 | 1 | 73,012,674 | 73,012,674 | 0 | true | 2022-07-17T14:27:26.737Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Vert.x address already in use: bind - Not kill processes (Windows)<p>I'm creating a simple <em><strong>REST Server</strong></em> using <em><strong>Vert.x</st... |
73,001,355 | How to return property of all elements of array inside MongoDB document?<p>I want to return the <code>title</code> and <code>_id</code> properties of each element in my <code>trips</code> array of a user's document. I am attempting to use the aggregate pipeline but its my first time and the docs are overwhelming. It se... | <p>You can use <code>find({})</code> for getting your expected result. In find query, you need to use a projection stage.</p>
<p><a href="https://www.humongous.io/app/playground/mongodb/KNekvmGFcKum" rel="nofollow noreferrer">Here the demo</a></p>
<p>Expected query</p>
<pre><code>db.collection.find({},{_id:1,"trip... | How to return property of all elements of array inside MongoDB document? | javascript|node.js|mongodb|mongoose | 2 | 45 | 2 | 73,001,974 | 73,001,974 | 0 | true | 2022-07-16T03:40:41.250Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to return property of all elements of array inside MongoDB document?<p>I want to return the <code>title</code> and <code>_id</code> properties of each el... |
72,867,464 | Preventing flexbox relative element from being moved when resizing window<p>How can I prevent the "about" section (flexcontainer div) from being moved by the header element?</p>
<p>I have a distance between the header element, a title and nav bar, and the "about" section. Upon resizing the window, t... | <p>I found a solution! I used absolute positioning on the header.</p>
<p>Code:</p>
<pre><code><body style="background-image: url(#); background-color: #a6afbe;">
<div class="flexcontainer">
<header>
<h1>Haruhi Suzumiya 3D School</h1>
... | Preventing flexbox relative element from being moved when resizing window | html|css|flexbox | 0 | 45 | 2 | 72,868,243 | 72,868,243 | 0 | true | 2022-07-05T09:59:01.857Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Preventing flexbox relative element from being moved when resizing window<p>How can I prevent the "about" section (flexcontainer div) from being mo... |
72,839,226 | How to make the rollup CLI watch.include multiple files or directories?<p>I'm starting a rollup process with watching using:</p>
<pre><code>npx rollup -c rollup.config.js --watch --watch.include=js/**
</code></pre>
<p>But now I want to add a second directory that I want to watch as well: <code>styles/**</code></p>
<p>H... | <p>edit: this no longer seems to work with a newer version of rollup. Instead I now simply add</p>
<pre><code>{
watch: {
include: ["js/**", "styles/**"]
}
}
</code></pre>
<p>to the rollup config.</p>
<hr />
<p>old answer:</p>
<p>If you are configuring your watcher from your <code>rol... | How to make the rollup CLI watch.include multiple files or directories? | command-line-interface|watch|rollup | 0 | 45 | 1 | 72,839,227 | 72,839,227 | 0 | true | 2022-07-02T12:58:00.107Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to make the rollup CLI watch.include multiple files or directories?<p>I'm starting a rollup process with watching using:</p>
<pre><code>npx rollup -c rol... |
72,929,079 | when i click the button the post request is being sent and also console.log is working fine in app.post but the res.send() does not reflect<p>when i click the button with class(.hw) the post request is being sent and also console.log is working fine in app.post but the res.send() does not reflect in the browser.I also... | <p>Try this</p>
<pre><code>fetch("/",{
method: "POST",
headers: {
'Content-Type':'application/json',
},
body: JSON.stringify(obj),
}).then(data => {
return data.json();
})
.then(resData=>{consol... | when i click the button the post request is being sent and also console.log is working fine in app.post but the res.send() does not reflect | javascript|node.js|express|backend | 0 | 45 | 2 | 72,929,122 | 72,929,122 | 0 | true | 2022-07-10T14:03:15.367Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
when i click the button the post request is being sent and also console.log is working fine in app.post but the res.send() does not reflect<p>when i click th... |
72,858,377 | how to change the row of a DataFrame depending on values of one column<p>I have a huge dataframe with multiple time series like in the link below.</p>
<p><a href="https://i.stack.imgur.com/kN6H1.png" rel="nofollow noreferrer">Dataframe with multiple time series</a></p>
<p>At the end there should be a dataframe with the... | <pre><code>import pandas as pd
import numpy as np
columns = ['Date','a','b','c','d','e','f','g']
data = [
['01.06.2022','0,574','0,2342','0,574','0,2342','0,574','0,2342','0,574'],
['02.06.2022','0,574','0,2342','0,574','0,2342','0,574','0,2342',np.nan],
]
df = pd.DataFrame(data, columns=columns)
check_col = '... | how to change the row of a DataFrame depending on values of one column | python|pandas|dataframe|time-series | 0 | 45 | 3 | 72,858,574 | 72,858,574 | 0 | true | 2022-07-04T14:32:45.437Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to change the row of a DataFrame depending on values of one column<p>I have a huge dataframe with multiple time series like in the link below.</p>
<p><a ... |
72,790,155 | AWK Linux shell variable calling a shell variable<p>this is probably an easy/what-the-hell-is-that question: here a blueprint of the script where I load 4 variables $1 $2 $3 and $4 in a function 'myloop'
say</p>
<pre><code>file1
1 2 3
1 4 5
1 6 7
</code></pre>
<pre><code>myloop () {
echo col=$1 $2 $3 $4
awk ... | <pre><code>$ cat tst.sh
#!/usr/bin/env bash
myloop() {
echo "col=$*"
awk -v c1="$1" -v c2="$2" -v l1="$3" -v l2="$4" '
{
xy += $c1 * $c2
}
END {
print "Product", l1, "and", l2
print... | AWK Linux shell variable calling a shell variable | function|shell|variables|awk | 1 | 45 | 2 | 72,790,416 | 72,790,416 | 0 | true | 2022-06-28T16:30:51.783Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
AWK Linux shell variable calling a shell variable<p>this is probably an easy/what-the-hell-is-that question: here a blueprint of the script where I load 4 va... |
72,871,013 | CSS - counter rotateX messes up on-hover effect<p>So I want to create a set of buttons that satisfies the following properties:</p>
<ul>
<li>Shape is an isosceles trapezoid (this is currently achieved by <code>transform: perspective(200px) rotateX(-35deg)</code></li>
<li>On hover, the button background colour and text ... | <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-css lang-css prettyprint-override"><code>body {
width: 100%;
height: 100%;
position: fixed;
background: #121212;
text-align: center;
padding-top: 5... | CSS - counter rotateX messes up on-hover effect | html|css|transform|css-transforms | 0 | 45 | 2 | 72,871,634 | 72,871,634 | 0 | true | 2022-07-05T14:20:30.813Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
CSS - counter rotateX messes up on-hover effect<p>So I want to create a set of buttons that satisfies the following properties:</p>
<ul>
<li>Shape is an isos... |
72,859,969 | Deserialise a generic class , with unknown generic type - Jackson<pre><code>public class MessageModel<T> {
T body;
}
</code></pre>
<p>Now <code>T</code> could be object of type say <code>Cricket</code> or <code>Football</code>. Now this class is serialised and published to a queue.
While consuming, what is th... | <blockquote>
<p><em>While consuming, what is the best way to deserialise and identify the message type as Cricket or Football, so that the corresponding service is called.</em></p>
</blockquote>
<p>This isn't possible. Generics don't work that way.</p>
<p>Generics are involved only at compile-time. When your program ru... | Deserialise a generic class , with unknown generic type - Jackson | java|generics|jackson|deserialization|json-deserialization | 0 | 45 | 1 | 72,860,195 | 72,860,195 | 0 | true | 2022-07-04T16:57:16.827Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Deserialise a generic class , with unknown generic type - Jackson<pre><code>public class MessageModel<T> {
T body;
}
</code></pre>
<p>Now <code>T</... |
73,003,653 | How can I assign each column from a csv file to an int number?<p>Newbie here!</p>
<p>I have learnt how to read a csv file and display in into the console, but this time I need to assign each column of the csv file into an int number and return the method so that when I type number (1) for example, the first column of t... | <p>Each data line of the CSV file is most likely comma (,) delimited so when you read in each line, split it then display the column you want, for example:</p>
<pre><code>public static void readAndDisplayDataColumn(String csvFilePath, int literalDataColumnToDisplay) throws IOException {
if (throws literalDataColumn... | How can I assign each column from a csv file to an int number? | java|csv | -1 | 45 | 1 | 73,003,893 | 73,003,893 | 0 | true | 2022-07-16T11:06:38.587Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I assign each column from a csv file to an int number?<p>Newbie here!</p>
<p>I have learnt how to read a csv file and display in into the console, bu... |
72,885,204 | A Script that pulls list of AD users and returns manager info<p>I'm working on script to pull the users' name, email address, and their manager info. I need some help. I have this so far</p>
<pre><code>$requestedUsers = Import-Csv "ADUserlist.csv"
$allUsers = Get-ADUser -filter 'Enabled -eq $true' -Propertie... | <p>It should be something like this</p>
<pre><code>Import-Module -name 'ActiveDirectory'
$requestedUsers = Import-Csv -path "ADUserlist.csv" #Full path required
$allUsers = Get-ADUser -filter 'Enabled -eq $true' -Properties 'name', 'EmailAddress', 'Manager'
$filterdUsers = $allUsers | Where-Object { $_.Sam... | A Script that pulls list of AD users and returns manager info | powershell|active-directory|ps | 0 | 45 | 1 | 72,886,439 | 72,886,439 | 0 | true | 2022-07-06T14:20:27.173Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
A Script that pulls list of AD users and returns manager info<p>I'm working on script to pull the users' name, email address, and their manager info. I need ... |
72,883,544 | Getting user input to match items in an array<p>I am very new to PowerShell and trying to work through something.</p>
<p>The logic I am working through seems straight-forward;</p>
<ol>
<li>user selects name to store output to the location on the machine</li>
<li>available devices to choose from device list (array)</li>... | <p>As i understand, what you want to do.</p>
<pre><code>$Sites = 'AB001', 'AB002' # etc.
$Switches = 'AB001-SW1', 'AB001-SW2', 'CD002-SW1', 'CD002-SW2'
do {
$file = read-host "Please enter the file name to be saved. Location of file: C:\Temp\"
$file = "C:\Temp\$file"
write-host 'Device... | Getting user input to match items in an array | powershell|networking|automation | 0 | 45 | 1 | 72,911,279 | 72,911,279 | 0 | true | 2022-07-06T12:26:13.373Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Getting user input to match items in an array<p>I am very new to PowerShell and trying to work through something.</p>
<p>The logic I am working through seems... |
72,964,591 | C++: Deep Copy Diamond Pointer Structure<p>In my simulation software, I generate objects with pybind11. So all objects are stored in std::shared_ptr with a not known structure at compile time. For parallelisation of my simulation I need to run the same configuration with different seeds. I want to implement the duplica... | <p>You can use <code>std::shared_ptr<void></code> to type-erase all your shared pointers, using <a href="https://en.cppreference.com/w/cpp/memory/shared_ptr/pointer_cast" rel="nofollow noreferrer"><code>std::static_pointer_cast</code></a> to go to and from your actual types.</p>
<pre><code>using Seen = std::set&l... | C++: Deep Copy Diamond Pointer Structure | c++ | -1 | 45 | 1 | 72,965,299 | 72,965,299 | 0 | true | 2022-07-13T10:15:19.250Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
C++: Deep Copy Diamond Pointer Structure<p>In my simulation software, I generate objects with pybind11. So all objects are stored in std::shared_ptr with a n... |
73,024,039 | Apps Script - Iterating over range based on IDs in a column<p>I have a sheet with three columns (ID, Stage, Date). Every day, about 10k rows are imported to that sheet. The ID is a Salesforce ID and references an Opportunity. "Stage" is the stage that the opportunity is in on the day of the import. "Date... | <p>It could be something like this:</p>
<pre><code>function myFunction() {
const sheet = SpreadsheetApp.getActiveSheet();
const [header, ...data] = sheet.getDataRange().getValues();
const obj = {};
data.reverse().forEach(([id,stage,date]) => obj[id+stage] = [id,stage,date]);
const table = [header, ...Obj... | Apps Script - Iterating over range based on IDs in a column | google-apps-script|google-sheets | 0 | 45 | 1 | 73,027,168 | 73,027,168 | 0 | true | 2022-07-18T14:31:59.050Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Apps Script - Iterating over range based on IDs in a column<p>I have a sheet with three columns (ID, Stage, Date). Every day, about 10k rows are imported to ... |
72,848,430 | How to find posts which the user hasn't viewed using SQLAlchemy?<p>I have a database of objects like these bellow:</p>
<pre class="lang-py prettyprint-override"><code>from flask_sqlalchemy import SQLAlchemy
from flask_login import UserMixin
app = Flask(__name__, static_folder="../public", static_url_path=&qu... | <p>To show only not viewed posts by <code>User(id=user_id)</code> you can use <code>subquery</code>:</p>
<pre class="lang-py prettyprint-override"><code>seen_posts = session.query(
Post.id.label('post_id')
).join(
PostViewed
).filter(
PostViewed.author_id = user_id
).subquery()
not_seen_posts = Post.query.f... | How to find posts which the user hasn't viewed using SQLAlchemy? | python|postgresql|flask|sqlalchemy | 0 | 45 | 1 | 72,858,447 | 72,858,447 | 0 | true | 2022-07-03T17:06:00.857Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to find posts which the user hasn't viewed using SQLAlchemy?<p>I have a database of objects like these bellow:</p>
<pre class="lang-py prettyprint-overri... |
72,971,255 | Why cant i navigate back to the previous page using navigate.goBack()?<p>Hey guys I'm new to <code>react-router@6</code> and I'm kind of confused.</p>
<p>When I use the <code>useEffect</code> hook to post a new review, I want the user to head back to the previous page where it has all the reviews after submitting the r... | <p><code>navigate.goBack()</code></p>
<p>is no such function in react router dom, you should be using this instead.</p>
<pre><code>const navigate = useNavigate();
navigate(-1);
</code></pre> | Why cant i navigate back to the previous page using navigate.goBack()? | reactjs|react-hooks|react-router | 2 | 45 | 3 | 72,971,458 | 72,971,458 | 0 | true | 2022-07-13T18:51:03.023Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why cant i navigate back to the previous page using navigate.goBack()?<p>Hey guys I'm new to <code>react-router@6</code> and I'm kind of confused.</p>
<p>Whe... |
72,877,166 | Is it possible to collapse all sim-tree nodes programatically?<p>I'm using the sim-tree tree view plugin (<a href="https://github.com/linjingming/sim-tree" rel="nofollow noreferrer">https://github.com/linjingming/sim-tree</a>) to display parent - child list. The items/checkboxes to be loaded as checked are fetched prog... | <p>After the document is loaded, trigger a <code>click()</code> on all expanded nodes to collapse them:</p>
<pre><code>$(document).ready(function(){
$('#tree').find('.sim-icon-d').each(function(){
$(this).click()
})
});
</code></pre> | Is it possible to collapse all sim-tree nodes programatically? | jquery|css | 1 | 45 | 1 | 72,877,352 | 72,877,352 | 0 | true | 2022-07-06T01:56:59.197Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is it possible to collapse all sim-tree nodes programatically?<p>I'm using the sim-tree tree view plugin (<a href="https://github.com/linjingming/sim-tree" r... |
72,850,496 | Bash Variable in Mongo eval command inserts empty data<p>I have a script that inserts data into Mongo from a CSV but I have to encrypt one of the columns before insertion.</p>
<pre><code>#!/bin/bash
while IFS=, read -r f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
do
ENCRYPT_VAL="$f5" | openssl aes-256-cbc -... | <p>This:</p>
<pre><code>ENCRYPT_VAL="$f5" | openssl aes-256-cbc -a -pbkdf2 -salt -pass pass:{*****}
</code></pre>
<p>Does not set <code>ENCRYPT_VAL</code> to the output of the <code>openssl</code> command. It temporarily sets <code>ENCRYPT_VAL</code> to the value of <code>$f5</code> (see below), and then runs... | Bash Variable in Mongo eval command inserts empty data | mongodb|bash|eval | 0 | 45 | 1 | 72,858,931 | 72,858,931 | 0 | true | 2022-07-03T23:12:14.907Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Bash Variable in Mongo eval command inserts empty data<p>I have a script that inserts data into Mongo from a CSV but I have to encrypt one of the columns bef... |
72,866,586 | How to add multiple rules for Ceiling formula?<p>I have a problem in Excel where I want to use a formula to calculate the number of delegates a specific county can send to the regional congress.</p>
<p>In this case a county is allowed to send 1 delegate per 300 votes (1-299: 1, 300-599: 2 etc.)
Thus for this case I use... | <p>If this matches your expected outcome:</p>
<p><a href="https://i.stack.imgur.com/gOHmH.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gOHmH.jpg" alt="enter image description here" /></a></p>
<p>Then you may want to try this what I posted in the comments:</p>
<pre><code>=(A1>=3000)*(INT(A1/1000... | How to add multiple rules for Ceiling formula? | excel|excel-formula | 0 | 45 | 1 | 72,867,275 | 72,867,275 | 0 | true | 2022-07-05T08:53:48.953Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to add multiple rules for Ceiling formula?<p>I have a problem in Excel where I want to use a formula to calculate the number of delegates a specific coun... |
72,773,198 | python find the nearest nonzero element in df column<p>I have df:</p>
<pre><code>id number
1 5
1 0
1 0
1 2
2 0
3 1
</code></pre>
<p>I want to write a function to fill 0 values.I want for each id(for each group) , when the value in number column is zero, to search the closet non zero v... | <p>You can <code>mask</code> the 0, <code>bfill</code> per group, finally fillna with then original value for the groups than only have zeros:</p>
<pre><code>df['number2'] = (df['number']
.mask(df['number'].eq(0))
.groupby(df['id'])
.bfill()
.fillna(df['number'], downcast='infer')
)
</code></pre>
<p>output:</p>
<pr... | python find the nearest nonzero element in df column | python|pandas | 1 | 45 | 1 | 72,773,270 | 72,773,270 | 0 | true | 2022-06-27T13:47:55.263Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
python find the nearest nonzero element in df column<p>I have df:</p>
<pre><code>id number
1 5
1 0
1 0
1 2
2 0
3 1
</code>... |
73,002,974 | How to check all of items in Android<p>I want develop test application and for this I want use this API : <a href="https://www.themealdb.com/api/json/v1/1/lookup.php?i=52772" rel="nofollow noreferrer">https://www.themealdb.com/api/json/v1/1/lookup.php?i=52772</a></p>
<p>In this API for show some info use many field, su... | <p>I checked the response, in some case response may be like this due to bad code from backend developer and things will not be in our control.</p>
<p>We can do some hack to sort out your problem. Check out this code snippet:</p>
<pre><code>val meals = response.getJSONArray("meals")
val meal = meals.getJS... | How to check all of items in Android | android|kotlin | 0 | 45 | 1 | 73,003,153 | 73,003,153 | 0 | true | 2022-07-16T09:15:41.663Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to check all of items in Android<p>I want develop test application and for this I want use this API : <a href="https://www.themealdb.com/api/json/v1/1/lo... |
72,797,384 | How can I initialize this ctypes Structure array?<p>I have a structure defined using <code>class</code> type and I want to initialize <code>test_arr</code> like this:</p>
<pre><code>from ctypes import *
class ST_DATA(Structure):
_fields_ = [("test1", c_int),
("test2", c_double),... | <p>It <em>is</em> initialized, but the default print representation doesn't reflect the data...just the object's type and address.</p>
<p>It's a good habit to write a debug representation for classes so printing a class instance is more convenient. In this case, <code>ctypes</code> arrays can be converted to lists to ... | How can I initialize this ctypes Structure array? | python|arrays|initialization|structure|ctypes | 0 | 45 | 1 | 72,799,202 | 72,799,202 | 0 | true | 2022-06-29T07:27:17.087Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I initialize this ctypes Structure array?<p>I have a structure defined using <code>class</code> type and I want to initialize <code>test_arr</code> l... |
72,778,339 | elastic search sort after aggregation<p>I have an elastic search query showing distinct value for [Have CVID], for each CONTACT_ID, and I want to sort by [Have CVID] count after aggregation. Where can I add the sort by here?</p>
<pre><code>POST /dashboard/_search?size=0
{
"query": {
"bool": {
... | <p>You can add <code>order</code> to your <code>terms</code> aggregation and specify a sub-aggregation to order by, like this:</p>
<pre><code>POST /dashboard/_search?size=0
{
"query": {
"bool": {
"must_not": [{
"match": {
"Have CVID": "... | elastic search sort after aggregation | elasticsearch|aggregation | 0 | 45 | 1 | 72,780,360 | 72,780,360 | 0 | true | 2022-06-27T21:10:03.137Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
elastic search sort after aggregation<p>I have an elastic search query showing distinct value for [Have CVID], for each CONTACT_ID, and I want to sort by [Ha... |
72,869,450 | Form value in a select<p>I have an angular page like:</p>
<pre><code> catClient: any = [
[1, 'VALUE1', 'DescriptionValue1', true],
[2, 'VALUE2', 'DescriptionValue2', true],
];
selectedCategory: string;
customer = {
baseTypeIdentifier: '', // if isNewCustomer = false, baseTypeIdentifier will be for exa... | <p>you issue is with the, look at the line which is commented which starts with @@@.</p>
<p>I think by assigning it by the text and not by the value, this should solve your issue</p>
<pre class="lang-js prettyprint-override"><code>selectCustomerType(newVal) {
console.log('newVal ', newVal);
console.log('catClie... | Form value in a select | javascript|angular | 1 | 45 | 1 | 72,869,543 | 72,869,543 | 0 | true | 2022-07-05T12:28:37.203Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Form value in a select<p>I have an angular page like:</p>
<pre><code> catClient: any = [
[1, 'VALUE1', 'DescriptionValue1', true],
[2, 'VALUE2', 'Des... |
72,810,497 | Laravel Excel: How to set the headers from database fields<p>There are tutorials about customizing headers. But now I want to use the header from database table field. I want to make two types for download. If specified, I write codes for each export, like ID, First Name, Last Name, E-Mail, Date .... If not specified,... | <p>If I want to export Users.</p>
<p>This command is provided by laravel-excel:</p>
<pre><code>php artisan make:export UserExport --model=User
</code></pre>
<p>UserExport.php</p>
<pre><code><?php
namespace App\Exports;
use App\Models\User;
use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concer... | Laravel Excel: How to set the headers from database fields | laravel | 0 | 45 | 2 | 72,826,043 | 72,826,043 | 0 | true | 2022-06-30T04:59:31.807Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Laravel Excel: How to set the headers from database fields<p>There are tutorials about customizing headers. But now I want to use the header from database ta... |
72,929,703 | How can I define the activation function as a hyperparameter in PyTorch through RAY.Tune?<p>This is the link to the main page of the topic I want.</p>
<p><a href="https://docs.ray.io/en/latest/tune/examples/tune-pytorch-cifar.html#tune-pytorch-cifar-ref" rel="nofollow noreferrer">https://docs.ray.io/en/latest/tune/exam... | <p>I solved this problem as follows.</p>
<pre><code>n_samples,n_features=X_train.shape
class NeuralNetwork (nn.Module):
def __init__(self,n_input_features,l1, l2,l3,config):
super (NeuralNetwork, self).__init__()
self.config = config
self.linear1=nn.Linear(n_input_features,4*math.floor(n_input_features/2)+l... | How can I define the activation function as a hyperparameter in PyTorch through RAY.Tune? | optimization|pytorch|hyperparameters|ray | 0 | 45 | 2 | 72,941,641 | 72,941,641 | 0 | true | 2022-07-10T15:33:15.320Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I define the activation function as a hyperparameter in PyTorch through RAY.Tune?<p>This is the link to the main page of the topic I want.</p>
<p><a ... |
72,874,874 | Find partial string text in array object<p>Example:
If I use the code below it works for the whole word "gorilla".</p>
<p>How do I get it to work with "gor" or "illa" or "orill"...?</p>
<p>...(equivalent to a str like "%gor%" in mysql for example)</p>
<p><div class="sni... | <p>You can use <code>find</code> (or <code>filter</code>)</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>const jungle = [
{ name: "frog", threat: 0 },
{ name: "monkey", th... | Find partial string text in array object | javascript|arrays | 0 | 45 | 4 | 72,874,957 | 72,874,957 | 0 | true | 2022-07-05T19:55:27.180Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Find partial string text in array object<p>Example:
If I use the code below it works for the whole word "gorilla".</p>
<p>How do I get it to work w... |
72,956,615 | Best way to avoid mypy error when None is a possible result<p>I have a <code>Processor</code> class that looks like this:</p>
<pre><code>class Processor:
def __init__(self, payment_table: List[PaymentTable]):
self.payment_table = payment_table
def get_payment_table(self, year: int, month: int) ->... | <p>Since it's not possible to process a payment if there is no payment table, I'd suggest that the simplest (and hence "pythonic") way of doing this would be to have <code>get_payment_table</code> raise an exception if there is no payment table, and allow that exception to raise from <code>process_payment</co... | Best way to avoid mypy error when None is a possible result | python|oop|type-hinting|mypy|typing | 0 | 45 | 2 | 72,956,734 | 72,956,734 | 0 | true | 2022-07-12T18:02:32.003Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Best way to avoid mypy error when None is a possible result<p>I have a <code>Processor</code> class that looks like this:</p>
<pre><code>class Processor:
... |
72,878,334 | How to seperate a 2d mask array into the individual segments within it?<h1>Context</h1>
<p>Im trying to take an array which consists of 1s and 0s in random locations and then seperate clusters of 1s within this array and label them seperately. I think it is best explained with an example.</p>
<p><a href="https://i.stac... | <p>This is an old classical subject in computer vision.
In image the "cluster of 1s" is called <strong>blob</strong> or <strong>connected component</strong> and the act of identify them is called <strong>blob extraction</strong> or <strong>labeling</strong>.</p>
<p>Use opencv library (<code>pip install opencv... | How to seperate a 2d mask array into the individual segments within it? | python|arrays|image-segmentation | 0 | 45 | 2 | 72,879,197 | 72,879,197 | 0 | true | 2022-07-06T05:29:31.787Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to seperate a 2d mask array into the individual segments within it?<h1>Context</h1>
<p>Im trying to take an array which consists of 1s and 0s in random l... |
72,855,413 | How to efficiently extract segments from pandas dataframe given list of start stop index<p>Given a dataframe df</p>
<pre><code> A B C
0 0 0 0
1 0 0 0
2 0 0 0
3 0 0 0
4 0 0 0
... ... ... ...
410 0 0 0
411 0 0 0
412 0 0 0
413 0 0 0
414 0 0 0
</code></pre>
<p>and a ... | <p>You could transform your list of start/stop indexes into a mapping of the dataframe row id to segment id. You could then add a column that includes the segment number instead of extracting each into a separate dataframe.</p>
<pre><code>import pandas
df = pandas.DataFrame(data={'A':[0]*415, 'B':[0]*415, 'C':[0]*415... | How to efficiently extract segments from pandas dataframe given list of start stop index | python|pandas | 0 | 45 | 1 | 72,855,920 | 72,855,920 | 0 | true | 2022-07-04T10:37:10.650Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to efficiently extract segments from pandas dataframe given list of start stop index<p>Given a dataframe df</p>
<pre><code> A B C
0 0 0 0
1 ... |
72,982,783 | Group objects in array based on sequence<p>I have an array of objects that are a log of actions taken by users.
This is an example of what the array looks like:</p>
<pre><code> [
{
"timestamp": "2022-07-14T14:53:32.925Z",
"action": "Action 1",
"... | <p><strong>Assuming the input array is sorted from new to old.</strong> You can loop through them, check each action against the last action present in the result. If it has the same action/user combo, don't add it to the result. If it's not the same user/action, add it to the result. Repeat until you've iterated throu... | Group objects in array based on sequence | javascript|arrays | 2 | 45 | 3 | 72,983,373 | 72,983,373 | 0 | true | 2022-07-14T15:08:36.363Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Group objects in array based on sequence<p>I have an array of objects that are a log of actions taken by users.
This is an example of what the array looks li... |
73,018,177 | R Interpolation of previous days using total value<p>I'm, new to data science methods so this is probably a basic question.</p>
<p>I have a dataset with daily observations but sometimes I get missing values for a couple of days and then an accumulated value for all the missing days. I know that total value is correct a... | <p>EDIT: We could fill in blanks using an average calculated with the "total." I understand you are looking for something fancier since flat readings are rare, but it's not clear from your description what specific pattern would be more likely. If you want it to look more plausible, you could add some noise t... | R Interpolation of previous days using total value | r|interpolation | 0 | 45 | 2 | 73,018,338 | 73,018,338 | 0 | true | 2022-07-18T06:39:11.873Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
R Interpolation of previous days using total value<p>I'm, new to data science methods so this is probably a basic question.</p>
<p>I have a dataset with dail... |
72,773,085 | Can not find Device Id in Azure IoTHub events<p>I am trying to use Azure IoTHub to receive some sensor data. I manage to receive the messages from devices using <a href="https://stackoverflow.com/questions/66092129/how-to-realtime-listen-and-consume-messages-from-azure-iot-hub"><code>EventProcessorClient</code></a>. Bu... | <p>I found my answer <a href="https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-messages-construct" rel="nofollow noreferrer">here</a>. The device id is in system properties:<code>{eventArgs}.Data.SystemProperties["iothub-connection-device-id"]</code></p>
<p>Also, you can find some other propert... | Can not find Device Id in Azure IoTHub events | iot|azure-iot-hub | 0 | 45 | 1 | 72,774,119 | 72,774,119 | 0 | true | 2022-06-27T13:40:42.107Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Can not find Device Id in Azure IoTHub events<p>I am trying to use Azure IoTHub to receive some sensor data. I manage to receive the messages from devices us... |
72,769,231 | Adding an element to a react reducer state array, Is doubling the element every append<p><strong>store.js</strong></p>
<pre><code>
const initialState = {
messagelist: []
}
const reducerAllMessages = (state=initialState, action) => {
if(action.type === "newMessage") {
console.log("stat... | <p>Your socket event handler is wrapped in useEffect, which does not have any dependencies.
When you dispatch 'newMessage' event, and it is processed by store and updates to message state slice are pushed, your component gets re-rendered.
Re-rendering causes a new socket event handler to be attached, thus doubling your... | Adding an element to a react reducer state array, Is doubling the element every append | javascript|reactjs|arrays|react-redux|redux-toolkit | 0 | 45 | 1 | 72,769,411 | 72,769,411 | 1 | true | 2022-06-27T08:40:02.797Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Adding an element to a react reducer state array, Is doubling the element every append<p><strong>store.js</strong></p>
<pre><code>
const initialState = {
... |
72,773,857 | How to reference a class method in another class?<p>MY PYTHON VERSION IS 3.10</p>
<p>I'm trying to reference a method defined in the Button class (is_clicked()) in the Game class. The problem is the when I do it the way I'm doing it, the command prompt tells me:</p>
<pre><code> if Button.is_clicked(event.pos):
TypeEr... | <p>create instance to solve this issue, your methods are not static in that way.</p>
<pre><code>buttonInstance = Button()
buttonInstance.is_clicked()
</code></pre>
<p>for more information you can check <a href="https://www.geeksforgeeks.org/class-method-vs-static-method-python/" rel="nofollow noreferrer">Class Methods ... | How to reference a class method in another class? | python|python-3.x | 0 | 45 | 2 | 72,774,059 | 72,774,059 | 1 | true | 2022-06-27T14:34:19.643Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to reference a class method in another class?<p>MY PYTHON VERSION IS 3.10</p>
<p>I'm trying to reference a method defined in the Button class (is_clicked... |
72,774,010 | Combining dataframes to replace missing values<p>I am trying to merge two dataframes together to replace possible missing values. For example:</p>
<pre><code>df1:
Fruit Price
Apple 5
Banana 7
Orange 4
df2:
Fruit Price
Pear 3
result:
Fruit Price
Apple 5
Banana 7
Ora... | <p>You could use <code>concat</code> and chain <code>drop_duplicates</code> on your Fruit column. Just always make sure to put the dataframe you want the values to keep in case of duplicated as the first parameter in <code>concat</code>:</p>
<pre><code># Case 1
>>> pd.concat([df1b,df2]).drop_duplicates('Fruit'... | Combining dataframes to replace missing values | python|pandas|dataframe|concatenation | 0 | 45 | 2 | 72,774,161 | 72,774,161 | 1 | true | 2022-06-27T14:44:14.330Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Combining dataframes to replace missing values<p>I am trying to merge two dataframes together to replace possible missing values. For example:</p>
<pre><code... |
72,778,628 | Upsampling a polars dataframe with groupby<p>I'm trying to upsample a Polars dataframe while grouping by a particular column. In the following example, I wish to group by 'fruit' and then upsample by date.</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>fruit</th>
<th>date</th>
<th>count</t... | <p>I realized that the upsample function has a 'by' parameter that gives me the results that I need.</p>
<p><a href="https://pola-rs.github.io/polars/py-polars/html/reference/api/polars.DataFrame.upsample.html" rel="nofollow noreferrer">https://pola-rs.github.io/polars/py-polars/html/reference/api/polars.DataFrame.upsa... | Upsampling a polars dataframe with groupby | pandas|dataframe|pandas-groupby|python-polars|rust-polars | 0 | 45 | 1 | 72,778,749 | 72,778,749 | 1 | true | 2022-06-27T21:46:22.480Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Upsampling a polars dataframe with groupby<p>I'm trying to upsample a Polars dataframe while grouping by a particular column. In the following example, I wis... |
72,778,779 | Watson Assistant image responses<p>Do you know if by making the images "Public" in IBM Cloud Object Storage it really becomes public meaning you can find the resources through web browser as google? or it becomes like "shared via link" because IBM COS provides a link, and that works just fine for th... | <p>When making a folder in S3 / IBM Cloud Object Storage (COS) PUBLIC, the content is accessible. Because there are tools (and attackers) that scan for host names, IP addresses and available services, there is a chance that a scanner might find the offered resources (images). Public is public.</p>
<p>I have used images... | Watson Assistant image responses | ibm-cloud|watson-assistant|cloud-object-storage | 0 | 45 | 1 | 72,780,903 | 72,780,903 | 1 | true | 2022-06-27T22:08:50.270Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Watson Assistant image responses<p>Do you know if by making the images "Public" in IBM Cloud Object Storage it really becomes public meaning you ca... |
72,780,708 | tfileproperties not working in my case in talend open studio<blockquote>
<p>I want to fetch file details like path of file, column names, and other things .In my job there are null values while using tfileproperties as shown in image added. look</p>
</blockquote>
<p>if somebody can do something.</p>
<p><a href="https:/... | <p>To Use <code>tFileProperties</code> you have to pass a <code>valid file Path</code></p>
<p>What i suggest is to pass the file Path in a <code>context variable</code> as such</p>
<p><a href="https://i.stack.imgur.com/luxcY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/luxcY.png" alt="enter imag... | tfileproperties not working in my case in talend open studio | mongodb|talend | 0 | 45 | 1 | 72,783,098 | 72,783,098 | 1 | true | 2022-06-28T04:19:54.860Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
tfileproperties not working in my case in talend open studio<blockquote>
<p>I want to fetch file details like path of file, column names, and other things .I... |
72,783,748 | Some questions about bday paradox results<p>I need someone to correct me or to discuss with me, why are my results of a 23 person calculation of the bday paradox always ~65%. It is said it should be ~50%, but whatever I do, I receive this result.</p>
<p>What I ask is someone to explain to me what I did wrong and correc... | <p>Because you clear up the list only in cases when dupes are found. For non-dupe cases the list keeps growing increasing probability of the dupes in the next iterations.</p> | Some questions about bday paradox results | c#|birthday-paradox | -3 | 45 | 1 | 72,784,014 | 72,784,014 | 1 | true | 2022-06-28T09:14:20.547Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Some questions about bday paradox results<p>I need someone to correct me or to discuss with me, why are my results of a 23 person calculation of the bday par... |
72,779,601 | laravel controller "Trying to get property 'cm_number' of non-object"<p>I have a problem in my controller, it doesn't get the value of what declare in getCMnumber, it needs to get the format of getCMNumber to cm_number and automatically save it to the database, but there was an error that says "Trying to get prope... | <p>Just try this:</p>
<pre><code> public static function getCMNumber()
{
$cm = ChangeManagement::whereNotNull('cm_number')->orderBy('cm_id', 'desc')->first();
if (!$cm) {
return null;
}
$last_ticket = $cm->cm_number;
$tick_date = substr($last_ticke... | laravel controller "Trying to get property 'cm_number' of non-object" | laravel|controller | 0 | 45 | 1 | 72,784,682 | 72,784,682 | 1 | true | 2022-06-28T00:43:15.050Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
laravel controller "Trying to get property 'cm_number' of non-object"<p>I have a problem in my controller, it doesn't get the value of what declare in getCMn... |
72,784,937 | Excel VBA loop for deleting a range when a cell has a 0<p>I'm trying to write a VBA loop in which the loop checks the cells in column M and if it finds a zero, it will delete the range "ii:Mi". I'm not that familiar with for loops so I thought I could get help here.</p>
<p>The code I came up with is as follow... | <p>If I got your goal, this should work. Thought it will clearly mess your data using the Delete function:</p>
<pre><code>Option Explicit
Sub delete()
'Change the "SheetName" for the actual sheet name
'Assuming that sheet is in the same workbook as the code
With ThisWorkbook.Sheets("Shee... | Excel VBA loop for deleting a range when a cell has a 0 | excel|vba | 0 | 45 | 1 | 72,785,569 | 72,785,569 | 1 | true | 2022-06-28T10:37:34.760Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Excel VBA loop for deleting a range when a cell has a 0<p>I'm trying to write a VBA loop in which the loop checks the cells in column M and if it finds a zer... |
72,788,063 | How to include kotlin.test properly via Maven?<p>Our team is making first steps into Kotlin and I'm about to to migrate a test. I tried a first example from mockk (<a href="https://github.com/mockk/mockk/blob/master/mockk/common/src/test/kotlin/io/mockk/it/InjectMocksTest.kt" rel="nofollow noreferrer">https://github.co... | <p>You need to add a dependency on one of <code>kotlin-test-junit</code> (for JUnit 4), <code>kotlin-test-junit5</code> (for JUnit Jupiter), or <code>kotlin-test-testng</code> (for TestNG), depending on what test framework you are using.</p>
<p>The artifact <code>kotlin-test</code> contains only the common code, assert... | How to include kotlin.test properly via Maven? | maven|kotlin|kotlintest | 1 | 45 | 1 | 72,788,959 | 72,788,959 | 1 | true | 2022-06-28T14:13:44.093Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to include kotlin.test properly via Maven?<p>Our team is making first steps into Kotlin and I'm about to to migrate a test. I tried a first example from ... |
72,788,324 | Trying to build Listview but I can't add any method to the Expansion tile<p>I have the following code to build a listview from local JSON file and it works perfectly fine. However, when I try to add a method such as <code>onTap: (){}</code> to the <code>ExpansionTile</code> in the <code>_buildList</code> Widget I got t... | <p><a href="https://api.flutter.dev/flutter/material/ExpansionTile-class.html" rel="nofollow noreferrer"><code>ExpansionTile</code></a> does not have an <code>onTap</code> property. This is because it has a default behaviour on tapping, expands or collapses.</p>
<p>If you'd like to execute some specific logic on expand... | Trying to build Listview but I can't add any method to the Expansion tile | flutter|android-studio|dart|expandablelistview|expansion-tile | 0 | 45 | 1 | 72,790,744 | 72,790,744 | 1 | true | 2022-06-28T14:28:37.363Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Trying to build Listview but I can't add any method to the Expansion tile<p>I have the following code to build a listview from local JSON file and it works p... |
72,791,585 | How do you call a function of a module in Python if the module should be called with a list or variable?<p>I have a module, in the module is a subcomponent which contains a multitude of functions. I need to iterate through a list of names which contains the names of the modules and call the functions. this does not wor... | <p>Try <a href="https://docs.python.org/3/library/functions.html#getattr" rel="nofollow noreferrer"><code>getattr()</code></a>:</p>
<pre class="lang-py prettyprint-override"><code>import module
lst = ["x", "y", "z"]
for item in lst:
getattr(module, item)()
</code></pre>
<p>Prints:</p... | How do you call a function of a module in Python if the module should be called with a list or variable? | python|list|loops|for-loop|module | 1 | 45 | 3 | 72,791,957 | 72,791,957 | 1 | true | 2022-06-28T18:36:37.497Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do you call a function of a module in Python if the module should be called with a list or variable?<p>I have a module, in the module is a subcomponent w... |
72,936,098 | azure unexpected deployment Template failure<p>i was trying to create a cluster in Databricks but every time i try it does'nt start and it shows this message: Error code: UnexpectedDeploymentTemplateFailure, error message: Failing to launch instances for the cluster because of unexpected deployment failure. Message: {&... | <p>actually i realized that i can't work with databriks with a free azure account because of the size of cluster. you can work with the community addition instead.</p> | azure unexpected deployment Template failure | databricks | 0 | 45 | 1 | 73,424,955 | 73,424,955 | 0 | true | 2022-07-11T09:09:12.817Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
azure unexpected deployment Template failure<p>i was trying to create a cluster in Databricks but every time i try it does'nt start and it shows this message... |
72,797,223 | RS485 Board starts losing numerous packets Raspberry Pico<p>I've built a data logger with a Raspberry Pico that sniffs data from an <a href="https://www.waveshare.com/rs485-board-3.3v.htm" rel="nofollow noreferrer">RS485</a> and saved them into an SD Card (see image). Everything works correctly with the only issue that... | <p>So the issue seems linked to the fact that the Python code needs to write on the same file at every cycle.
This is very fast at the beginning because the file has limited size.</p>
<p>This time increases when the file starts to occupy several hundreds of Mb and slow down the writing on file.</p>
<p>The code used for... | RS485 Board starts losing numerous packets Raspberry Pico | python|uart|micropython|rs485|raspberry-pi-pico | 0 | 45 | 1 | 73,699,594 | 73,699,594 | 0 | true | 2022-06-29T07:14:10.967Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
RS485 Board starts losing numerous packets Raspberry Pico<p>I've built a data logger with a Raspberry Pico that sniffs data from an <a href="https://www.wave... |
72,238,977 | Unicode char has odd gap when rendered in view<p>I am using the following code to show a playing card. Not sure why there is a large gap at the top.</p>
<p>This is on iOS 15.4</p>
<pre><code>var body: some View {
Text(String(Character(unicodeScalarLiteral: "\u{1F0A1}")))
.font(.system(size: size))... | <p>This is how this symbol layout within glyph box (pay attention on its position relative to base line):</p>
<p><a href="https://i.stack.imgur.com/rLRiF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rLRiF.png" alt="demo" /></a></p>
<p>and here is for comparison of Latin A:</p>
<p><a href="https://... | Unicode char has odd gap when rendered in view | swiftui|unicode | -1 | 45 | 1 | 72,239,380 | 72,239,380 | 0 | true | 2022-05-14T09:38:14.163Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Unicode char has odd gap when rendered in view<p>I am using the following code to show a playing card. Not sure why there is a large gap at the top.</p>
<p>T... |
72,241,094 | Django Framework : Problems with views settings<p>im learning Django framework and having some issues that i dont get it.
<br>
Actually i have apps like Polls/ Blog/ and my homepage/ installed and working as i want.</p>
<p>My problem is to display each data into my homepage_index.html like :
<br>
_ how many Question my... | <p>You can find more detail at the offical docs, what you need to do is same as the <code>now</code> value in the demo.
<a href="https://docs.djangoproject.com/en/4.0/ref/class-based-views/generic-display/#listview" rel="nofollow noreferrer">https://docs.djangoproject.com/en/4.0/ref/class-based-views/generic-display/#l... | Django Framework : Problems with views settings | python|django|django-views | 0 | 45 | 2 | 72,241,256 | 72,241,256 | 0 | true | 2022-05-14T14:24:28.847Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Django Framework : Problems with views settings<p>im learning Django framework and having some issues that i dont get it.
<br>
Actually i have apps like Poll... |
72,241,217 | Coordinate overlapping components to scale together<p>Attempting to create a higher-order component with two components that scale together.</p>
<p>The higher-order component is set up as so:</p>
<pre><code><>
<Component 1/>
<Component 2/>
</>
</code></pre>
<p>The css for Component 1:</p... | <p>So, as I understand it you want the components to remain proportional but have the second one remain fixed relative to the first? Here's a possibility if you want to go the usual CSS way:</p>
<p>If you want the content to remain proportional but still scale and overlap, you can use some positioning techniques combin... | Coordinate overlapping components to scale together | css|reactjs|material-ui | 0 | 45 | 1 | 72,243,145 | 72,243,145 | 0 | true | 2022-05-14T14:38:33.437Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Coordinate overlapping components to scale together<p>Attempting to create a higher-order component with two components that scale together.</p>
<p>The highe... |
72,244,565 | Why function from service class doesn't work from useContext?<p>I'm trying to pass service as context and then use it in app, but get error "service.getItems is not a function". What is wrong? I know I could just import and use it, but I'm trying to learn context thing. This works for normal functions, but no... | <p>This error is not related to React or React Context, you need to declare a method as static if you want to call it like:
<code>ClassName.method</code></p>
<pre><code>class Service {
static getItems() {
return [1, 2, 3];
}
}
Service.getItems() //[1,2,3]
</code></pre>
<p>Or you can instantiate your class bef... | Why function from service class doesn't work from useContext? | javascript|reactjs | 0 | 45 | 1 | 72,244,739 | 72,244,739 | 0 | true | 2022-05-14T23:41:39.970Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why function from service class doesn't work from useContext?<p>I'm trying to pass service as context and then use it in app, but get error "service.get... |
72,245,155 | While redirecting all pages with .htaccess my codes are conflicting<p>I am trying to redirect to</p>
<blockquote>
<p><a href="https://example.com" rel="nofollow noreferrer">https://example.com</a> from <a href="https://www.example.com" rel="nofollow noreferrer">https://www.example.com</a>, <a href="http://example.com" ... | <p>This probably is what you are looking for:</p>
<pre><code>RewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} !^example\.com$
RewriteRule ^ https://example.com%{REQUEST_URI} [R=301,L]
</code></pre>
<p>That should work in the actual http server configuration or, if you have no access to that, in a... | While redirecting all pages with .htaccess my codes are conflicting | php|.htaccess|http|redirect | 0 | 45 | 1 | 72,245,960 | 72,245,960 | 0 | true | 2022-05-15T02:27:44.893Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
While redirecting all pages with .htaccess my codes are conflicting<p>I am trying to redirect to</p>
<blockquote>
<p><a href="https://example.com" rel="nofol... |
72,251,856 | If two columns have the same value, how can I replace NA in a third column with this value in R?<p>I'm working with data whereby gender of participants has been noted in three columns ( baseline, first time point and second time point). For several hundred participants they have gender for baseline and second time poin... | <p>You can try using <code>mutate</code> and <code>case_when</code> from <code>dplyr</code> package. From the <code>case_when</code> documentation: "This function allows you to vectorise multiple if and else if statements."</p>
<pre><code>#if you haven't installed it yet
#install.packages('dplyr')
df <- ... | If two columns have the same value, how can I replace NA in a third column with this value in R? | r | 0 | 45 | 1 | 72,254,652 | 72,254,652 | 0 | true | 2022-05-15T20:10:25.250Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
If two columns have the same value, how can I replace NA in a third column with this value in R?<p>I'm working with data whereby gender of participants has b... |
72,254,832 | Changing axis scale in 3d plot with Sympy<p>What is the simplest way to change the axis scales or axis limits of a 3D plot with Sympy? For instance, if I want to plot a torus:</p>
<pre><code>from sympy import *
from sympy.plotting import *
u, v = symbols('u v')
p = plot3d_parametric_surface((5 + cos(u))*cos(v), (5 + c... | <p>You'd have to access the Matplotlib's axis object created by Sympy, like this:</p>
<pre><code>from sympy import *
from sympy.plotting import *
import numpy as np
u, v = symbols('u v')
p = plot3d_parametric_surface((5 + cos(u))*cos(v), (5 + cos(u))*sin(v), sin(u),
(u, 0, 2*pi), (v, 0, 2... | Changing axis scale in 3d plot with Sympy | python|sympy | 0 | 45 | 1 | 72,255,530 | 72,255,530 | 0 | true | 2022-05-16T06:18:20.500Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Changing axis scale in 3d plot with Sympy<p>What is the simplest way to change the axis scales or axis limits of a 3D plot with Sympy? For instance, if I wan... |
72,262,177 | Programatically generating Gatsby pages without a slug from Graphql<p>I have set up an ACF options page in WordPress called Projects</p>
<p>Inside the Projects options page there is an ACF repeater allowing the user to add multiple Projects.</p>
<p>In Gatsby, I’m using Graphql to query the data for my Projects in two f... | <p>The problem in your approach is that you are generating a "fake" slug based on the <code>title</code> of the project so you can't use that field to filter any GraphQL node because the field is not present in the project fields. Your best option is using the <code>title</code> itself or using any autogenera... | Programatically generating Gatsby pages without a slug from Graphql | javascript|graphql|gatsby | 1 | 45 | 1 | 72,262,901 | 72,262,901 | 0 | true | 2022-05-16T16:02:11.343Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Programatically generating Gatsby pages without a slug from Graphql<p>I have set up an ACF options page in WordPress called Projects</p>
<p>Inside the Projec... |
72,264,346 | When should I use nodejs and when should I use mongoDB<p>I read many documents about node js and MongoDB. But the regret is that I can't understand when I should use nodejs and when I should use MongoDB. If anyone here who can tell me the details, it will be very helpful for me.</p> | <p>MongoDB and NodeJS are two different technologies. MonogDB is a database system which gives you a chance to efficiently store documents in a database and to perform operations like data updates, or to search documents by some criterias.</p>
<p>Otherhand,
NodeJS's responsibilty is especially to execute your applicati... | When should I use nodejs and when should I use mongoDB | node.js|reactjs | -3 | 45 | 4 | 72,264,639 | 72,264,639 | 0 | true | 2022-05-16T19:02:07.377Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
When should I use nodejs and when should I use mongoDB<p>I read many documents about node js and MongoDB. But the regret is that I can't understand when I sh... |
72,266,404 | Can you inspect Memory without a breakpoint in VS2019<p>Is it possible in VS2019 to view what is in memory without triggering a breakpoint? I want to see the state of things without invoking any behavior because it seems something is changing anytime I interact with my app. It's an old .net framework app so I can't j... | <p>Depending on your scenario, there are two things that come to mind.</p>
<h2>Logs</h2>
<p>You can use <a href="https://docs.microsoft.com/en-us/dotnet/core/extensions/logging?tabs=command-line" rel="nofollow noreferrer">logs</a> to print some information to some output such as the debug output, console, log files, et... | Can you inspect Memory without a breakpoint in VS2019 | c#|visual-studio | 0 | 45 | 1 | 72,267,333 | 72,267,333 | 0 | true | 2022-05-16T22:50:08.973Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Can you inspect Memory without a breakpoint in VS2019<p>Is it possible in VS2019 to view what is in memory without triggering a breakpoint? I want to see th... |
72,271,443 | This is about validating user input, i was doing a tutorial and didnt understand why he had defined the below<p>Below is the code. What i dont understand is in the Initial part he defined 3 things.
choice, acceptable_range and within_range.</p>
<p>why did he have to define within_range?</p>
<pre><code>def user_choice()... | <p>If <code>within_range</code> wasn't defined, you would never enter in the <code>while</code> loop, you need to define it to false first to enter in the loop. Once you're in the loop, this value is defined depending of the <code>choice</code> value (with the <code>input</code> function)</p> | This is about validating user input, i was doing a tutorial and didnt understand why he had defined the below | python|user-input | 0 | 45 | 3 | 72,271,528 | 72,271,528 | 0 | true | 2022-05-17T09:26:01.490Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
This is about validating user input, i was doing a tutorial and didnt understand why he had defined the below<p>Below is the code. What i dont understand is ... |
72,272,785 | Outlook VSTO Add-In ribbon not showing for some users<p>I have developed a simple VSTO Add-In for Outlook which connects to an SharePoint on-premise server.
The issue is that for some users the ribbon with the data doesn't show. For others it works just fine.
For those where it doesn't work, they can disable a random a... | <p>You need to find out what is the exact error. For that you need to configure the host application to report about any UI erros.</p>
<p>By default, if a VSTO Add-in attempts to manipulate the Microsoft Office user interface (UI) and fails, no error message is displayed. However, you can configure Microsoft Office app... | Outlook VSTO Add-In ribbon not showing for some users | c#|sharepoint|outlook|vsto|ribbonx | 0 | 45 | 1 | 72,275,238 | 72,275,238 | 0 | true | 2022-05-17T10:54:38.730Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Outlook VSTO Add-In ribbon not showing for some users<p>I have developed a simple VSTO Add-In for Outlook which connects to an SharePoint on-premise server.
... |
72,274,389 | How do you round bottom corners of UINavigation bar with a search bar using large titles<p>When attempting to crate a UINavigationBar with a search bar and large title, how do you style the bottom of the navigation bar to have rounded corners?</p>
<pre><code> self.navigationController?.navigationBar.prefersLarge... | <p>so I found that this works, however, now my search bar text is black on purple vs white? - And I had to set the background color of the view to my purple color and then place a white background view on top of the view. Thoughts?</p>
<pre><code>override func viewDidLoad() {
super.viewDidLoad()
self.navi... | How do you round bottom corners of UINavigation bar with a search bar using large titles | swift|xcode|uinavigationbar | 0 | 45 | 2 | 72,290,624 | 72,290,624 | 0 | true | 2022-05-17T12:50:39.103Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do you round bottom corners of UINavigation bar with a search bar using large titles<p>When attempting to crate a UINavigationBar with a search bar and l... |
72,281,989 | Group time series by multiple colors ggplot2<p>Given the data below I would like to do the following:</p>
<ul>
<li>Color the graph by RCP.</li>
<li>RCP45 is <code>blue</code> and RCP85 is <code>red</code></li>
<li>Historical for RCP45 is <code>lightblue</code> and Future for RCP45 is <code>darkblue</code></li>
<li>RCP8... | <p>Like this?</p>
<pre><code># I prefer to define groups manually
datnew1$grp <- paste(datnew1$rcp, gsub("([a-zA-Z]*).*", "\\1", datnew1$window))
# Plot
ggplot(datnew1, aes(x=date, y=md, group=grp, color=grp)) +
geom_ribbon(aes(ymin=lw, ymax=up, fill=grp), alpha=0.2, color=NA) +
geom_line(si... | Group time series by multiple colors ggplot2 | r|ggplot2|colors | 2 | 45 | 1 | 72,291,162 | 72,291,162 | 0 | true | 2022-05-18T00:21:52.853Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Group time series by multiple colors ggplot2<p>Given the data below I would like to do the following:</p>
<ul>
<li>Color the graph by RCP.</li>
<li>RCP45 is ... |
72,292,850 | storing values in an array using react usestate hook<p>I have the following formik based example where I'm using primereact fileupload.
Everytime user uploads a file, the value of <code>selectedAssetCategoryId</code> is different. If a user is uploading multiple file at once then the value will remain the same. For exa... | <p>Let me answer this:</p>
<p><strong>Question 1:</strong></p>
<p><strong>Is <code>setUploadedFileCategory(uploadedFileCategory =>[...uploadedFileCategory,selectedAssetCategoryId]);</code> a correct way of pusing items in the array?</strong></p>
<p><strong>Answer</strong>
It works and here is the example code:</p>... | storing values in an array using react usestate hook | javascript|arrays|reactjs|react-hooks | 0 | 45 | 1 | 72,293,246 | 72,293,246 | 0 | true | 2022-05-18T16:28:58.460Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
storing values in an array using react usestate hook<p>I have the following formik based example where I'm using primereact fileupload.
Everytime user upload... |
72,293,161 | Unexpected result from Sum Over windowed function<p>This has been driving me crazy, any help is much appreciated. Code and results below - my question is simple. On the results line 4, the Activity does NOT match lag_Activity, why does the group number not increase?</p>
<pre><code>create table #exampleTable
(name ... | <p>Thanks to @ConorCunninghamMSFT for the tip, the lag functions and Sum Over function needed additional ordering. The order itself is less important than the fact that it stays consistent.</p>
<pre><code>select
sum(case when activity = lag_activity and starttime <= lag_endtime then 0 else 1 end) over(partition... | Unexpected result from Sum Over windowed function | sql|sql-server | 0 | 45 | 1 | 72,294,253 | 72,294,253 | 0 | true | 2022-05-18T16:53:54.620Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Unexpected result from Sum Over windowed function<p>This has been driving me crazy, any help is much appreciated. Code and results below - my question is sim... |
72,296,755 | It is a good practice type object pass as argument for a function with your parameter already typed?<p>I am working on a TypeScript project and I need to create a service function. So I create with this format:</p>
<pre><code>interface UserService {
name: string;
age: number;
complement: string;
}
const userServ... | <p>A selection of reasons why you should always use the first format:</p>
<ul>
<li><p>Documentation; the next person who reads the code (including you, in the future) can see exactly what you expected that object to be.</p>
</li>
<li><p>Your IDE can help you autocomplete the property names, because it can also see exac... | It is a good practice type object pass as argument for a function with your parameter already typed? | typescript | 0 | 45 | 1 | 72,296,923 | 72,296,923 | 0 | true | 2022-05-18T22:43:19.493Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
It is a good practice type object pass as argument for a function with your parameter already typed?<p>I am working on a TypeScript project and I need to cre... |
72,296,650 | Google Sheets Sidebar | HTML form, how do you parse the onsubmit formObject?<p>I'm creating a form in the sidebar to create new sheets based on a wide range of criteria. I've got about 27 inputs total. I have one text entry, and several groups of radio's and checkboxes.</p>
<p>I'm stuck at just creating a new sheet whe... | <p>In your script, how about the following modification? Please modify <code>Index.html</code> as follows.</p>
<h3>From:</h3>
<pre><code>var sheetName = formObject.sheetName;
</code></pre>
<h3>To:</h3>
<pre><code>var sheetName = formObject.sheetName.value;
</code></pre>
<ul>
<li><code>formObject.sheetName</code> is the... | Google Sheets Sidebar | HTML form, how do you parse the onsubmit formObject? | javascript|html|forms|google-apps-script|google-sheets | 1 | 45 | 1 | 72,297,360 | 72,297,360 | 0 | true | 2022-05-18T22:25:36.860Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Google Sheets Sidebar | HTML form, how do you parse the onsubmit formObject?<p>I'm creating a form in the sidebar to create new sheets based on a wide range ... |
72,304,922 | tally odbc xml export ( Timed out )<p>used send this xml through odbc</p>
<pre><code>objHTTP.Open "POST", URL, False
objHTTP.send (TallyString)
</code></pre>
<p>but returned timed out error with large data.
have no problem with small data. and tried different xmls . please help me to solve the error
</p>
<pre... | <p>You have 2 Options</p>
<h2><strong><a href="https://docs.microsoft.com/en-us/windows/win32/winhttp/iwinhttprequest-settimeouts" rel="nofollow noreferrer">Increase Timeout Limit</a></strong></h2>
<pre><code>objHTTP.SetTimeouts 300000, 300000, 300000, 300000
</code></pre>
<p>It will be milliseconds so If you want 5 mi... | tally odbc xml export ( Timed out ) | xml|vba|tally | 0 | 45 | 1 | 72,306,046 | 72,306,046 | 0 | true | 2022-05-19T12:53:22.967Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
tally odbc xml export ( Timed out )<p>used send this xml through odbc</p>
<pre><code>objHTTP.Open "POST", URL, False
objHTTP.send (TallyString)
</c... |
72,308,095 | Slider's width isn't updating without refreshing the page<p>When the page resizes "sliderContainerWidth" sticks with the same width, but if i refresh the page on any width its works fine.. I've tried using resize event as u guys can see i couldn't fixed it. It's not updating without refreshing the page..</p>
... | <p>If I'm understanding your issue correctly, you need to update the value inside of your event functions. It will not update if it's not getting set. The reason it only gets set when you refresh is because all the top-level javascript gets read when the page first loads.</p>
<pre><code>function sliderFunc() {
if (co... | Slider's width isn't updating without refreshing the page | javascript | 0 | 45 | 1 | 72,308,862 | 72,308,862 | 0 | true | 2022-05-19T16:31:07.173Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Slider's width isn't updating without refreshing the page<p>When the page resizes "sliderContainerWidth" sticks with the same width, but if i refre... |
72,310,636 | How to apply expression inside expression dynamically?<p>So, I have property, which is an expression.</p>
<pre><code>public Expression<Func<Profile, bool>> ManagerFilter { get; set; }
</code></pre>
<hr />
<p>Next, I want to implement this filter, which is the expression above dynamically here:</p>
<pre><cod... | <p>You can do that only with help from third party libraries. I would suggest to use <a href="https://github.com/scottksmith95/LINQKit" rel="nofollow noreferrer">LINQKit</a>. It needs just configuring <code>DbContextOptions</code>:</p>
<pre class="lang-cs prettyprint-override"><code>builder
.UseSqlServer(connection... | How to apply expression inside expression dynamically? | c#|.net|entity-framework|linq | -1 | 45 | 1 | 72,310,746 | 72,310,746 | 0 | true | 2022-05-19T20:19:40.930Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to apply expression inside expression dynamically?<p>So, I have property, which is an expression.</p>
<pre><code>public Expression<Func<Profile, bo... |
72,310,801 | How to add a value between a dom element?<p>This is my element:</p>
<pre><code><var mathquill-command-id="56"></var>
</code></pre>
<p>I want to add something between like this:</p>
<pre><code><var mathquill-command-id="56">HERE</var>
</code></pre>
<p>This is my process so far... | <p>Do something like this:</p>
<pre><code>p.innerHTML = 'HERE'
</code></pre> | How to add a value between a dom element? | javascript | 0 | 45 | 2 | 72,310,866 | 72,310,866 | 0 | true | 2022-05-19T20:37:00.053Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to add a value between a dom element?<p>This is my element:</p>
<pre><code><var mathquill-command-id="56"></var>
</code></pre>
<p>I... |
72,312,155 | How to change background image on Vimeo Portfolio Collections<p>I'm trying to change the background color to just black on this site: <a href="https://vimeopro.com/mbtv11/our-short-film-show" rel="nofollow noreferrer">https://vimeopro.com/mbtv11/our-short-film-show</a>. I have this code so far, but I can't get the wrap... | <p>Please post the actual code and not a link.</p>
<p>.wrapper .content has a background image. You need to remove it with the snippet below, or override it with !important.</p>
<pre><code>.wrapper .content { background: transparent; }
</code></pre> | How to change background image on Vimeo Portfolio Collections | css|background-color|vimeo | 0 | 45 | 1 | 72,312,174 | 72,312,174 | 0 | true | 2022-05-19T23:47:13.740Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to change background image on Vimeo Portfolio Collections<p>I'm trying to change the background color to just black on this site: <a href="https://vimeop... |
72,313,253 | How to select each number in a list with RegEx, but only after a specific set of characters?<p>I have the following RegEx:<br />
<code>/((?<=RGB:\s)\d*){1}[^,\s]+/gm</code> <br />
And the following text to use it on:<br /></p>
<pre><code>RGB: 123, 12, 5
HSV: 23, 119, 223
7
</code></pre>
<p>I am trying to have it sel... | <p>I would match on <code>\bRGB: (\d+, \d+, \d+)</code>, then split the first capture group on comma to get an array of string numbers.</p>
<pre class="lang-cs prettyprint-override"><code>var input = "RGB: 123, 12, 5\nHSV: 23, 119, 223\n7";
var pattern = @"\bRGB: (\d+, \d+, \d+)";
var match = Regex.... | How to select each number in a list with RegEx, but only after a specific set of characters? | c#|regex | 0 | 45 | 2 | 72,313,281 | 72,313,281 | 0 | true | 2022-05-20T03:24:29.147Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to select each number in a list with RegEx, but only after a specific set of characters?<p>I have the following RegEx:<br />
<code>/((?<=RGB:\s)\d*){1... |
72,315,077 | MySQL Throws error after defining the location of table<p>I have this 'information' table below with 4 columns in it: <code>'creator_id','viewer_id','date_format','donation'</code></p>
<pre><code>CREATE TABLE information (
creator_id INT NOT NULL,
viewer_id INT NOT NULL,
date_format DATE NOT NULL,
dona... | <p>Beside the problem the where clause must appear after the from, you don't need to do a division (which is risky because of possible divide by zero exceptions). You can use AVG, so "the creator_id that have the highest average of donation on date of '2014-01-02'" can be found that way:</p>
<pre><code>SELECT... | MySQL Throws error after defining the location of table | mysql|sql | 3 | 45 | 2 | 72,315,267 | 72,315,267 | 0 | true | 2022-05-20T07:28:17.317Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
MySQL Throws error after defining the location of table<p>I have this 'information' table below with 4 columns in it: <code>'creator_id','viewer_id','date_f... |
72,313,130 | Grok pattern (regex) to filter data from nested brackets<p>I've tried to apply grok pattern to filter nested brackets in the logs which is as below,</p>
<pre><code>[2022-05-20T02:21:54.715] [INFO] [{"id":"876g4jd8v36w0dhna2","data":"fetching public base-plans ..."}]
</code></pre>... | <p>Below is working fine and will filter as expected (regex)</p>
<pre><code>filter {
grok {
match => { "message" => "\[%{TIMESTAMP_ISO8601:time}\] \[%{WORD:logLevel}\] \[\{\"id\":%{DATA:id},\"data\":%{DATA:response}\]"}
}
}
</code></pre> | Grok pattern (regex) to filter data from nested brackets | amazon-web-services|azure|devops|logstash-grok|grok | 0 | 45 | 2 | 72,319,611 | 72,319,611 | 0 | true | 2022-05-20T03:02:55.567Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Grok pattern (regex) to filter data from nested brackets<p>I've tried to apply grok pattern to filter nested brackets in the logs which is as below,</p>
<pre... |
72,323,076 | How to name an anonymous function inside a javascript function based on passed parameters?<p>I want to give the anonymous function's name that is inside my function based on the parameters passed. For example, if the passed parameter is "nature" then I want to create an anonymous function with that name.</p>
... | <p>You can do it by passing a string as parameter.
Here how to assign a custom name and a custom function, if needed.</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>function h... | How to name an anonymous function inside a javascript function based on passed parameters? | javascript|function|parameter-passing|anonymous-function | 0 | 45 | 2 | 72,323,171 | 72,323,171 | 0 | true | 2022-05-20T17:58:39.863Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to name an anonymous function inside a javascript function based on passed parameters?<p>I want to give the anonymous function's name that is inside my f... |
72,323,099 | Java multiplication table, Writer writes in second line instead of first<p>It's supposed to be a multiplication table in the shape of a square,
but the writer doesn't write the numbers in the first line and the first column.</p>
<pre><code>try {
File file = new File("multi.txt");
// FileWriter Writer ... | <p>This should do it:</p>
<pre><code>import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
public class tmp {
public static void main(String[] args) {
try {
File file = new File("multi.txt");
// FileWriter Writer = new FileWriter("multi.txt... | Java multiplication table, Writer writes in second line instead of first | java|line|multiplication | 0 | 45 | 1 | 72,323,461 | 72,323,461 | 0 | true | 2022-05-20T18:00:40.060Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Java multiplication table, Writer writes in second line instead of first<p>It's supposed to be a multiplication table in the shape of a square,
but the write... |
72,312,222 | Rails 6 Bootstrap v3.4.1, jQuery 1.12.4 popover function is showing the Title but not the Body?<p>I am re-writing an application called FILTERtrak and it has been going great so far. I have added a subscription model to it, enhanced it in all kinds of ways and have really started to like Ruby and Rails a LOT. It was ... | <p>Ok I will have to file this one under What the Heck?!?
The issue was the popover would NOT display anything with the <strong>< dl ></strong> if HTML tag or <strong>%dl</strong> tag if HAML.</p>
<p>If you put the <strong>< dl ></strong> tag if <strong>HTML</strong> or the <strong>%dl</strong> if <strong>H... | Rails 6 Bootstrap v3.4.1, jQuery 1.12.4 popover function is showing the Title but not the Body? | javascript|jquery|ruby-on-rails|ruby|twitter-bootstrap-3 | 0 | 45 | 1 | 72,325,271 | 72,325,271 | 0 | true | 2022-05-20T00:02:59.810Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Rails 6 Bootstrap v3.4.1, jQuery 1.12.4 popover function is showing the Title but not the Body?<p>I am re-writing an application called FILTERtrak and it has... |
72,327,601 | How can I restrict a date input value?<p>I want to display an input type date from from today to future.</p>
<p>I tried this:</p>
<pre><code><input type="date" id="dateAppointment" name = "dateAppointment" min="2022-05-21" placeholder="date" required/>
</code></p... | <p>Yes indeed it is possible to make it thanks to javascript and I think that this answers detailed it perfectly : <a href="https://stackoverflow.com/questions/6982692/how-to-set-input-type-dates-default-value-to-today">How to set input type date's default value to today?</a>
Hope this is going to help you.</p> | How can I restrict a date input value? | html | 0 | 45 | 2 | 72,327,616 | 72,327,616 | 0 | true | 2022-05-21T07:37:54.893Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I restrict a date input value?<p>I want to display an input type date from from today to future.</p>
<p>I tried this:</p>
<pre><code><input type=&... |
72,324,594 | How to MATCH names which starting letters are defined in an interval<p>I have a movie dataset, which contains name of Directors and actresses. I want to catch all actresses names which start with letters between B to J. Except using 'OR' <code> MATCH (a:ACTOR)-[:PLAYED]-> (:MOVIE) WHERE a.Name STRATS WITH 'B' OR a.N... | <p>You could use <a href="https://neo4j.com/docs/cypher-manual/current/clauses/where/#query-where-regex" rel="nofollow noreferrer">Cypher Regular expressions</a></p>
<pre><code>MATCH (a:ACTOR)-[:PLAYED]->(:MOVIE)
WHERE toLower(a.name) =~ '[b-j].*'
RETURN a
</code></pre>
<p>Checking for all names that start with a c... | How to MATCH names which starting letters are defined in an interval | neo4j|cypher | 0 | 45 | 1 | 72,328,672 | 72,328,672 | 0 | true | 2022-05-20T20:43:16.457Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to MATCH names which starting letters are defined in an interval<p>I have a movie dataset, which contains name of Directors and actresses. I want to catc... |
72,334,568 | How to make three buttons in one line span the entire page?<p>I want to make the three buttons span the entire page equally, does anybody know how?</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html pret... | <p>Set the width of <code>table</code> and <code>input</code> to <code>100%</code>. A bit of explanation, setting the width of <code>table</code> to <code>100%</code> makes it span across the page giving the <code>input</code> children of it equal width of <code>(100/3)%</code> (3 input elements) of the page width. Now... | How to make three buttons in one line span the entire page? | html|css | 2 | 45 | 2 | 72,334,599 | 72,334,599 | 0 | true | 2022-05-22T03:18:16.823Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to make three buttons in one line span the entire page?<p>I want to make the three buttons span the entire page equally, does anybody know how?</p>
<p><d... |
72,320,947 | Networkx with custom cost function for path<p>I have the situation shown below where there is a weighted graph.</p>
<p><a href="https://i.stack.imgur.com/sWlUZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sWlUZ.png" alt="Graph" /></a></p>
<p>I am trying to get the best path from A to D based on a ... | <p>One way is to iterate over all paths and select the optimal one using a custom function. This is the rough (pseudo)code:</p>
<pre class="lang-py prettyprint-override"><code>from networkx import all_simple_paths
paths = all_simple_paths(G, source, target)
costs = []
for p in paths:
# obtain the edge weights and... | Networkx with custom cost function for path | python|graph|networkx | 1 | 45 | 1 | 72,334,638 | 72,334,638 | 0 | true | 2022-05-20T14:51:34.493Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Networkx with custom cost function for path<p>I have the situation shown below where there is a weighted graph.</p>
<p><a href="https://i.stack.imgur.com/sWl... |
72,311,240 | A type error of "MediaStream" occurs when using "addTrack" in React's useRef<p>A type error occurs in <code>myStreamRef.current</code> inside <code>addTrack</code>.</p>
<pre><code>const myStreamRef = useRef<MediaStream>();
...
if (myStreamRef.current) {
myStreamRef.current.getTracks().forEach((track) => {
... | <p>This problem arose because the internal methods had to operate independently.</p> | A type error of "MediaStream" occurs when using "addTrack" in React's useRef | reactjs|typescript|typeerror|use-ref|mediastream | 0 | 45 | 1 | 72,336,715 | 72,336,715 | 0 | true | 2022-05-19T21:24:44.303Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
A type error of "MediaStream" occurs when using "addTrack" in React's useRef<p>A type error occurs in <code>myStreamRef.current</code> inside <code>addTrack<... |
72,310,135 | Weird behavior of JS function "every()"<p>Please, can someone explain me behavior of function <strong>every</strong>.</p>
<p>I have an array and I want to apply function <strong>every</strong> to it. Function <strong>every</strong> is taking a predicate.</p>
<p>My simple predicate:</p>
<pre><code>function test() {
re... | <p><code>...arg</code> is like a passing of all the arguments that <code>.every</code> method accepts.</p>
<p>i.e. An array <code>element</code>, <code>index of the element</code> and a <code>whole array</code>.</p>
<p>Hence, to print values as an array. You can simply return the values in a square bracket.</p>
<p>Demo... | Weird behavior of JS function "every()" | javascript|arrays|function|predicate | -2 | 45 | 2 | 72,336,924 | 72,336,924 | 0 | true | 2022-05-19T19:29:04.560Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Weird behavior of JS function "every()"<p>Please, can someone explain me behavior of function <strong>every</strong>.</p>
<p>I have an array and I want to ap... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.