qid int64 4 19.1M | question stringlengths 18 48.3k | answers list | date stringlengths 10 10 | metadata list |
|---|---|---|---|---|
74,502,733 | <p>I have my current sql query which I will later convert to a HIVE query.</p>
<pre class="lang-sql prettyprint-override"><code>SELECT home_team, COUNT(home_team)
from results
WHERE results.home_score < results.away_score
GROUP BY home_team
UNION
SELECT away_team, COUNT(away_team)
FROM results
WHERE results.a... | [
{
"answer_id": 74502812,
"author": "Pepijn Kramer",
"author_id": 16649550,
"author_profile": "https://Stackoverflow.com/users/16649550",
"pm_score": 3,
"selected": true,
"text": "#include <type_traits>\n#include <string>\n\n// declare your own concept\ntemplate<typename type_t>\nconcept ... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74502733",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6286130/"
] |
74,502,770 | <p>I have a collection of docs like</p>
<pre><code>{'id':1, 'score': 1, created_at: ISODate(...)}
{'id':1, 'score': 2, created_at: ISODate(...)}
{'id':2, 'score': 1, created_at: ISODate(...)}
{'id':2, 'score': 20, created_at: ISODate(...)}
</code></pre>
<p>etc.</p>
<p>Does anyone know how to find docs that were created... | [
{
"answer_id": 74502812,
"author": "Pepijn Kramer",
"author_id": 16649550,
"author_profile": "https://Stackoverflow.com/users/16649550",
"pm_score": 3,
"selected": true,
"text": "#include <type_traits>\n#include <string>\n\n// declare your own concept\ntemplate<typename type_t>\nconcept ... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74502770",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5349476/"
] |
74,502,777 | <p>Package <code>shinyscreenshot</code> is not able to print <code>plotly</code> colorbars (<a href="https://stackoverflow.com/questions/74473002/shiny-screenshot-appears-with-colorless-legend#comment131515103_74473168">shiny screenshot appears with colorless legend</a>), so I'm looking for a way to still use color gra... | [
{
"answer_id": 74509733,
"author": "jrcalabrese",
"author_id": 14992857,
"author_profile": "https://Stackoverflow.com/users/14992857",
"pm_score": 1,
"selected": false,
"text": "scale_color_continuous guides(color = guide_legend()) ggplot ggplotly() ggplotly() library(tidyverse)\nlibrary... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74502777",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12242625/"
] |
74,502,786 | <p>I have this dataset:</p>
<pre class="lang-js prettyprint-override"><code>const dataset = [
{ date: "2022-01-01", category: "red", value: 10 },
{ date: "2022-01-01", category: "blue", value: 20 },
{ date: "2022-01-01", category: "gold", value: 30 },
... | [
{
"answer_id": 74509733,
"author": "jrcalabrese",
"author_id": 14992857,
"author_profile": "https://Stackoverflow.com/users/14992857",
"pm_score": 1,
"selected": false,
"text": "scale_color_continuous guides(color = guide_legend()) ggplot ggplotly() ggplotly() library(tidyverse)\nlibrary... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74502786",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13415477/"
] |
74,502,795 | <p>Im trying to configure my code to tell the user to re enter a number, taking them back to the scanner if it falls outside of my specified range of 25</p>
<pre class="lang-java prettyprint-override"><code>long number;// declares variables for storing number
long factorial = 1;// declare variable for storing factorial... | [
{
"answer_id": 74503047,
"author": "oleg.cherednik",
"author_id": 3461397,
"author_profile": "https://Stackoverflow.com/users/3461397",
"pm_score": 1,
"selected": false,
"text": "public static void main(String... args) {\n Scanner scan = new Scanner(System.in);\n\n int num = getNum... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74502795",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20545889/"
] |
74,502,810 | <p>The while loop and for loop works individually, but combining them does no generate the desired output.
I want the user to enter a sentence, and then a character. The Character must be entered as a single 1 character, if not then the program should ask again.<br></p>
<pre><code>sentence = input("Type sentence: ... | [
{
"answer_id": 74502853,
"author": "QWERTYL",
"author_id": 11777402,
"author_profile": "https://Stackoverflow.com/users/11777402",
"pm_score": 1,
"selected": false,
"text": "sentence = input(\"Type sentence: \")\nsentence = sentence.lower()\nsingleCharacter = input(\"Type character: \")\... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74502810",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4212022/"
] |
74,502,816 | <p>I am trying to use an <code>eventListener</code> to check input in an input box (<code>type="number"</code>):</p>
<pre><code>aE.addEventListener("input", (e) => {
console.log(aE.value);
}
</code></pre>
<p>But what I really need the <code>eventListener</code> to pick up is any change in <code... | [
{
"answer_id": 74502853,
"author": "QWERTYL",
"author_id": 11777402,
"author_profile": "https://Stackoverflow.com/users/11777402",
"pm_score": 1,
"selected": false,
"text": "sentence = input(\"Type sentence: \")\nsentence = sentence.lower()\nsingleCharacter = input(\"Type character: \")\... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74502816",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13062685/"
] |
74,502,843 | <p>I am building a simple Angular app.</p>
<p>I have some static data in a JSON file which I want to load.</p>
<p>I have put the file <code>data.json</code> under <code>src</code>.</p>
<p>I am trying to load it as follows</p>
<pre><code>export class AppComponent {
private urlDataFile = './data.json';
constructor(
... | [
{
"answer_id": 74502853,
"author": "QWERTYL",
"author_id": 11777402,
"author_profile": "https://Stackoverflow.com/users/11777402",
"pm_score": 1,
"selected": false,
"text": "sentence = input(\"Type sentence: \")\nsentence = sentence.lower()\nsingleCharacter = input(\"Type character: \")\... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74502843",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15452/"
] |
74,502,858 | <p>i am trying to dynamically alloc multiple matrixes instide of a struct, i've found a way to do it but it makes all of them the same size and i need them to be of different sizes</p>
<pre><code>#include <stdio.h>
#include<stdlib.h>
#include <stdbool.h>
struct matrice_dinamica{
int linii, coloa... | [
{
"answer_id": 74503045,
"author": "Weather Vane",
"author_id": 4142924,
"author_profile": "https://Stackoverflow.com/users/4142924",
"pm_score": 1,
"selected": true,
"text": "#include <stdio.h>\n#include <stdlib.h>\n\nstruct matrice_dinamica{\n int linii, coloane;\n int **matrice;... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74502858",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17064433/"
] |
74,502,864 | <p>I have a class like:</p>
<pre><code>#[derive(Clone,PartialEq,Debug)]
pub enum List<T> {
Nil,
Cons(T,Box<List<T>>)
}
</code></pre>
<p>Now suppose the Lists are created like the following:</p>
<pre><code>let x =
List::Cons(0,
Box::new(List::Cons(1,
... | [
{
"answer_id": 74503369,
"author": "rodrigo",
"author_id": 865874,
"author_profile": "https://Stackoverflow.com/users/865874",
"pm_score": 3,
"selected": true,
"text": "pub fn map<T, U, F: Fn(&T) -> U>(f: F, l: &List<T>) -> List<U> {\n match l {\n List::Nil => List::Nil,\n ... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74502864",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20064859/"
] |
74,502,866 | <p>I am trying to create association between active record objects with custom name.</p>
<p>For example, I have a <code>User</code> table and <code>Post</code> class, and <code>Post</code> class has <code>writer_id</code> and <code>reader_id</code>. I want to create association for both <code>writer_id</code> and <code... | [
{
"answer_id": 74503369,
"author": "rodrigo",
"author_id": 865874,
"author_profile": "https://Stackoverflow.com/users/865874",
"pm_score": 3,
"selected": true,
"text": "pub fn map<T, U, F: Fn(&T) -> U>(f: F, l: &List<T>) -> List<U> {\n match l {\n List::Nil => List::Nil,\n ... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74502866",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14428378/"
] |
74,502,901 | <p>I am fetching all the info from backend and maping it as object, I want to show this like grouping as exact like 2nd image while fetching data I am getting objects with there permissions and there displayName (Read all,Read,Creat,Update) and group(Admin Agent etc) I want to show admin agent name only once which is s... | [
{
"answer_id": 74503369,
"author": "rodrigo",
"author_id": 865874,
"author_profile": "https://Stackoverflow.com/users/865874",
"pm_score": 3,
"selected": true,
"text": "pub fn map<T, U, F: Fn(&T) -> U>(f: F, l: &List<T>) -> List<U> {\n match l {\n List::Nil => List::Nil,\n ... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74502901",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19982657/"
] |
74,502,929 | <p>I have a dataset looks like this:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>Car</th>
<th>Make</th>
<th>Model</th>
<th>Engine</th>
</tr>
</thead>
<tbody>
<tr>
<td>Toyota Rav 4 8cyl6L</td>
<td>Toyota</td>
<td></td>
<td>8cyl6L</td>
</tr>
<tr>
<td>Mitsubishi Eclipse 2.1T</td>
<td>Mitsu... | [
{
"answer_id": 74502960,
"author": "Bushmaster",
"author_id": 15415267,
"author_profile": "https://Stackoverflow.com/users/15415267",
"pm_score": 3,
"selected": true,
"text": "df['Model']=df.apply(lambda x: x['Car'].replace(x['Make'],\"\").replace(x['Engine'],\"\"),axis=1)\nprint(df)\n''... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74502929",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4796998/"
] |
74,502,933 | <p>I have a problem about writing a java stream by filtering multiple condition, grouping by month of the date and calculating the sum of person.</p>
<p>I store the values as <code>Map<String(pId),List<Person>></code></p>
<p>Here is my Person class shown below</p>
<pre><code>public class Person{
privat... | [
{
"answer_id": 74503300,
"author": "Alexander Ivanchenko",
"author_id": 17949945,
"author_profile": "https://Stackoverflow.com/users/17949945",
"pm_score": 3,
"selected": true,
"text": "record class public record MonthState(int mont, State info) {}\n groupingBy() counting() Person Map<St... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74502933",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5719229/"
] |
74,502,951 | <p>I have a form in my django website where the user requests coins and the information is sent to the admin for me to process. I want to automatically get the user who filled the form without them doing it themselves.</p>
<p>Here's the model.py file:</p>
<pre><code>class Requestpayment (models.Model):
username= mode... | [
{
"answer_id": 74503300,
"author": "Alexander Ivanchenko",
"author_id": 17949945,
"author_profile": "https://Stackoverflow.com/users/17949945",
"pm_score": 3,
"selected": true,
"text": "record class public record MonthState(int mont, State info) {}\n groupingBy() counting() Person Map<St... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74502951",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20317259/"
] |
74,502,959 | <p>What is the difference between:</p>
<pre><code>guard let json_data = Data(contentsOf: path) else {return nil}
</code></pre>
<p>and</p>
<pre><code>let json_data = try? Data(contentsOf: path)
</code></pre>
<p>I dont want to use optional while loading the data into the variable. I want other ways to try it.
Thanks in a... | [
{
"answer_id": 74503819,
"author": "Rob",
"author_id": 1271826,
"author_profile": "https://Stackoverflow.com/users/1271826",
"pm_score": 3,
"selected": false,
"text": "guard try? func foo() -> Bar? {\n guard let jsonData = try? Data(contentsOf: path) else { return nil }\n\n // if y... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74502959",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20550011/"
] |
74,503,028 | <p>I'm looking for a way to compile print strings out of my binary if a specific macro-based condition is met.</p>
<p>here, <code>_dLvl</code> can be conditionally set equal or lower than the maximum allowed level.</p>
<pre class="lang-cpp prettyprint-override"><code>
enum DEBUG_LEVELS : int
{
DEBUG_NONE,
DEBUG... | [
{
"answer_id": 74504307,
"author": "Nikos Athanasiou",
"author_id": 2567683,
"author_profile": "https://Stackoverflow.com/users/2567683",
"pm_score": 1,
"selected": false,
"text": "constexpr if // Sorry just a habit to order severity the other way around\nenum DEBUG_LEVELS : int\n{\n ... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74503028",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9168874/"
] |
74,503,039 | <p>For example, I have the array</p>
<pre><code>int [] array = new int[2];
</code></pre>
<p>using code</p>
<pre><code>for (int i: array){
System.out.println(i);
};
</code></pre>
<p>I see the output 0 and 0, it's expected</p>
<p>but what if I want to output the multi-array:</p>
<pre><code>int [][] array2 = new int[2... | [
{
"answer_id": 74503079,
"author": "Timo",
"author_id": 12828626,
"author_profile": "https://Stackoverflow.com/users/12828626",
"pm_score": 2,
"selected": false,
"text": "array2 for (int i = 0; i < array.length; i++) {\n for(int j = 0; i < array.length; j++){\n System.out.print... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74503039",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14221265/"
] |
74,503,041 | <p>I have a task that need to be scheduled on aws lambda function. I wrote a SAM template as below and I see it works when deploying on aws environment (my function get triggered intervally).</p>
<p>But we want to do testing on dev environment first before deploying. I use <code>sam local start-api [OPTIONS]</code> to ... | [
{
"answer_id": 74503100,
"author": "Carlos Jafet Neto",
"author_id": 6111165,
"author_profile": "https://Stackoverflow.com/users/6111165",
"pm_score": -1,
"selected": false,
"text": "var cron = require('node-cron');\n\ncron.schedule('* * * * *', () => {\n console.log('running a task e... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74503041",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14512647/"
] |
74,503,060 | <p>The dataset i have taken is having columns country,coal_<em>production</em>_change<em>pct,gasprodchangepct,year.There are null values in coal</em> prod change pct and gas prod change pct and i want to replace the null values with average of coal prod change pct non null values and gas prod change pct non null values... | [
{
"answer_id": 74503082,
"author": "BENY",
"author_id": 7964527,
"author_profile": "https://Stackoverflow.com/users/7964527",
"pm_score": 1,
"selected": false,
"text": "transform filler = country_grp['coal_prod_change_pct'].transform('mean')\nsample_df['coal_prod_change_pct'].fillna(fill... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74503060",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20549925/"
] |
74,503,136 | <p>I need to create a function called as convert_to_qtr() that converts monthly values in the month value of data frame into quarters. Given below is the month data frame below:-</p>
<p><a href="https://i.stack.imgur.com/qiISQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qiISQ.png" alt="month data... | [
{
"answer_id": 74503276,
"author": "NameVergessen",
"author_id": 11003343,
"author_profile": "https://Stackoverflow.com/users/11003343",
"pm_score": 0,
"selected": false,
"text": "def convert_to_quarterly(excl_merged):\n if excl_merged['Month'] in ['January', 'February', \"March\"]:\n... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74503136",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19831324/"
] |
74,503,137 | <p>Why does the page reload after sending a POST request to the json-server-auth (local database)? How to solve this problem? Due to the reboot, I don't have time to get the data and record it.</p>
<pre><code><form class="form">
<input type="email">
<input type="p... | [
{
"answer_id": 74503276,
"author": "NameVergessen",
"author_id": 11003343,
"author_profile": "https://Stackoverflow.com/users/11003343",
"pm_score": 0,
"selected": false,
"text": "def convert_to_quarterly(excl_merged):\n if excl_merged['Month'] in ['January', 'February', \"March\"]:\n... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74503137",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20550130/"
] |
74,503,146 | <p>Trying to pass an EventHandler to a Blazor component. Error I'm getting:
The event AppState.IntegerChanged can only appear on the left hand side of +=</p>
<p>Seems like this should work, is it a blazor limitation or am I doing something wrong?</p>
<p>Getting compiler error in MixedNumber.razor trying to assign event... | [
{
"answer_id": 74512962,
"author": "MrC aka Shaun Curtis",
"author_id": 13065781,
"author_profile": "https://Stackoverflow.com/users/13065781",
"pm_score": -1,
"selected": false,
"text": "[Parameter] public EventHandler<double>? ValueChanged { get; set; }\n Task MethodName(double value)"... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74503146",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1068557/"
] |
74,503,151 | <p>making a function that recieves numbers separated by spaces and adds the first element to the rest, the ouput should be a list of numbers if the first element is a number
i'm trying to remove all non numeric elements of list b</p>
<p>examples- input: 1 2 3 4
output: [3, 4, 5] (2+1, 3+1, 4+1)</p>
<p>input: 1 2 b 4
ou... | [
{
"answer_id": 74503186,
"author": "rikyeah",
"author_id": 17902018,
"author_profile": "https://Stackoverflow.com/users/17902018",
"pm_score": 0,
"selected": false,
"text": "b = [int(x) for x in (a[1:]) if x.isnumeric()] \n split()"
},
{
"answer_id": 74503218,
"author": "scot... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74503151",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20550063/"
] |
74,503,152 | <pre><code>
The goal is:
The db will have a handful of "plans" that can be used across multiple customers.
Each customer can have only a single plan associated with them at a time. Think of this as your "scription plan".
The vanilla SQL below works to create this enforces that we cannot delete a p... | [
{
"answer_id": 74503186,
"author": "rikyeah",
"author_id": 17902018,
"author_profile": "https://Stackoverflow.com/users/17902018",
"pm_score": 0,
"selected": false,
"text": "b = [int(x) for x in (a[1:]) if x.isnumeric()] \n split()"
},
{
"answer_id": 74503218,
"author": "scot... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74503152",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20550151/"
] |
74,503,167 | <p>Im working on a game in unity and I followed a dapper dino tutorial for character movement and character camera control. Everything was working with a few minor issues, most of which I solved, but the one issue I couldnt solve, was when I move the camera to face more the 90 degrees left or right, the character just ... | [
{
"answer_id": 74520682,
"author": "user15500238",
"author_id": 15500238,
"author_profile": "https://Stackoverflow.com/users/15500238",
"pm_score": 2,
"selected": true,
"text": "transform.localRotation = Quaternion.AngleAxis(-currentLookingPos.y, Vector3.right);\nplayer.transform.localRo... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74503167",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15500238/"
] |
74,503,195 | <p>I want to plot multiple subplots of scatter plots inside a function, after calling the <code>*args</code> parameter to unpack <code>(x,y)</code> input values. However, I keep getting a simple error:</p>
<blockquote>
<p>ValueError: s must be a scalar, or float array-like with the same size as x and y</p>
</blockquote... | [
{
"answer_id": 74520682,
"author": "user15500238",
"author_id": 15500238,
"author_profile": "https://Stackoverflow.com/users/15500238",
"pm_score": 2,
"selected": true,
"text": "transform.localRotation = Quaternion.AngleAxis(-currentLookingPos.y, Vector3.right);\nplayer.transform.localRo... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74503195",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17124619/"
] |
74,503,223 | <p>I'm trying to do something very simple but can't figure out how.</p>
<p>Say I have this table called "Tasks" where each task has a chosen set of users that should carry it out. The numbers in the Users column refer to the ID column of the "Users" table.</p>
<p><strong>Tasks table:</strong></p>
<p... | [
{
"answer_id": 74503504,
"author": "MT0",
"author_id": 1509264,
"author_profile": "https://Stackoverflow.com/users/1509264",
"pm_score": 3,
"selected": true,
"text": "CREATE TABLE task_users (\n Task CONSTRAINT task_users__task__fk REFERENCES tasks (task),\n User_id CONSTRAINT task_... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74503223",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13709246/"
] |
74,503,250 | <p>First time I am working with threads in spring boot webapp and when I do debugging then I see thread names are increasing like Thread-1, Thread-2... for every call method so I thought that the program is not killing the thread but creating new thread for every call.</p>
<p>Here is my code:</p>
<pre><code>public Adve... | [
{
"answer_id": 74503289,
"author": "KunalVarpe",
"author_id": 3649352,
"author_profile": "https://Stackoverflow.com/users/3649352",
"pm_score": 3,
"selected": true,
"text": "run() Thread"
},
{
"answer_id": 74503904,
"author": "Alexander Ivanchenko",
"author_id": 17949945,... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74503250",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1261764/"
] |
74,503,255 | <p>Lets say I have very simple <code>xaml</code></p>
<pre><code><?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:drawable=&quo... | [
{
"answer_id": 74503289,
"author": "KunalVarpe",
"author_id": 3649352,
"author_profile": "https://Stackoverflow.com/users/3649352",
"pm_score": 3,
"selected": true,
"text": "run() Thread"
},
{
"answer_id": 74503904,
"author": "Alexander Ivanchenko",
"author_id": 17949945,... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74503255",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16344063/"
] |
74,503,260 | <p>I have the following data structure:</p>
<pre><code>{
"nodes": [
{
"frontmatter": {
"excerpt": null,
"featured": true,
"title": "A Post with Content"
},
"fi... | [
{
"answer_id": 74503289,
"author": "KunalVarpe",
"author_id": 3649352,
"author_profile": "https://Stackoverflow.com/users/3649352",
"pm_score": 3,
"selected": true,
"text": "run() Thread"
},
{
"answer_id": 74503904,
"author": "Alexander Ivanchenko",
"author_id": 17949945,... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74503260",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1972982/"
] |
74,503,272 | <p>I'm new in programming, actually I use it for Machine Learning.
I have installed python and anaconda (I don't know if that is right, or I have to install only anaconda?).
And I can see in start menu: (Anaconda powershell, Jupyter, Spyder, Anaconda navigator, Anaconda prompt).
So my question is: Do I still have to us... | [
{
"answer_id": 74503289,
"author": "KunalVarpe",
"author_id": 3649352,
"author_profile": "https://Stackoverflow.com/users/3649352",
"pm_score": 3,
"selected": true,
"text": "run() Thread"
},
{
"answer_id": 74503904,
"author": "Alexander Ivanchenko",
"author_id": 17949945,... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74503272",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11541847/"
] |
74,503,273 | <p>I'm new in bash scripting and I'm trying to create a bash script which can create multiple file with content (around 10000 lines [no matters what text]) but with user input.
I made a script which create files (see below) but how can I fill each file with 10000 lines?
Thank you in advance!</p>
<pre><code>#!/bin/bash
... | [
{
"answer_id": 74503289,
"author": "KunalVarpe",
"author_id": 3649352,
"author_profile": "https://Stackoverflow.com/users/3649352",
"pm_score": 3,
"selected": true,
"text": "run() Thread"
},
{
"answer_id": 74503904,
"author": "Alexander Ivanchenko",
"author_id": 17949945,... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74503273",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20550025/"
] |
74,503,284 | <p><a href="https://i.stack.imgur.com/xhVia.png" rel="nofollow noreferrer">MY DATA IN EXCEL</a></p>
<p><a href="https://i.stack.imgur.com/ZysU1.png" rel="nofollow noreferrer">MY CODE</a></p>
<p>Hello Everyone!</p>
<p>I am brand new to python and have some simple data I want to separate and graph in a bar chart.</p>
<p>... | [
{
"answer_id": 74503289,
"author": "KunalVarpe",
"author_id": 3649352,
"author_profile": "https://Stackoverflow.com/users/3649352",
"pm_score": 3,
"selected": true,
"text": "run() Thread"
},
{
"answer_id": 74503904,
"author": "Alexander Ivanchenko",
"author_id": 17949945,... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74503284",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20534582/"
] |
74,503,297 | <p>We have many AWS Glue jobs and we are only updating the job code, which are scripts stored in S3.
The problem is CloudFormation couldn't tell when and when not to update our Glue jobs because all CloudFormation template parameters remain the same after script changes, even the script location is pointing to the same... | [
{
"answer_id": 74505877,
"author": "omuthu",
"author_id": 4840338,
"author_profile": "https://Stackoverflow.com/users/4840338",
"pm_score": 0,
"selected": false,
"text": "{\n \"Name\" : String,\n \"PythonVersion\" : String,\n \"ScriptLocation\" : String\n}\n"
},
{
"answer_id":... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74503297",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3307887/"
] |
74,503,306 | <p>I am making a discord bot in Discord4J, with a command handler that returns the valid command:</p>
<pre class="lang-java prettyprint-override"><code>return Mono.just(event.getCommandName())
.filter(commandRegistry::has)
.map(commandRegistry::get)
.flatMap(discordCommand -> {
tr... | [
{
"answer_id": 74503572,
"author": "Azn9",
"author_id": 10836980,
"author_profile": "https://Stackoverflow.com/users/10836980",
"pm_score": 1,
"selected": false,
"text": ".onErrorResume(throwable -> {\n //Do whatever you want with the error\n return Mono.empty();\n})\n"
},
{
... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74503306",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15935845/"
] |
74,503,314 | <p>I can't figure out how to keep the keys and values on a dictionary when I try to merge two dictionaries. I keep getting <code>ArgumentException</code> due to duplicate of key. When the key match I would just like to add the value by <code>=+ kvp.value;</code></p>
<p>I have a list of Dictionaries where the</p>
<p>1st... | [
{
"answer_id": 74504127,
"author": "Avrohom Yisroel",
"author_id": 706346,
"author_profile": "https://Stackoverflow.com/users/706346",
"pm_score": 0,
"selected": false,
"text": "=+ kvp.value"
},
{
"answer_id": 74504220,
"author": "Gabriel Stancu",
"author_id": 8187400,
... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74503314",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20529565/"
] |
74,503,315 | <p>I'm having a problem in where i want to count how many medals in total a country has won from both the individual and team competitions does not give me the disered outcome. i have managed so far tocome up with this.</p>
<pre><code>select distinct C.Cname as Country, count(i.medal) as Medals_Won
from individual_resu... | [
{
"answer_id": 74504127,
"author": "Avrohom Yisroel",
"author_id": 706346,
"author_profile": "https://Stackoverflow.com/users/706346",
"pm_score": 0,
"selected": false,
"text": "=+ kvp.value"
},
{
"answer_id": 74504220,
"author": "Gabriel Stancu",
"author_id": 8187400,
... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74503315",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20550247/"
] |
74,503,325 | <p>Currently i have below Array of Objects</p>
<pre><code>const dataClass = [
{
"id": 101,
"class": [
{
"type": "A",
"value": "A-class"
},
{
"type"... | [
{
"answer_id": 74504127,
"author": "Avrohom Yisroel",
"author_id": 706346,
"author_profile": "https://Stackoverflow.com/users/706346",
"pm_score": 0,
"selected": false,
"text": "=+ kvp.value"
},
{
"answer_id": 74504220,
"author": "Gabriel Stancu",
"author_id": 8187400,
... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74503325",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12028187/"
] |
74,503,366 | <p>I have a variant of exact match that I'm struggling to execute using regex. I would like to match several words (e.g. Apple, Bat, Car) to a string while ignoring order and also being exclusive (i.e. ignoring cases with extra words, or too few words). For example (using the list above), I'd like the following outcome... | [
{
"answer_id": 74503641,
"author": "Andrej Kesely",
"author_id": 10035985,
"author_profile": "https://Stackoverflow.com/users/10035985",
"pm_score": 1,
"selected": true,
"text": "(?=.*Apple)(?=.*Car)(?=.*Bat)(?!.*(?:,|^)(?:(?!Apple|Bat|Car).)+(?:,|$))^.*$\n (?=.*Apple)(?=.*Car)(?=.*Bat) ... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74503366",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20548760/"
] |
74,503,397 | <p>I'm working on a card game and for the most part its working out. It shuffles, and divides the deck into two (1st 26cards to player 1, the other half to player 2). My problem is when a player wins they are supposed to gain a card from the other player's hand. (player1Cards.push(player2Cards[card])) - This works, but... | [
{
"answer_id": 74503641,
"author": "Andrej Kesely",
"author_id": 10035985,
"author_profile": "https://Stackoverflow.com/users/10035985",
"pm_score": 1,
"selected": true,
"text": "(?=.*Apple)(?=.*Car)(?=.*Bat)(?!.*(?:,|^)(?:(?!Apple|Bat|Car).)+(?:,|$))^.*$\n (?=.*Apple)(?=.*Car)(?=.*Bat) ... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74503397",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11996252/"
] |
74,503,413 | <p>Table 1</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>Loc_Id</th>
<th>Label_Id</th>
<th>Active_Date</th>
<th>Inactive_Date</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>1001</td>
<td>2022/05/13</td>
<td>9999/12/31</td>
</tr>
<tr>
<td>2</td>
<td>1001</td>
<td>2018/05/20</td>
<td>2022/... | [
{
"answer_id": 74503641,
"author": "Andrej Kesely",
"author_id": 10035985,
"author_profile": "https://Stackoverflow.com/users/10035985",
"pm_score": 1,
"selected": true,
"text": "(?=.*Apple)(?=.*Car)(?=.*Bat)(?!.*(?:,|^)(?:(?!Apple|Bat|Car).)+(?:,|$))^.*$\n (?=.*Apple)(?=.*Car)(?=.*Bat) ... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74503413",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11601256/"
] |
74,503,440 | <p>I would like to retain the syntax highlighting for code written in code blocks in the Quarto document (.qmd) after rendering a PDF. Please let me know if this is possible.</p>
<p><a href="https://i.stack.imgur.com/WnLqQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WnLqQ.png" alt="Code in .qmd f... | [
{
"answer_id": 74503641,
"author": "Andrej Kesely",
"author_id": 10035985,
"author_profile": "https://Stackoverflow.com/users/10035985",
"pm_score": 1,
"selected": true,
"text": "(?=.*Apple)(?=.*Car)(?=.*Bat)(?!.*(?:,|^)(?:(?!Apple|Bat|Car).)+(?:,|$))^.*$\n (?=.*Apple)(?=.*Car)(?=.*Bat) ... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74503440",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19653760/"
] |
74,503,454 | <pre><code>#include <stdio.h>
#include <time.h>
int main(){
printf("%d\n", time(NULL));
printf("Second: %ld\n", time(NULL)/60);
printf("Minute: %ld\n", time(NULL)/(60*60));
printf("Hour: %ld\n", time(NULL)/(60*60*60));
printf("Day %ld\n"... | [
{
"answer_id": 74503600,
"author": "Lindydancer",
"author_id": 623133,
"author_profile": "https://Stackoverflow.com/users/623133",
"pm_score": 1,
"selected": false,
"text": "time(NULL)"
},
{
"answer_id": 74503693,
"author": "Ahmed Masud",
"author_id": 894328,
"author_... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74503454",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20408952/"
] |
74,503,488 | <p>As the title says. I have a Django 4.1 app, which uses Werkzeug to enable https. I have the following launch.json set up:</p>
<pre><code>{
"version": "0.2.0",
"configurations": [
{
"name": "Python: Django",
"type": &q... | [
{
"answer_id": 74559174,
"author": "Ajay K",
"author_id": 10782096,
"author_profile": "https://Stackoverflow.com/users/10782096",
"pm_score": -1,
"selected": false,
"text": "{\n \"version\": \"0.2.0\",\n \"configurations\": [\n {\n \"name\": \"Python: Django\",\n ... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74503488",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6874134/"
] |
74,503,499 | <p>i want a sticky side nav. I have three sections and place the nev in my first section but it just sticks till the end of the first section.</p>
<p>HTML:</p>
<pre><code><body>
<div id="sections">
<div class="section" id="section1">
<nav id=&qu... | [
{
"answer_id": 74559174,
"author": "Ajay K",
"author_id": 10782096,
"author_profile": "https://Stackoverflow.com/users/10782096",
"pm_score": -1,
"selected": false,
"text": "{\n \"version\": \"0.2.0\",\n \"configurations\": [\n {\n \"name\": \"Python: Django\",\n ... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74503499",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16116548/"
] |
74,503,501 | <p>I have below pandas dataframe which has employees sales data for october month.</p>
<pre><code> Employee Timerange Dials Conn Conv Mtg Bkd Talk Dial
0 Ricky Ponting 10/3 - 10/7 1,869 102 60.0 2.0 3h:08m 5h:23m
1 Adam ... | [
{
"answer_id": 74559174,
"author": "Ajay K",
"author_id": 10782096,
"author_profile": "https://Stackoverflow.com/users/10782096",
"pm_score": -1,
"selected": false,
"text": "{\n \"version\": \"0.2.0\",\n \"configurations\": [\n {\n \"name\": \"Python: Django\",\n ... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74503501",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15215859/"
] |
74,503,516 | <p>I'm creating a search field to allow users to search for tags associated with a photo, and then only show photos containing that tag in my List. I'm using a computed property to check if my array of <code>Photo</code> contains the tag but the tags are in a nested array several properties deep in my <code>Photo</code... | [
{
"answer_id": 74559174,
"author": "Ajay K",
"author_id": 10782096,
"author_profile": "https://Stackoverflow.com/users/10782096",
"pm_score": -1,
"selected": false,
"text": "{\n \"version\": \"0.2.0\",\n \"configurations\": [\n {\n \"name\": \"Python: Django\",\n ... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74503516",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13816223/"
] |
74,503,551 | <p>So as the title says I'm supposed to make a function that takes a list and returns the list without the duplicates, but I can't use list comprehensions, only high-order functions and lambdas.</p>
<p>I've found this code from another users question.</p>
<pre><code>has :: (Eq a) => [a] -> a -> Bool
has [] _ =... | [
{
"answer_id": 74559174,
"author": "Ajay K",
"author_id": 10782096,
"author_profile": "https://Stackoverflow.com/users/10782096",
"pm_score": -1,
"selected": false,
"text": "{\n \"version\": \"0.2.0\",\n \"configurations\": [\n {\n \"name\": \"Python: Django\",\n ... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74503551",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20477097/"
] |
74,503,579 | <p>I have a huge text file (~1.5GB) with numerous lines ending with ".Ends".<br />
I need a linux oneliner (perl\ awk\ sed) to find the <strong>last</strong> place '.Ends' appear in the file and add a couple of lines <strong>before</strong> it.</p>
<p>I tried using <code>tac</code> twice, and stumbled with my... | [
{
"answer_id": 74503810,
"author": "markp-fuso",
"author_id": 7366100,
"author_profile": "https://Stackoverflow.com/users/7366100",
"pm_score": 3,
"selected": true,
"text": "$ cat test.dat\ndla4\n.Ends\nshe\n.Ends\nres\n.Ends\nabc\n\n$ cat new.dat\nnewline 111\nnewline 222\n awk tac | <p... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74503579",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2141046/"
] |
74,503,615 | <p>my first time, be patient pls.</p>
<p>I want to highlight the selected nav-link, it works well but the first one (small), doesn't highlight.</p>
<p>Even when i select the other ones, (medium or large, that do change the color), and select the first one (small) again, small won't change its color.</p>
<p>and its also... | [
{
"answer_id": 74503810,
"author": "markp-fuso",
"author_id": 7366100,
"author_profile": "https://Stackoverflow.com/users/7366100",
"pm_score": 3,
"selected": true,
"text": "$ cat test.dat\ndla4\n.Ends\nshe\n.Ends\nres\n.Ends\nabc\n\n$ cat new.dat\nnewline 111\nnewline 222\n awk tac | <p... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74503615",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16222863/"
] |
74,503,622 | <p>How Do I sum up all the values in 'exports' and 'imports' of all countries by year?</p>
<p>data frame :</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>Country</th>
<th>Year</th>
<th>exports</th>
<th>imports</th>
</tr>
</thead>
<tbody>
<tr>
<td>Denmark</td>
<td>2004</td>
<td>10000000</td... | [
{
"answer_id": 74503810,
"author": "markp-fuso",
"author_id": 7366100,
"author_profile": "https://Stackoverflow.com/users/7366100",
"pm_score": 3,
"selected": true,
"text": "$ cat test.dat\ndla4\n.Ends\nshe\n.Ends\nres\n.Ends\nabc\n\n$ cat new.dat\nnewline 111\nnewline 222\n awk tac | <p... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74503622",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20550379/"
] |
74,503,655 | <p>I was going through the documentation for "Floating-point numeric types (C# reference)" at MSDN, <a href="https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/floating-point-numeric-types" rel="nofollow noreferrer">https://learn.microsoft.com/en-us/dotnet/csharp/language-referen... | [
{
"answer_id": 74504106,
"author": "Andrew McClement",
"author_id": 13893216,
"author_profile": "https://Stackoverflow.com/users/13893216",
"pm_score": 1,
"selected": false,
"text": "double double.Epsilon"
}
] | 2022/11/19 | [
"https://Stackoverflow.com/questions/74503655",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10576072/"
] |
74,503,659 | <p>Let's say I have a weighted, undirected, acyclic graph with no negative value weights, comprised of n vertices and n-1 edges. If I want to calculate the total distance between every single one of them (using edge weight) and then add it up, which algorithm should I use? If for example a graph has 4 vertices, connect... | [
{
"answer_id": 74504106,
"author": "Andrew McClement",
"author_id": 13893216,
"author_profile": "https://Stackoverflow.com/users/13893216",
"pm_score": 1,
"selected": false,
"text": "double double.Epsilon"
}
] | 2022/11/19 | [
"https://Stackoverflow.com/questions/74503659",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20549157/"
] |
74,503,660 | <p>I used DatePickerDialog in a fragment. I have a Button and an unclickable EditText. Whenever the user presses the button, it shows the DatePickerDialog, but the problem is when it chooses January, the value of the month is 0.</p>
<p>This is my code</p>
<pre><code>DatePickerDialog datePickerDialog = new DatePickerDia... | [
{
"answer_id": 74513289,
"author": "Liyun Zhang - MSFT",
"author_id": 17455524,
"author_profile": "https://Stackoverflow.com/users/17455524",
"pm_score": 1,
"selected": true,
"text": "this.month = month + 1; eventdatesetText.EditText.Text = this.month + \"/\" + dayOfMonth + \"/\" + year;... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74503660",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20498910/"
] |
74,503,668 | <p>I'm a student and I have this exercise: we have to write a function with 2 parameters, account number and withdrawal, and return the new balance of a bank account only if the account balance - withdrawal > Flow threshold</p>
<p>This is my code:</p>
<pre><code>set serveroutput on
CREATE OR REPLACE FONCTION Retrai... | [
{
"answer_id": 74513289,
"author": "Liyun Zhang - MSFT",
"author_id": 17455524,
"author_profile": "https://Stackoverflow.com/users/17455524",
"pm_score": 1,
"selected": true,
"text": "this.month = month + 1; eventdatesetText.EditText.Text = this.month + \"/\" + dayOfMonth + \"/\" + year;... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74503668",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15259670/"
] |
74,503,680 | <p>I extracted data from an API using Airflow.
The data is extracted from the API and saved on cloud storage in JSON format.</p>
<p>The next step is to insert the data into an SQL DB.
I have a few questions:</p>
<ul>
<li>Should I do it on Airflow or using another ETL like AWS Glue/Azure Data factory?</li>
<li>How to in... | [
{
"answer_id": 74513289,
"author": "Liyun Zhang - MSFT",
"author_id": 17455524,
"author_profile": "https://Stackoverflow.com/users/17455524",
"pm_score": 1,
"selected": true,
"text": "this.month = month + 1; eventdatesetText.EditText.Text = this.month + \"/\" + dayOfMonth + \"/\" + year;... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74503680",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11254743/"
] |
74,503,686 | <p>I am experimenting with colorized text output to the console in c. I know that you are able to change the color of entire printf statements, but I was wondering if I am able to change the text color of individual characters within a printf statement.
In summary, I would like to be able to print out "asdf" ... | [
{
"answer_id": 74503897,
"author": "RMEM",
"author_id": 18945783,
"author_profile": "https://Stackoverflow.com/users/18945783",
"pm_score": 0,
"selected": false,
"text": "printf"
},
{
"answer_id": 74504132,
"author": "chrslg",
"author_id": 20037042,
"author_profile": ... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74503686",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18945783/"
] |
74,503,697 | <p>Out of all the months in the year, I need to code the month with largest total balance (it's June as all together June has the biggest "amount" value)</p>
<pre class="lang-py prettyprint-override"><code>lst = [
{'account': 'x\\*', 'amount': 300, 'day': 3, 'month': 'June'},
{'account': 'y\\*', 'amou... | [
{
"answer_id": 74503987,
"author": "Pierre D",
"author_id": 758174,
"author_profile": "https://Stackoverflow.com/users/758174",
"pm_score": 0,
"selected": false,
"text": "from itertools import groupby\nfrom operator import itemgetter\n\nmo_total = {\n k: sum([d.get('amount', 0) for d ... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74503697",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20544158/"
] |
74,503,739 | <p>I am trying to create a contact info txt file with python</p>
<pre><code>what_you_want = input("Do you want to add or remove (if add write add), (if remove write remove): ")
if what_you_want == "remove":
what_you_want_remove = input("What contact number you want to remove: ")
w... | [
{
"answer_id": 74503987,
"author": "Pierre D",
"author_id": 758174,
"author_profile": "https://Stackoverflow.com/users/758174",
"pm_score": 0,
"selected": false,
"text": "from itertools import groupby\nfrom operator import itemgetter\n\nmo_total = {\n k: sum([d.get('amount', 0) for d ... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74503739",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20550454/"
] |
74,503,746 | <p>How to convert e.g. <code>&[u64]</code> to <code>&[u8]</code>? I contend that it's safe to do with this method (edited to make harder to misuse):</p>
<pre><code>use num_traits::PrimInt;
/// Reinterpret a slice of T as a slice of bytes without copying.
/// Only use with simple copy types like integers, float... | [
{
"answer_id": 74503976,
"author": "cafce25",
"author_id": 442760,
"author_profile": "https://Stackoverflow.com/users/442760",
"pm_score": 0,
"selected": false,
"text": "#[derive(Debug, Clone, Copy)]\nstruct Thingy {\n a: u32,\n b: u16,\n}\n/// Reinterpret a slice of T as a slice o... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74503746",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/152580/"
] |
74,503,788 | <p>I try to adapt the this <a href="https://github.com/tensorflow/agents/blob/635af30a6365ec963823d4623f14df25fcefaadd/tf_agents/experimental/examples/dqn/mnih15/dqn_train_eval_atari.py" rel="nofollow noreferrer">tf-agents actor<->learner</a> DQN Atari Pong example to my windows machine using a <a href="https://w... | [
{
"answer_id": 74503976,
"author": "cafce25",
"author_id": 442760,
"author_profile": "https://Stackoverflow.com/users/442760",
"pm_score": 0,
"selected": false,
"text": "#[derive(Debug, Clone, Copy)]\nstruct Thingy {\n a: u32,\n b: u16,\n}\n/// Reinterpret a slice of T as a slice o... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74503788",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20549040/"
] |
74,503,814 | <p>I need to create a new file name test.sh.
I need to write those lines with echo or somethings else but cant open new file manually and write it.
That is, I have to write down some things in the bash such a way that the following file is created:</p>
<pre><code>TEST_VALUE=$1
if [[cat data | grep $TEST_VALUE]]; then
e... | [
{
"answer_id": 74503967,
"author": "mbofos01",
"author_id": 17790231,
"author_profile": "https://Stackoverflow.com/users/17790231",
"pm_score": 0,
"selected": false,
"text": "echo 'TEST_VALUE=$1 \nif [[cat data | grep $TEST_VALUE]]; then\nexit 1\nfi\nexit 0' > test.sh\n"
},
{
"an... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74503814",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17696754/"
] |
74,503,898 | <p>I need to replace two strings using regular expression value replacement so the resulting string is <code>$?tlang=es&text=Hello world</code>, so I didn't know to use here <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace" rel="nofollow noreferrer">String.pro... | [
{
"answer_id": 74503977,
"author": "Andrew Parks",
"author_id": 5898421,
"author_profile": "https://Stackoverflow.com/users/5898421",
"pm_score": 2,
"selected": false,
"text": "const line = \"Full name: John Doe\" // text input\nconst sourcePattern = /Full name: (.*) (.*)/ // user input\... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74503898",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6421288/"
] |
74,503,923 | <p>I am looking to redirect my user to <code>login</code> page, if they have not logged in.</p>
<p>I initally looked at the decorator <code>@login_required(login_url='/accounts/login/')</code>.</p>
<p>But this is not ideal, for 2 reasons: first I want this to apply to all views. Also the decorator returns an error mess... | [
{
"answer_id": 74504199,
"author": "Dino Corry",
"author_id": 20535274,
"author_profile": "https://Stackoverflow.com/users/20535274",
"pm_score": 0,
"selected": false,
"text": "return redirect('%s?next=%s' % (settings.login_user, request.path))' \n HttpResponse"
},
{
"answer_id":... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74503923",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19003861/"
] |
74,503,935 | <p>Firstly apologies as I am fairly new to fetching from an API and I am trying to learn.</p>
<p>I need to fetch "name" , "age" and "phone" from "id" 1 from "is" and display it when click on button. This is my javascript-fetch-api.js file:</p>
<p>I'm not sure how to fet... | [
{
"answer_id": 74503978,
"author": "Georgemff",
"author_id": 9716786,
"author_profile": "https://Stackoverflow.com/users/9716786",
"pm_score": 3,
"selected": true,
"text": " event.language.is.age\n event.language.is.name\n event.language.is.phone\n"
},
{
"answer_id": 74503985,
... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74503935",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20550608/"
] |
74,503,971 | <p>I have a struct and a struct array similar to this:</p>
<pre><code>struct point{
double x;
double y;
char name[10];
};
struct point points[1000];
</code></pre>
<p>I created an algorithm that calculates the distances between all the points and prints the pair with the smallest distance, like this:</p>
<pr... | [
{
"answer_id": 74504007,
"author": "White Wizard",
"author_id": 9366059,
"author_profile": "https://Stackoverflow.com/users/9366059",
"pm_score": 1,
"selected": false,
"text": "for(int i = 0; i < 1000; i++){\n struct point a = points[i]\n for(int j = 0; j < 1000; j++){\n str... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74503971",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18361723/"
] |
74,504,021 | <p>Recently I have had some problems regarding basic npm commands.</p>
<p>I have the following package.json:</p>
<pre><code>{
"name": "bundle",
"version": "1.0.0",
"description": "",
"main": "webpack.config.js",
"author"... | [
{
"answer_id": 74504007,
"author": "White Wizard",
"author_id": 9366059,
"author_profile": "https://Stackoverflow.com/users/9366059",
"pm_score": 1,
"selected": false,
"text": "for(int i = 0; i < 1000; i++){\n struct point a = points[i]\n for(int j = 0; j < 1000; j++){\n str... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74504021",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14540793/"
] |
74,504,032 | <p>I have 25-km raster grid and a point. If I plot the point on the raster, it falls ~on the borderof two adjacent raster cells. I don't how to generate a sample data for this specific case but here's a visualisation of what I am taking about.</p>
<p><a href="https://i.stack.imgur.com/1uZ9v.png" rel="nofollow noreferre... | [
{
"answer_id": 74504500,
"author": "Grzegorz Sapijaszko",
"author_id": 17486894,
"author_profile": "https://Stackoverflow.com/users/17486894",
"pm_score": 0,
"selected": false,
"text": "library(terra)\n#> terra 1.6.17\nr <- rast(nrows=20, ncols=10, xmin=0, xmax=10, ymin = 0, ymax = 10)\n... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74504032",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3227302/"
] |
74,504,052 | <p>My code is as follows, and you can see how it works in <a href="https://codepen.io/rongeegee/pen/BaVJjGO" rel="nofollow noreferrer">https://codepen.io/rongeegee/pen/BaVJjGO</a>:</p>
<pre><code>const { useState } = React;
const Counter = () => {
const [data, setData] = useState({
displayData: "data_one... | [
{
"answer_id": 74504745,
"author": "Lord-JulianXLII",
"author_id": 19529102,
"author_profile": "https://Stackoverflow.com/users/19529102",
"pm_score": 2,
"selected": true,
"text": "input input default Value <input key=\"1\" name=\"data_one\" defaultValue={data.data_one.text} />\n<input k... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74504052",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6707111/"
] |
74,504,058 | <p>I want to run npm install in my folder and subfolder without having to run:</p>
<ol>
<li>npm install</li>
<li>cd subfolder</li>
<li>npm install</li>
</ol>
<p>So, in this script I would run two <code>npm install</code> in one single command in my main folder without having to <code>cd</code> into the subfolder.
I kn... | [
{
"answer_id": 74504111,
"author": "Arthur Secondaire",
"author_id": 12608183,
"author_profile": "https://Stackoverflow.com/users/12608183",
"pm_score": 0,
"selected": false,
"text": "scripts: {\n {\n \"cmdthatyouwant\": \"nmp i; cd folder; npm i\"\n }\n}\n"
},
{
"answer_id": 745... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74504058",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20515079/"
] |
74,504,091 | <p>I'm new to coding and im sure that my code is not very efficient but I just want to take the output from a variable and display it in a window. So far when you run it, it just displays the output in the console. I want it do to that and display it on the window. Hope that all makes sense.</p>
<pre><code>from tkinter... | [
{
"answer_id": 74504111,
"author": "Arthur Secondaire",
"author_id": 12608183,
"author_profile": "https://Stackoverflow.com/users/12608183",
"pm_score": 0,
"selected": false,
"text": "scripts: {\n {\n \"cmdthatyouwant\": \"nmp i; cd folder; npm i\"\n }\n}\n"
},
{
"answer_id": 745... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74504091",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20543811/"
] |
74,504,098 | <p>Select all the values of objects in the array. For example,</p>
<pre class="lang-js prettyprint-override"><code>tutorials = [{title:a, movie:a}, {title:b, movie:b}, {title:c, movie:c}] => a b c.
</code></pre>
<p>I want to find the values of the titles of all objects.</p>
<p><code>Tutorials[number].title</code> wa... | [
{
"answer_id": 74504140,
"author": "Zohrab Semedzade",
"author_id": 18158970,
"author_profile": "https://Stackoverflow.com/users/18158970",
"pm_score": 1,
"selected": false,
"text": "let tutorials = [\n {\n title:'a', movie:'a'\n },\n {\n title:'b', movie:'b'\n ... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74504098",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18704259/"
] |
74,504,099 | <p>Im trying to lookup the index in two different datframes and return the values.</p>
<p>For example, in df1 i would like to lookup in df2 and return the same index and values.</p>
<p>DF1 <a href="https://i.stack.imgur.com/qxuLw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qxuLw.png" alt="enter i... | [
{
"answer_id": 74504140,
"author": "Zohrab Semedzade",
"author_id": 18158970,
"author_profile": "https://Stackoverflow.com/users/18158970",
"pm_score": 1,
"selected": false,
"text": "let tutorials = [\n {\n title:'a', movie:'a'\n },\n {\n title:'b', movie:'b'\n ... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74504099",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20250014/"
] |
74,504,129 | <p>For example when I run <code>gulp</code> I don't have to do <code>npx gulp</code>.</p>
<p>I can omit the <code>npx</code> and just run <code>gulp</code></p>
<p>How do I do this for my own package?</p>
<p>I've added <code>mycommand</code> to the package npm <code>bin</code> config, but I still always have to do <code... | [
{
"answer_id": 74504363,
"author": "Dimava",
"author_id": 5734961,
"author_profile": "https://Stackoverflow.com/users/5734961",
"pm_score": 0,
"selected": false,
"text": "npx gulp gulp gulp.cmd gulp.ps1 gulp npx gulp"
},
{
"answer_id": 74504399,
"author": "Peter Toth",
"a... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74504129",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19716678/"
] |
74,504,153 | <p>I know this is a very basic question but it has me very confused - there's not much documentation that I could find about the flexslider. Also, I'm very new to this language, I'm a C++ / ASM type person but trying to get a webpage setup. The page is for an internet radio station. The slider is used to show the album... | [
{
"answer_id": 74504363,
"author": "Dimava",
"author_id": 5734961,
"author_profile": "https://Stackoverflow.com/users/5734961",
"pm_score": 0,
"selected": false,
"text": "npx gulp gulp gulp.cmd gulp.ps1 gulp npx gulp"
},
{
"answer_id": 74504399,
"author": "Peter Toth",
"a... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74504153",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16410654/"
] |
74,504,169 | <p>My script .py work perfectly, but .exe sadly doesn't work. Im running on newest PyInstaller.</p>
<p><a href="https://github.com/sat1ss/Printer_extension/blob/main/Printer_script.py" rel="nofollow noreferrer">Here is my script</a></p>
<p>I already tried everyting that i can think of here is options that i used:</p>
... | [
{
"answer_id": 74504363,
"author": "Dimava",
"author_id": 5734961,
"author_profile": "https://Stackoverflow.com/users/5734961",
"pm_score": 0,
"selected": false,
"text": "npx gulp gulp gulp.cmd gulp.ps1 gulp npx gulp"
},
{
"answer_id": 74504399,
"author": "Peter Toth",
"a... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74504169",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18529936/"
] |
74,504,174 | <p>I want to create an object, <code>A</code>, with <code>x</code> and <code>y</code> values without creating a class.</p>
<pre class="lang-py prettyprint-override"><code>#<Code I am looking for goes here.>
print(A.x, A.y)
</code></pre>
<p>Is there an easy way to do this that I am missing, or is it too hacky?</p... | [
{
"answer_id": 74504232,
"author": "Bituvo",
"author_id": 17064640,
"author_profile": "https://Stackoverflow.com/users/17064640",
"pm_score": 0,
"selected": false,
"text": "A = type('any name', (), {'x': 15, 'y': 23})\n\nprint(A.x, A.y)\n"
},
{
"answer_id": 74504263,
"author"... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74504174",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17064640/"
] |
74,504,197 | <pre><code>`mysql> select * from movies;
+----------+-------+---------+
| movie_id | title | watched |
+----------+-------+---------+
| 1 | bo | 0 |
| 2 | NEW | 0 |
| 3 | NEW 2 | 0 |
+----------+-------+---------+
</code></pre>
<pre><code>CREATE TABLE MOVIES (
movie_id I... | [
{
"answer_id": 74504286,
"author": "nbk",
"author_id": 5193536,
"author_profile": "https://Stackoverflow.com/users/5193536",
"pm_score": 1,
"selected": false,
"text": "SUM CASE WHEN FILTER SELECT\n movie_id , title , \n CASE WHEN watched = 0 THEN 'False' ELSE 'True' END IF\n"
},
{
... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74504197",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20258676/"
] |
74,504,231 | <p>Trying to write a program that follows a simple pattern (x-y, x+y) as practice with recursion. Essentially taking a number, subtracting the second until reaching a negative value, then adding until reaching the original value. I understand my base case is reaching the original value, and my recursive case to subtrac... | [
{
"answer_id": 74504285,
"author": "ChrisMM",
"author_id": 10686048,
"author_profile": "https://Stackoverflow.com/users/10686048",
"pm_score": 3,
"selected": true,
"text": "void PrintNumPattern(int x, int y){\n std::cout << x << \" \"; // Print \"x\" first\n if ( x >= 0... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74504231",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20550832/"
] |
74,504,234 | <p>Similar to Rstudio, Atom allowed you to run code segments on interactively rather than the entire script all at once. Is there a suitable Julia language IDE that is comparable to rstudio or Atom (juno) and allows for on-the-fly execution of code blocks because Atom is being phased out?</p>
<p>note: Thanks for answer... | [
{
"answer_id": 74504350,
"author": "Przemyslaw Szufel",
"author_id": 9957710,
"author_profile": "https://Stackoverflow.com/users/9957710",
"pm_score": 3,
"selected": true,
"text": "## # %% #- ##\n\n(your code goes here)\n\n##\n"
},
{
"answer_id": 74504376,
"author": "Odilf",
... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74504234",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7331417/"
] |
74,504,267 | <p>I want a python code to print greeting messages for users when logged in: if the <code>userName</code> is <code>admin</code> then it should print "Hello admin you're welcome, would you want to see a status update?", and if the <code>userName</code> is other than <code>admin</code> then a different welcome ... | [
{
"answer_id": 74504350,
"author": "Przemyslaw Szufel",
"author_id": 9957710,
"author_profile": "https://Stackoverflow.com/users/9957710",
"pm_score": 3,
"selected": true,
"text": "## # %% #- ##\n\n(your code goes here)\n\n##\n"
},
{
"answer_id": 74504376,
"author": "Odilf",
... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74504267",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8075146/"
] |
74,504,269 | <p>I want to parse the JSON from nominatim from OpenStreetMap.</p>
<p><a href="https://nominatim.openstreetmap.org/search?q=Tower%20Bridge&format=json" rel="nofollow noreferrer">Example</a></p>
<p>It's a list and I don't have a clue how I can describe the list. I am using Gson, these is my data class:</p>
<pre><cod... | [
{
"answer_id": 74504313,
"author": "Julius Babies",
"author_id": 16682019,
"author_profile": "https://Stackoverflow.com/users/16682019",
"pm_score": 1,
"selected": true,
"text": "Array List val list : Array<Destination> = Gson().fromJson(\n body,\n Array<Destination>::class.java\n)... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74504269",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16682019/"
] |
74,504,296 | <p>I'm using TypeScript with React Native to develop a mobile app.
To restore the scroll position of the previous screen, I created a variable and assign the <code>useRef()</code> to handle the scroll.
What is the type for the ref prop?
I'll share my code below.</p>
<pre><code>const sectionListRef = useRef();
...
secti... | [
{
"answer_id": 74504313,
"author": "Julius Babies",
"author_id": 16682019,
"author_profile": "https://Stackoverflow.com/users/16682019",
"pm_score": 1,
"selected": true,
"text": "Array List val list : Array<Destination> = Gson().fromJson(\n body,\n Array<Destination>::class.java\n)... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74504296",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4803603/"
] |
74,504,314 | <p>I'm sure I'm missing something in how classes work here, but basically this is my class:</p>
<pre><code>import pandas as pd
import numpy as np
import scipy
#example DF with OHLC columns and 100 rows
gold = pd.DataFrame({'Open':[i for i in range(100)],'Close':[i for i in range(100)],'High':[i for i in range(100)],'L... | [
{
"answer_id": 74504470,
"author": "Ovski",
"author_id": 8610346,
"author_profile": "https://Stackoverflow.com/users/8610346",
"pm_score": 1,
"selected": false,
"text": "class Backtest:\n\n def __init__(self, ticker, df):\n self.ticker = ticker\n self.df = df\n\n ... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74504314",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16523946/"
] |
74,504,341 | <p>I'm using a personal access token to access Github from the command line, in place of a password when prompted for my username and password. If I make a new access token, it works just fine in place of my password the first time, but if I try to use it again, I get this error:</p>
<pre><code>remote: Support for pass... | [
{
"answer_id": 74504470,
"author": "Ovski",
"author_id": 8610346,
"author_profile": "https://Stackoverflow.com/users/8610346",
"pm_score": 1,
"selected": false,
"text": "class Backtest:\n\n def __init__(self, ticker, df):\n self.ticker = ticker\n self.df = df\n\n ... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74504341",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15801507/"
] |
74,504,345 | <p>From a list of distinct numbers, I want to find the sum of the largest numbers of len(a)//3. Examples if len(a) = 9, you need to find the sum of the largest 3 numbers. If len(a)=40, you need to find the sum of the largest 13 numbers. I was able to code it as such:</p>
<pre><code>def largestthree(a):
max2 = 0
... | [
{
"answer_id": 74504390,
"author": "user7644509",
"author_id": 7644509,
"author_profile": "https://Stackoverflow.com/users/7644509",
"pm_score": 0,
"selected": false,
"text": "import heapq\nl = [100, 1,2,3,4 ,545 , 5434 , 34]\n\nminheap = []\nheapq.heapify(minheap)\n\nfor num in l:\n ... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74504345",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20544212/"
] |
74,504,354 | <p>I have a custom button in summernote that has a dropdown of items "one", "two", "three" when I click on for example the text "one" the text is added at the start which is fine. But then when I click on "two" afterwards the text is also added at the start which produc... | [
{
"answer_id": 74505045,
"author": "Dori Rina",
"author_id": 11858157,
"author_profile": "https://Stackoverflow.com/users/11858157",
"pm_score": 1,
"selected": false,
"text": "customButtonGenerator context.invoke('editor.insertText', $(this).html());\n context.invoke('editor.pasteHTML', ... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74504354",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10152435/"
] |
74,504,383 | <p>i am trying to add different styles for every listbox.Item in my project. Can anyone help me about that?</p>
<p>`</p>
<pre><code>
foreach (var item in orderList)
{
var itm = new ListBoxItem();
if (item.CustomOrder)
{
itm.Co... | [
{
"answer_id": 74508458,
"author": "EldHasp",
"author_id": 13349759,
"author_profile": "https://Stackoverflow.com/users/13349759",
"pm_score": 1,
"selected": true,
"text": "namespace Core2022.SO.Ali.ListBoxItemStyleSelector\n{\n public class OrderItem\n {\n public bool Custo... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74504383",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19202039/"
] |
74,504,388 | <p>From The C++ programming language book by Bjarne Stroustrup:</p>
<p><a href="https://i.stack.imgur.com/QIg7y.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QIg7y.jpg" alt="The C++ programming language| STL containers" /></a></p>
<p>Does using a <code>rep</code> pointer to element representation i... | [
{
"answer_id": 74504464,
"author": "Nicol Bolas",
"author_id": 734069,
"author_profile": "https://Stackoverflow.com/users/734069",
"pm_score": 2,
"selected": false,
"text": "rep #define"
},
{
"answer_id": 74504477,
"author": "Sam Varshavchik",
"author_id": 3943312,
"a... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74504388",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12137626/"
] |
74,504,395 | <p>If my request returns a JSON object like this</p>
<pre><code>{"autocomplete":["abc", "asd"]}
</code></pre>
<p>How can I get the array in the JSON and turn it into java ArrayList?</p>
<p>I find some methods like getString, getInt. But I don't find a method that could get the array.</p>
| [
{
"answer_id": 74504464,
"author": "Nicol Bolas",
"author_id": 734069,
"author_profile": "https://Stackoverflow.com/users/734069",
"pm_score": 2,
"selected": false,
"text": "rep #define"
},
{
"answer_id": 74504477,
"author": "Sam Varshavchik",
"author_id": 3943312,
"a... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74504395",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20550913/"
] |
74,504,396 | <p>I have the following two arrays of objects and I want to filter all elements of first array whose "stage" value is same in any of the element of second array.</p>
<pre><code>const arr1 = [
{
id: '1',
name: 'Ahmad',
title: 'Manager',
stage: 'Open',
},
{
id: '2',
name: 'Ahmad',
... | [
{
"answer_id": 74504437,
"author": "Georgemff",
"author_id": 9716786,
"author_profile": "https://Stackoverflow.com/users/9716786",
"pm_score": 2,
"selected": false,
"text": "let filteredArr = arr1.filter((o1) => {\n return arr2.some((o2) => o2.stage === o1.stage);\n});\n"
},
{
"... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74504396",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12032346/"
] |
74,504,413 | <p>I have an API JSON response like below. I want to decode the JSON to get an array of dictionary <code>[String:Double]</code>, like <code>[{"2020-01-01" : 0.891186}, {"2020-01-02" : 0.891186}]</code>.</p>
<pre><code>{
"rates": {
"2020-01-01": {
"EUR... | [
{
"answer_id": 74504437,
"author": "Georgemff",
"author_id": 9716786,
"author_profile": "https://Stackoverflow.com/users/9716786",
"pm_score": 2,
"selected": false,
"text": "let filteredArr = arr1.filter((o1) => {\n return arr2.some((o2) => o2.stage === o1.stage);\n});\n"
},
{
"... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74504413",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17625058/"
] |
74,504,447 | <p>I have this data class written:</p>
<pre class="lang-kotlin prettyprint-override"><code>package com.my.app
data class User(
var uid: String,
var nickname: String,
var email: String,
var description: String = "",
var avatar: String = "default",
var banReason: String = &quo... | [
{
"answer_id": 74504437,
"author": "Georgemff",
"author_id": 9716786,
"author_profile": "https://Stackoverflow.com/users/9716786",
"pm_score": 2,
"selected": false,
"text": "let filteredArr = arr1.filter((o1) => {\n return arr2.some((o2) => o2.stage === o1.stage);\n});\n"
},
{
"... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74504447",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13680873/"
] |
74,504,448 | <p><a href="https://i.stack.imgur.com/HpkfS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HpkfS.png" alt="" /></a></p>
<p>I have a task to take values from a prompt and put them like in the picture, but I don’t really understand how to make everything on the same level, for example, so that the '|'... | [
{
"answer_id": 74504437,
"author": "Georgemff",
"author_id": 9716786,
"author_profile": "https://Stackoverflow.com/users/9716786",
"pm_score": 2,
"selected": false,
"text": "let filteredArr = arr1.filter((o1) => {\n return arr2.some((o2) => o2.stage === o1.stage);\n});\n"
},
{
"... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74504448",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20502283/"
] |
74,504,455 | <p>I have the following data frame:</p>
<pre><code>A1_Q1 <- c(1, 2, 3)
A1_Q2 <- c(4, 5, 6)
A1_Q3 <- c(7, 8, 9)
A1_Q4 <- c(10, 11, 12)
A1_Q5 <- c(13, 14, 15)
A1_Q6 <- c(16, 17, 18)
A2_Q1 <- c(1, 2, 3)
A2_Q2 <- c(4, 5, 6)
A2_Q3 <- c(7, 8, 9)
A2_Q4 <- c(10, 11, 12)
A2_Q5 <- c(13, 14, 15)
... | [
{
"answer_id": 74504493,
"author": "akrun",
"author_id": 3732271,
"author_profile": "https://Stackoverflow.com/users/3732271",
"pm_score": -1,
"selected": false,
"text": "list split.default gl list lapply paste list do.call list nm1 <- paste0(\"col\", rep(unique( sub(\".(\\\\d+)_.*\", \... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74504455",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4937644/"
] |
74,504,488 | <p>T1 T2 T3 T4 T5
1 1 NA NA 1
NA NA 1 1 1
NA 1 NA NA NA
NA NA NA NA 1</p>
<p>suppose my dataframe is like this (plz see the picture below, sorry I don't know how to replicate this data in stackoverflow). T1 stands for the first period,T5 stands for the last.</p>
<p><a href="https://i.stack.imgur.... | [
{
"answer_id": 74504493,
"author": "akrun",
"author_id": 3732271,
"author_profile": "https://Stackoverflow.com/users/3732271",
"pm_score": -1,
"selected": false,
"text": "list split.default gl list lapply paste list do.call list nm1 <- paste0(\"col\", rep(unique( sub(\".(\\\\d+)_.*\", \... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74504488",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20318210/"
] |
74,504,496 | <p>I have <code>df1</code>:</p>
<pre><code> x y no.
0 -17.7 -0.785430 y1
1 -15.0 -3820.085000 y4
2 -12.5 2.138833 y3
.. .... ........ ..
40 15.6 5.486901 y2
41 19.2 1.980686 y3
42 19.6 9.364718 y2
</code></pre>
<p>and <code>df2</code>:</p>
<pre><code> delta y ... | [
{
"answer_id": 74504493,
"author": "akrun",
"author_id": 3732271,
"author_profile": "https://Stackoverflow.com/users/3732271",
"pm_score": -1,
"selected": false,
"text": "list split.default gl list lapply paste list do.call list nm1 <- paste0(\"col\", rep(unique( sub(\".(\\\\d+)_.*\", \... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74504496",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20458338/"
] |
74,504,497 | <p>I'm noticing the following weird behaviour for the <code>toTimeString</code> method.</p>
<pre><code>const date1 = new Date("2022-09-23T00:00:00.00Z")
const date2 = new Date()
date1.toTimeString()
//17:00:00 GMT-0700 (Pacific Daylight Saving Time)
date2.toTimeString()
// 15:06:43 GMT-0800 (Pacific Stand... | [
{
"answer_id": 74504493,
"author": "akrun",
"author_id": 3732271,
"author_profile": "https://Stackoverflow.com/users/3732271",
"pm_score": -1,
"selected": false,
"text": "list split.default gl list lapply paste list do.call list nm1 <- paste0(\"col\", rep(unique( sub(\".(\\\\d+)_.*\", \... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74504497",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15161914/"
] |
74,504,504 | <p>I was thinking about how to code TailwindCSS cleaner in React. Since Tailwind is utility-first, it makes us inevitably end up with components (ex: <code>className="w-full bg-red-500"</code>). So, I tried to create a utility like this:<br />
<code>utils/tailwind.ts</code></p>
<pre><code>const tw = (...class... | [
{
"answer_id": 74504599,
"author": "kind user",
"author_id": 6695924,
"author_profile": "https://Stackoverflow.com/users/6695924",
"pm_score": 3,
"selected": true,
"text": "yes useMemo useMemo useMemo tw App className useMemo tw className App useMemo export default function App() {\n co... | 2022/11/19 | [
"https://Stackoverflow.com/questions/74504504",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3639728/"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.