qid int64 4 19.1M | question stringlengths 18 48.3k | answers list | date stringlengths 10 10 | metadata list |
|---|---|---|---|---|
74,328,510 | <p><a href="https://i.stack.imgur.com/HCfwd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HCfwd.png" alt="enter image description here" /></a></p>
<ol>
<li><p>I want to get the uid using name
for eg: someFunctionToFindUidOfName('Akt') //should return uid = 0, but don't know how to get that i am new... | [
{
"answer_id": 74328548,
"author": "Anh Le Hoang",
"author_id": 16315750,
"author_profile": "https://Stackoverflow.com/users/16315750",
"pm_score": 1,
"selected": false,
"text": "display: flex; justify-content: center; .recipe-container .recipe-container {\n ...\n display: flex;\n ... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74328510",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20089880/"
] |
74,328,516 | <p>i have a string like so:</p>
<pre><code>${1}${2}${3}${4}%9${5}00
</code></pre>
<p>And I'm wanting to wrap all the numbers and vars in span tags But the issue is there can be an unlimited number of <strong>"${1}"</strong> variables in this string.</p>
<p>The current regex I'm using is</p>
<pre><code>str.rep... | [
{
"answer_id": 74328559,
"author": "Nathan Furnal",
"author_id": 9479128,
"author_profile": "https://Stackoverflow.com/users/9479128",
"pm_score": 2,
"selected": false,
"text": "str.replace(/(\\$\\{\\d\\})/g, '<span>$1</span>')\n '<span>${1}</span><span>${2}</span><span>${3}</span><span>... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74328516",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2057056/"
] |
74,328,533 | <p>I have a table Wallets:</p>
<pre><code>[id] [address]
1 ABC
2 ABC
3 DEF
4 GHI
5 JKL
</code></pre>
<p>I have a table Cards</p>
<pre><code>[company] [color] [wallet_id]
Facebook blue 1
Facebook blue 2
Youtube red 3
Facebook blue 3
Orkut pink 4
Microsoft ... | [
{
"answer_id": 74328559,
"author": "Nathan Furnal",
"author_id": 9479128,
"author_profile": "https://Stackoverflow.com/users/9479128",
"pm_score": 2,
"selected": false,
"text": "str.replace(/(\\$\\{\\d\\})/g, '<span>$1</span>')\n '<span>${1}</span><span>${2}</span><span>${3}</span><span>... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74328533",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15781720/"
] |
74,328,544 | <p>Let's assume we create a Ternary tree using an array implementation. The root is stored in the index 1, the left child is stored in index = 3(index)-1, middle child is stored in 3(index), and right child is stored in 3(index)+1. So for example. Assume the following Ternary Tree.</p>
<pre><code> ... | [
{
"answer_id": 74328559,
"author": "Nathan Furnal",
"author_id": 9479128,
"author_profile": "https://Stackoverflow.com/users/9479128",
"pm_score": 2,
"selected": false,
"text": "str.replace(/(\\$\\{\\d\\})/g, '<span>$1</span>')\n '<span>${1}</span><span>${2}</span><span>${3}</span><span>... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74328544",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17430837/"
] |
74,328,577 | <p>I create an arrayList and set all it's elements to 0</p>
<p>When all elements are set to 1, I try to turn them all back to 0 with a lambda and only the first 2 indices are changed.</p>
<pre class="lang-java prettyprint-override"><code>// create a list freeFrames, size 5, all elements set to 0:
List<Integer> fr... | [
{
"answer_id": 74328789,
"author": "vinsce",
"author_id": 3811895,
"author_profile": "https://Stackoverflow.com/users/3811895",
"pm_score": 2,
"selected": true,
"text": "forEach freeFrame.forEach(b -> freeFrame.set(b, 0));\n b List.set l [1, 1, 1, 1] forEach b=1 l.set(1,0) [1, 0, 1, 1] b... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74328577",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20419870/"
] |
74,328,599 | <p>I have a <code>base.html</code> template file for Django (4.1.2) as:</p>
<pre><code><!DOCTYPE html>
<html lang="en">
{% load static %}
{% load i18n %}
<head>
<meta charset="utf-8">
{% block title %}
<title>My Title</title>
{% e... | [
{
"answer_id": 74328789,
"author": "vinsce",
"author_id": 3811895,
"author_profile": "https://Stackoverflow.com/users/3811895",
"pm_score": 2,
"selected": true,
"text": "forEach freeFrame.forEach(b -> freeFrame.set(b, 0));\n b List.set l [1, 1, 1, 1] forEach b=1 l.set(1,0) [1, 0, 1, 1] b... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74328599",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6630397/"
] |
74,328,605 | <p>I'm very new to R, and I heard it's best to replace loops with apply functions, however I couldn't wrap my head around on how to transform my loop with this example. Any help would be appreciated.</p>
<pre><code>file_path is a list of file names
file_path[1] = "/home/user/a.rds"
file_path[2] = "/home/... | [
{
"answer_id": 74328789,
"author": "vinsce",
"author_id": 3811895,
"author_profile": "https://Stackoverflow.com/users/3811895",
"pm_score": 2,
"selected": true,
"text": "forEach freeFrame.forEach(b -> freeFrame.set(b, 0));\n b List.set l [1, 1, 1, 1] forEach b=1 l.set(1,0) [1, 0, 1, 1] b... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74328605",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20426162/"
] |
74,328,620 | <p>I have following nested object as state.</p>
<pre><code>interface name {
firstName: string;
lastName: string;
}
type NameType = name;
interface employer {
name: string;
state: string;
}
type EmployerType = employer;
interface person {
name: NameType;
age: number;
employer: EmployerType;
}
type Person... | [
{
"answer_id": 74328789,
"author": "vinsce",
"author_id": 3811895,
"author_profile": "https://Stackoverflow.com/users/3811895",
"pm_score": 2,
"selected": true,
"text": "forEach freeFrame.forEach(b -> freeFrame.set(b, 0));\n b List.set l [1, 1, 1, 1] forEach b=1 l.set(1,0) [1, 0, 1, 1] b... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74328620",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2353460/"
] |
74,328,660 | <p>I have this as an object (indiErr):</p>
<pre><code>[
{ errorType: 'color-contrast', errorImpact: 'serious', errorCount: 8 },
{ errorType: 'heading-order', errorImpact: 'moderate', errorCount: 1 },
{ errorType: 'image-alt', errorImpact: 'critical', errorCount: 1 },
{ errorType: 'image-redundant-alt', errorIm... | [
{
"answer_id": 74329065,
"author": "Andrew Parks",
"author_id": 5898421,
"author_profile": "https://Stackoverflow.com/users/5898421",
"pm_score": 0,
"selected": false,
"text": "const errors = [\n { errorType: 'color-contrast', errorImpact: 'serious', errorCount: 8 },\n { errorType: 'he... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74328660",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15058684/"
] |
74,328,667 | <p>I have a form with 2 input elements and I want to get value with i. But the value is nan.</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>let inputN1 = parseInt(document.g... | [
{
"answer_id": 74328721,
"author": "Dharmik_403",
"author_id": 19864266,
"author_profile": "https://Stackoverflow.com/users/19864266",
"pm_score": -1,
"selected": false,
"text": "parseInt() \"\" parseInt() NaN"
},
{
"answer_id": 74328741,
"author": "majusebetter",
"author... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74328667",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19220799/"
] |
74,328,692 | <p>Is there a way to create a sequence that replicates itself excluding the last element without a loop? Say we have a starting sequence <code>4:1</code> and the function <code>fun</code> that generates the rest of the sequence like:</p>
<pre><code>> fun(4:1)
[1] 4 3 2 1 4 3 2 4 3 4
</code></pre>
| [
{
"answer_id": 74328805,
"author": "danlooo",
"author_id": 16853114,
"author_profile": "https://Stackoverflow.com/users/16853114",
"pm_score": 0,
"selected": false,
"text": "fun <- function(x) {\n x |>\n length() |>\n seq() |>\n sapply(function(y) x[1:y]) |>\n rev() |>\n purrr::sim... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74328692",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17720640/"
] |
74,328,702 | <p>Could someone tell me if im right about what these parts of the code do:</p>
<p>This is JSON to string conversion?</p>
<pre><code>factory Post.fromJson(Map<String, dynamic> json) => Post(
userId: json["userId"],
id: json["id"],
title: json["title"],
body: json[&... | [
{
"answer_id": 74328805,
"author": "danlooo",
"author_id": 16853114,
"author_profile": "https://Stackoverflow.com/users/16853114",
"pm_score": 0,
"selected": false,
"text": "fun <- function(x) {\n x |>\n length() |>\n seq() |>\n sapply(function(y) x[1:y]) |>\n rev() |>\n purrr::sim... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74328702",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17349296/"
] |
74,328,755 | <p>Hi i am new to python and i have a little problems with my code.</p>
<pre><code>def Sumn(mylist):
i = 0
sum = 0
for i in mylist[1]:
sum += mylist[i]
return sum
i+=1
</code></pre>
<pre><code>import myFunctions
mylist = [6, 12, 645, 3, -8]
print(myFunctions.Sumn(mylist))
</code></p... | [
{
"answer_id": 74328784,
"author": "maciek97x",
"author_id": 10626495,
"author_profile": "https://Stackoverflow.com/users/10626495",
"pm_score": 2,
"selected": false,
"text": "for myList myList[1] for i myList[i] return i += 1 def Sumn(mylist):\n list_sum = 0 \n for i in mylist:... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74328755",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20426212/"
] |
74,328,787 | <p>I'm teaching myself CRUD in MERN stack and I've come across a bug. The onClick inside GET function is not firing, it only fires after multiple times of clicking.
Here's the code:</p>
<p>`</p>
<pre><code>function GetData() {
try{
useEffect(()=>{
axios.get('http://localhost:3000/app/profile', {
... | [
{
"answer_id": 74328784,
"author": "maciek97x",
"author_id": 10626495,
"author_profile": "https://Stackoverflow.com/users/10626495",
"pm_score": 2,
"selected": false,
"text": "for myList myList[1] for i myList[i] return i += 1 def Sumn(mylist):\n list_sum = 0 \n for i in mylist:... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74328787",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20426302/"
] |
74,328,810 | <p>When trying to set a value in a 2D array like this:</p>
<pre><code>let a = Array.make 5 (Array.make 5 0);;
a.(0).(0) <- 4;
</code></pre>
<p>It will for some reason put <code>4</code> at index <code>j</code> in every array contained in the 2D array <code>a</code>.</p>
<p>Why is this, and how do i get it to only s... | [
{
"answer_id": 74329073,
"author": "glennsl",
"author_id": 7943564,
"author_profile": "https://Stackoverflow.com/users/7943564",
"pm_score": 3,
"selected": false,
"text": "let inner = Array.make 5 0 in\nlet outer = Array.make 5 inner in\ninner.(0) <- 4\n Array.init Array.make Array.init ... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74328810",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15026297/"
] |
74,328,826 | <p><a href="https://i.stack.imgur.com/TuM9Y.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TuM9Y.png" alt="enter image description here" /></a></p>
<p>I want to center the image on the right vertically, so that it is centered between the two green titles, can somebody help me with this?</p>
<p>my CS... | [
{
"answer_id": 74329190,
"author": "Aymen Missaoui",
"author_id": 14157115,
"author_profile": "https://Stackoverflow.com/users/14157115",
"pm_score": 2,
"selected": true,
"text": "You can try this:\n\n\n\n .vorigejaren {\n display:flex;\n justify-content: center;\n }\n\nimg... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74328826",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20426320/"
] |
74,328,831 | <p>I'm working on a MSTest project which has a reference to a .NET 6.0 project.</p>
<p>I'd like to use Moq for constructing unit tests.</p>
<p>In my .Net project I have an interface <code>IDataAccees</code> with a method declaration which has the following signature:</p>
<pre><code>Task<(TypeA, Resource[,])> Load... | [
{
"answer_id": 74329190,
"author": "Aymen Missaoui",
"author_id": 14157115,
"author_profile": "https://Stackoverflow.com/users/14157115",
"pm_score": 2,
"selected": true,
"text": "You can try this:\n\n\n\n .vorigejaren {\n display:flex;\n justify-content: center;\n }\n\nimg... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74328831",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12470264/"
] |
74,328,832 | <p>Consider a 2D square tiled grid (chess board like) which contains conveyor belt like structures that can curve and move game pieces around.</p>
<p>I need to calculate the <em>turn movement</em> (<code>TURN_LEFT</code>, <code>TURN_RIGHT</code> or <code>STAY</code>), depending on</p>
<ol>
<li>the direction from which ... | [
{
"answer_id": 74330128,
"author": "Simon Jacobs",
"author_id": 10928439,
"author_profile": "https://Stackoverflow.com/users/10928439",
"pm_score": 3,
"selected": true,
"text": "val angle = atan2(outVec.y, outVec.x) - atan2(incVec.y, incVec.x)\n when"
},
{
"answer_id": 74330879,
... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74328832",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/204693/"
] |
74,328,834 | <p>I made rock paper scissors game with score counter. Although it works well, I realized that the code is too heavy.</p>
<pre class="lang-py prettyprint-override"><code>import random
game = 3
userScore = 0
computerScore = 0
while game != 0:
print(f"game left : {game}")
user = input("'r' for ro... | [
{
"answer_id": 74328932,
"author": "Samwise",
"author_id": 3799759,
"author_profile": "https://Stackoverflow.com/users/3799759",
"pm_score": 2,
"selected": true,
"text": "# use 'for' and 'range' to iterate over a sequence of numbers\nfor game in range(3, 0, -1):\n\n print(f\"game left... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74328834",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20426298/"
] |
74,328,938 | <p>I have data as follows:</p>
<pre><code>avec <- c("somevar", NA ,"anothervar", NA, "thisvar","thatvar", NA, "lastvar", NA )
</code></pre>
<p>All I want to do is to replace all <code>NA</code> values in <code>avec</code>, with a consecutive variable name, like <code... | [
{
"answer_id": 74328977,
"author": "danlooo",
"author_id": 16853114,
"author_profile": "https://Stackoverflow.com/users/16853114",
"pm_score": 2,
"selected": false,
"text": "\navec <- c(\"somevar\", NA ,\"anothervar\", NA, \"thisvar\",\"thatvar\", NA, \"lastvar\", NA )\nna_pos <- 1\nfor ... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74328938",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8071608/"
] |
74,328,978 | <p>Basically i have 3 tables and these tables have 3 titles on the top. Each time i click this title i want to hide the table and show it back. How can i make that happen?</p>
<p>I added a on click to each of the titles, but i can't hide only the table which belongs to this button, it's hiding all the tables? Keep in m... | [
{
"answer_id": 74329005,
"author": "sdev",
"author_id": 16161630,
"author_profile": "https://Stackoverflow.com/users/16161630",
"pm_score": 0,
"selected": false,
"text": "tables = [true,true,true]\n {tables[0] ? <Table1/> : null}\n{tables[1] ? <Table2/> : null}{tables[2] ? <Table3/> : nu... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74328978",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18174677/"
] |
74,328,986 | <p>in my laravel app I have to put the whole path of my file, like this:</p>
<pre><code>$credentialsFilePath = "C:\xampp\htdocs\myapp.com\json\myapp-dda63-firebase-adminsdk-a84ay-19eb8e8646.json"
</code></pre>
<p>However this doesn't look so good to me, in production I will have to change the string path for ... | [
{
"answer_id": 74329196,
"author": "Mohammed Jhosawa",
"author_id": 5599067,
"author_profile": "https://Stackoverflow.com/users/5599067",
"pm_score": 2,
"selected": false,
"text": "base_path()\n"
},
{
"answer_id": 74329306,
"author": "khawar Ali",
"author_id": 12719616,
... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74328986",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10646944/"
] |
74,328,992 | <p>I have an existing model that was trained on Azure. I want to fully integrate and start using the model on Databricks. Whats the best way to do this? How can I successfully load the model into databricks model workflow? I have the model in a pickle file</p>
<p>I have read almost all the documentation on databricks, ... | [
{
"answer_id": 74329196,
"author": "Mohammed Jhosawa",
"author_id": 5599067,
"author_profile": "https://Stackoverflow.com/users/5599067",
"pm_score": 2,
"selected": false,
"text": "base_path()\n"
},
{
"answer_id": 74329306,
"author": "khawar Ali",
"author_id": 12719616,
... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74328992",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20044772/"
] |
74,328,997 | <p>I have a spring boot api that works with a postgresql database. My frontend is an angular application. I am working with the HttpClient. Now I always have to refrsh the website to fetch new data from my api. My question is: How can I fetch new data without refreshing the website??</p>
<p>Service:</p>
<pre><code>getM... | [
{
"answer_id": 74329704,
"author": "Eli Porush",
"author_id": 14598976,
"author_profile": "https://Stackoverflow.com/users/14598976",
"pm_score": 1,
"selected": false,
"text": "interval `setInterval(() => { \n // you API request\n }, 1000)\n interval() rxjs"
}
] | 2022/11/05 | [
"https://Stackoverflow.com/questions/74328997",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20308284/"
] |
74,329,008 | <p>I'm trying to use the Clarifai API to build a face detection app, but I'm getting no response from it. I'm new to this, and I've done just about everything to get it to work, but I'm getting no response.</p>
<p>This is my code</p>
<blockquote>
</blockquote>
<pre><code>import React, { Component } from 'react';
import... | [
{
"answer_id": 74329890,
"author": "George A....",
"author_id": 12850027,
"author_profile": "https://Stackoverflow.com/users/12850027",
"pm_score": 0,
"selected": false,
"text": "app.models.predict(\"https://samples.clarifai.com/face-det.jpg%22\").then(response => {\n console.log(respons... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74329008",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19135295/"
] |
74,329,064 | <p>I made this exercise on SQL server: write a query that lists for each cluster the quantity of products that fall within it. The company wants to obtain an analysis of sales with respect to the average quantity of each product present in each order, classifying them into six clusters: Q1 (<15), Q2 (15-20), Q3 (21-... | [
{
"answer_id": 74329214,
"author": "topsail",
"author_id": 1467914,
"author_profile": "https://Stackoverflow.com/users/1467914",
"pm_score": 3,
"selected": true,
"text": "declare @clusters table (prod_num int, cluster nchar(2));\ninsert into @clusters values\n (0, 'Q1'),(0, 'Q2'),(0, ... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74329064",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20426481/"
] |
74,329,069 | <p>I currently have 2 methods. The first method says what is the row with the highest average and the second one says what is the column with the highest average. I want to merge these two methods into one but I don't know how. the parameter is an array of doubles and the return type should be a string that says for th... | [
{
"answer_id": 74329214,
"author": "topsail",
"author_id": 1467914,
"author_profile": "https://Stackoverflow.com/users/1467914",
"pm_score": 3,
"selected": true,
"text": "declare @clusters table (prod_num int, cluster nchar(2));\ninsert into @clusters values\n (0, 'Q1'),(0, 'Q2'),(0, ... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74329069",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20187389/"
] |
74,329,236 | <p>This is my code:</p>
<pre><code>struct Account: View {
var body: some View {
VStack {
ScrollView {
HStack {
Text("Account")
.font(.largeTitle)
.fontWeight(.bold)
... | [
{
"answer_id": 74329214,
"author": "topsail",
"author_id": 1467914,
"author_profile": "https://Stackoverflow.com/users/1467914",
"pm_score": 3,
"selected": true,
"text": "declare @clusters table (prod_num int, cluster nchar(2));\ninsert into @clusters values\n (0, 'Q1'),(0, 'Q2'),(0, ... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74329236",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17864647/"
] |
74,329,238 | <p>I am trying to create a new list by taking values from the user. Then I want to display the values in this list along with their indexes. For example for the values 5,4,3,2 I want the output to be:</p>
<p>5 0</p>
<p>4 1</p>
<p>3 2</p>
<p>2 3</p>
<p>This is my code:</p>
<pre><code>(setq n (getint "How many eleme... | [
{
"answer_id": 74339421,
"author": "CAD Developer",
"author_id": 5796526,
"author_profile": "https://Stackoverflow.com/users/5796526",
"pm_score": 2,
"selected": false,
"text": "vl-position (vl-position ... ) rtos vl-position itoa (print(strcat el \" \" (itoa (vl-position el lista))))\n"... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74329238",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15567924/"
] |
74,329,303 | <p>I am trying to make a simple clicker game that you try and generate money through clicking a button. And I want a upgrade button to become visible after you have $10.</p>
<p>Here is the code:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-cod... | [
{
"answer_id": 74339421,
"author": "CAD Developer",
"author_id": 5796526,
"author_profile": "https://Stackoverflow.com/users/5796526",
"pm_score": 2,
"selected": false,
"text": "vl-position (vl-position ... ) rtos vl-position itoa (print(strcat el \" \" (itoa (vl-position el lista))))\n"... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74329303",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20426737/"
] |
74,329,322 | <p>I have a simulation time, starting from zero and counting upwards. Then I have some if-statements, in which I set the speed of a motor to a specific value. I want to execute different stuff depending on the simulation time.</p>
<p>E.g.,</p>
<pre><code>if simulation_time % 5000 <= 0:
motorSpeed = actionList[ch... | [
{
"answer_id": 74329359,
"author": "mlokos",
"author_id": 19570235,
"author_profile": "https://Stackoverflow.com/users/19570235",
"pm_score": -1,
"selected": false,
"text": "motor_speed_cycle = simulation_time\n\nif motor_speed_cycle % 5000 <= 0:\n motorSpeed = actionList[choice1]\nel... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74329322",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12347671/"
] |
74,329,358 | <p>I would like to pass quoted variables in the <code>group</code> argument of <code>geom_col_wrap</code> to the <code>split_group</code> function.</p>
<pre><code># I deleted the rest of the function for readability
geom_col_wrap = function(data, mapping, group, ...) {
data |>
split_group(group)
}
</code></p... | [
{
"answer_id": 74329359,
"author": "mlokos",
"author_id": 19570235,
"author_profile": "https://Stackoverflow.com/users/19570235",
"pm_score": -1,
"selected": false,
"text": "motor_speed_cycle = simulation_time\n\nif motor_speed_cycle % 5000 <= 0:\n motorSpeed = actionList[choice1]\nel... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74329358",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9204125/"
] |
74,329,372 | <p>I'd like to link elements from a string with numbers in Python.</p>
<p>Users need to give an input string (one word such as "world") and then the elements of that string (here the letters of the word "world") needs to be linked to numbers starting from 0.</p>
<p>Then, when you give another string... | [
{
"answer_id": 74329359,
"author": "mlokos",
"author_id": 19570235,
"author_profile": "https://Stackoverflow.com/users/19570235",
"pm_score": -1,
"selected": false,
"text": "motor_speed_cycle = simulation_time\n\nif motor_speed_cycle % 5000 <= 0:\n motorSpeed = actionList[choice1]\nel... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74329372",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20279847/"
] |
74,329,374 | <p>Edit: as per the answers, this works in 21C but not before. Looks like it is an Oracle bug that was fixed. The workaround in previous versions is provided as the accepted answer.</p>
<p>In PL/SQL, a subtype of a nested table behaves inconsistently compared to a regular nested table. It seems like it is not possible ... | [
{
"answer_id": 74329359,
"author": "mlokos",
"author_id": 19570235,
"author_profile": "https://Stackoverflow.com/users/19570235",
"pm_score": -1,
"selected": false,
"text": "motor_speed_cycle = simulation_time\n\nif motor_speed_cycle % 5000 <= 0:\n motorSpeed = actionList[choice1]\nel... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74329374",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1391717/"
] |
74,329,387 | <p>I have this python server code here, which is waiting to receive a message digest and an encrypted message from a python client.</p>
<p>Clientside socket:</p>
<pre><code>with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
s=socket.socket()
s.connect((HOST, PORT))
s.sendall(transmit)
</code></pre... | [
{
"answer_id": 74329359,
"author": "mlokos",
"author_id": 19570235,
"author_profile": "https://Stackoverflow.com/users/19570235",
"pm_score": -1,
"selected": false,
"text": "motor_speed_cycle = simulation_time\n\nif motor_speed_cycle % 5000 <= 0:\n motorSpeed = actionList[choice1]\nel... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74329387",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15585688/"
] |
74,329,403 | <p>I'm having trouble accessing multiple values in a dictionary. Let's say I have this dictionary:</p>
<pre><code>{'1': 0, '2': 1, '3': 2, '4': 3, '5': 4, '6': 5}
</code></pre>
<p>I want to find two keys that sum to 6 and display their values. Here, the keys 4 and 2 add to 6, so the 2 values are 3 and 1.</p>
<p>Where d... | [
{
"answer_id": 74329488,
"author": "mlokos",
"author_id": 19570235,
"author_profile": "https://Stackoverflow.com/users/19570235",
"pm_score": 0,
"selected": false,
"text": "a = {'1': 0, '2': 1, '3': 2, '4': 3, '5': 4, '6': 5}\n\nresults = list()\n\nfor key_1 in a.keys():\n for key_2 in ... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74329403",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20402809/"
] |
74,329,438 | <p>I extracted some text from a web page.</p>
<p>But I have some whitespaces or speciual characters that I can not remove easily.</p>
<p>I tried this:</p>
<pre><code>library(dplyr)
library(rvest)
url <- "http://www.scielo.org.mx/scielo.php?script=sci_arttext&pid=S1607-40412016000100014&lang=es"
p... | [
{
"answer_id": 74329573,
"author": "G5W",
"author_id": 4752675,
"author_profile": "https://Stackoverflow.com/users/4752675",
"pm_score": 2,
"selected": false,
"text": "trimws trimws(referenes_whitout_end_spaces, whitespace=\"[ ]\")\n"
},
{
"answer_id": 74329899,
"au... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74329438",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10108383/"
] |
74,329,583 | <p>Have tried,</p>
<pre><code>export "INDEX_SET"="{"index_all":false,"index_group":true,"index_channel":true,"exclude_chats":[],"include_chats":[1522205730]}"
</code></pre>
<p>but received this error:</p>
<blockquote>
<p>json.decoder.JSONDecodeError:... | [
{
"answer_id": 74329629,
"author": "declension",
"author_id": 604382,
"author_profile": "https://Stackoverflow.com/users/604382",
"pm_score": 3,
"selected": true,
"text": "export INDEX_SET='{\"index_all\":false,\"index_group\":true,\"index_channel\":true,\"exclude_chats\":[],\"include_ch... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74329583",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18308985/"
] |
74,329,588 | <p>I have a table with the following structure:</p>
<pre class="lang-none prettyprint-override"><code> name | version | processed | processing | updated | ref_time
------+---------+-----------+------------+----------+----------
abc | 1 | t | f | 27794395 | 27794160
def | 1 | t ... | [
{
"answer_id": 74329653,
"author": "Sergey",
"author_id": 14535517,
"author_profile": "https://Stackoverflow.com/users/14535517",
"pm_score": 1,
"selected": false,
"text": "SELECT ref_time,count(*)as total,\nSUM\n(\n CASE\n WHEN processed='t' then 1\n else 0\n END\n)processed\nFROM... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74329588",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4070848/"
] |
74,329,676 | <p>I'm beginning to learn HTML/CSS and I have to make a header, and I'm having some troubles in the spacing I need to get between the texts on it. After trying a lot of things, I got the spacing right, but now somewhy the texts aint getting the interaction they should.</p>
<p>The HTML code is:</p>
<pre class="lang-htm... | [
{
"answer_id": 74329931,
"author": "BagMan",
"author_id": 20426770,
"author_profile": "https://Stackoverflow.com/users/20426770",
"pm_score": 2,
"selected": true,
"text": "@charset \"UTF-8\";\n@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond&display=swap');\n@font... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74329676",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20427057/"
] |
74,329,696 | <p>Numpy allows to pass a <code>numpy.array</code> as argument into a function and evaluate the function for every element of the array.:</p>
<pre class="lang-py prettyprint-override"><code>def f(n):
return n**2
arr = np.array([1,2,3])
f(arr)
</code></pre>
<p>outputs:</p>
<pre class="lang-py prettyprint-override">... | [
{
"answer_id": 74329880,
"author": "Chrysophylaxs",
"author_id": 9499196,
"author_profile": "https://Stackoverflow.com/users/9499196",
"pm_score": 0,
"selected": false,
"text": "np.array([1, 2, 3, 4, 5]) n%2 np.array([1, 0, 1, 0, 1]) np.array([False, True, False, True, False]) if True Fa... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74329696",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8588512/"
] |
74,329,698 | <p>I'm sampling 3 numbers with their given probabilities, and I would like to turn the results into a data frame counting the occurrences of each value per sample.</p>
<p>Like this:</p>
<pre><code>[0] [1] [2]
3 4 3
1 6 3
</code></pre>
<p>The code I am using to create the samples and count them is this:</p>
<p... | [
{
"answer_id": 74329877,
"author": "Ric Villalba",
"author_id": 6912817,
"author_profile": "https://Stackoverflow.com/users/6912817",
"pm_score": 0,
"selected": false,
"text": "replicate(\n 10, table(factor(\n sample(x=c(0,1,2), size=10, replace=TRUE, prob=c(.3,.4,.3)),\n levels =... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74329698",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13260546/"
] |
74,329,729 | <p>This code pop all the required strings from the stack. But i want to store those string elements in a final one string variable. How to do it?</p>
<pre><code>#include <sstream>
#include <stack>
#include <string>
#include<iostream>
using namespace std;
int main()
{
istringstream iss("... | [
{
"answer_id": 74329745,
"author": "lorro",
"author_id": 6292621,
"author_profile": "https://Stackoverflow.com/users/6292621",
"pm_score": 3,
"selected": true,
"text": "while std::ostringstream oss;\n while (!mudassir.empty()) {\n oss << mudassir.top();\n mudassir.po... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74329729",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12422272/"
] |
74,329,761 | <p>I tried to insert a node before a given node by specifying the position of the node before which I want to insert the newnode. I got the data present inside that node's position and using a while loop, compared this data with each node's data till I reached the point where I was supposed to insert the node.</p>
<p>B... | [
{
"answer_id": 74329745,
"author": "lorro",
"author_id": 6292621,
"author_profile": "https://Stackoverflow.com/users/6292621",
"pm_score": 3,
"selected": true,
"text": "while std::ostringstream oss;\n while (!mudassir.empty()) {\n oss << mudassir.top();\n mudassir.po... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74329761",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17610052/"
] |
74,329,770 | <p>I need to create a program that searches for a user inserted number from an array using pointers. This is my current code</p>
<pre><code>#include <iostream>
using namespace std;
void FindNumber(int *ptrArr, int size, int *ptr1) {
for (int *p = ptrArr; p < ptrArr + size; ++p) {
if (ptrArr[*p] ==... | [
{
"answer_id": 74329745,
"author": "lorro",
"author_id": 6292621,
"author_profile": "https://Stackoverflow.com/users/6292621",
"pm_score": 3,
"selected": true,
"text": "while std::ostringstream oss;\n while (!mudassir.empty()) {\n oss << mudassir.top();\n mudassir.po... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74329770",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18487151/"
] |
74,329,796 | <p>What is the time complexity of the second loop?</p>
<pre><code> for(int i =1; i<=n;i++)
{
for(int j=i ; j<=n; j+=i*2);
}
</code></pre>
<p>I have gone this far:</p>
<pre><code>i=1 ==> j=n/2
i=2 ==> j=(n-1)/4
i=3 ==> j=(n-2)/6
i=4 ==> j=(n-3)/8
i=n ==> j=1/2n
</code></pre>
<p>but i cant ... | [
{
"answer_id": 74329868,
"author": "lorro",
"author_id": 6292621,
"author_profile": "https://Stackoverflow.com/users/6292621",
"pm_score": 0,
"selected": false,
"text": "floor((n - i + 1) / (2 * i)) O(1) floor((n - i + 1) / (2 * i)) O(n/(2i) - 1/2 + 1/(2i)) = O(n/i) i n i"
},
{
"... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74329796",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19605618/"
] |
74,329,803 | <p>I have been trying to make my custom component for Adminjs dashboard. My project is made in Nodejs and Adminjs can be customized in React, so I created dashboard.jsx file inside components/dashboard folders, but when I implement that in Adminjs.bundle I get given file "./components/dashboard/dashboard doesn't e... | [
{
"answer_id": 74329868,
"author": "lorro",
"author_id": 6292621,
"author_profile": "https://Stackoverflow.com/users/6292621",
"pm_score": 0,
"selected": false,
"text": "floor((n - i + 1) / (2 * i)) O(1) floor((n - i + 1) / (2 * i)) O(n/(2i) - 1/2 + 1/(2i)) = O(n/i) i n i"
},
{
"... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74329803",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12880330/"
] |
74,329,829 | <p>i'm just learning asyncio and threads, so if someting is wrong, sorry</p>
<p>this is my code:</p>
<pre><code>async def callback_onlyAlert(update: Update, context):
await update.message.reply_text('Ok! \nI will send you a message only when you can withdraw your USDN')
#run alert
t = threading.Thread(targ... | [
{
"answer_id": 74329868,
"author": "lorro",
"author_id": 6292621,
"author_profile": "https://Stackoverflow.com/users/6292621",
"pm_score": 0,
"selected": false,
"text": "floor((n - i + 1) / (2 * i)) O(1) floor((n - i + 1) / (2 * i)) O(n/(2i) - 1/2 + 1/(2i)) = O(n/i) i n i"
},
{
"... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74329829",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13461401/"
] |
74,329,830 | <p>I have a JSON file with 28 million strings, the size is roughly 15 GB. Some of the strings are duplicates, so I need to create a new JSON file with just the unique ones. I'm guessing 240 million of them are unique, but I need to find out the exact number. The strings are all less than 100 characters. Here is an exam... | [
{
"answer_id": 74330064,
"author": "Kirk Ouimet",
"author_id": 102635,
"author_profile": "https://Stackoverflow.com/users/102635",
"pm_score": 3,
"selected": false,
"text": "// Find the files we want to count\nlet files = NodeFileSystem.readdirSync('data/imported');\nlet keyArray = [];\n... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74329830",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/102635/"
] |
74,329,841 | <p>I'm trying to create a confusion matrix, in order to build it I need to convert this matrix of predictions from my model into a label vector. (to compare it with the vector of actual labels)</p>
<p>Matrix:</p>
<pre><code> Africa America CentralAsiaSiberia EastAsia Oceania SouthAsia WestEurasia
196 1 0 ... | [
{
"answer_id": 74330025,
"author": "Maël",
"author_id": 13460602,
"author_profile": "https://Stackoverflow.com/users/13460602",
"pm_score": 2,
"selected": true,
"text": "max.col names(df)[max.col(df)]\n#[1] \"Africa\" \"America\" \"EastAsia\" \"EastAsia\" \"WestEurasia\" \... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74329841",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14525393/"
] |
74,329,846 | <p>How Do I make a token untransferable by the wallet owner and only transferable by the token smart contract</p>
| [
{
"answer_id": 74330025,
"author": "Maël",
"author_id": 13460602,
"author_profile": "https://Stackoverflow.com/users/13460602",
"pm_score": 2,
"selected": true,
"text": "max.col names(df)[max.col(df)]\n#[1] \"Africa\" \"America\" \"EastAsia\" \"EastAsia\" \"WestEurasia\" \... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74329846",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20354129/"
] |
74,329,859 | <p>I have created an enum for accessories and used the switch statement in the class property to determine the price depending on the accessories chosen. A class that has two constructors implements this enum, one of the constructors accepts types from this enum as arguments while the other does not. See codes below:</... | [
{
"answer_id": 74330337,
"author": "Thomas Weller",
"author_id": 480982,
"author_profile": "https://Stackoverflow.com/users/480982",
"pm_score": 1,
"selected": false,
"text": "SalesQuote(decimal vehicleSalePrice, decimal tradeInAmount, decimal salesTaxRate)\n SalesQuote(decimal vehicleSa... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74329859",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13206046/"
] |
74,329,891 | <pre><code>leading: Padding(
padding: EdgeInsets.only(left: 20),
child: IconButton(
onPressed: () => print('Menu Tapped'),
icon: Image.asset(
'assets/images/vecteezy_triangle_1200693.png',
fit: BoxFit.fitWidth,
),
),
),
</code></pre>... | [
{
"answer_id": 74330337,
"author": "Thomas Weller",
"author_id": 480982,
"author_profile": "https://Stackoverflow.com/users/480982",
"pm_score": 1,
"selected": false,
"text": "SalesQuote(decimal vehicleSalePrice, decimal tradeInAmount, decimal salesTaxRate)\n SalesQuote(decimal vehicleSa... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74329891",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20427219/"
] |
74,329,902 | <p>I want to use stripe android sdk pre build UI <strong>payment sheet</strong> for recurring payment (Subscription) in my android app.
I see payment sheet example for <strong>non recurring payment</strong> on stripe document but i didn't found document for <strong>subscription in android</strong>. I have spend lot of ... | [
{
"answer_id": 74341841,
"author": "orakaro",
"author_id": 3631795,
"author_profile": "https://Stackoverflow.com/users/3631795",
"pm_score": 1,
"selected": false,
"text": "latest_invoice.payment_intent.client_secret"
},
{
"answer_id": 74360212,
"author": "Pavel K",
"autho... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74329902",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8740243/"
] |
74,329,912 | <p>This is my first question here and this is also one of my first codes ever so please be understanding :D</p>
<p>I need to create something like this: <a href="https://i.stack.imgur.com/mH18n.png" rel="nofollow noreferrer">https://i.stack.imgur.com/mH18n.png</a>.</p>
<p>I don't know what I can do to make span class=&... | [
{
"answer_id": 74341841,
"author": "orakaro",
"author_id": 3631795,
"author_profile": "https://Stackoverflow.com/users/3631795",
"pm_score": 1,
"selected": false,
"text": "latest_invoice.payment_intent.client_secret"
},
{
"answer_id": 74360212,
"author": "Pavel K",
"autho... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74329912",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20420241/"
] |
74,329,922 | <p>I wrote a code to calculate an average, but it takes only the first item in the list.
I want to input a list of key=value and it should add all the values and then divide by the total number, so it gives me the average.</p>
<pre><code>def average_price_petrol(**args):
result = 0
total = 0
for key,value in args.items... | [
{
"answer_id": 74329979,
"author": "m_j_alkarkhi",
"author_id": 16138689,
"author_profile": "https://Stackoverflow.com/users/16138689",
"pm_score": 2,
"selected": false,
"text": "def average_price_petrol(**args):\n result = 0\n total = 0\n for key,value in args.items():\n ... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74329922",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20310544/"
] |
74,329,940 | <p>New to python. Here's a nested dictionary with two books each having 8 attributes.</p>
<pre><code>book_collection ={17104: {'Title': 'A River', 'Author': 'Elisha Mitchell', 'Publisher': 'FPG Publishing', 'Pages': '345', 'Year': '2014', 'Copies': 2, 'Available': 2, 'ID': 17104}, 37115: {'Title': 'Aim High', 'Author':... | [
{
"answer_id": 74329979,
"author": "m_j_alkarkhi",
"author_id": 16138689,
"author_profile": "https://Stackoverflow.com/users/16138689",
"pm_score": 2,
"selected": false,
"text": "def average_price_petrol(**args):\n result = 0\n total = 0\n for key,value in args.items():\n ... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74329940",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20178894/"
] |
74,329,949 | <p>I use <code>boost::intrusive_ptr</code> in my project and have such code:</p>
<pre><code>void foo(boost::intrusive_ptr<MyObject> obj) {
// do something with obj
}
</code></pre>
<p>And I have clang-tidy diagnostic:</p>
<pre><code>Clang-Tidy: The parameter 'obj' is copied for each invocation but only used as... | [
{
"answer_id": 74329979,
"author": "m_j_alkarkhi",
"author_id": 16138689,
"author_profile": "https://Stackoverflow.com/users/16138689",
"pm_score": 2,
"selected": false,
"text": "def average_price_petrol(**args):\n result = 0\n total = 0\n for key,value in args.items():\n ... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74329949",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7549594/"
] |
74,329,954 | <p>Hi everyone <br> So basically I have to code a website that calculates a certain amount using javascript, here is the exemple of the website :
<a href="https://i.stack.imgur.com/I21yf.png" rel="nofollow noreferrer">Check here</a>. <br> So basically the client fills the form with the quantity and I have to display th... | [
{
"answer_id": 74329979,
"author": "m_j_alkarkhi",
"author_id": 16138689,
"author_profile": "https://Stackoverflow.com/users/16138689",
"pm_score": 2,
"selected": false,
"text": "def average_price_petrol(**args):\n result = 0\n total = 0\n for key,value in args.items():\n ... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74329954",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19615773/"
] |
74,329,965 | <p>As described in the title, I have the following problem:</p>
<p>Data is prepared as a pandas dataframe incoming as follows:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>Article</th>
<th>Title</th>
</tr>
</thead>
<tbody>
<tr>
<td>A0</td>
<td>A00183</td>
</tr>
<tr>
<td>BB2</td>
<td>BB27... | [
{
"answer_id": 74329979,
"author": "m_j_alkarkhi",
"author_id": 16138689,
"author_profile": "https://Stackoverflow.com/users/16138689",
"pm_score": 2,
"selected": false,
"text": "def average_price_petrol(**args):\n result = 0\n total = 0\n for key,value in args.items():\n ... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74329965",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17872048/"
] |
74,329,966 | <p>I'm building on my practice web app and I'm tried to filter the data from fetched data but it filter real time. My question is how to make it not real time, like when searchbar is empty it will fetch all data but when type a text in searchbar it will fetch data from input text.</p>
<p>Here is my code</p>
<pre><code>... | [
{
"answer_id": 74329979,
"author": "m_j_alkarkhi",
"author_id": 16138689,
"author_profile": "https://Stackoverflow.com/users/16138689",
"pm_score": 2,
"selected": false,
"text": "def average_price_petrol(**args):\n result = 0\n total = 0\n for key,value in args.items():\n ... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74329966",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18642394/"
] |
74,329,987 | <p>I have two dataframes of different length. The first looks like this and is the dataframe I want to add the True/False column to:</p>
<pre><code>chr_snp loc_snp ma_snp
1 184319928 T
1 276998062 A
1 278255864 G
2 243012470 G
2 123072103 T
3 526785... | [
{
"answer_id": 74330060,
"author": "AndS.",
"author_id": 9778513,
"author_profile": "https://Stackoverflow.com/users/9778513",
"pm_score": 2,
"selected": true,
"text": "library(tidyverse)\n\nleft_join(df1 |>\n mutate(rw_id = row_number()), \n df2, by = c(\"chr_snp\" =... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74329987",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6836719/"
] |
74,329,994 | <p>I have a problem getting data through related_name, it can't find the attribute all(). =(<a href="https://i.stack.imgur.com/JcrYV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JcrYV.png" alt="enter image description here" /></a>
<a href="https://i.stack.imgur.com/bC4AO.png" rel="nofollow norefe... | [
{
"answer_id": 74330060,
"author": "AndS.",
"author_id": 9778513,
"author_profile": "https://Stackoverflow.com/users/9778513",
"pm_score": 2,
"selected": true,
"text": "library(tidyverse)\n\nleft_join(df1 |>\n mutate(rw_id = row_number()), \n df2, by = c(\"chr_snp\" =... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74329994",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16829846/"
] |
74,329,999 | <p>Dear Stackoverflow community,</p>
<p>I have been trying to read these set of daily stock market data using xts object and been getting different types of error messages, listed below.
The dataset contains 5030 observations, from 4/01/2000-22/07/2019.</p>
<ol>
<li>I have checked for NAs in the dataset, and there are ... | [
{
"answer_id": 74331528,
"author": "Chris",
"author_id": 794450,
"author_profile": "https://Stackoverflow.com/users/794450",
"pm_score": 2,
"selected": false,
"text": "df <- data.frame(Date = c('4/01/2000', '5/01/2000'), SXXP=c(0,0), STJ=c(0,-0.02484), ISP=c(-0.0209,-0.0020), INGA=c(-0... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74329999",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17940819/"
] |
74,330,012 | <p>Assume <code>P: nat -> T -> Prop</code> is a proposition that for any given <code>t: T</code>,</p>
<ul>
<li>either there exists a <code>k: nat</code> such that <code>P</code> holds for all numbers greater than or equal to <code>k</code> and no number less than <code>k</code>.</li>
<li>or <code>P k t</code> is ... | [
{
"answer_id": 74332663,
"author": "Ana Borges",
"author_id": 2305458,
"author_profile": "https://Stackoverflow.com/users/2305458",
"pm_score": 3,
"selected": true,
"text": "match Prop Type bool sumbool sumor Variable T : Type.\nVariable P : nat -> T -> Prop.\n\nHypothesis PProperty : fo... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74330012",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5774661/"
] |
74,330,024 | <p>I have encountered some challenge, I just want to confirm my knowledge is correct.</p>
<p>How are you going to implement this?</p>
<blockquote>
<p>For example, if your program is written in Java the Sieve of Eratosthenes testing should run in one thread, and the Brute Force testing should run concurrently in a separ... | [
{
"answer_id": 74332663,
"author": "Ana Borges",
"author_id": 2305458,
"author_profile": "https://Stackoverflow.com/users/2305458",
"pm_score": 3,
"selected": true,
"text": "match Prop Type bool sumbool sumor Variable T : Type.\nVariable P : nat -> T -> Prop.\n\nHypothesis PProperty : fo... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74330024",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20427317/"
] |
74,330,041 | <p>I am trying to format these 2 user inputs into a file on seperate lines I know I have to us the \n to use a new line but I keep getting errors with where I put it, is there another way to get each user input on a new line?</p>
<p>'''</p>
<pre><code>def userfile():
text = []
text.append(input("Enter sente... | [
{
"answer_id": 74332663,
"author": "Ana Borges",
"author_id": 2305458,
"author_profile": "https://Stackoverflow.com/users/2305458",
"pm_score": 3,
"selected": true,
"text": "match Prop Type bool sumbool sumor Variable T : Type.\nVariable P : nat -> T -> Prop.\n\nHypothesis PProperty : fo... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74330041",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15235615/"
] |
74,330,055 | <p>I have the following problem, and I am not sure how to access the item from a nested json file.
Could anyone help me out here, please!</p>
<pre><code>intents = {"intents": [
{"tag": "greeting",
"patterns": ["Hi", "Hey", "Is anyone there?"... | [
{
"answer_id": 74330157,
"author": "Andrej Kesely",
"author_id": 10035985,
"author_profile": "https://Stackoverflow.com/users/10035985",
"pm_score": 2,
"selected": true,
"text": "new_intents = json.dumps(intents, indent=4) # remove this line:\n# new_intents = json.dumps(intents, indent=4... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74330055",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18369373/"
] |
74,330,058 | <p><a href="https://i.stack.imgur.com/Rdqig.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Rdqig.png" alt="Data Image" /></a></p>
<p>data.info()
data['Timestamp']=pd.to_datetime(data['Timestamp'], errors='coerce')</p>
<pre><code>import datetime as dt
#function for month
def get_month(x):
return... | [
{
"answer_id": 74330234,
"author": "Abhi",
"author_id": 7430727,
"author_profile": "https://Stackoverflow.com/users/7430727",
"pm_score": 1,
"selected": false,
"text": "df['get_Timestamp'] = df['ArrivalDate'].dt.month\n"
},
{
"answer_id": 74330268,
"author": "Bushmaster",
... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74330058",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20303505/"
] |
74,330,085 | <p>I am trying to combine words like "my", "I", "for" etc, with their neighbor word.</p>
<p>I was thinking that I may check each word's length and if it's shorter than 4 for example, join them with the next word.</p>
<p>Let's say I have the string <code>'about my projects'</code>:
What I d... | [
{
"answer_id": 74330234,
"author": "Abhi",
"author_id": 7430727,
"author_profile": "https://Stackoverflow.com/users/7430727",
"pm_score": 1,
"selected": false,
"text": "df['get_Timestamp'] = df['ArrivalDate'].dt.month\n"
},
{
"answer_id": 74330268,
"author": "Bushmaster",
... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74330085",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20025773/"
] |
74,330,092 | <p>I'm working with a file right now where every line of data is sorted like " Dog 15 28 0 58 79 01" and I'm trying to convert it to a dictionary where Dog is the key and the others are the values.</p>
<p>Because its not split by comma's I've figured out that I should probably .split it to convert it to a lis... | [
{
"answer_id": 74330234,
"author": "Abhi",
"author_id": 7430727,
"author_profile": "https://Stackoverflow.com/users/7430727",
"pm_score": 1,
"selected": false,
"text": "df['get_Timestamp'] = df['ArrivalDate'].dt.month\n"
},
{
"answer_id": 74330268,
"author": "Bushmaster",
... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74330092",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20257226/"
] |
74,330,126 | <p>Can You Guys Help me</p>
<p>like input 1 or 2 checked color RED
if both checked input checked turn green</p>
<p>its for XNOR gate logic gates in java</p>
<p>i dont know how to do this is for my college but they dont teach me how to do that i cant find a good docs for that</p>
<p>i tried so much things but when i try... | [
{
"answer_id": 74330275,
"author": "sanurah",
"author_id": 4079056,
"author_profile": "https://Stackoverflow.com/users/4079056",
"pm_score": 2,
"selected": true,
"text": "import java.awt.Color;\nimport java.awt.Dimension;\nimport java.awt.FlowLayout;\nimport java.awt.Graphics;\nimport ja... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74330126",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19323597/"
] |
74,330,148 | <p>I'm retrieving data from an API, right now there are only two endpoints, one for adding users and other one for get the users added. The users are added using a button and its textbox.</p>
<pre><code> let [showAlert, setAlertState] = useState(false);
let [twitterAccount, setTwitterAcount] = useState("Twitter... | [
{
"answer_id": 74330203,
"author": "acdcjunior",
"author_id": 1850609,
"author_profile": "https://Stackoverflow.com/users/1850609",
"pm_score": 3,
"selected": true,
"text": "addTwitterAccount getCurrentSpiedUsers addTwitterAccount() getCurrentSpiedUsers() addTwitterAccount() getCurrentSp... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74330148",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9514144/"
] |
74,330,153 | <p>So, I have a project on R and I have to create a variable 'month' and 'day', so I decided to use 'lubridate' package. But the displayed days and months are in French, but I want to have it in English.</p>
<p>I hope that somebody can answer me.
Thank you in advance.</p>
<p>I have just used these two lines of code, th... | [
{
"answer_id": 74330203,
"author": "acdcjunior",
"author_id": 1850609,
"author_profile": "https://Stackoverflow.com/users/1850609",
"pm_score": 3,
"selected": true,
"text": "addTwitterAccount getCurrentSpiedUsers addTwitterAccount() getCurrentSpiedUsers() addTwitterAccount() getCurrentSp... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74330153",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20427454/"
] |
74,330,172 | <p>I have always been used to blocking programming and working in the Spring MVC framework. Recently, I considered learning reactive programming. I was full of doubts about how to convert the previous logic into a new style.</p>
<p>See the following processing(Pseudocode):</p>
<pre class="lang-java prettyprint-override... | [
{
"answer_id": 74330283,
"author": "Karol Dowbecki",
"author_id": 1602555,
"author_profile": "https://Stackoverflow.com/users/1602555",
"pm_score": 2,
"selected": false,
"text": "Thread.sleep()"
}
] | 2022/11/05 | [
"https://Stackoverflow.com/questions/74330172",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6607559/"
] |
74,330,177 | <pre><code> public void getDeviceinfo()
{
var proc = new Process
{
StartInfo = new ProcessStartInfo
{
FileName = "C:\\Users\\username\\Desktop\\repo\\project\\executable\\ideviceinfo.exe",
Arguments = "-s",
U... | [
{
"answer_id": 74330283,
"author": "Karol Dowbecki",
"author_id": 1602555,
"author_profile": "https://Stackoverflow.com/users/1602555",
"pm_score": 2,
"selected": false,
"text": "Thread.sleep()"
}
] | 2022/11/05 | [
"https://Stackoverflow.com/questions/74330177",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8997427/"
] |
74,330,190 | <p>Below I try to respond with a stream when I receive ticker updates.</p>
<p><strong>+page.server.js:</strong></p>
<pre><code>import YahooFinanceTicker from "yahoo-finance-ticker";
const ticker = new YahooFinanceTicker();
const tickerListener = await ticker.subscribe(["BTC-USD"])
const stream = n... | [
{
"answer_id": 74331423,
"author": "H.B.",
"author_id": 546730,
"author_profile": "https://Stackoverflow.com/users/546730",
"pm_score": 1,
"selected": false,
"text": "load +server Response ReadableStream"
},
{
"answer_id": 74336207,
"author": "voscausa",
"author_id": 6750... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74330190",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/675006/"
] |
74,330,211 | <p>I'm learning how classes works and I got stuck on a thing which I can't explain, I also didn't find a solution on the Internet so here am I with my first question on StackOverflow.</p>
<pre><code>class Swords:
damage = 5
</code></pre>
<p>Here is a class with only one line, with attribute damage.
Let's make an in... | [
{
"answer_id": 74330267,
"author": "Ultimate48",
"author_id": 19702144,
"author_profile": "https://Stackoverflow.com/users/19702144",
"pm_score": 0,
"selected": false,
"text": "sword = Sword(5)\n"
},
{
"answer_id": 74330367,
"author": "Ryan Haining",
"author_id": 1013719,... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74330211",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20427423/"
] |
74,330,214 | <p>I am trying to detect whenever the following script (<code>random_fail.sh</code>) fails --which happens rarely-- by running it inside a while loop in the second script (<code>catch_error.sh</code>):</p>
<pre class="lang-bash prettyprint-override"><code>#!/usr/bin/env bash
# random_fail.sh
n=$(( RANDOM % 100 ))
i... | [
{
"answer_id": 74332763,
"author": "Eric Marceau",
"author_id": 9716110,
"author_profile": "https://Stackoverflow.com/users/9716110",
"pm_score": 1,
"selected": false,
"text": "#!/usr/bin/env bash\n# catch_error.sh\n\ncount=0 # The number of times before failing\nerror=0 # assuming eve... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74330214",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16249489/"
] |
74,330,244 | <p>I want to make a widget window, but the Bottom and Text part aren't working properly and it keps getting sintax errors at the same part:</p>
<pre><code>import PySimpleGUI as sg
layout = [
[sg.Text("Hello from PySimpleGUI")],
[sg.Button("Close")]
window = sg.Window("Demo, layout... | [
{
"answer_id": 74332763,
"author": "Eric Marceau",
"author_id": 9716110,
"author_profile": "https://Stackoverflow.com/users/9716110",
"pm_score": 1,
"selected": false,
"text": "#!/usr/bin/env bash\n# catch_error.sh\n\ncount=0 # The number of times before failing\nerror=0 # assuming eve... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74330244",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20293469/"
] |
74,330,248 | <p>I am making a program that generates the phrase,
"The enemy of my friend is my enemy!"
actually, I want this phrase to print out a random permutation of (Friend/Enemy)
in each place every time it is re-ran.</p>
<p>so far I got the code to print out the same word 3 times in each,
but not a different word in... | [
{
"answer_id": 74330286,
"author": "Andrej Kesely",
"author_id": 10035985,
"author_profile": "https://Stackoverflow.com/users/10035985",
"pm_score": 2,
"selected": false,
"text": "random.choices str.format import random\n\nen = \"Enemy\"\nfr = \"Friend\"\nwords = en, fr\n\nsentence = \"T... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74330248",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2780254/"
] |
74,330,255 | <p>I am given prime factorization of a number as a map: <code>std::map<int, int> m</code>, where key is a prime number, and value is how many times this prime number occured in product.</p>
<p>Example: Prime factorization of 100 is 2 * 2 * 5 *5, so <code>m[2] = 2</code>, and <code>m[5] = 2</code></p>
<p>My questi... | [
{
"answer_id": 74330341,
"author": "Arty",
"author_id": 941531,
"author_profile": "https://Stackoverflow.com/users/941531",
"pm_score": 4,
"selected": true,
"text": "0, 1, 2, ..., PrimeCnt PrimeCnt + 1 100 = 2 * 2 * 5 * 5 m[2] = 2 m[5] = 2 PrimeCnt + 1 n m #include <iostream>\n#include <... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74330255",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19809278/"
] |
74,330,301 | <p>Code :</p>
<pre class="lang-py prettyprint-override"><code>from sys import exit
didlogcorrect = 1
Minecraft = 'Minecraft'
Roblox = 'Roblox'
Exit = 'Exit'
chrome = 'chrome'
print('Welcome To PotatOS')
user_input = input("What would you like to do on PotatOS: ")
if user_input == Roblox:
print('Unabl... | [
{
"answer_id": 74330361,
"author": "Code-Apprentice",
"author_id": 1440565,
"author_profile": "https://Stackoverflow.com/users/1440565",
"pm_score": -1,
"selected": false,
"text": "user_input = input(\"What would you like to do on PotatOS\")\n user_input"
},
{
"answer_id": 743304... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74330301",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20427591/"
] |
74,330,344 | <p>Build of my project is failing - it is throwing the below mentioned error.</p>
<p><strong>React version - 17.0.2</strong></p>
<p><strong>react-scripts - 4.0.3</strong></p>
<p>app-frontend\App>yarn build
yarn run v1.22.17
$ react-app-rewired build
Creating an optimized production build...
Failed to compile.</p>
<p... | [
{
"answer_id": 74346108,
"author": "thatGuyDaki",
"author_id": 17043195,
"author_profile": "https://Stackoverflow.com/users/17043195",
"pm_score": 2,
"selected": false,
"text": "\"@babel/core\": \"7.19.6\",\n\"@babel/generator\": \"7.19.6\",\n\"@babel/compat-data\": \"7.19.4\",\n\"@babel... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74330344",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18772414/"
] |
74,330,368 | <p>I was trying for CRUD services using springboot with mongodb.</p>
<p>Getting error while running main application.</p>
<p><code>ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException... | [
{
"answer_id": 74330670,
"author": "void void",
"author_id": 18969611,
"author_profile": "https://Stackoverflow.com/users/18969611",
"pm_score": 2,
"selected": true,
"text": "@Service @Service\nclass ProductServiceImpl implements ProductService {\n \n @Autowired\n private Produc... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74330368",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8793412/"
] |
74,330,370 | <p>I have a table of an "Id" column and multiple integer columns that I want to convert to categorical variables. Therefore, I want to apply this transformation only to those multiple integer columns, but leave the ID column unchanged.</p>
<p>All the other methods involve dropping the ID column. How do I do t... | [
{
"answer_id": 74330670,
"author": "void void",
"author_id": 18969611,
"author_profile": "https://Stackoverflow.com/users/18969611",
"pm_score": 2,
"selected": true,
"text": "@Service @Service\nclass ProductServiceImpl implements ProductService {\n \n @Autowired\n private Produc... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74330370",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3713236/"
] |
74,330,374 | <p>How to make time from len of array...</p>
<p>Picture 1:
<a href="https://i.stack.imgur.com/4jFh9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4jFh9.png" alt="enter image description here" /></a></p>
<p>Picture 2:
<a href="https://i.stack.imgur.com/72kZV.png" rel="nofollow noreferrer"><img src="... | [
{
"answer_id": 74330422,
"author": "ahrensaj",
"author_id": 20324675,
"author_profile": "https://Stackoverflow.com/users/20324675",
"pm_score": 1,
"selected": false,
"text": "plt.plot() x/dt"
},
{
"answer_id": 74330508,
"author": "Umang Gupta",
"author_id": 3236925,
"... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74330374",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17877163/"
] |
74,330,398 | <p>I need to find a node with input from a customer in the linked list but I have an error CS1503. How can I solve a problem?</p>
<p>In this code, I create the LinkList name "customerList" to collect string data such as name, contact number, and payment from the user. After that, I need to find the contact nu... | [
{
"answer_id": 74330481,
"author": "pm100",
"author_id": 173397,
"author_profile": "https://Stackoverflow.com/users/173397",
"pm_score": 2,
"selected": true,
"text": " var node = customerList.Where(c=>c.Phone == input).First();\n"
},
{
"answer_id": 74330540,
"author": "John ... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74330398",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18910525/"
] |
74,330,416 | <p>I'm dev an app that use a recycler view to show items composed by an image and a text. The user can add an item with a custom image, doing this in a normal activity it's easy:</p>
<pre><code>Intent intent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
laun... | [
{
"answer_id": 74432240,
"author": "Kaushal Rola",
"author_id": 14252468,
"author_profile": "https://Stackoverflow.com/users/14252468",
"pm_score": 0,
"selected": false,
"text": "ActivityResultLauncher<Intent> launcher = ((YourActivityClass) activity).registerForActivityResult(\n new ... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74330416",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12615735/"
] |
74,330,433 | <p>Need to create new array object from two other arrays in JS</p>
<pre><code>var array1 = ['one', 'two', 'one, 'two'];
var array2 = ['3', '4', '5', '6'];
</code></pre>
<p>Here array1[0] = one represents array2[0] = 3 and vice versa.</p>
<p>Need to create a new array object with array1's value as its key and array2's ... | [
{
"answer_id": 74330518,
"author": "Nina Scholz",
"author_id": 1447675,
"author_profile": "https://Stackoverflow.com/users/1447675",
"pm_score": 1,
"selected": true,
"text": "const\n combine = (a, b) => {\n const temp = {};\n for (let i = 0; i < array1.length; i++) (temp... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74330433",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14142973/"
] |
74,330,458 | <p>What is the best way to know the amount of white pixels that are anove the red areas using python and OpenCV?</p>
<p><a href="https://i.stack.imgur.com/R5qoS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/R5qoS.png" alt="enter image description here" /></a></p>
<p>I imagine drawing a straight ver... | [
{
"answer_id": 74330518,
"author": "Nina Scholz",
"author_id": 1447675,
"author_profile": "https://Stackoverflow.com/users/1447675",
"pm_score": 1,
"selected": true,
"text": "const\n combine = (a, b) => {\n const temp = {};\n for (let i = 0; i < array1.length; i++) (temp... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74330458",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20372455/"
] |
74,330,467 | <p>Full component:</p>
<pre><code>const Column = ({ form, setForm, fieldset, blocks, selectedFieldsetId, setFieldBeingEdited }) => {
//Sends block being edited to App component
const editField = (e) => {
const blockId = e.currentTarget.getAttribute('data-blockid')
const data = form.blocks[blockId]
... | [
{
"answer_id": 74330518,
"author": "Nina Scholz",
"author_id": 1447675,
"author_profile": "https://Stackoverflow.com/users/1447675",
"pm_score": 1,
"selected": true,
"text": "const\n combine = (a, b) => {\n const temp = {};\n for (let i = 0; i < array1.length; i++) (temp... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74330467",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16611081/"
] |
74,330,471 | <p>I'm currently working on a problem which requires me to return true if n is divisible by 11 without using the division or modulous operator.</p>
<p>It's mentioned that if we add and subtract the digits alternatively and it adds up to be 0, -11 or 11 it means that it is divisible by 11:</p>
<p>Example1: 121
1 - 2 + 1... | [
{
"answer_id": 74330535,
"author": "Danna",
"author_id": 19595981,
"author_profile": "https://Stackoverflow.com/users/19595981",
"pm_score": 2,
"selected": false,
"text": "listNum = list(map(int, str(num)))\n listNum n"
},
{
"answer_id": 74330582,
"author": "ahmadjanan",
... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74330471",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20427274/"
] |
74,330,472 | <p>My dropdown list items populated from the database table and working fine and want to save the selected dropdown list item into another sql database table but saving only value (id) instead text. Somebody helps me to solve these problems.</p>
<p>I have tried below codes but save only id instead save text</p>
<p>Mode... | [
{
"answer_id": 74342912,
"author": "Xinran Shen",
"author_id": 17438579,
"author_profile": "https://Stackoverflow.com/users/17438579",
"pm_score": 1,
"selected": false,
"text": "TempData[\"xx\"] //.....other code.....\nBiodataSingle model = new BiodataSingle();\n//populate from database\... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74330472",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16437954/"
] |
74,330,475 | <p>I've got 3 models: <code>Order</code>, <code>OrderItem</code> and <code>Product</code> (for simplicity just showing the relationships):</p>
<pre><code>class Order extends BaseModel
{
use Uuid;
protected $casts = [
'status' => OrderStatuses::class,
];
/**
* An Order has multiple Orde... | [
{
"answer_id": 74330566,
"author": "Vlad",
"author_id": 20382571,
"author_profile": "https://Stackoverflow.com/users/20382571",
"pm_score": 1,
"selected": false,
"text": "$order->loadMissing('orderItems.product')\n"
},
{
"answer_id": 74332314,
"author": "Don't Panic",
"au... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74330475",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2882913/"
] |
74,330,510 | <p>I am currently using the following code to combine Col A and Col B to get Col A & B in DataFrame B below:</p>
<pre><code>out = (df
.groupby('Col A', group_keys=False, sort=False)
.apply(lambda d: d.iloc[:, ::-1].unstack().drop_duplicates())
.reset_index(drop=True).to_frame(name='Col A&B')
)
</code><... | [
{
"answer_id": 74330566,
"author": "Vlad",
"author_id": 20382571,
"author_profile": "https://Stackoverflow.com/users/20382571",
"pm_score": 1,
"selected": false,
"text": "$order->loadMissing('orderItems.product')\n"
},
{
"answer_id": 74332314,
"author": "Don't Panic",
"au... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74330510",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8371891/"
] |
74,330,519 | <p>Consider a few vectors v1,v2,v3 to which you need to apply one function (for example clear()).</p>
<pre><code>vector <int> v1;
vector <int> v2;
vector <int> v3;
v1.clear();
v2.clear();
v3.clear();
</code></pre>
<p>Can I do it in one line? So I need something like that</p>
<pre><code>someHOF(clear(... | [
{
"answer_id": 74330531,
"author": "HolyBlackCat",
"author_id": 2752075,
"author_profile": "https://Stackoverflow.com/users/2752075",
"pm_score": 2,
"selected": false,
"text": "for (auto v : {&v1, &v2, &v3})\n v->clear();\n template <typename T, typename ...P>\nvoid apply(T func, P &&... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74330519",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20427708/"
] |
74,330,529 | <p>I'm trying to display in the Message dialog on the <code>JOptionPane</code> the highest number of sales from my array of sales.</p>
<p>And I also want to show in which month they happened, but I am failing to find a way to display the month.</p>
<pre><code>public static void main(String[] args) {
int[] CarSales=... | [
{
"answer_id": 74330748,
"author": "Melron",
"author_id": 8920328,
"author_profile": "https://Stackoverflow.com/users/8920328",
"pm_score": 1,
"selected": false,
"text": "public static void main(String[] args) {\n int[] CarSales= {1234,2343,1456,4567,8768,2346,9876,4987,7592,9658,7851... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74330529",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19717601/"
] |
74,330,538 | <p>I've got a MongoDB collection, which looks like this:</p>
<pre class="lang-js prettyprint-override"><code>// sites
// note that these urls all have paths, this is important.
// The path can only be longer, e.g. amazon.com/Coffee-Mug
[
{
name: "MySite",
urls: ['google.com/search', 'amazon.com/Coff... | [
{
"answer_id": 74330748,
"author": "Melron",
"author_id": 8920328,
"author_profile": "https://Stackoverflow.com/users/8920328",
"pm_score": 1,
"selected": false,
"text": "public static void main(String[] args) {\n int[] CarSales= {1234,2343,1456,4567,8768,2346,9876,4987,7592,9658,7851... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74330538",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10546688/"
] |
74,330,550 | <p>Eh so hello. I Cant frikin figure how to build SLASH COMMANDS!!!! Tbh i dont even want to anymore but still asking (I am here for the 3d day trying to figure it out) so bruh. It is working, but it DOESN'T show the command in discord even if i type the command out it still DOESNT WORK.
So anyways heres my code:</p>
<... | [
{
"answer_id": 74330748,
"author": "Melron",
"author_id": 8920328,
"author_profile": "https://Stackoverflow.com/users/8920328",
"pm_score": 1,
"selected": false,
"text": "public static void main(String[] args) {\n int[] CarSales= {1234,2343,1456,4567,8768,2346,9876,4987,7592,9658,7851... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74330550",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18269108/"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.