qid int64 4 19.1M | question stringlengths 18 48.3k | answers list | date stringlengths 10 10 | metadata list |
|---|---|---|---|---|
74,582,719 | <p>I have an xml file that looks something like this:</p>
<pre><code><xml>
<trkseg>
<note>
<to>A</to>
<from>B</from>
<body>
keep this
</body>
</trkseg>
<trkseg>
</note>
...
</trkseg>
</xml>
</code></p... | [
{
"answer_id": 74583329,
"author": "Roby Raju Oommen",
"author_id": 14399782,
"author_profile": "https://Stackoverflow.com/users/14399782",
"pm_score": 0,
"selected": false,
"text": "function wdm_add_rewrite_rules() {\n add_rewrite_rule( '^kb\\/([^\\/]+)\\/?([^\\/]+)$', 'kb?kb_cat=$ma... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74582719",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5376591/"
] |
74,582,740 | <p>I have this code below which loops <code>rsync</code> several times in different directories:</p>
<pre><code>for (( i=0; i<6; i++ )); do
rsync /source-${i} /remote-destination
done
</code></pre>
<p>However there is a problem: when it executes the first <code>rsync</code>, it asks me the password of the ... | [
{
"answer_id": 74583329,
"author": "Roby Raju Oommen",
"author_id": 14399782,
"author_profile": "https://Stackoverflow.com/users/14399782",
"pm_score": 0,
"selected": false,
"text": "function wdm_add_rewrite_rules() {\n add_rewrite_rule( '^kb\\/([^\\/]+)\\/?([^\\/]+)$', 'kb?kb_cat=$ma... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74582740",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15974517/"
] |
74,582,780 | <p>I would like to delete a row/column from a 2d DataFrame.
Let's assume the DataFrame looks like this:</p>
<pre><code>animal cat dog hedgehog
time
0 1 1 0
1 2 0 1
</code></pre>
<p>How to get rid of let's say the whole dog thingy to get something like that:</p>
<pre><code>animal ca... | [
{
"answer_id": 74582825,
"author": "solac34",
"author_id": 20554831,
"author_profile": "https://Stackoverflow.com/users/20554831",
"pm_score": 2,
"selected": false,
"text": "df.drop('dog',axis=1)\n inplace df.drop('dog',axis=1,inplace=True)\n df.drop(['dog','cat'],axis=1,inplace=True)\n"... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74582780",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2974685/"
] |
74,582,794 | <p>In Open CV or with Pillow library how can we improve below images for tesseract.</p>
<p><a href="https://i.stack.imgur.com/qSvIJ.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qSvIJ.jpg" alt="Images" /></a></p>
<p><a href="https://i.stack.imgur.com/IgT77.jpg" rel="nofollow noreferrer"><img src="h... | [
{
"answer_id": 74582825,
"author": "solac34",
"author_id": 20554831,
"author_profile": "https://Stackoverflow.com/users/20554831",
"pm_score": 2,
"selected": false,
"text": "df.drop('dog',axis=1)\n inplace df.drop('dog',axis=1,inplace=True)\n df.drop(['dog','cat'],axis=1,inplace=True)\n"... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74582794",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4324496/"
] |
74,582,805 | <p>Given the jagged Array, we are asked to use a looping statement to display the character based on the position. Display a "*" if the position matched or a " " if it doesn't.</p>
<pre><code> int arr [][] = {{0,4,8,12,13,14,15,18,19,20,21,24,28},
{0,4,7,9,12,16,18,22,25,27},
{0... | [
{
"answer_id": 74582825,
"author": "solac34",
"author_id": 20554831,
"author_profile": "https://Stackoverflow.com/users/20554831",
"pm_score": 2,
"selected": false,
"text": "df.drop('dog',axis=1)\n inplace df.drop('dog',axis=1,inplace=True)\n df.drop(['dog','cat'],axis=1,inplace=True)\n"... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74582805",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20607200/"
] |
74,582,831 | <p>Im learning about else and else if statements and combining them with Try Parse.</p>
<p>Basically, I ask the user to tell me the temperature outside and based on the answer I give him the output. If instead of numbers, he uses the words, Try Parse gives out the reply that the value entered is not a number, BUT, in t... | [
{
"answer_id": 74582976,
"author": "Okke Hendriks",
"author_id": 811059,
"author_profile": "https://Stackoverflow.com/users/811059",
"pm_score": 1,
"selected": false,
"text": "TryParse else\n{\n numTemp = 0;\n Console.WriteLine(\"Value entered, was no number. 0 set as temperature\");\n... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74582831",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14076730/"
] |
74,582,832 | <p>Suppost I have this index.html</p>
<pre><code><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-widt... | [
{
"answer_id": 74582976,
"author": "Okke Hendriks",
"author_id": 811059,
"author_profile": "https://Stackoverflow.com/users/811059",
"pm_score": 1,
"selected": false,
"text": "TryParse else\n{\n numTemp = 0;\n Console.WriteLine(\"Value entered, was no number. 0 set as temperature\");\n... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74582832",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15308432/"
] |
74,582,838 | <p>I have many Tasks, that are running asynchronously</p>
<pre><code>Task<bool> task1 = Task.Run<bool>(() =>
{
return this.addGroupStringToDictionary("IfcPolyline");
});
Task<bool> task2 = Task.Run<bool>(() =>
{
return this.addGroupStringToDictionary("IfcPolyLoop&quo... | [
{
"answer_id": 74583275,
"author": "Theodor Zoulias",
"author_id": 11178549,
"author_profile": "https://Stackoverflow.com/users/11178549",
"pm_score": 3,
"selected": true,
"text": "Task.Run await var task1 = Task.Run(() => { /*...*/ });\n\nvar task2 = Task.Run(() => { /*...*/ });\n\nvar ... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74582838",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7310000/"
] |
74,582,852 | <p>Struggling to open Office files from a C# application, <strong>.NET 6.</strong> Note this works just fine using .NET framework.</p>
<p>The official MS nuget package <code>Microsoft.Office.Interop.Word</code> appears to support only up to Office 2016. Adding the Microsoft Word 16.0 Object Library COM reference appear... | [
{
"answer_id": 74584185,
"author": "jwilo",
"author_id": 20595585,
"author_profile": "https://Stackoverflow.com/users/20595585",
"pm_score": 2,
"selected": true,
"text": "object Microsoft Word 16.0 Object Library', substituting "
},
{
"answer_id": 74586013,
"author": "Eugene ... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74582852",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20595585/"
] |
74,582,868 | <p>I need to be able to append multiple values from a <code>CSV</code> file to a dictionary that has three keys. The keys are <code>morning</code>, <code>midday</code>, and <code>night</code>. The values should come from each row of the <code>CSV</code> file.</p>
<p>Ideally, it should look like below.</p>
<p>I can't us... | [
{
"answer_id": 74584185,
"author": "jwilo",
"author_id": 20595585,
"author_profile": "https://Stackoverflow.com/users/20595585",
"pm_score": 2,
"selected": true,
"text": "object Microsoft Word 16.0 Object Library', substituting "
},
{
"answer_id": 74586013,
"author": "Eugene ... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74582868",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10733231/"
] |
74,582,893 | <p>List that contains strings (<a href="https://i.stack.imgur.com/pOzik.png" rel="nofollow noreferrer">https://i.stack.imgur.com/pOzik.png</a>)</p>
<p>This is a string list of items and I want to extract the dictionary {} that is from the 6th character and after.</p>
<p>Should I convert list to dictionary?</p>
<pre cla... | [
{
"answer_id": 74582937,
"author": "Amin",
"author_id": 10281248,
"author_profile": "https://Stackoverflow.com/users/10281248",
"pm_score": 1,
"selected": false,
"text": "list json.loads() import json\n\n\ntext = '[\\n {\\n \"registration_number\": \"aj13870\",\\n \"stat... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74582893",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20607225/"
] |
74,582,909 | <p>Three empty cans can be exchanged for a new one. Suppose you have N cans of soda, try to use the program to solve how many cans of soda you can drink in the end?</p>
<p>Input description: Input a positive integer N. ex.5 / ex.100</p>
<p>Output description: The maximum number of sodas that can be drunk, and must have... | [
{
"answer_id": 74582990,
"author": "kuro",
"author_id": 5293112,
"author_profile": "https://Stackoverflow.com/users/5293112",
"pm_score": 2,
"selected": true,
"text": "def get_total_cans(n):\n s = n # we can get at least n cans\n while n > 2:\n s += 1\n n -= 3 # 3 exc... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74582909",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20256456/"
] |
74,582,935 | <pre class="lang-py prettyprint-override"><code>input="""
intro: hey,how are you
i am fine
intro:
hey, how are you
Hope you are fine
"""
output= [['hey,how are you i am fine'],['hey, how are you Hope you are fine']]
for text in f:
text = text.strip()
</code></pre>
| [
{
"answer_id": 74582982,
"author": "NameVergessen",
"author_id": 11003343,
"author_profile": "https://Stackoverflow.com/users/11003343",
"pm_score": 0,
"selected": false,
"text": "input.split(\"intro:\") input.splitlines()"
},
{
"answer_id": 74582994,
"author": "Tim Biegeleis... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74582935",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20476327/"
] |
74,582,940 | <p>How do I run a C++ program separately in Visual Studio 2022. I used to use python and Visual Studio Code, but because of my current project, I need to learn C++ and every time I organize all my C++ files in a folder, I get an error that says that I cannot have more than 1 main function in the same project. I underst... | [
{
"answer_id": 74582992,
"author": "Thomas Weller",
"author_id": 480982,
"author_profile": "https://Stackoverflow.com/users/480982",
"pm_score": 2,
"selected": false,
"text": ".exe main() main.cpp main()"
}
] | 2022/11/26 | [
"https://Stackoverflow.com/questions/74582940",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15142630/"
] |
74,582,952 | <p>I have a problem with promised array:
I'm calling inside my switch a function which is loading an array from API
Example:</p>
<pre><code>let sorted = []
let limit = 10
async function loadPage(slcLimit) {
let i
let filter = document.getElementById("show-filter").value
if (sorted.length == 0) {
... | [
{
"answer_id": 74583011,
"author": "Steven Spungin",
"author_id": 5093961,
"author_profile": "https://Stackoverflow.com/users/5093961",
"pm_score": 1,
"selected": false,
"text": "then length sorting then let promisedArray = await Promise.resolve(myFunction())\n .then((realArray)... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74582952",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20206962/"
] |
74,582,956 | <p>I would like to write simple code to filter records in view based on request information (eg. organization the user belongs to).</p>
<p>I started to implemented it as Mixin for Admin views.</p>
<pre><code>class OrganizationPermissionMixin:
def get_queryset(self, request):
query = super().get_queryset(re... | [
{
"answer_id": 74582979,
"author": "Amin",
"author_id": 10281248,
"author_profile": "https://Stackoverflow.com/users/10281248",
"pm_score": 1,
"selected": false,
"text": "...\ndef get_queryset(self, *args, **kwargs):\n request = kwargs.get(\"request\", None)\n if request:\n ... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74582956",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3067485/"
] |
74,582,977 | <p><a href="https://i.stack.imgur.com/J0yZw.png" rel="nofollow noreferrer">https://i.stack.imgur.com/J0yZw.png</a>
This is how it looks for all files with <code>.ts</code>. And in <code>.tsx</code> files it also doesn't work.</p>
<p>Other projects in WebStorm work correct but they're written in <code>.js</code> and <co... | [
{
"answer_id": 74582979,
"author": "Amin",
"author_id": 10281248,
"author_profile": "https://Stackoverflow.com/users/10281248",
"pm_score": 1,
"selected": false,
"text": "...\ndef get_queryset(self, *args, **kwargs):\n request = kwargs.get(\"request\", None)\n if request:\n ... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74582977",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20472862/"
] |
74,583,003 | <p>I am looking to filter a list according to a predicate and also to filter her child list</p>
<pre class="lang-java prettyprint-override"><code>import java.util.ArrayList;
import java.util.List;
import java.util.function.Predicate;
import java.util.stream.Collectors;
class Hotel {
private final String city;
... | [
{
"answer_id": 74583170,
"author": "Alexander Ivanchenko",
"author_id": 17949945,
"author_profile": "https://Stackoverflow.com/users/17949945",
"pm_score": 2,
"selected": false,
"text": "searchHotelRoom() List<Room> Hotel searchHotelRoom() Hotel Room String hotelName Hotel toString() has... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74583003",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9599666/"
] |
74,583,025 | <p>The <a href="https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/nullable-reference-types" rel="nofollow noreferrer">documentation</a> for nullable reference types says:</p>
<blockquote>
<p>The compiler uses those annotations to help you find potential null reference errors in your code.... | [
{
"answer_id": 74583202,
"author": "gsharp",
"author_id": 150967,
"author_profile": "https://Stackoverflow.com/users/150967",
"pm_score": 2,
"selected": true,
"text": "string? myString1 = RemoveDots1(\"Hel.lo\");\nstring myString2 = RemoveDots1(\"Hel.lo\"); // warning: the function might... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74583025",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10807094/"
] |
74,583,078 | <p>fixed div through position:sticky and after scrolling navbar which is fixed overlaps div. How can this be fixed?
Navbar from bootstrap</p>
<p>I am new to frontend, so I used only padding, but it does not look nice, everything is not flat in relation to other blocks
I am new to frontend, so I used only padding, but i... | [
{
"answer_id": 74583202,
"author": "gsharp",
"author_id": 150967,
"author_profile": "https://Stackoverflow.com/users/150967",
"pm_score": 2,
"selected": true,
"text": "string? myString1 = RemoveDots1(\"Hel.lo\");\nstring myString2 = RemoveDots1(\"Hel.lo\"); // warning: the function might... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74583078",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19554644/"
] |
74,583,084 | <p>Why does the C code below output "Difference: 0.000000" ? I need to make calculations with many decimals in one of my university tasks and I don't understand this because I'm new to programming in C. Am I using the correct type? Thanks in advance.</p>
<pre><code>#include <stdio.h>
#include <time.h... | [
{
"answer_id": 74583163,
"author": "Jonathan Leffler",
"author_id": 15168,
"author_profile": "https://Stackoverflow.com/users/15168",
"pm_score": 3,
"selected": true,
"text": "0.000000 %Lf 0.000000 %Le %Lg %.8Lf #include <stdio.h>\n\nint main(void)\n{\n long double a = 1.00000001;\n ... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74583084",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20607214/"
] |
74,583,130 | <p>I have a command that adds all the current roles of a user to a Database (MongoDB).</p>
<p>The code:</p>
<pre><code>def add_roles_to_db(self):
check = cursor.find_one({"_id": self.ctx.author.id})
if check is None:
cursor.insert_one({"_id": self.ctx.author.id, "roles": ... | [
{
"answer_id": 74583163,
"author": "Jonathan Leffler",
"author_id": 15168,
"author_profile": "https://Stackoverflow.com/users/15168",
"pm_score": 3,
"selected": true,
"text": "0.000000 %Lf 0.000000 %Le %Lg %.8Lf #include <stdio.h>\n\nint main(void)\n{\n long double a = 1.00000001;\n ... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74583130",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18380731/"
] |
74,583,138 | <p>Getting this null check error, despite having null safety through out the code.
I'm attaching a git repo
<a href="https://github.com/HidayatBukhari01/Notes-App.git" rel="nofollow noreferrer">https://github.com/HidayatBukhari01/Notes-App.git</a>
can someone please check this code and explain why am i having this erro... | [
{
"answer_id": 74583163,
"author": "Jonathan Leffler",
"author_id": 15168,
"author_profile": "https://Stackoverflow.com/users/15168",
"pm_score": 3,
"selected": true,
"text": "0.000000 %Lf 0.000000 %Le %Lg %.8Lf #include <stdio.h>\n\nint main(void)\n{\n long double a = 1.00000001;\n ... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74583138",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20607455/"
] |
74,583,146 | <p>I am plotting a barchart with two quantitative variables (in two separate columns), a and b, per categorical variables on the x axis. The first 9 categ variables are the months in which certain values had been reached, while the last one is the yearly average, I would like to fill the last two columns (those referri... | [
{
"answer_id": 74583163,
"author": "Jonathan Leffler",
"author_id": 15168,
"author_profile": "https://Stackoverflow.com/users/15168",
"pm_score": 3,
"selected": true,
"text": "0.000000 %Lf 0.000000 %Le %Lg %.8Lf #include <stdio.h>\n\nint main(void)\n{\n long double a = 1.00000001;\n ... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74583146",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20607260/"
] |
74,583,150 | <p>models.py</p>
<pre><code>class Courses(models.Model):
course_name=models.CharField(max_length=50)
course_price=models.IntegerField()
class Exam(models.Model):
exam_name=models.CharField(max_length=101)
course=models.ForeignKey(Courses,on_delete=models.CASCADE,default='python')
exam_time=mod... | [
{
"answer_id": 74583167,
"author": "Willem Van Onsem",
"author_id": 67579,
"author_profile": "https://Stackoverflow.com/users/67579",
"pm_score": 1,
"selected": false,
"text": "course_id def Examadd(request):\n mycourses = Courses.objects.all()\n context = {'mycourses': mycourses}\... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74583150",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20607296/"
] |
74,583,162 | <p>Code I try to copy:
<a href="https://codesandbox.io/s/knhlr?file=/src/index.tsx:0-691" rel="nofollow noreferrer">https://codesandbox.io/s/knhlr?file=/src/index.tsx:0-691</a></p>
<p>Dependencies:
"@next/font": "^13.0.5",
"eslint-config-next": "13.0.4",
"next": "1... | [
{
"answer_id": 74583341,
"author": "Farbod Shabani",
"author_id": 14712252,
"author_profile": "https://Stackoverflow.com/users/14712252",
"pm_score": -1,
"selected": false,
"text": "useEffect"
},
{
"answer_id": 74593389,
"author": "Amirhossein",
"author_id": 11342834,
... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74583162",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18717939/"
] |
74,583,176 | <p>When i introduce the "try" "catch" statements and read the user input for the "choice" variable, the code executes as it should it does not however continue on to the "switch" "case" statement as the "choice" variable is then said to be an unassigned local ... | [
{
"answer_id": 74583220,
"author": "Olivier Jacot-Descombes",
"author_id": 880990,
"author_profile": "https://Stackoverflow.com/users/880990",
"pm_score": 2,
"selected": true,
"text": "catch choice try catch int choice; // Choice is declared here but is not assigned a value.\n\n...\n\ntr... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74583176",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20607495/"
] |
74,583,181 | <p>Hello I have filled a ListView from list on my State Bloc(CustomerGetAllLoadedState) and work fine but now I need to search item from a TextField, I did so:</p>
<p>I declare list:</p>
<pre><code>List<Customer> _customersFromRepo = [];
</code></pre>
<p>this is ListView where intercept to List Global:</p>
<pre><... | [
{
"answer_id": 74583220,
"author": "Olivier Jacot-Descombes",
"author_id": 880990,
"author_profile": "https://Stackoverflow.com/users/880990",
"pm_score": 2,
"selected": true,
"text": "catch choice try catch int choice; // Choice is declared here but is not assigned a value.\n\n...\n\ntr... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74583181",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3021708/"
] |
74,583,196 | <p>I have the following data</p>
<pre class="lang-r prettyprint-override"><code>sim_model = "
x =~ 1.3*x1 + 1.2*x2 + 1.1*x3 + 1.2*x4
y =~ 1*y1 + 1.2*y2 + 1.3*y3 + 0.9*y4
y ~ 0.6*x
"
sim_data = lavaan::simulateData(sim_model)
model = "
x =~ x1 + x2 + x3 + x4
y =~ y1 + y2 + y3 + y4
y ~ x
"
sd_d = data... | [
{
"answer_id": 74583285,
"author": "Kensho",
"author_id": 19577706,
"author_profile": "https://Stackoverflow.com/users/19577706",
"pm_score": 1,
"selected": false,
"text": "\nsim_data |>\n mutate(SDxX1 = sd(x1)*x1,\n SDxX2 = sd(x2)*x2,\n SDxX3 = sd(x3)*x3,\n SDxX... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74583196",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2890129/"
] |
74,583,201 | <p>I'd like to put images with centered text underneath each image in columns, I'd also like to size the images to a specific width and height each and I also want to make it so that when the text gets too long the text gets split into 2 lines, but I dont want it to move the image up and down at the same time. What cod... | [
{
"answer_id": 74583285,
"author": "Kensho",
"author_id": 19577706,
"author_profile": "https://Stackoverflow.com/users/19577706",
"pm_score": 1,
"selected": false,
"text": "\nsim_data |>\n mutate(SDxX1 = sd(x1)*x1,\n SDxX2 = sd(x2)*x2,\n SDxX3 = sd(x3)*x3,\n SDxX... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74583201",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18893803/"
] |
74,583,211 | <pre><code>import { useEffect } from "react";
import jwtDecode from "jwt-decode";
import { useDispatch } from "react-redux";
import { login } from "../redux/user";
import { setCurrentPath } from "../redux/currentpath";
const Login = () => {
const dispatch = useDis... | [
{
"answer_id": 74583624,
"author": "Hassan Baig",
"author_id": 11325852,
"author_profile": "https://Stackoverflow.com/users/11325852",
"pm_score": 1,
"selected": false,
"text": "useEffect(() => {\n if(window.google){\n /* global google */\n window.google.accounts.id.init... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74583211",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20306342/"
] |
74,583,212 | <p>I was wondering how to simplify the following python code. I tried to loop it but it didn't quite work out and I thought there must be a way without repeating the same thing over and over again.</p>
<pre><code>coordinates = [
(9, 2, 17),
(4, 14, 11),
(8, 10, 6),
(2, 7, 0)
]
cdns = coordinates[0][0:2... | [
{
"answer_id": 74583229,
"author": "SollyBunny",
"author_id": 7483019,
"author_profile": "https://Stackoverflow.com/users/7483019",
"pm_score": 1,
"selected": true,
"text": "coordinates = [\n (9, 2, 17),\n (4, 14, 11),\n (8, 10, 6),\n (2, 7, 0)\n]\nnewCnds = [i[:2] for i in c... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74583212",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20607509/"
] |
74,583,244 | <p>I have a dataframe that looks like this:</p>
<pre><code> info_version commits commitdates
18558 17.1.3 42 2017-07-14
20783 17.1.3 57 2017-07-14
20782 17.2.2 57 2017-09-27
18557 17.2.2 42 2017-09-27
18556 17.2.3 42 2017-10-30
20781 17.2.3 ... | [
{
"answer_id": 74583229,
"author": "SollyBunny",
"author_id": 7483019,
"author_profile": "https://Stackoverflow.com/users/7483019",
"pm_score": 1,
"selected": true,
"text": "coordinates = [\n (9, 2, 17),\n (4, 14, 11),\n (8, 10, 6),\n (2, 7, 0)\n]\nnewCnds = [i[:2] for i in c... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74583244",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17192742/"
] |
74,583,263 | <p>I am trying to use Shared Preferences and send my data into another activity. When I click on the registration textview the application crashes and I get the error message</p>
<pre><code>Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.widget.EditText com.google.android.material.t... | [
{
"answer_id": 74583483,
"author": "lawrence",
"author_id": 1257303,
"author_profile": "https://Stackoverflow.com/users/1257303",
"pm_score": 2,
"selected": false,
"text": "setContentView()"
},
{
"answer_id": 74584763,
"author": "cactustictacs",
"author_id": 13598222,
... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74583263",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15897853/"
] |
74,583,264 | <p>When I try to use Axios in serverSideProps I get a strange data value, at first, I thought it was a Redux issue, but no, if I replace Axios with Fetch everything works correctly. Outside of serverSideProps Axios also works well.</p>
<pre><code>export async function getServerSideProps() {
const res = await axios.ge... | [
{
"answer_id": 74583483,
"author": "lawrence",
"author_id": 1257303,
"author_profile": "https://Stackoverflow.com/users/1257303",
"pm_score": 2,
"selected": false,
"text": "setContentView()"
},
{
"answer_id": 74584763,
"author": "cactustictacs",
"author_id": 13598222,
... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74583264",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16891437/"
] |
74,583,273 | <p>I want to pass Array of string values to a string literal as follows</p>
<p>Code :</p>
<pre class="lang-js prettyprint-override"><code>var array = ['1','2556','3','4','5'];
...
...
var output = `
<scr`+`ipt>
window.stringArray = [`+ array +`]
</scr`+`ipt>
`
</code></pre>
<p>Output :</p>
<pre><code>... | [
{
"answer_id": 74583300,
"author": "Lakshya Raj",
"author_id": 14469685,
"author_profile": "https://Stackoverflow.com/users/14469685",
"pm_score": 0,
"selected": false,
"text": "JSON.stringify var array = ['1','2556','3','4','5'];\n\nvar output = `\n<scr`+`ipt>\n window.stringArray = ... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74583273",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16617567/"
] |
74,583,333 | <p>I'm trying to create a class method that can run some code after its execution.</p>
<p>In <code>pytest</code> we have this functionality with <code>fixtures</code>:</p>
<pre class="lang-py prettyprint-override"><code>@pytest.fixture
def db_connection(conn_str: str):
connection = psycopg2.connect(conn_str)
yi... | [
{
"answer_id": 74583385,
"author": "Carcigenicate",
"author_id": 3000206,
"author_profile": "https://Stackoverflow.com/users/3000206",
"pm_score": 2,
"selected": true,
"text": "next database = Database()\ngen = database() # Saved the generator to a variable\nconn = next(gen)\ncur = conn... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74583333",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14153592/"
] |
74,583,353 | <p>I have a dataset like:</p>
<pre><code>year = c("2000", "2000", "2000", "2002", "2000", "2002", "2007")
id = c("X", "X", "X", "X", "Z", "Z", "Z")
product = c("apple", &... | [
{
"answer_id": 74583385,
"author": "Carcigenicate",
"author_id": 3000206,
"author_profile": "https://Stackoverflow.com/users/3000206",
"pm_score": 2,
"selected": true,
"text": "next database = Database()\ngen = database() # Saved the generator to a variable\nconn = next(gen)\ncur = conn... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74583353",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13484989/"
] |
74,583,373 | <p>There is a service is defined as below:</p>
<pre><code>export class MyService {
doSomething(callbacks: { onSuccess: (data: Object) => any, onError: (err: any) => any }) {
// This function does something
}
}
</code></pre>
<p>It is used in a component as below:</p>
<pre><code>export class MyCompo... | [
{
"answer_id": 74583396,
"author": "Cheteel",
"author_id": 20519869,
"author_profile": "https://Stackoverflow.com/users/20519869",
"pm_score": 0,
"selected": false,
"text": "this."
},
{
"answer_id": 74583487,
"author": "pzaenger",
"author_id": 2436655,
"author_profile... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74583373",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3722884/"
] |
74,583,390 | <p>How to refactor this function to a higher order function?</p>
<p>It is meant to return a new array containing the sub-arrays of <strong>characters</strong> that contain the value 'Rambo'.</p>
<pre><code>function isRamboCharacter(characters) {
const x = [];
for (let i = 0; i < characters.length; i++) {
if... | [
{
"answer_id": 74583396,
"author": "Cheteel",
"author_id": 20519869,
"author_profile": "https://Stackoverflow.com/users/20519869",
"pm_score": 0,
"selected": false,
"text": "this."
},
{
"answer_id": 74583487,
"author": "pzaenger",
"author_id": 2436655,
"author_profile... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74583390",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20534662/"
] |
74,583,393 | <p>I wish to order the columns of a dataset in order of decreasing column variance but I have had no luck in doing so. This is what I have so far:</p>
<pre><code>og_data <- og_data[, sort(apply(og_data, 2, var), decreasing=TRUE)]
</code></pre>
<p>Now, I know this doesn't work since <code>sort(apply(og_data, 2, var),... | [
{
"answer_id": 74583396,
"author": "Cheteel",
"author_id": 20519869,
"author_profile": "https://Stackoverflow.com/users/20519869",
"pm_score": 0,
"selected": false,
"text": "this."
},
{
"answer_id": 74583487,
"author": "pzaenger",
"author_id": 2436655,
"author_profile... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74583393",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15198024/"
] |
74,583,402 | <p>I want to print out the average amount of an 2D array column, by filling the matrix with random numbers</p>
<pre><code>#include <stdio.h>
#include <stdlib.h>
int main(void) {
int m = 0;
int n = 0;
int array[m][n];
double ran_num = (double)rand() / RAND_MAX;
double avg_col[] = {0... | [
{
"answer_id": 74583396,
"author": "Cheteel",
"author_id": 20519869,
"author_profile": "https://Stackoverflow.com/users/20519869",
"pm_score": 0,
"selected": false,
"text": "this."
},
{
"answer_id": 74583487,
"author": "pzaenger",
"author_id": 2436655,
"author_profile... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74583402",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20385971/"
] |
74,583,417 | <h4>I need to parse a string, which contains both text content and specific tags.</h4>
<p>Expected result must be an array containing items, with separation between texts and tags.</p>
<h2>An example of string to parse</h2>
<pre><code>There is user [[user-foo]][[/user-foo]] and user [[user-bar]]label[[/user-bar]].
</co... | [
{
"answer_id": 74583396,
"author": "Cheteel",
"author_id": 20519869,
"author_profile": "https://Stackoverflow.com/users/20519869",
"pm_score": 0,
"selected": false,
"text": "this."
},
{
"answer_id": 74583487,
"author": "pzaenger",
"author_id": 2436655,
"author_profile... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74583417",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5908790/"
] |
74,583,419 | <p>I am a at the very beginning of learning to code in python and am following a tutorial. I attempted to convert this string into an integer to get it to simply add 5 and 6. Here is what I have</p>
<p>No matter what I do, I get 5+6 = 56. Here is what I have:</p>
<p>first_num = (input('Please enter a number '))
second_... | [
{
"answer_id": 74583457,
"author": "Aroune",
"author_id": 20521674,
"author_profile": "https://Stackoverflow.com/users/20521674",
"pm_score": 0,
"selected": false,
"text": "first_num = int(input('Please enter a number '))\nsecond_num = int(input('Please enter another number '))\nsum=firs... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74583419",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20607677/"
] |
74,583,468 | <p>i have an html file with some javascript locally offline on my computer and want to enbed an svg favicon in that html file to show up in the browser without the need of an extra <code>favicon.svg</code> file.
is it possible to get this working some how?</p>
<pre><code><html>
<head>
<link rel="... | [
{
"answer_id": 74583854,
"author": "chrwahl",
"author_id": 322084,
"author_profile": "https://Stackoverflow.com/users/322084",
"pm_score": 3,
"selected": true,
"text": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"256\" height=\"256\"\n v... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74583468",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14533222/"
] |
74,583,505 | <p>I have a variable with lists with varied number of elements:</p>
<pre><code>['20', 'M', '10', 'M', '1', 'D', '14', 'M', '106', 'M']
['124', 'M', '19', 'M', '7', 'M']
['19', 'M', '131', 'M']
['3', 'M', '19', 'M', '128', 'M']
['12', 'M', '138', 'M']
</code></pre>
<p>Variable is always number, letter and order matters.... | [
{
"answer_id": 74583528,
"author": "Martijn Pieters",
"author_id": 100297,
"author_profile": "https://Stackoverflow.com/users/100297",
"pm_score": 3,
"selected": true,
"text": ">>> example = ['30', 'M', '1', 'D', '120', 'M']\n>>> example[1::2]\n['M', 'D', 'M']\n [1::2] : [::2] zip() def ... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74583505",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20607709/"
] |
74,583,527 | <p>I am trying to replace items in list of lists by the value of the index of that specific list. I can do it with a for loop, but I was wondering if there is a faster way to do this.</p>
<p>such that the following list</p>
<pre><code>example = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
</code></pre>
<p>becomes:</p>
<pre><code>... | [
{
"answer_id": 74583552,
"author": "sourin",
"author_id": 14912756,
"author_profile": "https://Stackoverflow.com/users/14912756",
"pm_score": 0,
"selected": false,
"text": "example = [[1,2,3],[4,5,6],[7,8,9]]\nsolution = [[x for _ in range(len(example[x]))] for x in range(len(example))]\... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74583527",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20330710/"
] |
74,583,565 | <p>I need to create a pandas dataframe based on 4 txt files with comments (to skip while reading) based on the following structure:</p>
<pre><code># Moteur conçu par le Poly Propulsion Lab (PPL)
nom=Tondeuse
# Propriétés générales
hauteur=0.5
masse=20.0
prix=110.00
# Propriétés du moteur
impulsion specifique=80
</co... | [
{
"answer_id": 74583552,
"author": "sourin",
"author_id": 14912756,
"author_profile": "https://Stackoverflow.com/users/14912756",
"pm_score": 0,
"selected": false,
"text": "example = [[1,2,3],[4,5,6],[7,8,9]]\nsolution = [[x for _ in range(len(example[x]))] for x in range(len(example))]\... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74583565",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20607791/"
] |
74,583,607 | <p>I am training a machine with reinforcements, everything is going well, but the task is to get the number of the game in which 5 victories were won in a row.</p>
<p>The algorithm consists of a loop that calculates 10,000 games, in each of which the agent walks on a frozen lake using 100 steps (for each game). If the ... | [
{
"answer_id": 74583552,
"author": "sourin",
"author_id": 14912756,
"author_profile": "https://Stackoverflow.com/users/14912756",
"pm_score": 0,
"selected": false,
"text": "example = [[1,2,3],[4,5,6],[7,8,9]]\nsolution = [[x for _ in range(len(example[x]))] for x in range(len(example))]\... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74583607",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20371531/"
] |
74,583,639 | <pre><code>char model[10][15] = {"Honda","Audi","Ferrari","Jeep","Toyota","Bugatti","Ford","Jensen","Porsche","Suzuki"};
int price[10][15] = {750000,650000,950000,300000,900000,1000000,400000,750000,300000,800000};
int r... | [
{
"answer_id": 74583552,
"author": "sourin",
"author_id": 14912756,
"author_profile": "https://Stackoverflow.com/users/14912756",
"pm_score": 0,
"selected": false,
"text": "example = [[1,2,3],[4,5,6],[7,8,9]]\nsolution = [[x for _ in range(len(example[x]))] for x in range(len(example))]\... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74583639",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20607912/"
] |
74,583,683 | <p>So I get this error when I run the program. The error is supposed to be at line 11 after the 'try' block but that's exactly how the author of the book I use for learning python displayed it. Can someone help me?</p>
<pre><code>print("Give me two number, and I'll divide them.")
print("Enter 'q' to quit... | [
{
"answer_id": 74583698,
"author": "CreepyRaccoon",
"author_id": 18342123,
"author_profile": "https://Stackoverflow.com/users/18342123",
"pm_score": -1,
"selected": false,
"text": "try while True:\n first_number = input(\"\\nFirst number: \")\n if first_number == 'q':\n brea... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74583683",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20607952/"
] |
74,583,694 | <p>There is a website that stores two videos as a list of thousands of PNGs, 31145 images in total. Is there a way to automate the downloading by generating the URLs? (I have no knowledge in coding.)</p>
<ol>
<li>Here's the 1st video's <a href="https://cf-images.eu-west-1.prod.boltdns.net/v1/jit/719509184001/570e9336-d... | [
{
"answer_id": 74583829,
"author": "Daweo",
"author_id": 10785975,
"author_profile": "https://Stackoverflow.com/users/10785975",
"pm_score": 1,
"selected": false,
"text": "template = 'xxx/%05dms/match/image.png'\nfor i in range(1,11): # limited for brevity sake, adjust as requires\n p... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74583694",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16950238/"
] |
74,583,711 | <p>I am trying to import a class named 'Questions' from my models.py to admin.py
<code>from .models import Questions</code>
I don't understand why we have to use a period in '.models', what does it mean and what exactly is it pin pointing to?</p>
<p>I tried this combinations but it was no avail
<code>from models import... | [
{
"answer_id": 74583829,
"author": "Daweo",
"author_id": 10785975,
"author_profile": "https://Stackoverflow.com/users/10785975",
"pm_score": 1,
"selected": false,
"text": "template = 'xxx/%05dms/match/image.png'\nfor i in range(1,11): # limited for brevity sake, adjust as requires\n p... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74583711",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16523984/"
] |
74,583,735 | <p>I have problem with seeders in laravel 9. The problem is when I want to execute all seeders with commands like php artisan db:seed, php artisan db:fresh and similar commands that should execute all seeders. Seeder are only working when I specify exact class with command like php artisan db:seed --class=UserSeeder an... | [
{
"answer_id": 74583829,
"author": "Daweo",
"author_id": 10785975,
"author_profile": "https://Stackoverflow.com/users/10785975",
"pm_score": 1,
"selected": false,
"text": "template = 'xxx/%05dms/match/image.png'\nfor i in range(1,11): # limited for brevity sake, adjust as requires\n p... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74583735",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17440063/"
] |
74,583,737 | <p>I need to replace each half of an image with the other half:</p>
<p>Starting with this:</p>
<p><a href="https://i.stack.imgur.com/PhRI9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PhRI9.png" alt="Original" /></a></p>
<p>Ending with this:</p>
<p><a href="https://i.stack.imgur.com/aSY0t.png" rel... | [
{
"answer_id": 74583874,
"author": "arsho",
"author_id": 3129414,
"author_profile": "https://Stackoverflow.com/users/3129414",
"pm_score": 2,
"selected": false,
"text": "from PIL import Image\noutput_image = 'test.png'\nim = Image.open(\"input.png\")\nw, h = im.size\nleft_x = int(w / 2) ... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74583737",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20518918/"
] |
74,583,758 | <p>(Problem solved, I will accept my answer in 2 days when the system allows me to).</p>
<p><a href="https://i.stack.imgur.com/SER2B.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SER2B.png" alt="enter image description here" /></a></p>
<p>I have a background applied to all of my <code>div</code> el... | [
{
"answer_id": 74583960,
"author": "kushagra-aa",
"author_id": 14001385,
"author_profile": "https://Stackoverflow.com/users/14001385",
"pm_score": 0,
"selected": false,
"text": "background-color: transparent !important; .options background-color: cyan !important; .options cyan * {\n pad... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74583758",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18884489/"
] |
74,583,770 | <p>Those are the array models:</p>
<pre><code>struct UserModel: Codable {
var userid: Int
var nickname: String
}
struct UserModelSplit: Codable {
var usr: [UserModel]
}
</code></pre>
<p>Initialising them:</p>
<pre><code>@State private var users = [UserModel]()
@State private var userSplit = [UserModelSplit... | [
{
"answer_id": 74583960,
"author": "kushagra-aa",
"author_id": 14001385,
"author_profile": "https://Stackoverflow.com/users/14001385",
"pm_score": 0,
"selected": false,
"text": "background-color: transparent !important; .options background-color: cyan !important; .options cyan * {\n pad... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74583770",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19559647/"
] |
74,583,787 | <p>I have been through many similar QnAs on StackOverflow but I am still confused about why it does not work for me. I understand that state update is not synchronous. Also I am not performing any DOM manipulation.</p>
<p>The full working demo here which demonstrates the issue - <a href="https://codesandbox.io/s/fallin... | [
{
"answer_id": 74584411,
"author": "Azzy",
"author_id": 2122822,
"author_profile": "https://Stackoverflow.com/users/2122822",
"pm_score": 0,
"selected": false,
"text": "let tabId = 1;\n\nconst DisplayTable = ({ isNewMode, name, ...rest }) => {\n return (\n <div>\n {isNewMode ? (... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74583787",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/137893/"
] |
74,583,788 | <p>I made multiple v-model binding in vue 3. but got some probel in code quality when i must code emit value function repeating with 90% the function code is same. Is this possible to refactoring this code</p>
<pre class="lang-js prettyprint-override"><code><script lang="ts" setup>
const props = defineP... | [
{
"answer_id": 74586519,
"author": "anas laaroussi",
"author_id": 12469248,
"author_profile": "https://Stackoverflow.com/users/12469248",
"pm_score": 0,
"selected": false,
"text": "<script lang=\"ts\" setup>\nconst props = defineProps({\n firstName: String,\n lastName: String,\n first... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74583788",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12871038/"
] |
74,583,790 | <p>So basically I am trying to compare two lists to see if they hold the same value at the same index at any point. If they do I return the index, if they do not, I return -1.</p>
<p>When I had first done this as a test I was having no issues however adding in the text has made it more difficult and my main issue is wi... | [
{
"answer_id": 74583931,
"author": "ep742",
"author_id": 13441010,
"author_profile": "https://Stackoverflow.com/users/13441010",
"pm_score": 1,
"selected": true,
"text": "enumerate zip Dlist = [17,13,10,6,2]\nIlist = [5,9,10,15,18]\n\ndef seqsearch(DS,IS):\n for idx, (d, s) in enumera... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74583790",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15346274/"
] |
74,583,792 | <p>Is it possible to create a dynamic C array which works for all types. In this instance the dynamicArr would have to work for both struct1 and struct. What should the type of <code>structuretype</code> be to work for both struct1 and struct2 depending on the user initialization?</p>
<pre class="lang-c prettyprint-ove... | [
{
"answer_id": 74583872,
"author": "Monique Shaqiri",
"author_id": 20414674,
"author_profile": "https://Stackoverflow.com/users/20414674",
"pm_score": 1,
"selected": false,
"text": "typedef struct { \n void *dataStructure; \n int size; \n int numElements; \n} dynamicArray; \n \ndyn... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74583792",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13787037/"
] |
74,583,876 | <p>I would like to delete all the elements from list of lists that appear more than once and am looking for a smoother solution than this:
<a href="https://stackoverflow.com/questions/46018429/removing-duplicate-elements-from-list-of-lists-in-prolog">Removing Duplicate Elements from List of Lists in Prolog</a></p>
<p>I... | [
{
"answer_id": 74584145,
"author": "user19077881",
"author_id": 19077881,
"author_profile": "https://Stackoverflow.com/users/19077881",
"pm_score": 3,
"selected": true,
"text": "from collections import Counter\n\nmylist = [\n[1, 3, 4, 5, 77],\n[1, 5, 10, 3, 4],\n[1, 5, 100, 3, 4], \n[1, ... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74583876",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20051041/"
] |
74,583,954 | <p>I have a large dataset in which I want to group similar resistance patterns together. A plot to visualize similarity of resistance pattern is needed.</p>
<pre><code>
dat <- read.table(text="Id Resistance.Pattern
A SSRRSSSSR
B SSSRSSSSR
C RRRRSSRRR
D SSSSSSSSS
E SSRSSSSSR
F S... | [
{
"answer_id": 74584345,
"author": "Allan Cameron",
"author_id": 12500315,
"author_profile": "https://Stackoverflow.com/users/12500315",
"pm_score": 1,
"selected": false,
"text": "library(tidyverse)\n\np <- strsplit(dat$Resistance.Pattern, \"\")\n\ndo.call(rbind, lapply(p, \\(x) c(x, rep... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74583954",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19965337/"
] |
74,583,974 | <p>I'm trying to create a carousel component that has n amount of child components based on whatever size list it will get. I want the parent (carousel) to control the styling for children as it manipulates the size of the list and track the indexes to rotate items around the carousel and style accordingly. There will ... | [
{
"answer_id": 74584345,
"author": "Allan Cameron",
"author_id": 12500315,
"author_profile": "https://Stackoverflow.com/users/12500315",
"pm_score": 1,
"selected": false,
"text": "library(tidyverse)\n\np <- strsplit(dat$Resistance.Pattern, \"\")\n\ndo.call(rbind, lapply(p, \\(x) c(x, rep... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74583974",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13059486/"
] |
74,583,998 | <p>I have a simple question in python. How can I store arrays inside a tuple in Python. For example:</p>
<p>I want the output of my code to be like this:</p>
<pre><code>bnds = ((0, 1), (0, 1), (0, 1), (0, 1))
</code></pre>
<p>So I want <code>(0, 1)</code> to be repeated for a specific number of times inside a tuple!</p... | [
{
"answer_id": 74584026,
"author": "Riya",
"author_id": 19674402,
"author_profile": "https://Stackoverflow.com/users/19674402",
"pm_score": 2,
"selected": true,
"text": "g = []\nb1 = (0, 1)\n\nfor i in range(4):\n g.append(b1)\ng = tuple(g)\nprint(g)\n"
},
{
"answer_id": 74584... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74583998",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19585524/"
] |
74,584,045 | <p>I'm following the <a href="https://firebase.google.com/docs/storage/web/download-files?hl=es-419" rel="nofollow noreferrer">firebase documentation</a> for web to download the files related to a document in firestore. I practically pasted the code to achieve this, but when I click the element is not showing anything ... | [
{
"answer_id": 74584026,
"author": "Riya",
"author_id": 19674402,
"author_profile": "https://Stackoverflow.com/users/19674402",
"pm_score": 2,
"selected": true,
"text": "g = []\nb1 = (0, 1)\n\nfor i in range(4):\n g.append(b1)\ng = tuple(g)\nprint(g)\n"
},
{
"answer_id": 74584... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74584045",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14598570/"
] |
74,584,070 | <p>I want to save canvas image as a bitmap to be able to later use it in drawImage.</p>
<p>Goal is to be able to change (eg. resize) canvas and keep it's contents (eg. scaled - canvas is always a square).</p>
<p>I tried:
<code>var tmp = createImageBitmap(canvas)</code>
<code>ctx.drawImage(tmp,0,0)</code></p>
<p>What I ... | [
{
"answer_id": 74584148,
"author": "kayahr",
"author_id": 274473,
"author_profile": "https://Stackoverflow.com/users/274473",
"pm_score": 3,
"selected": true,
"text": "await const img = await createImageBitmap(canvas);\nctx.drawImage(img, 0, 0);\n await createImageBitmap(canvas).then(img... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74584070",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20085898/"
] |
74,584,077 | <p>I am trying to write two logic for <code>WG_SHIP_ADDR_TYPE</code> key in my input. if the value was <code>2</code>, I want add <code>shipToAddress</code> object and otherwise I want add <code>WG_SHIP_ADDR_TYPE</code> value to <code>shipToAddressType</code> key.</p>
<p>So how do I use both the logic in JOLT?</p>
<p>A... | [
{
"answer_id": 74584148,
"author": "kayahr",
"author_id": 274473,
"author_profile": "https://Stackoverflow.com/users/274473",
"pm_score": 3,
"selected": true,
"text": "await const img = await createImageBitmap(canvas);\nctx.drawImage(img, 0, 0);\n await createImageBitmap(canvas).then(img... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74584077",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20530341/"
] |
74,584,078 | <p>Having the following problem. I'm reading the data from stdin and save it in list that I convert to tuple the following way:</p>
<pre><code>x = int(input())
f = []
for i in range(x):
a, b = map(int, input().split())
f.append([a,b])
def to_tuple(lst):
return tuple(to_tuple(i) if isinstance(i, list) else... | [
{
"answer_id": 74584148,
"author": "kayahr",
"author_id": 274473,
"author_profile": "https://Stackoverflow.com/users/274473",
"pm_score": 3,
"selected": true,
"text": "await const img = await createImageBitmap(canvas);\nctx.drawImage(img, 0, 0);\n await createImageBitmap(canvas).then(img... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74584078",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3079439/"
] |
74,584,083 | <p>can someone teach me on how to auto fill an select box based on the selection from the other select box?</p>
<p>this is my first selection wherein the user will select in Orderlist Code.</p>
<pre><code> <div class="form-group">
<label for="gross_amount" class="col-sm-2 control-... | [
{
"answer_id": 74584148,
"author": "kayahr",
"author_id": 274473,
"author_profile": "https://Stackoverflow.com/users/274473",
"pm_score": 3,
"selected": true,
"text": "await const img = await createImageBitmap(canvas);\nctx.drawImage(img, 0, 0);\n await createImageBitmap(canvas).then(img... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74584083",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14393948/"
] |
74,584,137 | <p>I got a dataframe with a date/time in seconds, which I changed by:</p>
<pre><code>df["start"] = pd.to_datetime(df["start"], unit='s')
df["time"] = df["start"].dt.time
</code></pre>
<p>Now I would like to add a column df["timeofday"], which include the time of da... | [
{
"answer_id": 74584148,
"author": "kayahr",
"author_id": 274473,
"author_profile": "https://Stackoverflow.com/users/274473",
"pm_score": 3,
"selected": true,
"text": "await const img = await createImageBitmap(canvas);\nctx.drawImage(img, 0, 0);\n await createImageBitmap(canvas).then(img... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74584137",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15215291/"
] |
74,584,181 | <p>i have problem with onClick function on element in React.</p>
<pre><code> const [selectedGenre, updateSelectedGenre] = React.useState("s");
function update(genre) {
updateSelectedGenre(genre);
console.log(selectedGenre);
}
const Genres = (genreIds) => {
return genreIds.map((genreId, i... | [
{
"answer_id": 74584148,
"author": "kayahr",
"author_id": 274473,
"author_profile": "https://Stackoverflow.com/users/274473",
"pm_score": 3,
"selected": true,
"text": "await const img = await createImageBitmap(canvas);\nctx.drawImage(img, 0, 0);\n await createImageBitmap(canvas).then(img... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74584181",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7744142/"
] |
74,584,190 | <p>This is one of those questions where there are so many answers, and yet none do the specific thing.</p>
<p>I tried to look at all of these posts —
<a href="https://stackoverflow.com/questions/54244461/dynamically-allocating-memory-for-2d-char-array">1</a> <a href="https://stackoverflow.com/questions/17389009/a-diffe... | [
{
"answer_id": 74584274,
"author": "wohlstad",
"author_id": 18519921,
"author_profile": "https://Stackoverflow.com/users/18519921",
"pm_score": 1,
"selected": false,
"text": "W H int H W int * a = malloc(W * H * sizeof(int));\n int val = a[j * W + i];\na[j * W + i] = val;\n W"
},
{
... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74584190",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20314114/"
] |
74,584,195 | <p>I am facing a problem, I can't extract data from just one array - temperature. I tried to put it into another array, but all I managed to do was put there all the data. Any advice? Thank you in advance!</p>
<blockquote>
<p>Console output of the function I use:
{
latitude: 51.75,
longitude: 19.5,
generationtime_ms: 0... | [
{
"answer_id": 74584274,
"author": "wohlstad",
"author_id": 18519921,
"author_profile": "https://Stackoverflow.com/users/18519921",
"pm_score": 1,
"selected": false,
"text": "W H int H W int * a = malloc(W * H * sizeof(int));\n int val = a[j * W + i];\na[j * W + i] = val;\n W"
},
{
... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74584195",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20608333/"
] |
74,584,304 | <p>As per the Headless service definition:</p>
<blockquote>
<p>Kubernetes allows clients to discover pod IPs through DNS lookups. Usually, when you perform a DNS lookup for a service, the DNS server returns a single IP which is the service’s cluster IP. But if you don’t need the cluster IP for your service, you can set... | [
{
"answer_id": 74590161,
"author": "David Maze",
"author_id": 10008173,
"author_profile": "https://Stackoverflow.com/users/10008173",
"pm_score": 1,
"selected": false,
"text": "deployment-name-12345678-abcde replicas:"
}
] | 2022/11/26 | [
"https://Stackoverflow.com/questions/74584304",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12425757/"
] |
74,584,324 | <p>i have this table that has some data, but i want to get the row where a paticular coluom <code>votecount</code> has the highest value:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>id</th>
<th>votecount</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>0</td>
</tr>
<tr>
<td>2</td>
<td>1<... | [
{
"answer_id": 74584384,
"author": "Roby Raju Oommen",
"author_id": 14399782,
"author_profile": "https://Stackoverflow.com/users/14399782",
"pm_score": 1,
"selected": true,
"text": "$selectr = \"SELECT * from `audio` where `votecount` = ( SELECT MAX(`votecount`) from `audio`)\"; \n$stmt ... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74584324",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19138572/"
] |
74,584,329 | <p>I want to create a random <code>Matrix</code> with values of zeros and ones. With this presumption, there will be more zeros instead of ones! So I guess there should be something like a weighted Bernoulli distribution to choose between 0 or 1 each time (and more probability for choosing 0). I prefer not to limit it ... | [
{
"answer_id": 74584464,
"author": "Alexander L. Hayes",
"author_id": 12439119,
"author_profile": "https://Stackoverflow.com/users/12439119",
"pm_score": 3,
"selected": false,
"text": "p = 0.5 julia> using Distributions\n\njulia> rand(Binomial(), 3, 5)\n3×5 Matrix{Int64}:\n 1 1 1 1 1... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74584329",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11747148/"
] |
74,584,372 | <p>I am new to C and I am learning how to add a line break. Although it's easy, I haven't been able to figure out how to do it after a variable, taking into account that it's at the end of the line.</p>
<p>This is the code with the error, as you can see, I added '\n' after varA and varB</p>
<pre><code>#include <stdi... | [
{
"answer_id": 74584392,
"author": "Gnought",
"author_id": 294577,
"author_profile": "https://Stackoverflow.com/users/294577",
"pm_score": 1,
"selected": false,
"text": "#include <stdio.h>\n\nint main(void)\n{\n char varA = 10;\n int varB = 150;\n float varC = 1.25;\n\n pr... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74584372",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17423323/"
] |
74,584,385 | <p>I have just a simple message page which consists of From: Text: and a Submit button, then I have another page, which contains nothing, it's my "Message Board" the most recent posted message goes on top of the board, both are aspx pages with master page.</p>
<p>I have a SQL DB, I'm already assuming there wi... | [
{
"answer_id": 74584392,
"author": "Gnought",
"author_id": 294577,
"author_profile": "https://Stackoverflow.com/users/294577",
"pm_score": 1,
"selected": false,
"text": "#include <stdio.h>\n\nint main(void)\n{\n char varA = 10;\n int varB = 150;\n float varC = 1.25;\n\n pr... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74584385",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20522538/"
] |
74,584,404 | <p>Implement the function most_popular_character(my_string), which gets the string argument my_string and returns its most frequent letter. In case of a tie, break it by returning the letter of smaller ASCII value.
Note that lowercase and uppercase letters are considered different (e.g., ‘A’ < ‘a’). You may assume m... | [
{
"answer_id": 74584515,
"author": "solac34",
"author_id": 20554831,
"author_profile": "https://Stackoverflow.com/users/20554831",
"pm_score": 0,
"selected": false,
"text": "def most_popular_character(my_string):\n history_l = [l for l in my_string] #each letter in string\n char_dict... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74584404",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20486728/"
] |
74,584,415 | <p>How to make sure that part of the pattern (keyword in this case) is in the pattern you're looking for, but it can appear in different places. I want to have a match only when it occurs at least once.</p>
<p><strong>Regex</strong>:</p>
<pre><code> \b(([0-9])(xyz)?([-]([0-9])(xyz)?)?)\b
</code></pre>
<p>We only want t... | [
{
"answer_id": 74584493,
"author": "Wiktor Stribiżew",
"author_id": 3832970,
"author_profile": "https://Stackoverflow.com/users/3832970",
"pm_score": 1,
"selected": false,
"text": "\\b([0-9])(xyz)?(?:-([0-9])(xyz)?)?\\b(?(2)|(?(4)|(?!)))\n \\b ([0-9]) (xyz)? xyz (?:-([0-9])(xyz)?)? - xyz... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74584415",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19601467/"
] |
74,584,424 | <p>I have been using typescript for a little while in node.js projects. I understand that for many npm packages there is separate @types package for typescript type definitions.</p>
<p>My question is: how can I know that the @types package is up to date with the latest version of the actual package when they are mainta... | [
{
"answer_id": 74584493,
"author": "Wiktor Stribiżew",
"author_id": 3832970,
"author_profile": "https://Stackoverflow.com/users/3832970",
"pm_score": 1,
"selected": false,
"text": "\\b([0-9])(xyz)?(?:-([0-9])(xyz)?)?\\b(?(2)|(?(4)|(?!)))\n \\b ([0-9]) (xyz)? xyz (?:-([0-9])(xyz)?)? - xyz... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74584424",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13277644/"
] |
74,584,445 | <p>I have a huge list like this. I want to remove the lines that have only numbers. How can I do that?
I'm using <strong>Notepad++</strong>. So, if possible, please give me a solution that will work on <strong>Notepad++</strong></p>
<p><strong>List:</strong></p>
<pre><code>dog.belt.b79
dog.food
7902823429
dog.hoodie.72... | [
{
"answer_id": 74584583,
"author": "help-info.de",
"author_id": 1981088,
"author_profile": "https://Stackoverflow.com/users/1981088",
"pm_score": 1,
"selected": false,
"text": "^\\d+\\R NOTHING"
},
{
"answer_id": 74593134,
"author": "Andrej Kesely",
"author_id": 10035985,... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74584445",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13776038/"
] |
74,584,494 | <pre><code>u = []
n = 3
for i in range(0,n):
u[i] = n - i
u.append(u[i])
print(u)
</code></pre>
<p>I am creating an array as u = [0 n-2 n-1....1]. I tried with above code and I cant find my mistake here.</p>
| [
{
"answer_id": 74584583,
"author": "help-info.de",
"author_id": 1981088,
"author_profile": "https://Stackoverflow.com/users/1981088",
"pm_score": 1,
"selected": false,
"text": "^\\d+\\R NOTHING"
},
{
"answer_id": 74593134,
"author": "Andrej Kesely",
"author_id": 10035985,... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74584494",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20608660/"
] |
74,584,534 | <p>I am attempting to set up the Vite project configuration shown in Thomas Findlay's book "React The Road To Enterprise." I am trying to configure absolute imports (2.2.7)</p>
<p>When I run <code>pnpm run dev</code> or <code>npm run dev</code> the dev server gives this error referencing <code>stylelint</code... | [
{
"answer_id": 74584794,
"author": "Jay F.",
"author_id": 20504019,
"author_profile": "https://Stackoverflow.com/users/20504019",
"pm_score": 2,
"selected": true,
"text": "type: \"module\""
}
] | 2022/11/26 | [
"https://Stackoverflow.com/questions/74584534",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5633198/"
] |
74,584,553 | <p>I have a large dataframe with rows that have duplicated first three columns (UnionChr, UnionStart, UnionEnd) and the remaining columns differ in values.</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>UnionChr</th>
<th>UnionStart</th>
<th>UnionEnd</th>
<th>IntersectChr</th>
<th>Intersect... | [
{
"answer_id": 74584612,
"author": "akrun",
"author_id": 3732271,
"author_profile": "https://Stackoverflow.com/users/3732271",
"pm_score": 3,
"selected": true,
"text": "library(dplyr)\nlibrary(tidyr)\ndf %>% \n mutate(PeakType = na_if(PeakType, \"N/A\"),\n indx = is.na(PeakType))... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74584553",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17053500/"
] |
74,584,598 | <p>I have following React component:</p>
<p><code>App.tsx:</code></p>
<pre><code>function App() {
const [countdownTimers, setCountdownTimers] = React.useState<
Map<number, number>
>(new Map([[1, 60]]));
useEffect(() => {
const timeoutId = setInterval(() => {
se... | [
{
"answer_id": 74584673,
"author": "CertainPerformance",
"author_id": 9515207,
"author_profile": "https://Stackoverflow.com/users/9515207",
"pm_score": 2,
"selected": true,
"text": "setCountdownTimers((prevState) => {\n console.log(prevState);\n for (const [timerKey, timer] of prev... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74584598",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7374141/"
] |
74,584,614 | <h2>Explanation</h2>
<p>I'm working with <code>react-select</code> and want to generate the <code>options</code> array which would be passed to the <code>react-select</code> component.</p>
<p>The options array is of the type:</p>
<pre><code>type TOptions = { value: string; label: string }[]
</code></pre>
<p>I get the d... | [
{
"answer_id": 74584673,
"author": "CertainPerformance",
"author_id": 9515207,
"author_profile": "https://Stackoverflow.com/users/9515207",
"pm_score": 2,
"selected": true,
"text": "setCountdownTimers((prevState) => {\n console.log(prevState);\n for (const [timerKey, timer] of prev... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74584614",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9162851/"
] |
74,584,642 | <p>How can I write a JavaScript object inside of an array that is inside a JSON file?
What I mean is: I'm making a Discord (message app) BOT, when the user uses the command "/add" the BOT will ask for 2 inputs, a "name" and an "artist" both this inputs make up a song so I'm creating an obj... | [
{
"answer_id": 74584656,
"author": "Ronnie Royston",
"author_id": 4797603,
"author_profile": "https://Stackoverflow.com/users/4797603",
"pm_score": 0,
"selected": false,
"text": ".push var arr = [];\narr.push(123);\narr.push({a:1,b:2});\narr.push(null);\narr.push(\"string\");\nconsole.di... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74584642",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20287603/"
] |
74,584,661 | <p>Is anyone else receiving a moduleNotFoundError with their requests library? Not sure why this is happening. The library is installed as well which is even more confusing.</p>
<pre class="lang-py prettyprint-override"><code>
import csv
from datetime import datetime
import requests
from bs4 import BeautifulSoup
</cod... | [
{
"answer_id": 74584656,
"author": "Ronnie Royston",
"author_id": 4797603,
"author_profile": "https://Stackoverflow.com/users/4797603",
"pm_score": 0,
"selected": false,
"text": ".push var arr = [];\narr.push(123);\narr.push({a:1,b:2});\narr.push(null);\narr.push(\"string\");\nconsole.di... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74584661",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20480131/"
] |
74,584,679 | <p>In Node js, trying to fetch data using Axios Get from any URL. For example: [Json Place Holder]
<a href="https://jsonplaceholder.typicode.com/users" rel="nofollow noreferrer">https://jsonplaceholder.typicode.com/users</a></p>
<p>.The response.data() is returning special characters. Tried to use the same request from... | [
{
"answer_id": 74585119,
"author": "Bench Vue",
"author_id": 8054998,
"author_profile": "https://Stackoverflow.com/users/8054998",
"pm_score": 2,
"selected": false,
"text": "const axios = require(\"axios\");\nasync function getData() {\n const resp = await axios.get(\n \"https:... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74584679",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12851971/"
] |
74,584,683 | <h2>Background</h2>
<p>I am making a custom control that has multiple ListBox's. I want to make this control MVVM compliant, so I am keeping any XAML and the code behind agnostic with respect to any ViewModel. One ListBox is simply going to be a list of TextBox's while the other is going to have a canvas as the host to... | [
{
"answer_id": 74586279,
"author": "BionicCode",
"author_id": 3141792,
"author_profile": "https://Stackoverflow.com/users/3141792",
"pm_score": 0,
"selected": false,
"text": "ItemsSource ListBox IList IEnumerable IList ItemTemplate DataTemplate ListBox.ItemTemplate ItemsSource DataTempla... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74584683",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5326068/"
] |
74,584,690 | <p>In my <code>nodeJs</code> code I make a REST call to a 3rd party api and one of the values in the response is a string value e.g:</p>
<pre><code> "total": "-15"
</code></pre>
<p>Note that this value can either be a negative number, zero or a positive number, but as a string.</p>
<p>e.g:</p>
<pre... | [
{
"answer_id": 74584791,
"author": "Yasio",
"author_id": 9488284,
"author_profile": "https://Stackoverflow.com/users/9488284",
"pm_score": 2,
"selected": false,
"text": "const toText = (value) => {\n const parsed = parseInt(value)\n return parsed > 0 ? `${parsed} over` : parsed < 0 ?... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74584690",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12268910/"
] |
74,584,693 | <p>I am aware that it is discouraged to plot 2 separate y-axes on a single plot, and that it can be confusing and misleading.</p>
<p>Is there a way to match the values of the Y axis ? Such as finding a way to shift the right Y axis data within the graph (?)
For example, I would like 40 in the left Y axis to match -1 i... | [
{
"answer_id": 74585813,
"author": "AndS.",
"author_id": 9778513,
"author_profile": "https://Stackoverflow.com/users/9778513",
"pm_score": 2,
"selected": true,
"text": "library(tidyverse)\n\ndat |>\n mutate(SPEI = (SPEI+(25/15))*15)|>\n pivot_longer(VCI:SPEI) |>\n mutate(name = factor... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74584693",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16964076/"
] |
74,584,717 | <p>I need to instantiate an object using iterable with multiple objects inside. I have to create another method to do it</p>
<pre><code>class MyClass:
def __init__(self, *args):
self.args = args
def instantiate_from_iterable
#some clever code
</code></pre>
<p>I need to have a result like this</p>
<pre><... | [
{
"answer_id": 74584760,
"author": "Grzegorz Skibinski",
"author_id": 11610186,
"author_profile": "https://Stackoverflow.com/users/11610186",
"pm_score": 2,
"selected": false,
"text": "classmethod from collections.abc import Iterable\n\nclass MyClass:\n def __init__(self, *args):\n ... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74584717",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20608809/"
] |
74,584,719 | <p>I'm trying to add a variable to a className and need to append a percentage for it to work. For example the following works:</p>
<pre><code>className="scale-x-[35%]"
</code></pre>
<p>But the following doesn't:</p>
<pre><code>className={`scale-x-[${variableNumber}%]`}
</code></pre>
<p>What would be the corr... | [
{
"answer_id": 74584865,
"author": "Karim Elghamry",
"author_id": 10853255,
"author_profile": "https://Stackoverflow.com/users/10853255",
"pm_score": -1,
"selected": false,
"text": "10 scale className={`scale-x-[${percentage1}]`}\n 0 1"
},
{
"answer_id": 74586856,
"author": "... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74584719",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15018688/"
] |
74,584,726 | <p>I want to find duplicate directories from a list of dictionaries and delete one of them but it's generating an error. name, age, group only all 3 should be same values to take it as duplicate dictionary. Without append to a new list of dictionaries</p>
<pre><code>a = [
{"name": "Tom", "age... | [
{
"answer_id": 74584766,
"author": "I'mahdi",
"author_id": 1740577,
"author_profile": "https://Stackoverflow.com/users/1740577",
"pm_score": 2,
"selected": false,
"text": "dict tuple set list dict a = [\n {\"name\": \"Tom\", \"age\": 21,\"group\":\"sdd\",\"points\":0},\n {\"name\": \"M... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74584726",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20095556/"
] |
74,584,770 | <p>I'm trying to build a login form, and one of the fields accepts both email and text(username). What type should I use for my input?</p>
| [
{
"answer_id": 74584766,
"author": "I'mahdi",
"author_id": 1740577,
"author_profile": "https://Stackoverflow.com/users/1740577",
"pm_score": 2,
"selected": false,
"text": "dict tuple set list dict a = [\n {\"name\": \"Tom\", \"age\": 21,\"group\":\"sdd\",\"points\":0},\n {\"name\": \"M... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74584770",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15611155/"
] |
74,584,790 | <p>I am quite new to R. I have few text (.txt) files in a folder that have been converted from PDF with page break character (#12). I need to produce a data frame by reading these text files in R with condition that one row in R represents one PDF page. It means that every time there is a page break (\f), it will only ... | [
{
"answer_id": 74584845,
"author": "dcsuka",
"author_id": 19512611,
"author_profile": "https://Stackoverflow.com/users/19512611",
"pm_score": 1,
"selected": true,
"text": "library(tidyverse)\nread_file(\"mytxt.txt\") %>%\n str_split(\"␌\") %>%\n unlist() %>%\n as_tibble_col(\"data\")\... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74584790",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12190512/"
] |
74,584,803 | <p>I want to create a new post using PostCreateView and go to the details page of the new post in the next step, but I get this error:</p>
<p>(The view post.views.view didn't return an HttpResponse object. It returned None instead.)</p>
<p>views</p>
<pre><code>class PostDetailView(View):
"""see detai... | [
{
"answer_id": 74584845,
"author": "dcsuka",
"author_id": 19512611,
"author_profile": "https://Stackoverflow.com/users/19512611",
"pm_score": 1,
"selected": true,
"text": "library(tidyverse)\nread_file(\"mytxt.txt\") %>%\n str_split(\"␌\") %>%\n unlist() %>%\n as_tibble_col(\"data\")\... | 2022/11/26 | [
"https://Stackoverflow.com/questions/74584803",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17601745/"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.