question_id int64 37.6M 73.2M | input_text stringlengths 88 52.4k | output_text stringlengths 37 35.6k | title stringlengths 15 150 | tags stringlengths 1 107 | q_score int64 -19 397 | view_count int64 3 879k | answer_count int64 1 21 | accepted_answer_id int64 37.6M 73.8M | answer_id int64 37.6M 73.8M | a_score int64 -5 1.29k | is_accepted bool 1
class | creation_date stringlengths 20 24 | input_text_instruct stringlengths 251 52.6k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
72,156,528 | Copy contents from one Dataframe to another based on column values in Pandas<p>Two seperate similar DataFrames with different lengths</p>
<p><code>df2</code>=</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th style="text-align: center;">Index</th>
<th style="text-align: center;">First Name</t... | <p>Building off of Rabinzel's answer:</p>
<pre><code>output = df2.merge(df1, how='left', on='First Name', suffixes=[None, '_old'])
df3 = output[['First Name', 'Age', 'Gender', 'Weight', 'Height']]
cols = df1.columns[1:-1]
modval = pd.DataFrame()
for col in cols:
modval = pd.concat([modval, output[['First Name', co... | Copy contents from one Dataframe to another based on column values in Pandas | python|pandas|dataframe | 0 | 113 | 2 | 72,157,244 | 72,157,244 | 2 | true | 2022-05-07T21:37:15.717Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Copy contents from one Dataframe to another based on column values in Pandas<p>Two seperate similar DataFrames with different lengths</p>
<p><code>df2</code>... |
72,157,219 | How to keep program unclosed after ctr+c in named pipe?<p>I have 2 programs.
One is server one is client. The Client sending string to the server, the server is swapping the string and return to the client.
the problems I have is when I pressing ctr+c the program(client) closed.(I'm using threads because I have been a... | <blockquote>
<p>To avoid closing a program you should capture and
manage the signal sent by CTRL + C, that is SIGINT, I have modified the code so that it captures the signal CTRL + C</p>
</blockquote>
<pre><code>#include <signal.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#i... | How to keep program unclosed after ctr+c in named pipe? | c|named-pipes|fifo|mkfifo | 0 | 26 | 1 | 72,157,267 | 72,157,267 | 2 | true | 2022-05-08T00:11:26.440Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to keep program unclosed after ctr+c in named pipe?<p>I have 2 programs.
One is server one is client. The Client sending string to the server, the server... |
72,156,091 | How insert or connect two procedures?<p>Hi I have a menu in which I have a print part for the memo and now I don't know how to when I click that part to run this print code I found. <br>
How to link or possibly insert this part of the
<br> PrintTStrings procedure (Lst: TStrings);
in the part that is the menu of the pro... | <p>You have to declare the <code>PrintStrings</code> procedure before you can use it. The proper way would be to make <code>PrintTStrings</code> a method of your form by declaring it in the <code>private</code> section of the form declaration:</p>
<pre><code>type
TForm1 = class(TForm)
// Items you've dropped on t... | How insert or connect two procedures? | delphi|lazarus | 0 | 165 | 1 | 72,157,333 | 72,157,333 | 2 | true | 2022-05-07T20:22:01.667Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How insert or connect two procedures?<p>Hi I have a menu in which I have a print part for the memo and now I don't know how to when I click that part to run ... |
72,157,692 | React.js private route related issue when trying to signup or login<p>I am getting this error "Cannot update a component (<code>BrowserRouter</code>) while rendering a different component (<code>Login</code>). To locate the bad setState() call inside <code>Login</code>" whenever I try to signUp or log in. I t... | <p>It's because you try to navigate out in the open within the Login component.</p>
<pre><code>if (user || fbUser|| gUser) {
navigate(from, { replace: true });
}
</code></pre>
<p>By invoking navigate here, you're causing an update in the navigation context, which in turn can trigger a rerender while Login is still re... | React.js private route related issue when trying to signup or login | javascript|reactjs|react-router | 0 | 56 | 1 | 72,157,713 | 72,157,713 | 2 | true | 2022-05-08T02:40:01.130Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
React.js private route related issue when trying to signup or login<p>I am getting this error "Cannot update a component (<code>BrowserRouter</code>) wh... |
72,157,469 | How to add code to AppDelegate using SwiftUI Life Cycle<p>I'm following Google's tutorial on how to integrate AdMob ads into my app. In the tutorial, they put some code into the App Delegate. I've only ever used the SwiftUI life cycle for apps, so I'm not even sure what the App Delegate is. However, the issue is that i... | <p>The <code>init</code> might be too early, try in app delegate as follows</p>
<pre><code>import GoogleMobileAds
class AppDelegate: NSObject, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Boo... | How to add code to AppDelegate using SwiftUI Life Cycle | swift|xcode|swiftui|admob|appdelegate | 0 | 191 | 1 | 72,158,079 | 72,158,079 | 2 | true | 2022-05-08T01:33:36.103Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to add code to AppDelegate using SwiftUI Life Cycle<p>I'm following Google's tutorial on how to integrate AdMob ads into my app. In the tutorial, they pu... |
72,157,371 | Vue 3 - V-Model Confusion<p>I am teaching myself <code>vue 3</code>. I have read article after article on <code>v-model</code> and each time I think I understand how it works I get confused again.</p>
<p>My goal: I built a custom dropdown component. I need the ability to control the value of this dropdown from the p... | <p>If you want to call a method inside your parent component when the "select value changes", It is better to call it inside a Vue <strong>watch</strong> like the codes below:</p>
<blockquote>
<p>Parent component:</p>
</blockquote>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" d... | Vue 3 - V-Model Confusion | javascript|vue.js|vuejs3 | 0 | 74 | 2 | 72,158,191 | 72,158,191 | 2 | true | 2022-05-08T00:55:55.843Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Vue 3 - V-Model Confusion<p>I am teaching myself <code>vue 3</code>. I have read article after article on <code>v-model</code> and each time I think I under... |
72,158,073 | Pattern matching for headOption with enum<p>The problem I'm trying to solve is to check if the first element (if any) of a list is of a certain enum type. As follows:</p>
<pre><code>enum Color(val rgb: Int):
case Red extends Color(0xFF0000)
case Green extends Color(0x00FF00)
case Blue extends Color(0x0000FF)
... | <p>How about this:</p>
<pre><code>scala> enum Color(val rgb: Int):
| case Red extends Color(0xFF0000)
| case Green extends Color(0x00FF00)
| case Blue extends Color(0x0000FF)
| case CustomColor(override val rgb: Int) extends Color(rgb)
|
| enum Error:
| case ExpectRed
... | Pattern matching for headOption with enum | scala|pattern-matching | 0 | 25 | 1 | 72,158,342 | 72,158,342 | 2 | true | 2022-05-08T04:30:46.647Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pattern matching for headOption with enum<p>The problem I'm trying to solve is to check if the first element (if any) of a list is of a certain enum type. As... |
72,157,509 | Can't install Script on Atom editor<p>Just installed Atom and tried to install Script to run my code (Windows user)</p>
<p>I tried from the <a href="https://atom.io/packages/script" rel="nofollow noreferrer">website</a> but when clicking Install, it says <code>Launching Atom... If nothing happens, download Atom and try... | <p>Atom wasn't set as the default program to open atom:// links.</p>
<p>Once I activated it from the Settings -> URI Handling I could install Script from the website</p>
<p><a href="https://i.stack.imgur.com/NleaC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NleaC.png" alt="enter image descript... | Can't install Script on Atom editor | python|atom-editor | 0 | 1,898 | 1 | 72,158,586 | 72,158,586 | 2 | true | 2022-05-08T01:44:01.673Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Can't install Script on Atom editor<p>Just installed Atom and tried to install Script to run my code (Windows user)</p>
<p>I tried from the <a href="https://... |
72,158,797 | How to display a spinner when data is loading from server by fetch api in REACT JS?<p>I am developing a React app where I have to load data from the server on the home page. It takes a small amount of time when loading data from the server. I want to display a spinner when the fetch api is called. I already created a s... | <p>Control your loader state with hooks and use <code>.finally()</code> to convert your loading state back to false.</p>
<pre><code>import { useEffect, useState } from 'react';
export default function Home() {
const [loading, setLoading] = useState(false);
useEffect(() => {
setLoading(true);
... | How to display a spinner when data is loading from server by fetch api in REACT JS? | reactjs|spinner|loading | 0 | 1,366 | 2 | 72,158,837 | 72,158,837 | 2 | true | 2022-05-08T07:02:53.787Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to display a spinner when data is loading from server by fetch api in REACT JS?<p>I am developing a React app where I have to load data from the server o... |
72,150,038 | php HeadlessChromium\BrowserFactory not found in file.php<pre><code><?php
use HeadlessChromium\BrowserFactory;
$browserFactory = new BrowserFactory();
?>
</code></pre>
<p>I've installed chrome-php/chrome with composer and hovering my mouse over the class will give me the details but when I try to run the code I... | <p>When using composer you need to <a href="https://getcomposer.org/doc/01-basic-usage.md#autoloading" rel="nofollow noreferrer">include the autoloader</a> on top of the script.</p>
<pre><code><?php
require __DIR__ . '/vendor/autoload.php';
use HeadlessChromium\BrowserFactory;
$browserFactory = new BrowserFactory(... | php HeadlessChromium\BrowserFactory not found in file.php | php|debugging|visual-studio-code|headless|headless-browser | 0 | 135 | 1 | 72,158,965 | 72,158,965 | 2 | true | 2022-05-07T06:29:10Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
php HeadlessChromium\BrowserFactory not found in file.php<pre><code><?php
use HeadlessChromium\BrowserFactory;
$browserFactory = new BrowserFactory();
?... |
72,157,539 | instantiate gameobject then show ui<p>I try to instantiate a GameObject and then make the button show on the screen, but I found I can't use SetActive(false) and then set true, to show the UI, Because I can't find the false object.</p>
<p>is there a better way to do that?</p> | <p>I am a little confused.</p>
<p>Remember, that people can't see your screen or what you are doing, so you need to explain it in a lot of detail.</p>
<p>If I read that correctly and think what you see is what I think, then it's this:</p>
<ol>
<li>You Instantiate a new GameObject</li>
<li>You want a button to be enable... | instantiate gameobject then show ui | unity3d | 0 | 28 | 1 | 72,159,239 | 72,159,239 | 2 | true | 2022-05-08T01:52:04.587Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
instantiate gameobject then show ui<p>I try to instantiate a GameObject and then make the button show on the screen, but I found I can't use SetActive(false)... |
72,159,432 | 'int' object not callable when opening a file in python<p>I am getting what seems to be an odd error when trying to open a file in python. I am simply trying to open a csv:</p>
<p><code>with open(filename, 'a') as history:</code></p>
<p>filename is simply a string pointing the file:</p>
<p><code>filename = file_path +... | <p>It looks like you may have defined <code>open</code> as a variable somewhere else with an int value. This is causing the error message.</p> | 'int' object not callable when opening a file in python | python | 0 | 61 | 1 | 72,159,462 | 72,159,462 | 2 | true | 2022-05-08T08:53:52.813Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
'int' object not callable when opening a file in python<p>I am getting what seems to be an odd error when trying to open a file in python. I am simply tryin... |
72,159,014 | what's the shortcut for copying cursor's current line?<p>what's the shortcut for copying cursor's current line?
In matlab's preference setting, I can't find it in the the shortcut key panel.</p> | <p>Just select the current line and press <kbd>Ctrl</kbd>+<kbd>C</kbd>.</p>
<p>For selecting the line, press <kbd>Home</kbd> button to take the cursor to the beginning of line and then press <kbd>Shift</kbd>+<kbd>End</kbd> to select the line to its end. These steps work in multiple applications; not just MATLAB.</p>
<p... | what's the shortcut for copying cursor's current line? | matlab|keyboard-shortcuts | 0 | 56 | 1 | 72,159,497 | 72,159,497 | 2 | true | 2022-05-08T07:42:14.807Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
what's the shortcut for copying cursor's current line?<p>what's the shortcut for copying cursor's current line?
In matlab's preference setting, I can't find ... |
72,160,273 | Need a dynamic size buffer when listening to a udpsocket<p>This is the current code listening to the udpsocket at port: 34254</p>
<pre><code>use std::net::UdpSocket;
use std::str;
fn main() -> std::io::Result<()> {
{
let socket = UdpSocket::bind("127.0.0.1:34254").expect("couldn't b... | <blockquote>
<p>Now, the length of my data will vary and I cannot give a size like "2048"</p>
</blockquote>
<p>Do you have packed the length information of your data into the packet data? For example, the leading 4 bytes containing the length of the entire packet.</p>
<p>If you have such information, you coul... | Need a dynamic size buffer when listening to a udpsocket | rust|udp|buffer | 0 | 226 | 1 | 72,160,580 | 72,160,580 | 2 | true | 2022-05-08T10:52:50.153Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Need a dynamic size buffer when listening to a udpsocket<p>This is the current code listening to the udpsocket at port: 34254</p>
<pre><code>use std::net::Ud... |
72,160,278 | How to make a state disappear after some time (React)?<p>I have a state in useState hook and I want to make it disappear after a particular time frame. I tried using setTimeout() but it does not work.</p>
<pre><code>export const Profile = () => {
let { username } = useParams();
const [bio, setBio] = useState(&q... | <p>Use a combination with <code>useEffect()</code> and <code>setTimeout()</code> in the following manner:</p>
<pre><code>let timeoutId = null;
export function App(props) {
const [updated, setUpdated] = useState("");
useEffect(() => {
// if there's a message in updated
if(updated.length > ... | How to make a state disappear after some time (React)? | reactjs|react-native | 0 | 89 | 1 | 72,160,696 | 72,160,696 | 2 | true | 2022-05-08T10:53:55.313Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to make a state disappear after some time (React)?<p>I have a state in useState hook and I want to make it disappear after a particular time frame. I tri... |
72,160,803 | DataTable in C# - named rows<p>Is it possible to give name for each row in <code>DataTable</code>? I would like to simply refer to the given cell in <code>DataTable</code> by typing</p>
<pre><code>myDataTable.Rows["Row1"]["Column1"]
</code></pre>
<p>instead passing Row Index as int.</p> | <p>You can't do this, because rows are only indexed by their row index. Columns are indexed by their column index and column name. If you need to reference rows by a name, you must create your own index:</p>
<pre class="lang-cs prettyprint-override"><code>var rowNameToIndexMap = new Dictionary<string, int>();
var... | DataTable in C# - named rows | c# | 0 | 40 | 1 | 72,161,034 | 72,161,034 | 2 | true | 2022-05-08T12:02:59.783Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
DataTable in C# - named rows<p>Is it possible to give name for each row in <code>DataTable</code>? I would like to simply refer to the given cell in <code>Da... |
72,160,382 | group by year of birth<p>I've a table sales</p>
<pre><code>idcustomer year of birth amount salesdate
112 1970 200 12/02/2022
12 1980 400 12/03/2012
122 1990 600 12/04/2012
300 1977 20 12/06/2012
500 1996 250 12/04/2012
</code></pre>
<p>I need to see how different agegroups perform, how much is sale... | <p>Not exactly clear what you want.</p>
<p>I assumed you always wanted your groupings to start on a multiple of five.</p>
<ul>
<li>create a list of groupings based on the earliest date of birth rounded down to the nearest multiple of five.</li>
<li>Add a column which has the start year of the grouping</li>
<li>Add anot... | group by year of birth | powerbi|dax|powerquery | 0 | 64 | 2 | 72,161,057 | 72,161,057 | 2 | true | 2022-05-08T11:06:03.250Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
group by year of birth<p>I've a table sales</p>
<pre><code>idcustomer year of birth amount salesdate
112 1970 200 12/02/2022
12 1980 400 12/03/201... |
72,160,783 | scope of a variable inside of a nested loop<p>I am trying to read through an <code>ActiveStorage::Attached::One</code> object that is a txt file uploaded by the user.</p>
<p>Could anyone help me why the variable 'grid' inside the <code>line.chars.each_with_index</code> is nil?</p>
<pre class="lang-rb prettyprint-overri... | <p>Whenever <code>row_index</code> is not equal to <code>0</code> or equal to <code>1</code>, <code>grid</code> is not assigned and therefore evaluates to <code>nil</code>. In other words, whenever <code>txt_fle</code> has three lines or more, <code>grid</code> will be <code>nil</code> at some point.</p> | scope of a variable inside of a nested loop | ruby-on-rails|ruby|rails-activestorage | 0 | 68 | 1 | 72,161,220 | 72,161,220 | 2 | true | 2022-05-08T12:00:17.420Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
scope of a variable inside of a nested loop<p>I am trying to read through an <code>ActiveStorage::Attached::One</code> object that is a txt file uploaded by ... |
72,160,961 | How to calculate speed of transitions between two event categories in column in a pandas dataframe?<p>I have a pandas dataframe</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th></th>
<th>ID</th>
<th>api_timestamp</th>
<th>event_level</th>
</tr>
</thead>
<tbody>
<tr>
<td>0</td>
<td>A9</td>
<t... | <p>Idea is to sort the <code>api_timestamp</code> column and find the <code>L2</code> event between <code>L1</code> event by comparing the index of <code>L2</code> event and the max and min index of <code>L1</code> event.</p>
<pre class="lang-py prettyprint-override"><code>df['api_timestamp'] = pd.to_datetime(df['api_t... | How to calculate speed of transitions between two event categories in column in a pandas dataframe? | python|pandas|window | 0 | 46 | 1 | 72,161,242 | 72,161,242 | 2 | true | 2022-05-08T12:25:22.703Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to calculate speed of transitions between two event categories in column in a pandas dataframe?<p>I have a pandas dataframe</p>
<div class="s-table-conta... |
72,161,136 | ORA-00904, Code Newbie I need help in identifying what's wrong<pre><code>CREATE TABLE TASK_SKILL (TASK_ID INT REFERENCES PROJECT_SCHEDULE_TASK(TASK_ID),
SKILL_ID INT REFERENCES PROJECT(PROJECT_ID),
NUMBER_OF_EMPLOYEES INT,
PRIMARY KEY (TASK_ID, PROJECT_ID, SKILL_ID));
</c... | <p>You are creating a table TASK_SKILL with 3 fiels: TASK_ID, SKILL_ID and NUMBER_OF_EMPLOYEES. Also you want to create a Primary Key by TASK_ID, PROJECT_ID, SKILL_ID. Oracle is right, you do not have a PROJECT_ID field in your table.
Your field is called SKILL_ID, so the Primary key should be created using it, like th... | ORA-00904, Code Newbie I need help in identifying what's wrong | sql|oracle | 0 | 29 | 2 | 72,161,246 | 72,161,246 | 2 | true | 2022-05-08T12:45:57.777Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
ORA-00904, Code Newbie I need help in identifying what's wrong<pre><code>CREATE TABLE TASK_SKILL (TASK_ID INT REFERENCES PROJECT_SCHEDULE_TASK(TASK_ID),
... |
72,160,937 | How can I place multiple QToolButton one after the other, instead of being one below the other<p>I am working on a QT project that makes it possible to view and edit table views from a given file.
For the buttons in the GUI I'm using QToolButton, but when more than one button is created, they are placed one below the o... | <p>Put them in a horizontal layout or a widget with horizontal layout. You can also use a grid layout for your window and make the table span all columns.</p>
<p>There is also the QButtonBox that has a number of default buttons with default icons that might mesh better with the users theme.</p> | How can I place multiple QToolButton one after the other, instead of being one below the other | c++|qt|qtoolbutton | 0 | 41 | 1 | 72,161,276 | 72,161,276 | 2 | true | 2022-05-08T12:22:06.367Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I place multiple QToolButton one after the other, instead of being one below the other<p>I am working on a QT project that makes it possible to view ... |
72,159,171 | actual machine code to execute what Win APIs do stays in OS kernel memory space or compiled together as part of the app?<p>If this question deals with too basic a matter, please forgive me.</p>
<p>As a somewhat-close-to-beginner-level programmer, I really wonder about this--whether the underlying code of every win API ... | <p>The implementation for (most) API calls is provided by the system by way of compiled modules (<a href="https://en.wikipedia.org/wiki/Portable_Executable" rel="nofollow noreferrer">Portable Executable</a> images). Application code only contains enough information so that the system can identify and load the required ... | actual machine code to execute what Win APIs do stays in OS kernel memory space or compiled together as part of the app? | winapi|operating-system | 0 | 41 | 1 | 72,161,470 | 72,161,470 | 2 | true | 2022-05-08T08:08:59.770Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
actual machine code to execute what Win APIs do stays in OS kernel memory space or compiled together as part of the app?<p>If this question deals with too ba... |
72,159,688 | Make a direct call to Kubernetes pod<p>I have several pods running inside the Kubernetes cluster.
How I can make http call to a specific Pod, without calling LoadBalancer service?</p> | <p><code>...make http call to a specific Pod, without calling LoadBalancer service?</code></p>
<p>There are several ways, try <code>kubectl port-forward <pod name> 8080:80</code>, then open another terminal and you can now do <code>curl localhost:8080</code> which will forward your request to the pod. More detail... | Make a direct call to Kubernetes pod | http|kubernetes|kubernetes-pod | 0 | 121 | 1 | 72,161,492 | 72,161,492 | 2 | true | 2022-05-08T09:30:52.420Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Make a direct call to Kubernetes pod<p>I have several pods running inside the Kubernetes cluster.
How I can make http call to a specific Pod, without calling... |
72,161,110 | Ways to fix muttable borrowing of self in arguments to function that borrows muttable self<p>I have some code like this (<a href="https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=99520256edc5573ee2241c413d86a41f" rel="nofollow noreferrer">playground</a>). Why does the compiler think i... | <p>Taking apart that your methods do not need to be <code>&mut</code> and that is just for the example.</p>
<blockquote>
<p>How can i solve this problem without adding new variable that storing argument as the compiler tells?</p>
</blockquote>
<p><strong>At the moment, you can't</strong>. The way is to move the inn... | Ways to fix muttable borrowing of self in arguments to function that borrows muttable self | rust|borrow-checker | 0 | 78 | 1 | 72,161,562 | 72,161,562 | 2 | true | 2022-05-08T12:43:33.933Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Ways to fix muttable borrowing of self in arguments to function that borrows muttable self<p>I have some code like this (<a href="https://play.rust-lang.org/... |
72,161,741 | p5.js ReferenceError: keyDown is not defined<p>Created this simple code that should move a rect in <code>p5.js</code>. I get the error <code>ReferenceError: keyDown is not defined</code>. What's wrong? Do I have to install any other libraries or is it a syntax error?</p>
<pre><code>function setup() {
createCanvas(... | <p>Syntax error. The correct way to check for a keypress is <code>KeyIsDown(keycode)</code>:</p>
<pre><code>function setup() {
createCanvas(400, 400);
}
let x = 0;
let y = 0;
function draw() {
if (keyIsDown(68)) // d
{
x += 3
}
if (keyIsDown(65)) // a
{
x -= 3
}
if (k... | p5.js ReferenceError: keyDown is not defined | javascript|p5.js | 0 | 75 | 1 | 72,161,760 | 72,161,760 | 2 | true | 2022-05-08T13:59:56.340Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
p5.js ReferenceError: keyDown is not defined<p>Created this simple code that should move a rect in <code>p5.js</code>. I get the error <code>ReferenceError: ... |
72,162,384 | How to get the parent of a JSON element?<p>How can I get the parent of the element in JSON? For example, In the JSON below,</p>
<p>When I use <code>print(json["phones"])</code>, the result I want to happpen is:</p>
<pre><code>[iphone1, iphone2]
</code></pre>
<p>but instead, I am getting this:</p>
<pre><code>... | <blockquote>
<p>When I print(json["phones"]), the result I want to happpen is:</p>
<pre><code>[iphone1, iphone2]
</code></pre>
</blockquote>
<p>What do you mean by <code>iphone1</code>? You mean <code>"iphone1"</code>?</p>
<hr />
<p>What you want are the <code>key</code>s of the JSON <code>object</... | How to get the parent of a JSON element? | python | 0 | 43 | 1 | 72,162,412 | 72,162,412 | 2 | true | 2022-05-08T15:14:02.710Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to get the parent of a JSON element?<p>How can I get the parent of the element in JSON? For example, In the JSON below,</p>
<p>When I use <code>print(jso... |
72,162,298 | How to update constraints programmatically if I would like to change every time<p>I have an imageView that is supposed to go up or down according to a value changing every time.</p>
<p>I am keeping a reference to the bottom constraint of imageView and changing this constant according to constant value.</p>
<p>These ass... | <p>Since you are using SnapKit, you need to use its <code>.updateConstraints</code> syntax.</p>
<p>This example will toggle <code>.imageConstraint</code> between 50.0 and -50.0 on any touch, and animate the image view:</p>
<pre><code>class SnapVC: UIViewController {
let imageView = UIImageView()
priva... | How to update constraints programmatically if I would like to change every time | ios|swift|autolayout | 0 | 227 | 1 | 72,162,494 | 72,162,494 | 2 | true | 2022-05-08T15:03:38.210Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to update constraints programmatically if I would like to change every time<p>I have an imageView that is supposed to go up or down according to a value ... |
72,162,584 | Laravel get the data and display it in the blade html failed<p>I am trying to get data from the database and simply display it in the view</p>
<pre><code>public function index()
{
$messages = ProjectInterestedMessages::get();
return view('dashboard/projects-interests', compact($messages));
}
</code></pre>
<p>T... | <p>The PHP method <code>compact()</code> is a little tricky with its syntax. I make this same mistake all the time.</p>
<p>Change:</p>
<pre><code>return view('dashboard/projects-interests', compact($messages));
</code></pre>
<p>to:</p>
<pre><code>return view('dashboard/projects-interests', compact('messages'));
</code... | Laravel get the data and display it in the blade html failed | php|laravel | 0 | 38 | 3 | 72,162,678 | 72,162,678 | 2 | true | 2022-05-08T15:38:06.957Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Laravel get the data and display it in the blade html failed<p>I am trying to get data from the database and simply display it in the view</p>
<pre><code>pub... |
72,155,657 | MouseClick Event on PyQt Folder Tree<p>I have coded out a small application using PyQt5. The application gives a tree view of all folders in the computer plus a lineEditd where the user can type things:</p>
<pre><code>import sys
from PyQt5.QtWidgets import (
QMainWindow, QApplication,
QHBoxLayout,QWidget,
... | <p>If you want to get the directory using the view's clicked signal then you should use the model:</p>
<pre><code>self.tree.clicked.connect(self.handle_clicked)
</code></pre>
<pre><code>def handle_clicked(self, index):
filename = self.model.fileName(index)
path = self.model.filePath(index)
fileinfo = self.m... | MouseClick Event on PyQt Folder Tree | python|pyqt|pyqt5|file-browser | 0 | 61 | 1 | 72,163,008 | 72,163,008 | 2 | true | 2022-05-07T19:07:12.080Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
MouseClick Event on PyQt Folder Tree<p>I have coded out a small application using PyQt5. The application gives a tree view of all folders in the computer plu... |
72,163,346 | what's wrong with this basic scheme function<p>I'm trying to write a scheme function that does the following (taken from SICP):</p>
<blockquote>
<p>Exercise 1.3. Define a procedure that takes three numbers as arguments
and returns the sum of the squares of the two larger numbers.</p>
</blockquote>
<p>Here's my attempt:... | <pre><code>(define (square-sum-larger a b c)
(cond ((and (< a b) (< a c))) (+ (* b b) (* c c))) ;; this is thrown away
(cond ((and (< b c) (< b a))) (+ (* a a) (* c c))) ;; this is thrown away
(cond ((and (< c a) (< c b))) (+ (* b b) (* a a)))
)
</code></pre>
<p>Only the last of the three <code>... | what's wrong with this basic scheme function | function|scheme|lisp | 0 | 54 | 2 | 72,163,381 | 72,163,381 | 2 | true | 2022-05-08T17:04:59.247Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
what's wrong with this basic scheme function<p>I'm trying to write a scheme function that does the following (taken from SICP):</p>
<blockquote>
<p>Exercise ... |
72,163,353 | Python JWT doesn't validate with google public key<p>Tried to decode the JWT provided by the google. I have used phone number authentication with google and returned <code>verifyIdToken</code> which is a jwt token. I have tried to verify with the jwt package available in python but it throws error.</p>
<p>When I tried ... | <p>I was able to reproduce the following:</p>
<pre class="lang-py prettyprint-override"><code>import jwt
key = "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAu1SU1LfVLPHCozMxH2Mo4lgOEePzNm0tRgeLezV6ffAt0gunVTLw7onLRnrq0/IzW7yWR7QkrmBL7jTKEn5u+qKhbwKfBstIs+bMY2Zkp18gnTxKLxoS2tFczGkPLPgizs... | Python JWT doesn't validate with google public key | python|jwt|cryptography|pycrypto | 0 | 487 | 1 | 72,163,567 | 72,163,567 | 2 | true | 2022-05-08T17:05:43.443Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python JWT doesn't validate with google public key<p>Tried to decode the JWT provided by the google. I have used phone number authentication with google and ... |
72,163,316 | System V Semaphores - semop() in different function<p>I created and initialized System V semaphores with <code>semget()</code> and <code>semctl()</code> in the main function, but the <code>semop()</code> function is called in a different function. I simply passed the ids of the semaphores as parameters to that functio... | <blockquote>
<p>Does this work or should <code>semop()</code> be called in the same function as <code>semget()</code> and <code>semctl()</code>?</p>
</blockquote>
<p>The id of a semaphore set, as obtained from <code>semget()</code>, is a process-scoped handle on an object (the semaphore set) with kernel persistence. O... | System V Semaphores - semop() in different function | c|semaphore | 0 | 56 | 1 | 72,163,689 | 72,163,689 | 2 | true | 2022-05-08T17:01:28.370Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
System V Semaphores - semop() in different function<p>I created and initialized System V semaphores with <code>semget()</code> and <code>semctl()</code> in ... |
72,161,870 | How can I read input values written by a user? In PL/SQL<pre><code>DECLARE
text VARCHAR2(20) := &text;
BEGIN
DBMS_OUTPUT.PUT_LINE(text);
END;
</code></pre>
<p>When I declare this anonymous block so that the user enters a value by keyboard, it shows me an error in the console output.</p>
<p>This is the error:</... | <p>As this is a substitution variable whose datatype is <code>varchar2</code>, enclose it into single quotes (as any other string):</p>
<pre><code>SQL> declare
2 text varchar2(20) := '&text'; --> this
3 begin
4 dbms_output.put_line(text);
5 end;
6 /
Enter value for text: Hello
ol... | How can I read input values written by a user? In PL/SQL | oracle|plsql | 0 | 40 | 2 | 72,164,187 | 72,164,187 | 2 | true | 2022-05-08T14:16:20.647Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I read input values written by a user? In PL/SQL<pre><code>DECLARE
text VARCHAR2(20) := &text;
BEGIN
DBMS_OUTPUT.PUT_LINE(text);
END;
</code... |
72,163,357 | SDL mingw static lib linking errors<p>I'm trying to compile a simple SDL program using Mingw w64. Here is my code:</p>
<p>test.c</p>
<pre><code>#include "SDL2/SDL.h"
#include <stdio.h>
int main( int argc, char* args[] )
{
SDL_Window *window;
SDL_Init(SDL_INIT_VIDEO);
window = SDL_CreateWind... | <p>You have two options, depending on your intent:</p>
<ul>
<li><p>If you want to link SDL2 dynamically (this should be your default course of action), you need to add <code>libSDL2.dll.a</code> to your library directory. Then <code>libSDL2.a</code> will be ignored and can be removed. It should just work, no other chan... | SDL mingw static lib linking errors | c++|c|linker|sdl|mingw-w64 | 0 | 98 | 1 | 72,164,530 | 72,164,530 | 2 | true | 2022-05-08T17:06:32.417Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SDL mingw static lib linking errors<p>I'm trying to compile a simple SDL program using Mingw w64. Here is my code:</p>
<p>test.c</p>
<pre><code>#include &quo... |
72,163,818 | The body might complete normally, causing 'null' to be returned, but the return type, 'Future<bool>', is a potentially non-nullable type<p>I upgraded my project to null-safety as they describe here <a href="https://dart.dev/null-safety/migration-guide" rel="nofollow noreferrer">dart migrate</a>. I applied all suggestio... | <p>Your <code>systemBackButtonPressed()</code> doesn't return anything, and it should return a Future of a bool. You can achieve returning the future if you mark it as <code>async</code>, and to return a bool just add the return in the end:</p>
<pre><code> Future<bool> systemBackButtonPressed() async {
if (n... | The body might complete normally, causing 'null' to be returned, but the return type, 'Future<bool>', is a potentially non-nullable type | flutter|dart|flutter-dependencies|dart-null-safety|null-safety | 0 | 480 | 2 | 72,164,649 | 72,164,649 | 2 | true | 2022-05-08T18:01:01.300Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
The body might complete normally, causing 'null' to be returned, but the return type, 'Future<bool>', is a potentially non-nullable type<p>I upgraded my proj... |
72,162,291 | what causes git apply error already exists in working directory<p>i am trying to apply a commit from one repository and apply it on other repository. to do so, i am using <code>git show</code> to generate the git patch\diff then pipe it to <code>git apply</code>. for some commits, the following error pops</p>
<pre clas... | <p><code>git apply</code> generally doesn't try to resolve conflicts. You appear to have a <code>.foo.txt</code> file that already exists, and the patch expects to <em>create</em> one, not modify an existing gone.</p>
<p>You can try the following:</p>
<ol>
<li>Delete the file, if you only need the file the patch will c... | what causes git apply error already exists in working directory | git | 0 | 372 | 1 | 72,164,790 | 72,164,790 | 2 | true | 2022-05-08T15:02:46.080Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
what causes git apply error already exists in working directory<p>i am trying to apply a commit from one repository and apply it on other repository. to do s... |
72,164,715 | Wordpress ACF plugin how to get only not empty values<p>I have group of fields for every post. Not all fields per post has values. I try to get array with all fields and get empty values. How to get only not empty values?</p>
<p>My code:</p>
<pre><code>$parthers_shops_prices = array(
get_field( 'price_1', $prod... | <p>After loading your values, this additional line should give you the result you want:</p>
<pre><code>$parthers_shops_prices = array_filter($parthers_shops_prices);
</code></pre>
<p>This should output</p>
<pre><code>Array ( [0] => 199 [3] => 299 )
</code></pre>
<p>If you need to additionally reindex your array, ... | Wordpress ACF plugin how to get only not empty values | wordpress|advanced-custom-fields | 0 | 51 | 1 | 72,165,184 | 72,165,184 | 2 | true | 2022-05-08T20:06:26.073Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Wordpress ACF plugin how to get only not empty values<p>I have group of fields for every post. Not all fields per post has values. I try to get array with al... |
72,164,807 | How to export matlab matrix to .txt in a format supported by c<p>As I state in the title, I want to export a matrix from matlab to a <code>.txt</code> file in format that is supported by C. What I mean is something like this</p>
<pre><code>{ { 1, 2, 3, 4}, { 5, 6, 7, 8} ...... }
</code></pre>
<p>Any suggestions ?</p>
... | <p>I think you should be able to use <a href="https://uk.mathworks.com/help/matlab/ref/jsonencode.html" rel="nofollow noreferrer">jsonencode()</a> to turn a matrix into the same string format as you want albeit with [] instead of {}. You could then use <a href="https://uk.mathworks.com/help/matlab/ref/regexprep.html?s_... | How to export matlab matrix to .txt in a format supported by c | c|matlab|export | 0 | 68 | 1 | 72,165,269 | 72,165,269 | 2 | true | 2022-05-08T20:20:07.077Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to export matlab matrix to .txt in a format supported by c<p>As I state in the title, I want to export a matrix from matlab to a <code>.txt</code> file ... |
72,165,474 | Distinct Counts in a Window Function<p>I'm trying to get a distinct count of rows within a window function that has multiple levels of partitioning. Below is a sample of my data.</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>PRODUCT_ID</th>
<th>KEY_ID</th>
<th>STORECLUSTER</th>
</tr>
</th... | <p>Unfortunately, SQL Server does not support <code>COUNT(DISTINCT</code> as a window function.</p>
<p>So you need to nest window functions. I find the simplest and most efficient method is <code>MAX</code> over a <code>DENSE_RANK</code>, but there are others.</p>
<p>The partitioning clause is the equivalent of <code>G... | Distinct Counts in a Window Function | sql-server|tsql|distinct|window-functions | 0 | 256 | 1 | 72,165,644 | 72,165,644 | 2 | true | 2022-05-08T22:19:40.087Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Distinct Counts in a Window Function<p>I'm trying to get a distinct count of rows within a window function that has multiple levels of partitioning. Below is... |
72,165,619 | Second level key as types<p>I'm trying to define a type as a second level key for a given object. So for example, for object:</p>
<pre class="lang-js prettyprint-override"><code>const myObj = {
vegetabes: {
legumes: ['chickpea', 'garbanzo', 'lentil'],
tubers: ['potatoe', 'carrot']
},
meat: {
farm: ['c... | <p>You probably would want to introduce a generic to ensure the keys are related correctly:</p>
<pre><code>const findRecipe = <T extends keyof typeof myObj>(
firstLevelKey: T,
secondLevelKey: keyof typeof myObj[T]) => {
const collection = myObj[firstLevelKey][secondLevelKey]
}
</code></pre>
<p>The fully... | Second level key as types | typescript | 0 | 39 | 1 | 72,165,659 | 72,165,659 | 2 | true | 2022-05-08T22:55:36.953Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Second level key as types<p>I'm trying to define a type as a second level key for a given object. So for example, for object:</p>
<pre class="lang-js prettyp... |
72,165,742 | Trigger for capturing changed columns in audit table<p>I have 2 tables, one main table and one audit table.</p>
<pre><code>create sequence dbo.users_seq;
create table dbo.users
(
id bigint primary key default(next value for dbo.users_seq),
name varchar(100) not null, --user's full name
user_data nvarchar(max) not n... | <p>Here is one way to do it.</p>
<p>The principles are mostly the same as mentioned on an earlier answer. The main differences are:</p>
<ul>
<li>Get the starting batch using <code>dm_exec_input_buffer</code>. You need server-level permissions for this.</li>
<li><code>FOR JSON</code> will not show a key which has a <cod... | Trigger for capturing changed columns in audit table | sql|sql-server|sql-server-2016 | 0 | 73 | 1 | 72,166,055 | 72,166,055 | 2 | true | 2022-05-08T23:29:07.343Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Trigger for capturing changed columns in audit table<p>I have 2 tables, one main table and one audit table.</p>
<pre><code>create sequence dbo.users_seq;
cre... |
72,165,869 | plotting Date ranges for each ID and marking specific Dates using ggplot<p>Here is my data</p>
<pre><code>
mydata = data.frame (id =c(1,1,2,3,3,4,4,5,6,6,7,7,8),
startdate=c("2014-01-21","2015-04-01","2016-03-15","2013-01-13","2014-01-02","2017... | <p>You should use <code>Date</code> objects instead of strings: it makes the x-axis a lot easier to read, better shows gaps and relative time gaps, and allows many other controls over the aesthetics.</p>
<p>As for the additional dots, just add another <code>geom_point</code>. You can control the dates on the x-axis usi... | plotting Date ranges for each ID and marking specific Dates using ggplot | r|ggplot2|time-series|data-manipulation | 0 | 61 | 1 | 72,166,230 | 72,166,230 | 2 | true | 2022-05-09T00:01:48.010Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
plotting Date ranges for each ID and marking specific Dates using ggplot<p>Here is my data</p>
<pre><code>
mydata = data.frame (id =c(1,1,2,3,3,4,4,5,6,6,7,7... |
72,166,577 | program to rotate list of numbers until all numbers have moved back to origioal position<p>I'm trying to write a program were given a list, the program reads through a list and rotates the numbers in the list one position for each interaction until the numbers reach starting position.</p>
<p>example of required output:... | <p>It's not clear why you're operating on the number <code>1234</code> when you want to operate on the list <code>[1, 2, 3, 4]</code>, or why your function is returning a set when you want the output to contain a repeated element. All this does is make the problem more complicated.</p>
<p>Just have the function take t... | program to rotate list of numbers until all numbers have moved back to origioal position | python|python-3.x | 0 | 64 | 2 | 72,166,629 | 72,166,629 | 2 | true | 2022-05-09T03:01:03.107Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
program to rotate list of numbers until all numbers have moved back to origioal position<p>I'm trying to write a program were given a list, the program reads... |
72,166,000 | How to plot more than 1 graph in 1 figure with 3D Mesh Plotly?<p>I have a problem with my plotting.
I want to plot multiple meshes in one graph, and each mesh is marked by label.</p>
<p>This is what the data looks like:</p>
<p><img src="https://i.stack.imgur.com/fwWmi.png" alt="This is the data" /></p>
<p>I only could ... | <p>Your question was code with the understanding that you want to draw two meshes on a 3D graph. The key is to extract and add a graph for each label.</p>
<pre><code>import pandas as pd
import io
data = '''
X Y Z LABEL
500 500 -200 1
500 500 -180 1
505 505 -190 1
495 495 -190 1
495 505 -190 1
505 495 -190 1
400 400 -1... | How to plot more than 1 graph in 1 figure with 3D Mesh Plotly? | python|plotly|mesh|plotly-python|plotly.graph-objects | 0 | 117 | 1 | 72,166,749 | 72,166,749 | 2 | true | 2022-05-09T00:40:42.427Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to plot more than 1 graph in 1 figure with 3D Mesh Plotly?<p>I have a problem with my plotting.
I want to plot multiple meshes in one graph, and each mes... |
72,161,614 | identifier D3DReadFileToBlob is undefined?<pre><code>#include<D3Dcompiler.h>
void Init()
{
D3DReadFileToBlob(L"", nullptr);
}
</code></pre>
<p>it gives <code>D3DReadFileToBlob is undefined</code> error, i don't think it is a <a href="https://stackoverflow.com/questions/14860543/calling-d3dreadfilet... | <p>The problem was that i was using both Windows Kits and Directx SDK at the same time and that caused <a href="https://stackoverflow.com/questions/14860543/calling-d3dreadfiletoblob-in-visual-studio-2012-causes-link-error">this error</a>, Because i was watching old tutorials i didn't know that i really don't need Dire... | identifier D3DReadFileToBlob is undefined? | c++|visual-studio|blob|directx|directx-11 | 0 | 128 | 1 | 72,167,256 | 72,167,256 | 2 | true | 2022-05-08T13:45:45.337Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
identifier D3DReadFileToBlob is undefined?<pre><code>#include<D3Dcompiler.h>
void Init()
{
D3DReadFileToBlob(L"", nullptr);
}
</code></p... |
72,167,303 | Error in installing React - incompatible engine<p>So after typing</p>
<pre><code>npx create-react-app myapp
</code></pre>
<p>I get this error</p>
<pre><code>error eslint@8.15.0: The engine "node" is incompatible with this module. Expected version "^12.22.0 || ^14.17.0 || >=16.0.0". Got "12.1... | <p>It says your current version of node is 12.13.0 and you need at least 12.22.0.</p>
<p>The current version of Node is 16.15.0
You can download an updated one at <a href="https://nodejs.org/en/download/" rel="nofollow noreferrer">https://nodejs.org/en/download/</a></p> | Error in installing React - incompatible engine | node.js|reactjs | 0 | 416 | 2 | 72,167,320 | 72,167,320 | 2 | true | 2022-05-09T05:22:18.467Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Error in installing React - incompatible engine<p>So after typing</p>
<pre><code>npx create-react-app myapp
</code></pre>
<p>I get this error</p>
<pre><code>... |
72,166,063 | react-i18next pass value into .json using translation<p>I followed the article here: <a href="https://dev.to/adrai/how-to-properly-internationalize-a-react-application-using-i18next-3hdb" rel="nofollow noreferrer">https://dev.to/adrai/how-to-properly-internationalize-a-react-application-using-i18next-3hdb</a>.</p>
<p>N... | <p>By default i18next uses different format prefixes (<code>{{</code>) and suffixes (<code>}}</code>)</p>
<p>Try writing your translations like this:</p>
<pre><code>{
"GREETING": "Hello {{name}}, nice to see you."
}
</code></pre>
<p>And the <a href="https://www.i18next.com/translation-function/int... | react-i18next pass value into .json using translation | reactjs|react-i18next|i18next-http-backend | 0 | 785 | 2 | 72,167,426 | 72,167,426 | 2 | true | 2022-05-09T00:57:19.833Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
react-i18next pass value into .json using translation<p>I followed the article here: <a href="https://dev.to/adrai/how-to-properly-internationalize-a-react-a... |
72,167,489 | SQL Update table where Relation is inside other table<p>hello I have two Table where table number one is for product and table two is the category i want to update using the this SQL but keep getting syntax error</p>
<pre><code>UPDATE product SET local_delivery = 0,none_local_delivery = 0,
WHERE EXISTS
(SELECT product.... | <p>The syntax error is a comma right before <code>WHERE</code>.</p>
<p>Your update statement then updates either all or no rows in the table, depending on whether a product exists for category 90.</p>
<p>I suppose you rather want to update all produts of category 90 instead. In order to achieve that, relate the product... | SQL Update table where Relation is inside other table | mysql|sql|sql-update | 0 | 50 | 2 | 72,167,573 | 72,167,573 | 2 | true | 2022-05-09T05:53:18.133Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SQL Update table where Relation is inside other table<p>hello I have two Table where table number one is for product and table two is the category i want to ... |
72,167,611 | Why this error is showing " Uncaught FirebaseError: Firebase: Error (auth/invalid-api-key)"?<p>I'm trying to use firebase authentication in my project. After creating the environment variable I'm getting this error "Uncaught FirebaseError: Firebase: Error (auth/invalid-api-key)."</p>
<p><a href="https://i.pos... | <ol>
<li>You need to put your .env.local file in your root.</li>
<li>Make Sure inside your .env.local no (,) or ("") or ('') or (;) exist.</li>
</ol> | Why this error is showing " Uncaught FirebaseError: Firebase: Error (auth/invalid-api-key)"? | reactjs|firebase | 0 | 80 | 1 | 72,167,692 | 72,167,692 | 2 | true | 2022-05-09T06:10:06.530Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why this error is showing " Uncaught FirebaseError: Firebase: Error (auth/invalid-api-key)"?<p>I'm trying to use firebase authentication in my project. After... |
72,167,822 | How show display all data using fetch method in React.js<p>I am Beginning in Programming. Now am trying to show All data in the display using the fetch data method. But Couldn't show this.</p>
<pre><code>import { useEffect, useState } from "react";
const useProducts = () => {
const [items, setItems] =... | <p>please note <code>res => res.json</code> in your code should be <code>res.json()</code> as it is a function not property.</p> | How show display all data using fetch method in React.js | javascript|fetch | 0 | 64 | 2 | 72,167,872 | 72,167,872 | 2 | true | 2022-05-09T06:37:05.073Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How show display all data using fetch method in React.js<p>I am Beginning in Programming. Now am trying to show All data in the display using the fetch data ... |
72,167,883 | Passing string rather than filename to -f option in jq under bash<p>I'm curious whether I can replace <em>file name</em> with <em>a string</em> when using <code>-f</code> option of <code>jq</code>.</p>
<p>When I do</p>
<pre><code>$ jq -nf <(echo \"hello world\")
</code></pre>
<p>it correctly outputs</p>
<p... | <p>You can use <code>/dev/stdin</code> to represent standard input as a file:</p>
<pre><code>jq -nf /dev/stdin <<<$'\"hello world\"'
echo \"hello world\" | jq -nf /dev/stdin
</code></pre> | Passing string rather than filename to -f option in jq under bash | bash|file|filter|jq | 0 | 65 | 1 | 72,168,127 | 72,168,127 | 2 | true | 2022-05-09T06:44:38.353Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Passing string rather than filename to -f option in jq under bash<p>I'm curious whether I can replace <em>file name</em> with <em>a string</em> when using <c... |
72,168,304 | Pandas: rolling difference between rows based on alternating value changes in the other column<p>I have a dataframe:</p>
<pre class="lang-python prettyprint-override"><code>df = pd.DataFrame([['ann', 23.3, 0], ['bob', 36.5, 0], ['don', 29.3, 1], ['jul', 45.8, 0], ['ken', 36.2, -1], ['nic', 38.9, 1], ['pal', 16.7, 0], [... | <p>First, we build an intermediate DataFrame that have nonzero grades. Since 1s and -1s always alternate, it suffices to analyze the difference between consecutive <code>grade</code> values.</p>
<p>Again, since 1s and -1s alternate, the difference between consecutive <code>scores</code> can be either -2 or 2, so depend... | Pandas: rolling difference between rows based on alternating value changes in the other column | python|pandas|dataframe | 0 | 54 | 1 | 72,168,576 | 72,168,576 | 2 | true | 2022-05-09T07:23:48.560Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pandas: rolling difference between rows based on alternating value changes in the other column<p>I have a dataframe:</p>
<pre class="lang-python prettyprint-... |
72,168,543 | Best way to "SELECT *" from multiple tabs in sql without duplicate?<p>I am trying to retrieve every data stored in 2 tabs from my database through a SELECT statement.
The problem is there are a lot of columns in each tab and manually selecting each column would be a pain in the ass.</p>
<p>So naturally I thought about ... | <p>You can use USING clause.</p>
<blockquote>
<p>"The USING clause specifies which columns to test for equality when
two tables are joined. It can be used instead of an ON clause in the
JOIN operations that have an explicit join clause."</p>
</blockquote>
<pre><code>select *
from test
join test2 using(id)
</... | Best way to "SELECT *" from multiple tabs in sql without duplicate? | sql|join|select | 0 | 123 | 2 | 72,168,623 | 72,168,623 | 2 | true | 2022-05-09T07:44:48.780Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Best way to "SELECT *" from multiple tabs in sql without duplicate?<p>I am trying to retrieve every data stored in 2 tabs from my database through a SELECT s... |
72,168,673 | Pass JSON array to function in React as props and then count items in area<p>Apologies. Newbie here having problems with passing a JSON object into a function as props. I'm obviously doing something wrong but I've searched and other people's posts seem more complex than mine.</p>
<p>I want to pass an array which may ... | <p>In your example code, there is the object shorthand in the argument of the call to <code>getNumberOfTeams</code></p>
<pre class="lang-js prettyprint-override"><code>getNumberOfTeams({ registrations })
</code></pre>
<p>The function <code>getNumberOfTeams(registrations)</code> attempts to read <code>registrations.leng... | Pass JSON array to function in React as props and then count items in area | javascript|arrays|reactjs|react-native | 0 | 169 | 1 | 72,168,726 | 72,168,726 | 2 | true | 2022-05-09T07:56:05.777Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pass JSON array to function in React as props and then count items in area<p>Apologies. Newbie here having problems with passing a JSON object into a functi... |
72,169,342 | show header and hide footer slow down<p>the header and footer should be shown and hidden in 2 different ways. The header fades in when the user scrolls down. The footer fades in when the user moves over the area. When I get to the top it pops up again pretty quickly. Fade in should be faded in as quickly as faded out. ... | <p>Just add the <code>0.8s ease</code> to the component style as well. So in <code>.header</code> instead of <code>transition: transform 250ms;</code> use something like <code>transition: top 0.8s ease;</code>. Same for footer if you want the fade-in and fade-out to be same.</p>
<p><div class="snippet" data-lang="js" d... | show header and hide footer slow down | javascript|css | 0 | 39 | 1 | 72,169,483 | 72,169,483 | 2 | true | 2022-05-09T08:56:55.517Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
show header and hide footer slow down<p>the header and footer should be shown and hidden in 2 different ways. The header fades in when the user scrolls down.... |
72,169,363 | Get Coordinates of image on click<p>I have a set of divs which are dynamic, I somehow want them in a different order. So I'm using <code>flex</code> <code>order</code> to control the order of the divs. One of the div contains an image. By clicking on that image it should console the x & y coordinates of the click w... | <p>This is caused by your own calculations.
You can simplify the calculation using this function</p>
<pre><code>GetMousePositionRelativeToTarget(e) {
// Get the target
const target = e.target;
// Get the bounding rectangle of target
const rect = target.getBoundingClientRect();
// Mouse position
... | Get Coordinates of image on click | javascript|angular|typescript | 0 | 42 | 1 | 72,169,486 | 72,169,486 | 2 | true | 2022-05-09T08:58:55.570Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Get Coordinates of image on click<p>I have a set of divs which are dynamic, I somehow want them in a different order. So I'm using <code>flex</code> <code>or... |
72,169,376 | How can I improve the verbose code when I use enum in Kotlin?<p>The are many items in a enum class , I found there ae many verbose code in the function <code>fun getLevel</code>.</p>
<p>How can I improve it?</p>
<p><strong>Code A</strong></p>
<pre><code>enum class ELevel(private val labelId: Int, val alarmed: Boolean)... | <p>In the same way that you have associates a <code>labelId</code> and <code>alarmed</code> flag with each of the enum constants, you can add an additional <code>maxSoundLevel</code> property:</p>
<pre><code>enum class ELevel(
private val labelId: Int,
val alarmed: Boolean,
val maxSoundLevel: Int,
){
N... | How can I improve the verbose code when I use enum in Kotlin? | kotlin | 0 | 45 | 3 | 72,169,567 | 72,169,567 | 2 | true | 2022-05-09T09:00:06.223Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I improve the verbose code when I use enum in Kotlin?<p>The are many items in a enum class , I found there ae many verbose code in the function <cod... |
72,168,956 | How To Delete an Azure Devops Release which is showing as Deployed - Error VS402946<p>I am trying to delete a Release from a Legacy release Pipeline but when selecting the <code>Delete</code> option I get the following error...</p>
<pre><code>
VS402946: 'My-Release-2022-01-06' cannot be deleted as it is currently deplo... | <p>Three steps when you have an older release def you need to delete and it was previously deployed.</p>
<ol>
<li><p>Edit the definition, and delete all the environments.</p>
</li>
<li><p>create an environment with a default name that is different than the original and save.</p>
</li>
<li><p>Delete the environment as i... | How To Delete an Azure Devops Release which is showing as Deployed - Error VS402946 | azure-devops|azure-pipelines-release-pipeline | 0 | 786 | 1 | 72,169,990 | 72,169,990 | 2 | true | 2022-05-09T08:22:58.490Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How To Delete an Azure Devops Release which is showing as Deployed - Error VS402946<p>I am trying to delete a Release from a Legacy release Pipeline but when... |
72,167,332 | Redis - Cache entry evictions across multiple databases<p>When using multiple databases on a single redis instance and its memory is full, when I'm trying to insert new data it samples a number of keys and it applies an algorithm to them to determine which ones should be evicted.</p>
<p>But, if I'm using db0 and db1 an... | <p>When it does eviction, Redis chooses eviction candidate from all databases.</p>
<p>In your case, it might evict keys from db0 or db1.</p> | Redis - Cache entry evictions across multiple databases | redis | 0 | 27 | 1 | 72,170,295 | 72,170,295 | 2 | true | 2022-05-09T05:28:04.140Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Redis - Cache entry evictions across multiple databases<p>When using multiple databases on a single redis instance and its memory is full, when I'm trying to... |
72,169,200 | View Not Expanding to Full List Line Width- SwiftUI<p>I have Views embedded in a list, one <code>View</code> per <code>List</code> item but for some reason, the <code>View</code> only takes up a small leading part of the list's row, rather than filling the full line. The embedded <code>View</code> is fully expanded in ... | <p>So it seems that SwiftUI renders <code>Button</code>'s content as if it was inside an <code>HStack</code> by default, in case no <em>Stack</em> was provided.</p>
<p>However, when using the <code>Button</code> inside a <code>List</code>, this default behaviour changes to defaulting as if it was a <code>VStack</code>.... | View Not Expanding to Full List Line Width- SwiftUI | ios|swiftui | 0 | 96 | 1 | 72,170,406 | 72,170,406 | 2 | true | 2022-05-09T08:44:13.070Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
View Not Expanding to Full List Line Width- SwiftUI<p>I have Views embedded in a list, one <code>View</code> per <code>List</code> item but for some reason, ... |
72,165,672 | Is there a replacement for ERR_load_SSL_strings() since it is deprecated?<p>Compiling one of my libraries on Ubuntu 22.04, I get a deprecated error on the <code>ERR_load_SSL_strings()</code> call. There is no comment other than the date when it was deprecated. Searching with Google doesn't return anything useful.</p>
<... | <blockquote>
<p>Is there a replacement to that function? or can we do without it now?</p>
</blockquote>
<p>There is no replacement. You don't need to call it anymore. Error strings are loaded automatically since OpenSSL 1.1.0.</p> | Is there a replacement for ERR_load_SSL_strings() since it is deprecated? | openssl|deprecated | 0 | 43 | 1 | 72,170,410 | 72,170,410 | 2 | true | 2022-05-08T23:08:22.220Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is there a replacement for ERR_load_SSL_strings() since it is deprecated?<p>Compiling one of my libraries on Ubuntu 22.04, I get a deprecated error on the <c... |
72,170,640 | How can i add 6 rows of paragraphs with bootstrap?<pre class="lang-html prettyprint-override"><code><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="v... | <p>You're not closing your <code><div></code>s properly. Use proper indentation and check whether you closed everything.</p> | How can i add 6 rows of paragraphs with bootstrap? | javascript|html|bootstrap-4|bootstrap-5 | 0 | 30 | 1 | 72,170,717 | 72,170,717 | 2 | true | 2022-05-09T10:37:58.620Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can i add 6 rows of paragraphs with bootstrap?<pre class="lang-html prettyprint-override"><code><!DOCTYPE html>
<html lang="en">
&l... |
72,170,948 | How to destructure nested object that might be undefined in javascript<p>I have a function that returns an object like the following:</p>
<pre><code>{
data: {key1: value1, ...},
errors: [...]
}
</code></pre>
<p>I can extract <code>key1</code> with the following:</p>
<pre><code>const { data: { key1 }} = myFuncti... | <p>You could take a default object.</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
myFunction = () => ({}),
{ data: { key1 } = {} } = myFunction();
console.l... | How to destructure nested object that might be undefined in javascript | javascript | 0 | 106 | 1 | 72,170,974 | 72,170,974 | 2 | true | 2022-05-09T11:05:23.143Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to destructure nested object that might be undefined in javascript<p>I have a function that returns an object like the following:</p>
<pre><code>{
da... |
72,170,762 | Run different ActiveMQ Artemis versions with separate JDK's<p>quick question; is it possible and reasonable to run different Artemis ActiveMQ versions with different JDK versions?
There are currently two separate Artemis-Services on my VM running different Artemis versions (2.4.0 not cool, I know :/ and 2.16.0).
Now I ... | <p>Your solution will works, an alternative could be to use the full path to define the executable element, i.e.</p>
<pre><code><executable>C:\PATH_TO_JDK_17\bin\java.exe</executable>
</code></pre> | Run different ActiveMQ Artemis versions with separate JDK's | activemq-artemis | 0 | 87 | 1 | 72,171,049 | 72,171,049 | 2 | true | 2022-05-09T10:49:08.410Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Run different ActiveMQ Artemis versions with separate JDK's<p>quick question; is it possible and reasonable to run different Artemis ActiveMQ versions with d... |
72,170,710 | Span use max width before line break<p>I've got following setup:</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-css lang-css prettyprint-override"><code>.container1 {
position: absolute;
max-width: 300px
}
.co... | <p>In such case, use a big negative margin</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-css lang-css prettyprint-override"><code>.container1 {
position: absolute;
max-width: 300px;
margin-right:-100vmax
}
... | Span use max width before line break | html|css | 0 | 73 | 2 | 72,171,178 | 72,171,178 | 2 | true | 2022-05-09T10:44:47.953Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Span use max width before line break<p>I've got following setup:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel=... |
72,167,415 | Polly.Extensions.Http not accessible for IHttpClientFactory - .Net6<p>I need to use <strong>Polly.Extensions.Http</strong> for same reason.</p>
<p>I install Polly and Polly.Extensions.Http packages, and have these using's</p>
<pre><code>global using Polly;
global using Polly.Retry;
global using Polly.Timeout;
global us... | <p>To summarize the discussion in the comments:</p>
<ul>
<li>Like Peter Csala said: <em>"The <code>Polly.Extensions.Http</code> package is deprecated. It has not been modified more than 3 years."</em></li>
<li>The new way to use <code>Polly</code> with the <code>HttpClientFactory</code> is described in <a hre... | Polly.Extensions.Http not accessible for IHttpClientFactory - .Net6 | asp.net-core|.net-core|.net-6.0|polly | 0 | 417 | 1 | 72,171,307 | 72,171,307 | 2 | true | 2022-05-09T05:42:09.940Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Polly.Extensions.Http not accessible for IHttpClientFactory - .Net6<p>I need to use <strong>Polly.Extensions.Http</strong> for same reason.</p>
<p>I install ... |
72,171,508 | Group rows by column and sum another column within groups<p>I have an array looking like:</p>
<pre><code>array(480) {
[0]=>
array(2) {
["tag_id"]=>
string(4) "6291"
["az"]=>
int(5)
}
[1]=>
array(2) {
["tag_id"]=>
string(4) "62... | <p>You'll have to use <code>array_walk()</code> to modify the array. <code>array_reduce()</code> is to calculate a single value and not to change the array itself.</p>
<p>I would do something like this:</p>
<pre class="lang-php prettyprint-override"><code><?php
$array = [
[
'tag_id' => "6291&quo... | Group rows by column and sum another column within groups | php|arrays|multidimensional-array|grouping | 0 | 115 | 3 | 72,171,779 | 72,171,779 | 2 | true | 2022-05-09T11:48:39.873Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Group rows by column and sum another column within groups<p>I have an array looking like:</p>
<pre><code>array(480) {
[0]=>
array(2) {
["tag_... |
72,170,055 | Generate Tuple Type using a mapped Type<p>Good morning,</p>
<p>I'm trying to achieve the following,</p>
<p>Create a type that will take the keys from the following object</p>
<pre><code>const obj = {
setName: () => void;
setAge: () => void;
}
</code></pre>
<p>And generate a Tuple type using a mapped type th... | <p>what you need is <code>UnionToTuple<U></code>:</p>
<pre><code>// T ====> [...T, E]
type Push<T, E> = T extends any[] ? [...T, E] : [];
// union to intersection of functions
// UnionToIoFn<'a' | 'b'>
// ====> ((x: 'a') => void) & ((x: 'b') => void)
// ====> that equal to { (x: '... | Generate Tuple Type using a mapped Type | typescript|types|mapped-types | 0 | 89 | 2 | 72,171,791 | 72,171,791 | 2 | true | 2022-05-09T09:50:07.830Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Generate Tuple Type using a mapped Type<p>Good morning,</p>
<p>I'm trying to achieve the following,</p>
<p>Create a type that will take the keys from the fol... |
72,171,637 | Finding Mutually disjoint subsets of a list with python<p>How do we go about finding all sets of lists consisting of mutually disjoint subsets from a given list. Assuming that the list <code>L</code> consists of a list of tuples, I tried the following code, but to no avail:</p>
<pre><code>L=[Large list of lists of tupl... | <p>Consider this Solution using itertools:</p>
<pre class="lang-py prettyprint-override"><code>import itertools
ls = [[1,2],[2,3],[3,4]]
k = []
# for all 2 element combinations of set
for i,j in itertools.combinations(ls,2):
# an empty set is True, a nonempty set is False
if not set(i).intersection(set(j)):
... | Finding Mutually disjoint subsets of a list with python | python|list|sage | 0 | 45 | 1 | 72,171,827 | 72,171,827 | 2 | true | 2022-05-09T11:58:29.953Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Finding Mutually disjoint subsets of a list with python<p>How do we go about finding all sets of lists consisting of mutually disjoint subsets from a given l... |
72,156,940 | display aggregate function output in trailer record<p>We are reading csv file input which has two fields. Sample input file is given for reference</p>
<pre><code>source, balance
1,100
2, 200
</code></pre>
<p>I need to create a trailer record in the output that the following details-</p>
<ul>
<li>number of records in th... | <p>I have repro’d with your sample data and was able to add the trailer record with aggregated values using Data flow.</p>
<ol>
<li>Add <strong>source1</strong> with the source data set.</li>
</ol>
<p><a href="https://i.stack.imgur.com/3ojkI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3ojkI.png" ... | display aggregate function output in trailer record | azure-data-factory | 0 | 70 | 2 | 72,171,915 | 72,171,915 | 2 | true | 2022-05-07T23:01:04.987Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
display aggregate function output in trailer record<p>We are reading csv file input which has two fields. Sample input file is given for reference</p>
<pre><... |
72,171,969 | scaling text within list elements<p>I need our community help. I created a side menu which should scale for certain display/screen sizes. In general the width and height scaling works like expected. I do not get the text scaling done. I tried the svg text option from this stackoverflow thread <a href="https://stackover... | <p>If you're trying to manipulate the font size based on viewer width, then you'll have to set a font-size attribute on your <code>li</code> which you currently do not have. This is a simple fix but I would suggest looking into this article on fluid typography for something a little more elegant: <a href="https://css-t... | scaling text within list elements | html|css | 0 | 28 | 1 | 72,172,089 | 72,172,089 | 2 | true | 2022-05-09T12:25:15.480Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
scaling text within list elements<p>I need our community help. I created a side menu which should scale for certain display/screen sizes. In general the widt... |
72,172,369 | ASP.NET Core Web API - Unable to resolve service for type 'IHttpContextAccessor' while attempting to activate 'Services.CurrentUserService'<p>I am implementing CurrentUser Service in ASP.NET Core-6 Web API User Authentication Login. I am using IdentityDbContext:</p>
<p>ICurrentUserService:</p>
<pre class="lang-cs prett... | <p>Register <code>HttpContextAccessor</code> dependency.</p>
<pre><code>builder.Services.AddHttpContextAccessor();
</code></pre>
<pre class="lang-cs prettyprint-override"><code>var builder = WebApplication.CreateBuilder(args);
builder.Services.AddHttpContextAccessor();
// Register CurrentUserService
builder.Services.... | ASP.NET Core Web API - Unable to resolve service for type 'IHttpContextAccessor' while attempting to activate 'Services.CurrentUserService' | c#|asp.net-core|asp.net-core-webapi | 0 | 67 | 1 | 72,172,440 | 72,172,440 | 2 | true | 2022-05-09T12:55:26.713Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
ASP.NET Core Web API - Unable to resolve service for type 'IHttpContextAccessor' while attempting to activate 'Services.CurrentUserService'<p>I am implementi... |
72,173,142 | Jump certain number of cells when dragging formula down on Google Sheets<p>I need to create a fórmula that when it is dragged down it jumps a certain pre defined number of cells. For example, I have this column:</p>
<p><a href="https://i.stack.imgur.com/y7c78.png" rel="nofollow noreferrer"><img src="https://i.stack.img... | <p>Try in B2</p>
<pre><code>=offset($A$1;5*row(A2)-10;)
</code></pre> | Jump certain number of cells when dragging formula down on Google Sheets | google-sheets | 0 | 117 | 2 | 72,173,347 | 72,173,347 | 2 | true | 2022-05-09T13:54:16.443Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Jump certain number of cells when dragging formula down on Google Sheets<p>I need to create a fórmula that when it is dragged down it jumps a certain pre def... |
72,172,986 | Typescript does not recognize ant design prop for rendering icon<p>I am new in typescript and Ant design. I have a password input and want to have an open/invisible Icon inside input element. But typescript gives me an error, iconRender does not exist on type 'IntrinsicAttributes & InputProps & RefAttributes'. ... | <p>You should use <code>Input.Password</code> for password input from <code>antd</code>. See more: <a href="https://ant.design/components/input/#components-input-demo-password-input" rel="nofollow noreferrer">https://ant.design/components/input/#components-input-demo-password-input</a></p> | Typescript does not recognize ant design prop for rendering icon | reactjs|typescript|antd | 0 | 135 | 1 | 72,173,506 | 72,173,506 | 2 | true | 2022-05-09T13:43:47.413Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Typescript does not recognize ant design prop for rendering icon<p>I am new in typescript and Ant design. I have a password input and want to have an open/in... |
72,170,489 | Exchanging AccessToken, returns error "invalid_grant" code 9002313<p>I am trying to get access token of a user from an Outlook Add-in, then exchange it for a graph api token, but I get this error:</p>
<pre><code>{
"error": "invalid_grant",
"error_description": "AADSTS9002313: ... | <p><em><strong>I tried to reproduce the same error in my environment. I have registered an Azure AD application and granted the same permissions as below:</strong></em></p>
<p><a href="https://i.stack.imgur.com/Qz7KV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Qz7KV.png" alt="enter image descript... | Exchanging AccessToken, returns error "invalid_grant" code 9002313 | oauth-2.0|outlook|azure-active-directory|microsoft-graph-api|azure-ad-graph-api | 0 | 226 | 1 | 72,174,092 | 72,174,092 | 2 | true | 2022-05-09T10:26:23.240Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Exchanging AccessToken, returns error "invalid_grant" code 9002313<p>I am trying to get access token of a user from an Outlook Add-in, then exchange it for a... |
72,174,133 | Why does Cassandra docker image require root privileges to run?<p>I am using the latest Cassandra docker image. When I run it with root privileges, cqlsh is able to connect to Cassandra service as expected:</p>
<pre><code>$ sudo docker run --name mycassandra -d cassandra:latest
$ sudo docker exec -it mycassandra bash
#... | <p>It looks like you're a member of the <code>docker</code> group since you can run docker without sudo. Whether you run it with or without sudo shouldn't make a difference. The container runs as root in both cases, which you can verify by the <code>#</code> bash prompt in both cases.</p>
<p>What I think is happening i... | Why does Cassandra docker image require root privileges to run? | docker|cassandra | 0 | 78 | 1 | 72,174,443 | 72,174,443 | 2 | true | 2022-05-09T15:02:26.623Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why does Cassandra docker image require root privileges to run?<p>I am using the latest Cassandra docker image. When I run it with root privileges, cqlsh is ... |
72,174,402 | Change color based on a keys value in each object of array<p>Problem:
I have an array of objects. Each object has a Name key. Sometimes the name will be the same. When the name is the same, I want the color to remain the same. When the name is different, I would like a different color. I would like to just use 2 differ... | <p>So keep track of the of the name and flip the color when the name changes</p>
<pre class="lang-js prettyprint-override"><code>function buildProjectsGrid(data) {
let lastName = data[0]?.Name;
let rowState = false;
return data.map((obj) => {
if (lastName !== obj.Name) {
rowState = !rowStat... | Change color based on a keys value in each object of array | javascript|reactjs|iteration | 0 | 264 | 2 | 72,174,506 | 72,174,506 | 2 | true | 2022-05-09T15:19:38.163Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Change color based on a keys value in each object of array<p>Problem:
I have an array of objects. Each object has a Name key. Sometimes the name will be the ... |
72,174,447 | How to pass data to the canActivate service guard?<p>There is routes definition :</p>
<pre><code>{ path:'some_path', component: some_component, canActivate: some_service}
</code></pre>
<p>How to pass data to the some_service ?</p> | <p>you can pass it this way:</p>
<p>first in your route definition add data property:</p>
<pre><code>{ path:'some_path', component: some_component, canActivate: some_service, data: {routeData: <what ever you want to pass>}}
</code></pre>
<p>then in your some service guard you can access the data:</p>
<pre><code>c... | How to pass data to the canActivate service guard? | angular | 0 | 42 | 2 | 72,174,586 | 72,174,586 | 2 | true | 2022-05-09T15:23:09.653Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to pass data to the canActivate service guard?<p>There is routes definition :</p>
<pre><code>{ path:'some_path', component: some_component, canActivate: ... |
72,174,305 | How to remove daily mean from minute data in a Pandas dataframe<p>I have a pandas dataframe with a minute datetime index:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>Index</th>
<th>Col1</th>
</tr>
</thead>
<tbody>
<tr>
<td>2022-12-25 09:01:00</td>
<td>5</td>
</tr>
<tr>
<td>2022-12-25 09... | <p>Assuming df is your dataframe, this should do the trick:</p>
<pre><code>for day, df_group in df.groupby(by=df.index.day):
df.loc[df_group.index,"Col1"] -= df_group["Col1"].mean()
</code></pre> | How to remove daily mean from minute data in a Pandas dataframe | python|pandas|dataframe|datetime|mean | 0 | 35 | 1 | 72,174,640 | 72,174,640 | 2 | true | 2022-05-09T15:13:53.707Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to remove daily mean from minute data in a Pandas dataframe<p>I have a pandas dataframe with a minute datetime index:</p>
<div class="s-table-container">... |
72,174,879 | Unable to establish connection with elasticsearch 8.1 (java)<p>I have elasticsearch 8.1 running in docker with this docker compose file:</p>
<pre><code>version: '3.7'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.1.0
container_name: es-node
environment:
- xpack.secu... | <h1>Tldr;</h1>
<p>It seems you are confusing the <code>Transport port</code> and the <code>Rest Api port</code> of Elasticsearch.</p>
<h1>To Fix</h1>
<p>You will first need to expose the port of the <code>transport layer</code>, which is <code>9300</code> by default</p>
<pre class="lang-yaml prettyprint-override"><code... | Unable to establish connection with elasticsearch 8.1 (java) | java|docker|elasticsearch|docker-compose|elasticsearch-rest-client | 0 | 239 | 2 | 72,174,988 | 72,174,988 | 2 | true | 2022-05-09T15:56:47.037Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Unable to establish connection with elasticsearch 8.1 (java)<p>I have elasticsearch 8.1 running in docker with this docker compose file:</p>
<pre><code>versi... |
72,174,644 | OpenMP parallel reduction (min) incorrect result<p>i am using OpenMP reduction(min) to get the minimum number of lock acquisitions in a parallel section over all participating threads.
When printing each threads counter inside the parallel section, I get correct results but after the parallel section, the min counter i... | <p>You have a confusion between the init value that OMP uses internally, and the init value from the user code. The partial reductions are done with the internal value, but at some point there also has to be a reduction against the user-supplied initial value. If you don't set that, anything can happen.</p>
<p>Here is ... | OpenMP parallel reduction (min) incorrect result | c++|multithreading|openmp | 0 | 52 | 1 | 72,175,260 | 72,175,260 | 2 | true | 2022-05-09T15:38:57.443Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
OpenMP parallel reduction (min) incorrect result<p>i am using OpenMP reduction(min) to get the minimum number of lock acquisitions in a parallel section over... |
72,174,198 | Spring Boot log4j ClassPath contains multiple SLF4J bindings<p>I have a Spring Boot project and I want to add SLF4J to my project</p>
<p>I created a file named <code>log4j.properties</code> and here is it's body:</p>
<pre><code>log4j.rootLogger=ALL, STDOUT
log4j.appender.STDOUT= org.apache.log4j.ConsoleAppender
log4j.a... | <p>By default, Spring Boot uses <code>spring-boot-starter-logging</code> with a logback as a backend for logging. In order to use log4j you need to exclude <code>spring-boot-starter-logging</code>.</p>
<pre><code>configurations {
all {
exclude group: 'org.springframework.boot', module: 'spring-boot-starter-... | Spring Boot log4j ClassPath contains multiple SLF4J bindings | spring-boot|slf4j | 0 | 309 | 1 | 72,175,280 | 72,175,280 | 2 | true | 2022-05-09T15:07:04Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Spring Boot log4j ClassPath contains multiple SLF4J bindings<p>I have a Spring Boot project and I want to add SLF4J to my project</p>
<p>I created a file nam... |
72,174,899 | S3 file uploaded is getting corrupted<p>I have some code that uploads filestream to s3 bucket. One of my customer is having some issues but I'm having trouble reproducing it on my end. Upon upload, their filesize remains at 0 bytes. This does not occur every time. Seems very sporadic.</p>
<p><a href="https://i.stack.im... | <p>Is there anything else that could be consuming the inputStream and leaving the position at the end? I have had a similar problem before and solved the problem by ensuring the stream is at the start by either</p>
<pre><code>stream.Seek(0, SeekOrigin.Begin);
</code></pre>
<p>or</p>
<pre><code>stream.Position = 0;
</c... | S3 file uploaded is getting corrupted | c#|.net|amazon-web-services|amazon-s3 | 0 | 124 | 1 | 72,175,417 | 72,175,417 | 2 | true | 2022-05-09T15:58:47.410Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
S3 file uploaded is getting corrupted<p>I have some code that uploads filestream to s3 bucket. One of my customer is having some issues but I'm having troubl... |
72,175,602 | What is the hex code console gives when creating object of a class in ruby<p>When I create an object of the class in ruby, the console returns a Hex code. What is the significance of this hex code?</p>
<p>apple = Fruits.new
=> #Fruits:0x00005569446a55d8</p> | <p>I'm assuming you're running this in irb, or some sort of interactive console. In this scenario <code>inspect</code> is used to display a representation of <code>apple</code>. If you haven't defined your own <code>inspect</code> in the <code>Fruits</code> class, then it's inherited from <code>Object</code>.</p>
<bloc... | What is the hex code console gives when creating object of a class in ruby | ruby-on-rails|ruby|oop | 0 | 70 | 1 | 72,175,839 | 72,175,839 | 2 | true | 2022-05-09T16:52:51.633Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What is the hex code console gives when creating object of a class in ruby<p>When I create an object of the class in ruby, the console returns a Hex code. Wh... |
72,175,916 | Pytest not properly using fixture: TypeError: test_foo() missing 1 required positional argument: 'bar'<p>I am running a pytest with Pycharm. It follows the fixture correctly when using <code>ctrl+click</code>.</p>
<pre><code>import pytest
@pytest.fixture(scope="session")
def bar():
return 1
def test_f... | <p>After some head bashing, it seems that after setting pycharm to pytest over unittest, one <strong>must also remove and recreate the run-configurations.</strong></p>
<p><a href="https://stackoverflow.com/a/48074735/913098">Credit: point 3 here</a></p> | Pytest not properly using fixture: TypeError: test_foo() missing 1 required positional argument: 'bar' | python|pycharm|pytest|fixtures | 0 | 394 | 1 | 72,176,026 | 72,176,026 | 2 | true | 2022-05-09T17:19:42.553Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pytest not properly using fixture: TypeError: test_foo() missing 1 required positional argument: 'bar'<p>I am running a pytest with Pycharm. It follows the f... |
72,176,104 | How to add a new entry under a given XML tag in python<p>I need to modify an xml file in python; specifically I need to add a new entry under the <code>video</code> tag. For instance, having something like this</p>
<pre><code><sources>
<programs>
<default pathversion="1"></def... | <p>Using <code>xml.etree.ElementTree</code> to insert.</p>
<pre><code>import xml.etree.ElementTree as ET
tree = ET.parse('sample.xml')
root = tree.getroot()
insertLoc = root.findall("./video")[0]
start1 = ET.Element(insertLoc)
insSource = ET.SubElement(start1, "source")
insName = ET.SubElement(ins... | How to add a new entry under a given XML tag in python | python|xml | 0 | 35 | 1 | 72,176,691 | 72,176,691 | 2 | true | 2022-05-09T17:38:29.540Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to add a new entry under a given XML tag in python<p>I need to modify an xml file in python; specifically I need to add a new entry under the <code>video... |
72,176,085 | SQL to delete relationships in a junction table based on other table date<p>So I have three tables and now I need to remove all posts starting from 7 days old of date. I also need to remove the relationship inside post_category to the category with that post that gets deleted.</p>
<p>Then I need to do a calculation and... | <p>How is your foreign key constraint for the <code>post_id</code> column in <code>post_category</code> defined?</p>
<p>If they are defined as <code>ON DELETE RESTRICT</code> (which is the default) then the sql statement you started with will not work - your dbms will complain that there is still an entry in <code>post... | SQL to delete relationships in a junction table based on other table date | sql|postgresql | 0 | 47 | 1 | 72,176,902 | 72,176,902 | 2 | true | 2022-05-09T17:36:44.590Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SQL to delete relationships in a junction table based on other table date<p>So I have three tables and now I need to remove all posts starting from 7 days ol... |
72,150,784 | Will it be simpler to convert this code from CStringArray to std::vector<CString>?<p>Given this code:</p>
<pre><code>void CSelectNamesDlg::ShuffleArray(CString strName, CStringArray *pAryStrNames)
{
if (pAryStrNames == nullptr)
return;
const auto iSize = pAryStrNames->GetSize();
if (iSize > 1... | <p>I know of 1 (ONE!) benefit of MFC array over <code>std::vector</code> - they support MFC-style serialization. If you use it - you may be stuck.</p>
<p>However, if you don't - I would use <code>std::vector<CString></code>. Your <code>LocateText</code> (that is overly verbose) will become obsolete - just use <a ... | Will it be simpler to convert this code from CStringArray to std::vector<CString>? | visual-c++|mfc|stdvector | 0 | 40 | 1 | 72,176,928 | 72,176,928 | 2 | true | 2022-05-07T08:27:01.200Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Will it be simpler to convert this code from CStringArray to std::vector<CString>?<p>Given this code:</p>
<pre><code>void CSelectNamesDlg::ShuffleArray(CStri... |
72,176,850 | PostgreSQL get all records with most recent date<p>I have this query that will run on very large data sets and it is too slow.</p>
<pre class="lang-sql prettyprint-override"><code>SELECT *
FROM tableA
WHERE columnA =
(SELECT MAX(columnA) -- select most recent date from entries we care about
FROM tab... | <p>I suspect that it will be the last line which is taking the most time because the list must be parsed.</p>
<pre><code>AND columnC in (1,2,3)
-- pull a subset out of those entries, this set here can be a thousand (ish) large.
</code></pre>
<p>It would be better to put these values in a table with an index (PRIMARY ... | PostgreSQL get all records with most recent date | sql|postgresql | 0 | 43 | 2 | 72,177,012 | 72,177,012 | 2 | true | 2022-05-09T18:46:47.937Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
PostgreSQL get all records with most recent date<p>I have this query that will run on very large data sets and it is too slow.</p>
<pre class="lang-sql prett... |
72,176,481 | How to step through this evaluation?<p>I would like to see how the value of a square root is iteratively improved. For example on the following:</p>
<pre><code>#lang sicp
(define (square x) (* x x))
(define (average x y) (/ (+ x y) 2))
(define (improve guess x) (average guess (/ x guess)))
(define (good-enough? guess x... | <p>I am sure Racket has some fancy trace facility. But there's a famous quote (due I think to John Foderaro):</p>
<blockquote>
<p>Lisp [for which read Racket] is the <em>programmable</em> programming language.</p>
</blockquote>
<p>What this means is: if there's no tracing facility, or you are too lazy to make one, you... | How to step through this evaluation? | scheme|racket|sicp | 0 | 83 | 3 | 72,177,069 | 72,177,069 | 2 | true | 2022-05-09T18:12:37.973Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to step through this evaluation?<p>I would like to see how the value of a square root is iteratively improved. For example on the following:</p>
<pre><co... |
72,176,913 | Vue Component Loading Before Vuex Data Is Set<p>I have a Vue2 component that relies on Vuex to retrieve the currently selected node (infoNode) in order to show that node's data to the user. I have a beforeCreate function that uses Axios to retrieve the top level nodes and set the 'infoNode' as the first node as shown b... | <p>In your case beforeCreate() is async so the component renders before you set data to store.
You're displaying <code>v-icon</code> if <code>fileIcons</code> have specific entry (<code>infoNode.data.filetype</code>), but at that moment <code>infoNode</code> is <code>undefined</code> or <code>infoNode.data</code> is un... | Vue Component Loading Before Vuex Data Is Set | javascript|vue.js|vuex | 0 | 112 | 1 | 72,177,198 | 72,177,198 | 2 | true | 2022-05-09T18:52:49.053Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Vue Component Loading Before Vuex Data Is Set<p>I have a Vue2 component that relies on Vuex to retrieve the currently selected node (infoNode) in order to sh... |
72,177,329 | Pandas drop rows on multiple conditions<p>I have a dataframe:</p>
<pre><code>from_dict = {'weekday': {1937: 'Thursday',
1938: 'Thursday',
1939: 'Thursday',
1940: 'Friday',
1941: 'Friday',
1942: 'Friday',
... | <p>Try:</p>
<pre><code>>>> df[~(df["weekday"].isin(["Thursday", "Friday"])&df["sort"].eq("day"))]
weekday sort volume
1937 Thursday pre 48840
1939 Thursday twi 48393
1940 Friday pre 47675
1942 Friday twi 46270
1943 Saturday pre... | Pandas drop rows on multiple conditions | python|pandas|slice | 0 | 39 | 1 | 72,177,368 | 72,177,368 | 2 | true | 2022-05-09T19:32:23.933Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pandas drop rows on multiple conditions<p>I have a dataframe:</p>
<pre><code>from_dict = {'weekday': {1937: 'Thursday',
1938: 'Thursday',... |
72,177,521 | For some reason my content within an array is not printing out to the screen<p>I am currently following a tutorial on PERN stack and whenever I try to print out the contents of an array to the screen to be under <strong>title</strong> and <strong>content</strong>, nothing prints out.</p>
<p>Here is my code where the er... | <p>this happens because you forget to return in <code>bolgs.map</code></p>
<pre><code> {
blogs.map(blog => {
return (<tr>
<td>
{blog.title}
</td>
<td>{blog.content}</td>
<td>Edit</td>
<td&... | For some reason my content within an array is not printing out to the screen | javascript|reactjs|react-hooks|fetch | 0 | 37 | 3 | 72,177,572 | 72,177,572 | 2 | true | 2022-05-09T19:52:23.903Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
For some reason my content within an array is not printing out to the screen<p>I am currently following a tutorial on PERN stack and whenever I try to print ... |
72,175,650 | openmp increasing number of threads increases the execution time<p>I'm implementing sparse matrices multiplication(type of elements <code>std::complex</code>) after converting them to <code>CSR</code>(compressed sparse row) format and I'm using openmp for this, but what I noticed that increasing the number of threads d... | <p>You can try to improve the scaling of this algorithm, but I would use a better algorithm. You are allocating a dense matrix (wrongly, but that's beside the point) for the product of two sparse matrices. That's wasteful since quite often the project of two sparse matrices will not be dense by a long shot.</p>
<p>Your... | openmp increasing number of threads increases the execution time | c++|c|openmp | 0 | 58 | 1 | 72,177,636 | 72,177,636 | 2 | true | 2022-05-09T16:55:58.190Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
openmp increasing number of threads increases the execution time<p>I'm implementing sparse matrices multiplication(type of elements <code>std::complex</code>... |
72,176,552 | How to Exclude list of variablized rules dynamically from AWS WAF Terraform resource aws_wafv2_web_acl<p>I am trying to Create an AWS WEB-ACL using Terraform having multiple rules, also want to exclude multiple rules from AWS Managed rulset. but I am not able to exclude multiple rules dynamically coming from variables.... | <p>I don't have access to AWS but I think it's possible with a nested <code>block</code> like below..</p>
<pre><code>dynamic "rule" {
for_each = var.acls[each.key]["AWSManagedRuleSets"]
content {
name = rule.value.name
priority = 0
override_action {
count {}
}... | How to Exclude list of variablized rules dynamically from AWS WAF Terraform resource aws_wafv2_web_acl | terraform|terraform-provider-aws|amazon-waf | 0 | 340 | 1 | 72,177,722 | 72,177,722 | 2 | true | 2022-05-09T18:18:59.083Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to Exclude list of variablized rules dynamically from AWS WAF Terraform resource aws_wafv2_web_acl<p>I am trying to Create an AWS WEB-ACL using Terraform... |
72,174,598 | Microsoft Teams Powershell. How to get the email address of the person logged on<p>I'm sure this is easy, but it's doing my head in.
I'm very new to Powershell.</p>
<p>Accessing the Teams powershell is no problem.</p>
<pre><code>Connect-MicrosoftTeams
</code></pre>
<p>This brings up a dialog, and asks me to select an a... | <p>The easiest way is to save the Teams connection information from <code>Connect-MicrosoftTeams</code> into a variable. The email used to connect is stored in the Account.id field:</p>
<pre><code>$TeamsInfo = Connect-MicrosoftTeams
$TeamsInfo.Account.id
</code></pre> | Microsoft Teams Powershell. How to get the email address of the person logged on | powershell|microsoft-teams|azure-powershell | 0 | 267 | 1 | 72,177,769 | 72,177,769 | 2 | true | 2022-05-09T15:34:50.797Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Microsoft Teams Powershell. How to get the email address of the person logged on<p>I'm sure this is easy, but it's doing my head in.
I'm very new to Powershe... |
72,177,731 | vuelidate identical passwords only if checkbox is ticked<p>I have one form for logging in and creating an account. Additional fields are added when a checkbox is ticked.</p>
<pre class="lang-html prettyprint-override"><code><label for="createNewAccount" >Create account
<input v-model="form.cre... | <p>The most concise fix is:</p>
<pre><code> (value) => {
return !this.form.createNewAccount || value === this.form.admPassWord;
}
</code></pre>
<p>A more readable fix is:</p>
<pre><code> (value) => {
return this.form.createNewAccount ? value === this.form.admPassW... | vuelidate identical passwords only if checkbox is ticked | javascript|vuejs3|vuelidate | 0 | 45 | 1 | 72,177,963 | 72,177,963 | 2 | true | 2022-05-09T20:12:10.077Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
vuelidate identical passwords only if checkbox is ticked<p>I have one form for logging in and creating an account. Additional fields are added when a checkbo... |
72,176,299 | grant privileges and permissions to a role via terrafrom is not working<p>according to terraform doc, I created a user and role as follows:</p>
<pre><code>resource "postgresql_role" "ro_role" {
name = "ro_role"
}
resource "postgresql_role" "ro_user" {
name ... | <p>You likely didn't grant yourself <code>USAGE</code> on the public schema. Based on the docs you provided, you'll need to define a resource like:</p>
<pre><code>resource "postgresql_grant" "readonly_tables_schema_usage_public" {
database = var.database
role = "ro_role"
sc... | grant privileges and permissions to a role via terrafrom is not working | postgresql|terraform|amazon-rds|cicd|terragrunt | 0 | 578 | 1 | 72,178,033 | 72,178,033 | 2 | true | 2022-05-09T17:54:40.800Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
grant privileges and permissions to a role via terrafrom is not working<p>according to terraform doc, I created a user and role as follows:</p>
<pre><code>re... |
72,177,853 | Using Axios in useEffect from an external file<p>I'm trying to export an axios call from an external file to my component, in useEffect. Im exporting the function and importing in the said component. The response is "undefined".</p>
<p>api_call.js:</p>
<pre><code>import axios from 'axios';
const accessToken ... | <p>The real problem here is that the function <code>getPublicCircles</code> returns nothing, which is why any variable to which the result of this function call is assigned as a value, will be <code>undefined</code> per JavaScript rules, because a function that doesn't return any value will return <code>undefined</code... | Using Axios in useEffect from an external file | reactjs|axios|use-effect | 0 | 308 | 1 | 72,178,080 | 72,178,080 | 2 | true | 2022-05-09T20:25:40.957Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Using Axios in useEffect from an external file<p>I'm trying to export an axios call from an external file to my component, in useEffect. Im exporting the fun... |
72,178,589 | What is the Comment (native) function?<p>In console, in both Firefox and Chrome, typing <code>Comment</code> outputs</p>
<pre><code>ƒ Comment() { [native code] }
</code></pre>
<p>What is it?</p> | <p>It's an interface that creates an <a href="https://developer.mozilla.org/en-US/docs/Web/API/Comment" rel="nofollow noreferrer">HTML comment object</a> when called with <code>new</code>:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pr... | What is the Comment (native) function? | javascript | 0 | 17 | 1 | 72,178,637 | 72,178,637 | 2 | true | 2022-05-09T21:56:37.417Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What is the Comment (native) function?<p>In console, in both Firefox and Chrome, typing <code>Comment</code> outputs</p>
<pre><code>ƒ Comment() { [native cod... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.