question_id
int64
37.6M
73.2M
input_text
stringlengths
88
52.4k
output_text
stringlengths
37
35.6k
title
stringlengths
15
150
tags
stringlengths
1
107
q_score
int64
-19
397
view_count
int64
3
879k
answer_count
int64
1
21
accepted_answer_id
int64
37.6M
73.8M
answer_id
int64
37.6M
73.8M
a_score
int64
-5
1.29k
is_accepted
bool
1 class
creation_date
stringlengths
20
24
input_text_instruct
stringlengths
251
52.6k
72,842,343
Function's return "looses" its value after exiting function<p>I have written this code to make a temperature converter and challenged myself to only use functions but I don't quite understand what is happening with the returned value.</p> <p>The problem starts when I enter a wrong value like &quot;celsiuss&quot; or &qu...
<p>I suggest you don't recursively call the same function until user enters a legitimate option. instead use a loop and return value to the calling code only when the input option is valid. Code example below:</p> <pre><code>Celsius = 1 Farenheit = 2 Kelvin = 3 def inputUnitSelection(): while True: unitInp...
Function's return "looses" its value after exiting function
python|recursion|return
1
75
4
72,842,376
72,842,376
2
true
2022-07-02T20:50:34.217Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Function's return "looses" its value after exiting function<p>I have written this code to make a temperature converter and challenged myself to only use func...
72,992,437
ASP.NET Core MVC works only with Json-Files with 1 object in it<p><strong>I am not sure how to explain my problem corectly but I will try my best.</strong> <br /> My MVC accepts Json-Files like this one</p> <pre><code>{ &quot;userId&quot;: 1, &quot;id&quot;: 1, &quot;title&quot;: &quot;delectus aut autem&quot;, ...
<p>If you want only two (generic) JSON models, you need use:</p> <pre><code>var _todoData = JsonConvert.DeserializeObject&lt;List&lt;&gt;&gt;(json) </code></pre> <p>In this case, <code>_todoData</code> will be a list.</p> <p>Then, in your view, you need use <code>_todoData</code>, and in your HTML, <code>tr</code> need...
ASP.NET Core MVC works only with Json-Files with 1 object in it
c#|arrays|json.net|asp.net-core-mvc
-1
75
3
72,992,682
72,992,682
2
true
2022-07-15T10:14:55.823Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: ASP.NET Core MVC works only with Json-Files with 1 object in it<p><strong>I am not sure how to explain my problem corectly but I will try my best.</strong> <...
72,929,188
How to monkeypatch requests to save the responses?<p>I have a package with a bunch of classes that act as wrappers for other systems. For example:</p> <pre><code># mysystem.py import requests class MySystem(): def __init__(self): self.session = requests.session() def login(self, username, password): ...
<p>It seems like you want to do a record/replay of the network calls and responses.</p> <p>I know a couple of libraries you can use:</p> <ul> <li><a href="https://pypi.org/project/pytest-automock/" rel="nofollow noreferrer">pytest-automock</a></li> <li><a href="https://vcrpy.readthedocs.io/en/latest/usage.html" rel="no...
How to monkeypatch requests to save the responses?
python|python-requests|pytest|monkeypatching|python-responses
0
75
1
72,929,598
72,929,598
2
true
2022-07-10T14:20:24.813Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to monkeypatch requests to save the responses?<p>I have a package with a bunch of classes that act as wrappers for other systems. For example:</p> <pre><...
72,857,958
Add duration to DateTime in JavaScript<p>I have an array of dates:</p> <pre><code>dates: [ { start: '30.05.2022 02:30:00', end: '30.05.2022 03:30:00' } , { start: '30.05.2022 02:34:01', end: '3.06.2022 04:34:01' } ] </code></pre> <p>What I want is to make the start of the second item of an array to be the end...
<p>&quot;<em>simply</em>&quot; do ( first version. before the OP further clarified his original question )</p> <p><div class="snippet" data-lang="js" data-hide="true" data-console="true" data-babel="false"> <div class="snippet-code snippet-currently-hidden"> <pre class="snippet-code-js lang-js prettyprint-override"><co...
Add duration to DateTime in JavaScript
javascript|datetime|momentjs
0
75
1
72,859,552
72,859,552
2
true
2022-07-04T13:59:06.417Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Add duration to DateTime in JavaScript<p>I have an array of dates:</p> <pre><code>dates: [ { start: '30.05.2022 02:30:00', end: '30.05.2022 03:30:00' } ...
72,938,295
How to "select" columns from an array of struct?<p>I have an array of structs and I want to create a new column, but only select a few columns from the struct.</p> <p>Currently, I am doing it this way:</p> <pre class="lang-py prettyprint-override"><code>F.array(F.struct( F.col('orig_column.item_1'), F.col('orig...
<p>Since the structs are inside an array, you can &quot;loop&quot; through every element of the array using <a href="https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.functions.transform.html#pyspark.sql.functions.transform" rel="nofollow noreferrer"><strong><code>transform</code></s...
How to "select" columns from an array of struct?
arrays|apache-spark|select|pyspark|struct
2
75
1
72,939,456
72,939,456
2
true
2022-07-11T12:03:44.220Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to "select" columns from an array of struct?<p>I have an array of structs and I want to create a new column, but only select a few columns from the struc...
72,930,925
How to select from database with "where" parameter SpringBoot?<p>I would like to get one single entry from database. I have such entry model:</p> <pre><code>@Table(&quot;USERS&quot;) data class User(@Id val id: String?, val login: String, val password: String) </code></pre> <p>and such controller:</p> <pre><code>@RestC...
<p>The method <code>JdbcTemplate().queryForObject</code> in repository expected to return only 1 row by the SELECT statement.</p> <p>If your statement is returning multiple results, you should consider to use <code>JdbcTemplate().query</code> and the <code>getByUser()</code> method in repository should return <code>Lis...
How to select from database with "where" parameter SpringBoot?
spring-boot|kotlin
0
75
1
72,933,743
72,933,743
2
true
2022-07-10T18:31:27.953Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to select from database with "where" parameter SpringBoot?<p>I would like to get one single entry from database. I have such entry model:</p> <pre><code>...
72,874,520
Listener from DialogFragment to Fragment<p>I'm a beginner in Java and I'm trying to create a listener in my <code>DialogFragment</code> to notice my fragment that some book was removed. When the user removes a book, I want to call the removeBook method in BookFragment and update the <code>recyclerview</code>.</p> <p>He...
<p>Going through your code, it doesn't seem like you're using Navigation Component. So let's do it this way.</p> <p>Your <strong>BookDialogFragment</strong> is a child fragment to <strong>BookFragment</strong>. So basically, you should set a result in your dialog when <em>remove button</em> is clicked. Then set up a re...
Listener from DialogFragment to Fragment
java|android|android-fragments|android-recyclerview|android-dialogfragment
0
75
1
72,896,432
72,896,432
2
true
2022-07-05T19:18:13.620Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Listener from DialogFragment to Fragment<p>I'm a beginner in Java and I'm trying to create a listener in my <code>DialogFragment</code> to notice my fragment...
72,845,009
Unable to connect - docker<p>I am learning docker and try to dockerize a simple fastapi app. Here is my docker file</p> <pre><code>FROM python:3.8-slim WORKDIR /app COPY requirements.txt . RUN pip install -r requirements.txt -U --no-cache-dir COPY fast.py . CMD [ &quot;uvicorn&quot;,&quot;fast:app&quot;,&quot;--host&...
<p>According to the picture posted it seems like you didn't expose the ports.</p> <p>The ports are exposed from your docker to your pc, in this instance, when you iniate the container not in the Dockerfile</p> <p>Try the following</p> <pre><code>docker run -p 8000:8000 fastapi </code></pre> <p><strong>EDIT</strong></p>...
Unable to connect - docker
python|docker
1
75
3
72,845,183
72,845,183
2
true
2022-07-03T08:33:52.580Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Unable to connect - docker<p>I am learning docker and try to dockerize a simple fastapi app. Here is my docker file</p> <pre><code>FROM python:3.8-slim WORKD...
72,974,869
Correct syntax for operator >> overloading to members of nested class?<p>I have <strong>class Address</strong> nested in <strong>class Student</strong>, and I want to feed each input line into the <strong>class Student</strong> with <strong>operator&gt;&gt;</strong> overloading through istream.</p> <pre><code>class Add...
<p>The problem is not in the operator itself, but in the visibility of the members. You are using the <code>Address</code> class as a member of <code>Student</code>, but the <code>Address::house_no</code> member is not accessible from it (not only for the input operator).</p> <p>One solution (a simple but bad one) woul...
Correct syntax for operator >> overloading to members of nested class?
c++|class|nested|overloading|istream
1
75
1
72,974,904
72,974,904
2
true
2022-07-14T03:27:45.860Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Correct syntax for operator >> overloading to members of nested class?<p>I have <strong>class Address</strong> nested in <strong>class Student</strong>, and ...
72,775,755
C++, fast removal of elements from vector by binary index<p>There are several posts focused on the fast removal of elements given by indices from a vector. This question represents a slightly modified version of the problem.</p> <p>There is a vector of elements:</p> <pre><code>std::vector &lt;double&gt; numbers{ 100, 2...
<p>Unfortunately there is no automatism for this. You simply have to implement a custom erase function yourself:</p> <pre><code>auto widx = numbers.begin(); for (auto ridx = numbers.cbegin(), auto bidx = idxs.cbegin(); ridx != numbers.end; ++ridx, ++bidx) { if (*bidx) *widx++ = *ridx; } numbers.erase(widx, ...
C++, fast removal of elements from vector by binary index
c++|erase-remove-idiom
0
75
1
72,775,909
72,775,909
3
true
2022-06-27T16:55:38.217Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: C++, fast removal of elements from vector by binary index<p>There are several posts focused on the fast removal of elements given by indices from a vector. T...
72,854,648
Generic detection of subimages in images with openCV<p>Disclaimer: I'm a computer vision rookie.</p> <p>I have seen a lot of stack overflow posts of how to find a specific sub-image in a larger image.</p> <p>My usecase is a bit different since I don't want it to be specific and I'm not sure how I can do this (if it's e...
<ul> <li>Use <code>cv.Sobel</code> or other derivative kernel (with <code>cv.filter2D</code>) to find edges</li> <li>Sum along pixel columns to score each for &quot;edginess&quot;. <code>np.sum</code> or <code>np.mean</code> do that.</li> <li>Some thresholding and <code>np.argsort</code> and indexing to find best candi...
Generic detection of subimages in images with openCV
python|image|opencv|image-processing
2
75
1
72,855,624
72,855,624
3
true
2022-07-04T09:38:40.913Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Generic detection of subimages in images with openCV<p>Disclaimer: I'm a computer vision rookie.</p> <p>I have seen a lot of stack overflow posts of how to f...
72,939,957
How to pass in a callable object into a template class's constructor, able to call it later?<p>I want a class template whose constructor accepts (among other things), a callable argument. The class can then store a reference/pointer to this callable object and later call the function. I'll try to sketch out what I'm lo...
<blockquote> <p>I've tried implementing Callable as a type erasure Concept</p> </blockquote> <p>That's a good idea, but the implementation has already been done for you. Use the type <code>std::function&lt;float(T)&gt;</code> as your <code>Callable</code>. The template argument to <code>std::function</code> is a functi...
How to pass in a callable object into a template class's constructor, able to call it later?
c++|c++17
1
75
1
72,940,037
72,940,037
3
true
2022-07-11T14:13:01.497Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to pass in a callable object into a template class's constructor, able to call it later?<p>I want a class template whose constructor accepts (among other...
72,956,987
Pandas: map new column to existing column based on condition<p>I have a table like this:</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>id</th> <th>q1_score</th> <th>q2_score</th> <th>q3_score</th> <th>q4_score</th> <th>quarter</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>-0.77</td> <td...
<p>Try:</p> <pre class="lang-py prettyprint-override"><code>df[&quot;quarter_score&quot;] = df.apply(lambda x: x[x[&quot;quarter&quot;] + &quot;_score&quot;], axis=1) print(df) </code></pre> <p>Prints:</p> <pre class="lang-none prettyprint-override"><code> id q1_score q2_score q3_score q4_score quarter quarter_s...
Pandas: map new column to existing column based on condition
python|pandas|dictionary|apply
2
75
2
72,957,026
72,957,026
3
true
2022-07-12T18:40:47.143Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Pandas: map new column to existing column based on condition<p>I have a table like this:</p> <div class="s-table-container"> <table class="s-table"> <thead> ...
72,979,898
Using reduce to group array of objects<p>I am having a crazy hard time figuring this out, maybe because I almost never use the reduce method and I have been looking at this way too long but all I am trying to do here is group together an array of objects based on the product title.</p> <pre class="lang-js prettyprint-o...
<p>Does it have to be with reduce?</p> <p>A <code>forEach</code> would fit your need pretty well:</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override"><code>const products = [ { ...
Using reduce to group array of objects
javascript|reduce
0
75
2
72,980,090
72,980,090
3
true
2022-07-14T11:39:20.813Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Using reduce to group array of objects<p>I am having a crazy hard time figuring this out, maybe because I almost never use the reduce method and I have been ...
72,975,483
Milliseconds to HH:MM:SS time format<p>I'm trying to add the timestamp of a video frame to its own frame name like &quot;frame2 00:00:01:05&quot;, using <code>CAP_PROP_POS_MSEC</code> I'm getting the current position of the video file in milliseconds, what I want is to change those milliseconds to the time format &quot...
<p>Just use <code>divmod</code>. It does a <strong>div</strong>ision and <strong>mod</strong>ulo at the same time. It's more convenient than doing that separately.</p> <pre class="lang-py prettyprint-override"><code>seconds = 1.05 # or whatever (hours, seconds) = divmod(seconds, 3600) (minutes, seconds) = divmod(secon...
Milliseconds to HH:MM:SS time format
python
3
75
1
72,979,658
72,979,658
3
true
2022-07-14T05:10:25.010Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Milliseconds to HH:MM:SS time format<p>I'm trying to add the timestamp of a video frame to its own frame name like &quot;frame2 00:00:01:05&quot;, using <cod...
72,960,952
startingOffset and endingOffset in pyspark structured-streaming<p>I'm using pyspark 2.4.5 to consume message from Kafka. For batch query, there are 2 options <code>startingOffset</code> and <code>endingOffset</code> can be used to read specific message on Kafka. I'm quite confused with the example in Spark document:</p...
<p>A kafka topic consists of multiple partitions where each partition would have its own offset. So a starting offset of <code>{&quot;topicA&quot;:{&quot;0&quot;:23,&quot;1&quot;:-1},&quot;topicB&quot;:{&quot;0&quot;:-2}}</code> would mean:</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>To...
startingOffset and endingOffset in pyspark structured-streaming
apache-spark|pyspark|apache-kafka|spark-structured-streaming
0
75
1
72,961,803
72,961,803
3
true
2022-07-13T04:28:34.410Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: startingOffset and endingOffset in pyspark structured-streaming<p>I'm using pyspark 2.4.5 to consume message from Kafka. For batch query, there are 2 options...
72,795,330
How to efficiently store 1 million words and query them by starts_with, contains, or ends_with?<p>How do sites like <a href="https://www.morewords.com/contains/c" rel="nofollow noreferrer">this</a> store tens of thousands of words &quot;containing c&quot;, or like <a href="https://word.tips/words-with/d/and/c/" rel="no...
<p>&quot;Containing <code>C</code>&quot; amounts to <code>count(C) &gt; 0</code>. Unscrambling <code>CAUDC</code> amounts to <code>count(C) &lt;= 2 &amp;&amp; count(A) &lt;= 1 &amp;&amp; count(U) &lt;= 1 &amp;&amp; count(D) &lt;= 1</code>. So both queries could be efficiently answered by a database with 26 indices, one...
How to efficiently store 1 million words and query them by starts_with, contains, or ends_with?
database|algorithm|memory|full-text-search
2
75
2
72,795,404
72,795,404
3
true
2022-06-29T03:04:11.900Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to efficiently store 1 million words and query them by starts_with, contains, or ends_with?<p>How do sites like <a href="https://www.morewords.com/contai...
72,854,804
Java : How to convert from Set to List while specifying first element of List<pre><code>static void main(String[] args) { List&lt;Foo&gt; fooList = new LinkedList&lt;&gt;(); Set&lt;Foo&gt; fooSet = new HashSet&lt;&gt;(); Foo element1 = new Foo(&quot;Element1&quot;); Foo element2 = new Foo(&quot;Ele...
<blockquote> <p>convert from a <code>Se</code>t to a <code>List</code> and guaranteeing <code>element1</code> is the first element in the <code>List</code>?</p> </blockquote> <p>For that, you need to use a <a href="https://docs.oracle.com/en/java/javase/17/docs/api//java.base/java/util/LinkedHashSet.html" rel="nofollow...
Java : How to convert from Set to List while specifying first element of List
java|list|collections|set|java-stream
0
75
1
72,854,870
72,854,870
3
true
2022-07-04T09:49:49.963Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Java : How to convert from Set to List while specifying first element of List<pre><code>static void main(String[] args) { List&lt;Foo&gt; fooList = new ...
72,936,036
Tkinter Grid of Labels with fixed column-sizes<p>I just started to learn python and tried to setup a simple GUI with Tkinter.</p> <p>I am having problems understanding the grid feature of Tkinter.</p> <p>I want to create a GUI, where I can dynamically add new frames with a fixed setup. For simplicity, I just used label...
<p>It is hard to align those labels if they are in different frames. Put all of them inside same frame instead.</p> <pre class="lang-py prettyprint-override"><code>from tkinter import * def newLabelWithContent(frame, name): cols, rows = frame.grid_size() Label(frame, text=name, borderwidth=2, relief=&quot;gro...
Tkinter Grid of Labels with fixed column-sizes
python-3.x|tkinter|grid|frame
0
75
1
72,936,636
72,936,636
4
true
2022-07-11T09:04:03.383Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Tkinter Grid of Labels with fixed column-sizes<p>I just started to learn python and tried to setup a simple GUI with Tkinter.</p> <p>I am having problems und...
72,876,446
Solving a linear model for a known value of y in R<p>I have a series of x and y values that I've used to build a linear model. I can use predict() to find a value of y from a known value of x, but I'm struggling to calculate x from a known value of y. I've seen a few posts that talk about using the approx() function, ...
<p>Since you have fitted a low order polynomial in ordinary form (<code>raw = TRUE</code>), you can use <code>polyroot</code> to directly find <code>x</code> given <code>y</code>.</p> <pre><code>## pc: polynomial coefficients in increasing order solvePC &lt;- function (pc, y) { pc[1] &lt;- pc[1] - y ## all roots, i...
Solving a linear model for a known value of y in R
r|lm|predict
0
75
3
72,876,554
72,876,554
4
true
2022-07-05T23:20:57.397Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Solving a linear model for a known value of y in R<p>I have a series of x and y values that I've used to build a linear model. I can use predict() to find a ...
72,793,516
How to tell Agda to unfold a definition to prove an equivalency<p>I have a function like this:</p> <pre><code>open import Data.Char open import Data.Nat open import Data.Bool open import Relation.Binary.PropositionalEquality open Relation.Binary.PropositionalEquality.≡-Reasoning foo : Char → Char → ℕ foo c1 c2 with c1...
<p>Agda's built-in <code>Char</code> type is a little weird. Let's contrast it with a non-weird built-in type, <code>ℕ</code>. The equality test for <code>ℕ</code> looks as follows.</p> <pre><code>_≡ᵇ_ : Nat → Nat → Bool zero ≡ᵇ zero = true suc n ≡ᵇ suc m = n ≡ᵇ m _ ≡ᵇ _ = false </code></pre> <p>Note that <co...
How to tell Agda to unfold a definition to prove an equivalency
agda
3
75
1
72,801,046
72,801,046
5
true
2022-06-28T21:50:01.180Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to tell Agda to unfold a definition to prove an equivalency<p>I have a function like this:</p> <pre><code>open import Data.Char open import Data.Nat open...
73,009,501
setting JAVA_HOME with multiple Java versions<p>Previously when I was writing Java code, I only needed to add the javapath +&quot;/bin&quot; inside the path for environment variables and I had no major problems. Recently I have been self learning Spring and it insists on having JAVA_HOME environment variable.</p> <p>Ho...
<p>As in the comments section, JAVA_HOME is a variable and can not have multiple values.</p> <p>I agree with @Dolphin. To install <code>SDKMan</code> please read <a href="https://sdkman.io/install" rel="noreferrer">official documentation</a>.</p> <p>Now to install a version of Java with <code>SDKMan</code>.</p> <p>Firs...
setting JAVA_HOME with multiple Java versions
java|java-home
2
75
1
73,009,599
73,009,599
5
true
2022-07-17T05:42:50.623Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: setting JAVA_HOME with multiple Java versions<p>Previously when I was writing Java code, I only needed to add the javapath +&quot;/bin&quot; inside the path ...
72,787,964
DIV layout like honeycomb<p>I am trying to make a specific layout, and I am struggling with the grid CSS. I am open using flex or any other method.</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-css lang-css pretty...
<p>I would do it like below. All the element inside the same area then translate to update their position</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-css lang-css prettyprint-override"><code>.container { displ...
DIV layout like honeycomb
html|css|grid
3
75
1
72,788,318
72,788,318
5
true
2022-06-28T14:06:58.213Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: DIV layout like honeycomb<p>I am trying to make a specific layout, and I am struggling with the grid CSS. I am open using flex or any other method.</p> <p><d...
72,977,431
What is the real problem solved by React?<p>I know this can be a classic question, but i really couldn't get a real answer from anyone, i seek a detailed example or a situation that proves that React solved a real problem. i understand the part of reusability, declarative style, but still lost in that words React websi...
<blockquote> <p>I couldn't fully understand that situation, can anyone explain in details this situation to me with or without code, what is the problem to get that data asynchronously from multiple sources and just append it to a certain element in the DOM??</p> </blockquote> <p>Let's say we have a shopping cart:</p> ...
What is the real problem solved by React?
javascript|reactjs
2
75
1
72,977,925
72,977,925
5
true
2022-07-14T08:22:57.287Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What is the real problem solved by React?<p>I know this can be a classic question, but i really couldn't get a real answer from anyone, i seek a detailed exa...
72,964,608
Split Java List items within String<p>The code example below shows a Test class that is supposed to print the list out as follows:</p> <p><strong><code>'A','B','C'</code></strong> (note the quotation marks).</p> <p>Is there a method I can use to do that kind of formatting directly within the <code>String</code> assignm...
<p>One option to print the desired result would be to use <code>String.join</code> in <code>System.out.format</code>:</p> <pre class="lang-java prettyprint-override"><code>public static void main(String[] args) { List&lt;String&gt; test = new ArrayList&lt;&gt;(); test.add(&quot;A&quot;); test.add(&quot;B&qu...
Split Java List items within String
java|string|formatting
0
75
2
72,964,947
72,964,947
7
true
2022-07-13T10:17:25.120Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Split Java List items within String<p>The code example below shows a Test class that is supposed to print the list out as follows:</p> <p><strong><code>'A','...
72,902,821
Function parameters behaving strangely in C<p>Below is the sample code written in C:</p> <pre><code>#include &lt;stdlib.h&gt; #include &lt;stdio.h&gt; #include &lt;stdbool.h&gt; int* second; void myTest1(int a, bool check){ if(check){ second = &amp;a; } printf(&quot;%d&quot;, *(second)); printf...
<p>You are setting <code>second</code> to the address of a variable that goes out of scope at the end of the function invocation. Once the variable is out of scope, the memory it occupied is no longer yours, and it can be reused. That memory address happens to be reused in each subsequent invocation, with the new argum...
Function parameters behaving strangely in C
c
2
75
2
72,902,854
72,902,854
7
true
2022-07-07T18:47:30.840Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Function parameters behaving strangely in C<p>Below is the sample code written in C:</p> <pre><code>#include &lt;stdlib.h&gt; #include &lt;stdio.h&gt; #inclu...
72,963,090
C++ non-generic class in template<p>I would like to know how to make a template with an own class:</p> <pre><code>#include &lt;iostream&gt; using namespace std; template&lt;C cc&gt; void A() { cout &lt;&lt; cc.l &lt;&lt; endl; } int main() { C cc; A&lt;cc&gt;(); } class C { public: int l = 10; }; </c...
<p>You can do it as shown below with C++20(&amp;onwards):</p> <pre><code>//moved definition of C before defining function template `A` struct C { int l = 10; }; template&lt;C cc&gt; void A() { cout &lt;&lt; cc.l &lt;&lt; endl; } int main() { //--vvvvvvvvv---------&gt;constexpr added here constexpr C cc; ...
C++ non-generic class in template
c++|templates
1
75
1
72,963,126
72,963,126
8
true
2022-07-13T08:24:40.440Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: C++ non-generic class in template<p>I would like to know how to make a template with an own class:</p> <pre><code>#include &lt;iostream&gt; using namespace s...
73,011,826
CASE WHEN function & date function to change now() > to an assumption date<pre><code>WITH latest AS ( SELECT DISTINCT customer_id, MAX(submitted_on) AS latest_order FROM orders GROUP BY 1 ), AA AS ( SELECT DISTINCT o.customer_id, latest.latest_order, now() - INTERVAL '91 days' AS reference_more_than_90D, ...
<p>I would suggest avoiding the use of <code>now()</code> as this includes millisecond precision. Instead you probably only need date precision so you could use <code>current_date</code> instead. Plus you really don't need <code>select distinct</code> at all, nor do you need multiple joins etc.</p> <pre><code>WITH AA A...
CASE WHEN function & date function to change now() > to an assumption date
sql|postgresql|case|pgadmin|sql-date-functions
-1
75
2
73,017,790
73,017,790
-1
true
2022-07-17T12:35:45.660Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: CASE WHEN function & date function to change now() > to an assumption date<pre><code>WITH latest AS ( SELECT DISTINCT customer_id, MAX(submitted_on) AS ...
72,788,692
Print all powersets of an array giving wrong answer<p>Given an integer array nums of unique elements, return all possible subsets (the power set). The belwo code is returning wrong answer for input [1,2].How to fix it?</p> <p>Expected Output is</p> <blockquote> <p>[[],[1],[2],[1,2]]</p> </blockquote> <p>I am getting ...
<p>Not sure your approach is right. you add element to your running list <code>output</code> but then you don't remove it which is what an usual backtracking does. You add to the running list, recurse and then remove the last element chosen. The correct <code>solve</code> looks like:</p> <pre><code> public static vo...
Print all powersets of an array giving wrong answer
algorithm|data-structures
0
76
1
72,789,288
72,789,288
0
true
2022-06-28T14:51:34.683Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Print all powersets of an array giving wrong answer<p>Given an integer array nums of unique elements, return all possible subsets (the power set). The belwo ...
72,778,388
Mooc Helsinki Part 1 Week 4 Exercise 18 Java Weird Occurrence<p>Having a problem here with this error which the solution to is simply beyond me.</p> <p>FAIL: PersonalInformationCollectionTest testInputFirst Something weird occurred. It could be that the void main (String[] args) method of the class class PersonalInform...
<p>Solved by using scanner.nextLine() rather than scanner.next(). No idea how that made such a difference in this case</p>
Mooc Helsinki Part 1 Week 4 Exercise 18 Java Weird Occurrence
java|arrays|for-loop|oop|java.util.scanner
-1
76
2
72,793,308
72,793,308
0
true
2022-06-27T21:17:01.507Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Mooc Helsinki Part 1 Week 4 Exercise 18 Java Weird Occurrence<p>Having a problem here with this error which the solution to is simply beyond me.</p> <p>FAIL:...
72,810,811
How to select two relational tables in Laravel that select all fields from the first and one field in the second step<p>I wish you are doing well. This is my controller code and what I want to do. From the defined table of the projects in the database, I will display the values ​​of the 'title', and 'description'. and...
<p>Avoid using joins, use relationships instead. Eager load the images, using <code>with()</code>, for optimal query execution.</p> <pre><code>$projects = Project::orderBy('id', 'desc') -&gt;with('images') -&gt;get(); </code></pre> <p>Since it is a one to many relationship, you either have to take the first im...
How to select two relational tables in Laravel that select all fields from the first and one field in the second step
sql|laravel|laravel-8|balde
0
76
1
72,814,872
72,814,872
0
true
2022-06-30T05:44:36.220Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to select two relational tables in Laravel that select all fields from the first and one field in the second step<p>I wish you are doing well. This is my...
72,814,052
Calculation using SQL server<p><strong>Formula used</strong> This is the formula that I used to calculate<br /> Expressed as a single equation:</p> <pre><code>eGFR = 142 x min(Scr/κ, 1)α x max(Scr/κ, 1)-1.200 x 0.9938Age x 1.012 [if female] where: Scr = serum creatinine in mg/dL κ = 0.7 α = -0.329 min(Scr/κ, 1) i...
<p>According to <a href="https://www.kidney.org/content/ckd-epi-creatinine-equation-2021" rel="nofollow noreferrer">this site</a> your equation is kinda wrong. Please be sure to add <code>^</code> to display the &quot;to the power of&quot;.</p> <pre><code>DECLARE @Scr AS FLOAT = 40.0; DECLARE @gender AS VARCHA...
Calculation using SQL server
sql|sql-server
0
76
2
72,815,613
72,815,613
0
true
2022-06-30T10:15:12.063Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Calculation using SQL server<p><strong>Formula used</strong> This is the formula that I used to calculate<br /> Expressed as a single equation:</p> <pre><cod...
72,819,761
Setting up an Application with Azure for use with Graph API outlook calendars<p>I'm aware that Graph API has a nice nuget package and I am confident on the code side of things, but my understanding is that I need to have the application set up in Azure and while there is a lot of documentation about this in general, I ...
<p><code>need my application to do is access an outlook calendar of a specific user</code></p> <p>Does it mean you need your app to have the abiltity to modify the callendar of any user you owned? If not, then it means you need your application to provide a sign in module and let users sign in, then the users can get a...
Setting up an Application with Azure for use with Graph API outlook calendars
azure|outlook|microsoft-graph-api
0
76
1
72,824,083
72,824,083
0
true
2022-06-30T17:23:16.197Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Setting up an Application with Azure for use with Graph API outlook calendars<p>I'm aware that Graph API has a nice nuget package and I am confident on the c...
72,823,844
How to Filter Url linked text in Google sheets using Formula/Google Apps Script?<p>I want to filter Google sheet data that contains URL-linked text in one column. Here is the image of the <a href="https://i.stack.imgur.com/R7koS.png" rel="nofollow noreferrer">raw Data</a></p> <p>I want this data to be filtered based on...
<p>So, I found a way to keep the URL intact with the text by updating the above script, so instead of using <code>getValue()</code>, you can use <code>getRichTextValue()</code> to get the text along with its url :</p> <pre><code>function FilteredData() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var rawShe...
How to Filter Url linked text in Google sheets using Formula/Google Apps Script?
google-apps-script|google-sheets|filter|google-sheets-formula
1
76
2
72,825,871
72,825,871
0
true
2022-07-01T02:32:43.800Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to Filter Url linked text in Google sheets using Formula/Google Apps Script?<p>I want to filter Google sheet data that contains URL-linked text in one co...
72,834,299
Datepicker in am-pm format<p>I have the following date picker:</p> <pre><code>DatePicker(&quot;Time&quot;, selection: $wakeUp, displayedComponents: .hourAndMinute) </code></pre> <p>That would be using the 24h format by default like this:</p> <p><a href="https://i.stack.imgur.com/UcXvF.png" rel="nofollow noreferrer"><im...
<p>The picker will respect the locale. So, if you what to overrule the system settings you can set the desired locale on the picker like this:</p> <pre><code>picker.locale = Locale.init(identifier: &quot;en&quot;) </code></pre>
Datepicker in am-pm format
swift|swiftui
0
76
1
72,834,504
72,834,504
0
true
2022-07-01T20:22:41.813Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Datepicker in am-pm format<p>I have the following date picker:</p> <pre><code>DatePicker(&quot;Time&quot;, selection: $wakeUp, displayedComponents: .hourAndM...
72,833,937
How to pass variable in child_process and access the variable in child process in nodejs<p>Code for parent.js</p> <pre><code>const {spawn} = require(&quot;child_process&quot;); const encodeImage = (req,res)=&gt;{ try { const path = req.file.path; let dataToSend; const python = spawn('pytho...
<p>The easiest approach would probably be to pass it as a command-line argument:</p> <p>In the JavaScript code:</p> <pre class="lang-js prettyprint-override"><code>const python = spawn('python', ['controllers/script.py', path]); </code></pre> <p>In the Python code:</p> <pre><code>import sys import cv2 as cv img = cv.i...
How to pass variable in child_process and access the variable in child process in nodejs
python|node.js|child-process
1
76
1
72,839,698
72,839,698
0
true
2022-07-01T19:38:01.503Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to pass variable in child_process and access the variable in child process in nodejs<p>Code for parent.js</p> <pre><code>const {spawn} = require(&quot;ch...
72,832,142
Azure CLI creating a new branch from a task<p>I'm tring to automate task and branch creation on Azure boards- but am stuggling to programtically create a branch, once the task is created. I'm using the Azure/Azure Devops extensions in PowerShell, but can't see anything in the docs that would replicate the 'create branc...
<p>To programmatically create a branch, here are two methods :</p> <p>Az CLI : run</p> <pre><code>az repos ref create --name refs/heads/{branch name} --object-id {Id of the object to create the reference from} --organization https://dev.azure.com/{org name} --project {project name} --repository {repos name} </code></pr...
Azure CLI creating a new branch from a task
git|azure|powershell|azure-devops|azure-cli
0
76
1
72,851,952
72,851,952
0
true
2022-07-01T16:21:50.533Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Azure CLI creating a new branch from a task<p>I'm tring to automate task and branch creation on Azure boards- but am stuggling to programtically create a bra...
72,835,227
Keras on GPU on windows with python 3.7.13<p>I had to reinstall completely my python distribution lately and for some reasons I cannot run keras on GPU anymore.</p> <p>I followed the instructions from <a href="https://stackoverflow.com/questions/45662253/can-i-run-keras-model-on-gpu">Can I run Keras model on gpu?</a> b...
<p>OK so here is the solution :</p> <p>Python 3.7.13 requires tensorflow-gpu 2.1.0 to detect gpu. So the correct set of versions is :</p> <ul> <li>Python 3.7.13</li> <li>tensorflow 2.1.0</li> <li>keras 2.3.0</li> <li>cudnn 7.6.5</li> <li>cudatoolkit 10.1.243</li> </ul> <p>with this it works. Be careful that for some re...
Keras on GPU on windows with python 3.7.13
python|windows|tensorflow|keras|gpu
2
76
1
72,852,403
72,852,403
0
true
2022-07-01T22:47:56.097Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Keras on GPU on windows with python 3.7.13<p>I had to reinstall completely my python distribution lately and for some reasons I cannot run keras on GPU anymo...
72,814,636
Assertion Error While Testing the Pipeline Apache Beam<p>While testing the pipeline I got this error even the error log shows that the objects are equal:</p> <pre><code> public void testGenerateUserPageViews() throws Exception{ final PCollection&lt;SessionModel&gt; input = p.apply(Create.of(SESSION_MODEL)); ...
<p>The solution is that I replace String variable with &quot;&quot; value in place of null. But I still don't understand why the object reference are the same in both cases.</p>
Assertion Error While Testing the Pipeline Apache Beam
unit-testing|apache-beam
2
76
2
72,852,934
72,852,934
0
true
2022-06-30T11:01:04.757Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Assertion Error While Testing the Pipeline Apache Beam<p>While testing the pipeline I got this error even the error log shows that the objects are equal:</p>...
72,851,871
how can I change django application server port number in spyne<p>I am trying to run the spyne Django soap server project on my computer but I can't run the project because the default port number which is 8000, is already in use so I want to change the port number of django soap server.</p> <p><a href="https://github....
<p>The easiest way out there is just type the required port to run after the &quot;runserver&quot; command <br> eg:</p> <pre><code>python manage.py runserver 7000 </code></pre>
how can I change django application server port number in spyne
django|soap|spyne
-2
76
2
72,853,016
72,853,016
0
true
2022-07-04T04:46:34.313Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how can I change django application server port number in spyne<p>I am trying to run the spyne Django soap server project on my computer but I can't run the ...
72,845,069
Incorrect number of bindings supplied -error<p>I end up always with &quot;Incorrect number of bindings supplied&quot; error of SQlite3. I tried (dataset), (dataset,),[dataset].</p> <pre><code>import requests import json import datetime import sqlite3 #Get tbe Data url = 'https://opensky-network.org//api/flights/depart...
<p><code>dataset</code> is a list of dictionaries. My assumption is that you want to insert the values from the dictionaries into the table. So, replacing <code>(dataset,)</code> with <code>(tuple(record.values()) for record in dataset)</code> should produce the desired result (worked here):</p> <pre><code>... #Insert...
Incorrect number of bindings supplied -error
python|sqlite
-1
76
2
72,853,951
72,853,951
0
true
2022-07-03T08:43:07.400Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Incorrect number of bindings supplied -error<p>I end up always with &quot;Incorrect number of bindings supplied&quot; error of SQlite3. I tried (dataset), (d...
72,854,063
making pipeline for machine learning models<pre><code>from sklearn import svm from sklearn.ensemble import RandomForestClassifier from sklearn.linear_model import LogisticRegression from sklearn.tree import DecisionTreeClassifier model_params = { /* creating dictionary of all classifiers with paramters */ ...
<p>It should be <code>decisiontreeclassifier__criterion</code>. <code>make_pipeline()</code> sets the stage name to lowercase of a respective type (<a href="https://scikit-learn.org/stable/modules/generated/sklearn.pipeline.make_pipeline.html" rel="nofollow noreferrer">https://scikit-learn.org/stable/modules/generated/...
making pipeline for machine learning models
python|machine-learning|scikit-learn|classification|pipeline
0
76
1
72,854,558
72,854,558
0
true
2022-07-04T08:51:41.967Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: making pipeline for machine learning models<pre><code>from sklearn import svm from sklearn.ensemble import RandomForestClassifier from sklearn.linear_model i...
72,822,176
How to get multiple values from array in JObject with JToken and store them in list<p>I have following response message from server as string:</p> <pre><code>string receivedResult = &quot;{\&quot;method\&quot;:\&quot;_result\&quot;,\&quot;params\&quot;:[[{\&quot;idmake\&quot;:1,\&quot;name\&quot;:\&quot;Abarth\&quot;,\...
<p>I've found out how can be done after spending a while, through the while loop I hardcoded the last index number of child arrays, and then do the iteration over all, maybe there exists different solution for this, but for now this logic for me works, combobox is filling after click event is fired properly.</p> <p>Her...
How to get multiple values from array in JObject with JToken and store them in list
c#|arrays|json|winforms
-1
76
1
72,858,463
72,858,463
0
true
2022-06-30T21:22:49.323Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to get multiple values from array in JObject with JToken and store them in list<p>I have following response message from server as string:</p> <pre><code...
72,830,132
Module not found in Nest JS after deploying to App engine<p>I tried to deploy a Nest JS app to App Engine through Google Build Cloud &amp; Manually Both tries gives same error Modules not found</p> <p><a href="https://i.stack.imgur.com/i2hec.png" rel="nofollow noreferrer">Error when deploying manually through Shell</a>...
<p>The problem was caused by Nest Js CLI Aliases, When I changed src/example/service to ../example/service the deployment worked It's recommended to use typescript aliases in tsconfig file instead of CLI</p>
Module not found in Nest JS after deploying to App engine
google-app-engine|nestjs|google-cloud-build
0
76
1
72,862,747
72,862,747
0
true
2022-07-01T13:36:22.283Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Module not found in Nest JS after deploying to App engine<p>I tried to deploy a Nest JS app to App Engine through Google Build Cloud &amp; Manually Both trie...
72,864,352
splash screen before webview loads in flutter<p>I am trying to build an app that uses webview but before loading it I need an splashscreen that checks if there is internet connection and if there isn't it shows an Snackbar in splashscreen. Do you know how to achieve this?</p>
<p>This would help. I achieved this in my personal project.</p> <p>As you can see am using internet_connection_checker and whenever the internet is down I do a retry which was achieved by calling a <code>restart</code> widget in the main method to safely perform a restart whenever the internet is restored</p> <ol> <li>...
splash screen before webview loads in flutter
flutter
0
76
3
72,864,579
72,864,579
0
true
2022-07-05T05:23:41.300Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: splash screen before webview loads in flutter<p>I am trying to build an app that uses webview but before loading it I need an splashscreen that checks if the...
72,872,163
How to change Safari autocomplete key icon<p>I want to tweak the default icon color for Safari to match the UI better.</p> <p>Is this something, that can be accomplished at all?</p> <p><a href="https://i.stack.imgur.com/Xvl5Q.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Xvl5Q.png" alt="enter image...
<p>This works for me. Will wrap into some tailwind class and that's it.</p> <pre class="lang-css prettyprint-override"><code>input::-webkit-credentials-auto-fill-button { background-color: white; } </code></pre> <p>Duplicate of this question: <a href="https://stackoverflow.com/questions/43734117/invalid-selector-we...
How to change Safari autocomplete key icon
css|tailwind-css
0
76
1
72,874,286
72,874,286
0
true
2022-07-05T15:41:24.037Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to change Safari autocomplete key icon<p>I want to tweak the default icon color for Safari to match the UI better.</p> <p>Is this something, that can be ...
72,877,945
Tensorflow Conv2D layers input_shape configuration error: ValueError: Input 0 of layer "sequential" is incompatible with the layer:<p>I have a question about the input_shape of CONV2D layer. As the official doc says:</p> <blockquote> <p>4+D tensor with shape: batch_shape + (channels, rows, cols) if data_format='channel...
<p>You need to set a batch size for the dataset like this</p> <pre><code>batch_size = 8 #Or some number dataset = dataset.batch(batch_size) </code></pre> <p>If you don't do this, your image goes into the model in the shape of <code>(128,128,3)</code> instead of <code>(batch_size,128,128,3)</code> which is what Conv2D l...
Tensorflow Conv2D layers input_shape configuration error: ValueError: Input 0 of layer "sequential" is incompatible with the layer:
python|tensorflow|machine-learning|conv-neural-network
0
76
1
72,880,258
72,880,258
0
true
2022-07-06T04:25:49.107Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Tensorflow Conv2D layers input_shape configuration error: ValueError: Input 0 of layer "sequential" is incompatible with the layer:<p>I have a question about...
72,857,439
how to get list in head tag using puppeteer?<p>I want to get meta data in head tag using puppeteer.</p> <p>but I got a lot of empty objects.</p> <p>here is my code:</p> <pre><code>const description = await page.$eval(&quot;head &gt; meta[name='description']&quot;, (e) =&gt; e.content); console.log(description); const ...
<p>Its code is work for me. but I got some issues when the puppeteer launch its browser on docker container environment.</p> <p>My OS is mac os M1. So, I am shooting this problem so on.</p> <pre><code>const list = await page.evaludate(() =&gt; Array.from(document.querySelectorAll('meta'), (e) =&gt; { return e. content ...
how to get list in head tag using puppeteer?
puppeteer
0
76
1
72,892,264
72,892,264
0
true
2022-07-04T13:20:22.430Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to get list in head tag using puppeteer?<p>I want to get meta data in head tag using puppeteer.</p> <p>but I got a lot of empty objects.</p> <p>here is m...
72,839,944
Async function did not complete within 5000ms (Jasmine)<p>I am new to angular testing and I am using Jasmine as testing framework I try to test my service class but I could not know how to resolve this error I went through different examples but all showed me different errors. Is there any solution</p> <p>My Service cl...
<p>Try this (follow comments with !!):</p> <pre><code>describe('DisbursementService', () =&gt; { let httpTestingController: HttpTestingController; let disbService: DisbursementService; beforeEach(waitForAsync(async () =&gt; { TestBed.configureTestingModule({ imports: [HttpClientTestingModule], //...
Async function did not complete within 5000ms (Jasmine)
angular|unit-testing|jasmine|karma-jasmine
0
76
1
72,898,327
72,898,327
0
true
2022-07-02T14:41:54.353Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Async function did not complete within 5000ms (Jasmine)<p>I am new to angular testing and I am using Jasmine as testing framework I try to test my service cl...
72,887,465
SCons: ld cannot find standard libraries<p>I'm developing a game with raylib using SCons for building. I'm using Clang to cross compile from Ubuntu (in WSL) to Windows. My project directory contains a <code>lib</code> directory with the raylib binaries and an <code>include</code> directory with the raylib headers. When...
<p>I found the answer to my problem. According the <a href="https://stackoverflow.com/a/25711050/5155973">this</a> by default SCons doesn't use the shell's <code>PATH</code>. The user needs to add it to the environment.</p> <p>My fixed SConstruct file:</p> <pre><code>import os LIBS=['raylib', 'opengl32', 'gdi32', 'win...
SCons: ld cannot find standard libraries
c++|cross-compiling|clang++|scons|raylib
0
76
1
72,901,012
72,901,012
0
true
2022-07-06T17:08:33.637Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: SCons: ld cannot find standard libraries<p>I'm developing a game with raylib using SCons for building. I'm using Clang to cross compile from Ubuntu (in WSL) ...
72,896,408
Vue: UI only renders data when I save changes in VS Code<p>I am new to Vue and I am struggling with an extremely weird issue: In my component, in the creates() function I fetch data and save them into my items Array. I display the content of the items with v-for as a paragraph.</p> <p>Now here comes the weird thing: Wh...
<p>So I tried multiple things to fix it:</p> <ul> <li>Switching to Composition API</li> <li>Using Array Mutators instead of replacing the Array</li> <li>Using async - await instead of then(..)</li> </ul> <p>Unfortunately, none of that fixed the problem. So I looked more deeply into the getUsersWithPoints function to fi...
Vue: UI only renders data when I save changes in VS Code
javascript|vue.js
2
76
3
72,902,855
72,902,855
0
true
2022-07-07T10:44:45.003Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Vue: UI only renders data when I save changes in VS Code<p>I am new to Vue and I am struggling with an extremely weird issue: In my component, in the creates...
72,905,468
Using Regex to find certain string (API Key)<p>I wanted to use a regular expressions to find if the API key exists or not.</p> <p>I tried <code>preg_match</code></p> <pre><code>^[a-f0-9]{32}$ </code></pre> <p>I have this HTML code as a string.</p> <p><code>{&quot;page_data&quot;:&quot;&lt;div class=\&quot;row\&quot;&gt...
<p>Parse the info into an html element and then it's a lot easier to find what you 're looking for.</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override"><code>const input = `{"page_data":...
Using Regex to find certain string (API Key)
javascript|html|regex
-4
76
1
72,909,098
72,909,098
0
true
2022-07-08T00:19:09.950Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Using Regex to find certain string (API Key)<p>I wanted to use a regular expressions to find if the API key exists or not.</p> <p>I tried <code>preg_match</c...
72,903,945
How to bundle multiple ES6 modules into a single ES6 compatible bundle using Rollup<p>I'm creating charts with HighCharts v10.x. The HighCharts NPM install includes all necessary ES6 modules.</p> <p><strong>The following works just fine.</strong></p> <p>At the top of MyChartingModule.js, I import the HighCharts modules...
<p>For Rollup to successfully bundle, you need to add the exports to your input script, <code>chart.bundle.js</code>:</p> <pre><code>import Highcharts from '../../node_modules/highcharts/es-modules/Core/Globals.js'; import SVGRenderer from '../../node_modules/highcharts/es-modules/Core/Renderer/SVG/SVGRenderer.js'; imp...
How to bundle multiple ES6 modules into a single ES6 compatible bundle using Rollup
highcharts|es6-modules|rollup
0
76
1
72,912,663
72,912,663
0
true
2022-07-07T20:37:32.460Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to bundle multiple ES6 modules into a single ES6 compatible bundle using Rollup<p>I'm creating charts with HighCharts v10.x. The HighCharts NPM install i...
72,914,550
Why does my parbox not work in latex table cell<p>In my simple mwe of a Gantt chart below, using parbox (commented out in the code below) gives error &quot;! Missing number, treated as zero.\c@ }&quot; I am wondering if there is a package I am not loading or some other problem with my code. I will appreciate help.</p> ...
<p>Nothing to do with tables or parboxes, the problem is the content of your parbox</p> <pre><code>\begin{enumerate}[noitemsep, label=\alph*), leftmargin=*] \item First programme execution \item First program completion \end{enumerate} </code></pre> <p>is not default latex syntax. All these optional arguments for the ...
Why does my parbox not work in latex table cell
latex
1
76
1
72,915,816
72,915,816
0
true
2022-07-08T16:46:09.650Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why does my parbox not work in latex table cell<p>In my simple mwe of a Gantt chart below, using parbox (commented out in the code below) gives error &quot;!...
72,918,538
How to stretch the image responsive to fill entire screen<p>I want to know how can I extend the image to the part ([) marked in black. This is my code (I'm trying to make it responsive):</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre ...
<p>Change <code>height:100%</code> to <code>height:100vh</code> and add <code>object-fit:cover</code></p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-css lang-css prettyprint-override"><code>body { background: #ae...
How to stretch the image responsive to fill entire screen
html|css
0
76
4
72,918,690
72,918,690
0
true
2022-07-09T02:35:09.720Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to stretch the image responsive to fill entire screen<p>I want to know how can I extend the image to the part ([) marked in black. This is my code (I'm t...
72,901,514
Error: Duplicate key value violates uniqueness constraint<p>When trying to send a request, with the same &quot;flower_id&quot;, to Postman, returns 500 with message:</p> <blockquote> <p>&quot;could not execute statement; SQL [n/a]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationExcept...
<p>I still don't fully understand why this is the case, but I still want to leave a solution to my question.</p> <p>It was only worth adding a save method for <code>User</code></p> <pre><code> public User saveUser(User user) { return userRepository.save(user); } </code></pre> <p>Which is strange, because before tha...
Error: Duplicate key value violates uniqueness constraint
java|spring|postgresql|spring-boot
0
76
2
72,921,459
72,921,459
0
true
2022-07-07T16:43:12.543Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Error: Duplicate key value violates uniqueness constraint<p>When trying to send a request, with the same &quot;flower_id&quot;, to Postman, returns 500 with ...
72,921,502
Undefined user.roles with NestJS RoleGuard<p>I've created the RoleGuard by following the official NestJs documentation. However, I keep getting a 403 error even if my users have the correct Role.</p> <p><em>app.module.ts</em></p> <pre><code>@Module({ imports: [ MongooseModule.forRoot(process.env.MONGO_DB_URI), ...
<p>Your <code>JwtStrategy</code> does not return a <code>roles</code> property, so <code>req.user.roles</code> will always be <code>undefined</code>. You need to return a <code>roles</code> property as a part of the <code>JwtStrategy#validate</code> method to read <code>req.user.roles</code> later on</p>
Undefined user.roles with NestJS RoleGuard
enums|nestjs|rbac
0
76
1
72,926,401
72,926,401
0
true
2022-07-09T12:50:09.483Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Undefined user.roles with NestJS RoleGuard<p>I've created the RoleGuard by following the official NestJs documentation. However, I keep getting a 403 error e...
72,778,714
When will awaitWorkAvailable resume from runRecomposeAndApplyChanges in Recomposer?<p>I saw that changes were tracked and requested invalidation through <code>Recompoer#runRecomposeAndApplyChanges</code>. This function tracks changes and requests invalidation in the while statement and remains suspended until new chang...
<p>I finally solved it. A <code>workContinuation</code> instance was being returned from <code>deriveStateLocked()</code>, and <code>workContinuation</code> is resumed whenever invalidation is required thereafter.</p> <pre><code>private fun deriveStateLocked(): CancellableContinuation&lt;Unit&gt;? { // ... retu...
When will awaitWorkAvailable resume from runRecomposeAndApplyChanges in Recomposer?
android|android-jetpack-compose|internals
0
76
1
72,930,370
72,930,370
0
true
2022-06-27T21:58:17.747Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: When will awaitWorkAvailable resume from runRecomposeAndApplyChanges in Recomposer?<p>I saw that changes were tracked and requested invalidation through <cod...
72,933,773
Passing parameters using React fetch to access Node API<p>I have a react project with NODE API backend. I am facing issues with the very basic fetch GET request. When passing parameters through link, it cannot be accessed at the server side.</p> <p>My react function:</p> <pre><code> const loadOptions = async (cnt) =&gt...
<p>Edited React code based on the answers I got above. Thank you @Phil</p> <pre><code>const response = await fetch(`${baseurl}/pdt/${prev}/${cnt}`); </code></pre> <p>It's working now.</p>
Passing parameters using React fetch to access Node API
node.js|reactjs|api|parameters|get
2
76
2
72,933,929
72,933,929
0
true
2022-07-11T04:36:09.017Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Passing parameters using React fetch to access Node API<p>I have a react project with NODE API backend. I am facing issues with the very basic fetch GET requ...
72,942,405
change ggplot2 y-axis values<p>Please help me. I have the following data in R: I have values of three groups of organisms from day 0 to day 7 which represent the mean of populations for these groups for each day.</p> <p>Here is my data:</p> <p><a href="https://docs.google.com/spreadsheets/d/15-XXT6jOSKZs0FS14FScnHMm0Qd...
<p>Are you looking for such a solution:</p> <pre><code>library(tidyverse) df %&gt;% pivot_longer(-Day) %&gt;% ggplot(aes(x = Day, y = value, group=name, color = name))+ geom_line(size=1) </code></pre> <p><a href="https://i.stack.imgur.com/ZNcn5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com...
change ggplot2 y-axis values
r|ggplot2
-1
76
2
72,942,696
72,942,696
0
true
2022-07-11T17:23:56.980Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: change ggplot2 y-axis values<p>Please help me. I have the following data in R: I have values of three groups of organisms from day 0 to day 7 which represent...
72,949,977
How get IMEI of device?<p>I a beginner in android development and I try to get device <strong>IMEI</strong> but I have a problem of permission.</p> <p>I don't have <code>android.permission.READ_PRIVILEGED_PHONE_STATE</code> property in my project but the function <code>getImei()</code> of <code>TelephonyManger.java</co...
<p>The answer is sad. <strong>We can't</strong> !</p> <p>Like @Nitsh said, <em>&quot;The <code>READ_PRIVILEGED_PHONE_STATE</code> permission is only granted to apps signed with the platform key and privileged system apps&quot;</em>.</p>
How get IMEI of device?
android|android-studio|kotlin|telephonymanager
0
76
2
72,950,864
72,950,864
0
true
2022-07-12T09:24:04.793Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How get IMEI of device?<p>I a beginner in android development and I try to get device <strong>IMEI</strong> but I have a problem of permission.</p> <p>I don'...
72,954,987
SQL - How do I use Case When to pivot data and have no duplicate keys in the rows?<p>I need to transpose the In_Type and Out_Type attributes to columns with the DDTM as the data, but the rows cannot have duplicate keys.</p> <p>My table:</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>PT_ID<...
<p>You are almost done. You just need to add an outter query to aggregate the values of your query using conditions, like this:</p> <pre><code>SELECT pt_id, arrival_date, ft, pd1, pd2, admit, CASE WHEN admit IS NULL THEN trans_in1 END AS trans_in1, trans_out1, trans_in2, CASE WHE...
SQL - How do I use Case When to pivot data and have no duplicate keys in the rows?
sql|sql-server
-1
76
1
72,958,405
72,958,405
0
true
2022-07-12T15:41:21.740Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: SQL - How do I use Case When to pivot data and have no duplicate keys in the rows?<p>I need to transpose the In_Type and Out_Type attributes to columns with ...
72,962,388
Fetched firestore data not displaying on first page load with React useEffect()<p>I am trying to display data from a firestore database by pushing it to an array and mapping it. My goal is to have it display on the first page load, however, it only displays after I make changes to my code and I don't know why. My suspi...
<p>First, inside .then (next to fetchUserData), you wrote a function call rather than a callback. Change it to .then(() =&gt; callback()) or .then(callback).</p> <p>Second, state changes inside useEffect loop reflects changes only after the next render. So even after calling setClassesArray inside fetchUserData, fetchC...
Fetched firestore data not displaying on first page load with React useEffect()
reactjs|firebase|google-cloud-firestore|react-hooks
0
76
2
72,962,872
72,962,872
0
true
2022-07-13T07:23:33.487Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Fetched firestore data not displaying on first page load with React useEffect()<p>I am trying to display data from a firestore database by pushing it to an a...
72,966,341
Create a list of floats with only a specific decimal [0.0, 0.7, 1.0, 1.7, 2.0, 2.7, 3.0, 3.7, 4.0, 4.7, ...etc]<p>I am reading from an excel file and require the generation of a list to pull from where it has every integer in a range to the number read as well as a specific decimal between each integer.</p> <p>For inst...
<h2>A one-liner:</h2> <pre class="lang-py prettyprint-override"><code>x = 2.3 a = sorted([i for i in range(int(x)+1)] + [(x - i) for i in range(int(x)+1)]) </code></pre> <p>This creates a following list:</p> <pre><code>[0, 0.2999999999999998, 1, 1.2999999999999998, 2, 2.3] </code></pre> <p>This is due to floating-point...
Create a list of floats with only a specific decimal [0.0, 0.7, 1.0, 1.7, 2.0, 2.7, 3.0, 3.7, 4.0, 4.7, ...etc]
python|list|sorting
0
76
6
72,966,676
72,966,676
0
true
2022-07-13T12:31:28.757Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Create a list of floats with only a specific decimal [0.0, 0.7, 1.0, 1.7, 2.0, 2.7, 3.0, 3.7, 4.0, 4.7, ...etc]<p>I am reading from an excel file and require...
72,967,169
how to write a python code to get input and make a list of numbers from 1 to 100 and divide in to 5 parts and see the input is in witch part<p>I want to write a code that gets input from the user and the make a list of numbers from 1 to 100 and divide it into 5 sectors and check if the input is in which sector.</p> <p>...
<p>This will take the users input and see if it is in a certain range or give the count of the &quot;sector&quot; that it is in (0-20 = Sector 1, 20-40 = Sector 2)</p> <pre class="lang-py prettyprint-override"><code>userInput = input(&quot;please give a number from 1 to 100: &quot;) split = 20 count = 0 for i in range(...
how to write a python code to get input and make a list of numbers from 1 to 100 and divide in to 5 parts and see the input is in witch part
python|input|numbers|sector
-3
76
1
72,967,394
72,967,394
0
true
2022-07-13T13:30:26.823Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to write a python code to get input and make a list of numbers from 1 to 100 and divide in to 5 parts and see the input is in witch part<p>I want to writ...
72,942,694
Entity Framework 6.3 in .NET6<p>I'm having a problem using EF 6 (not EF Core) with .NET 6 everything works fine except when I try to add a migration.</p> <p>I get the following error:</p> <pre><code>The type initializer for 'System.Data.Entity.Migrations.DbMigrationsConfiguration`1' threw an exception. ---&gt; System....
<p>For other people still wanting to use EF 6.3 with .NET Core for legacy reasons.</p> <p>Add this to the project containing your <strong>Configuration</strong> file.</p> <pre><code>&lt;PropertyGroup&gt; &lt;GenerateRuntimeConfigurationFiles&gt;True&lt;/GenerateRuntimeConfigurationFiles&gt; &lt;/PropertyGroup&gt; </co...
Entity Framework 6.3 in .NET6
c#|.net|entity-framework|.net-6.0
0
76
1
72,971,598
72,971,598
0
true
2022-07-11T17:49:35.897Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Entity Framework 6.3 in .NET6<p>I'm having a problem using EF 6 (not EF Core) with .NET 6 everything works fine except when I try to add a migration.</p> <p>...
72,945,291
Pixi.JS: Using the Pixi Loader to create textures for inline SVG images<p>Everyone seems to recommend utilizing the Pixi Loader to load textures together, get updates on progress, etc. This works great so far.</p> <p>However, I am wondering if there is a way to load a texture from an inline SVG using the Pixi Loader? A...
<p>The only way I was able to get this to work, was to make the URL passed into the loader be a base64 encoded dataURI. Everything after &quot;base64,&quot; is just a base64 encoded svg. Example:</p> <pre><code>let svgTest = &quot;data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5...&quot; Loader.shared.add(...
Pixi.JS: Using the Pixi Loader to create textures for inline SVG images
svg|textures|pixi.js
0
76
1
72,983,729
72,983,729
0
true
2022-07-11T22:30:33.857Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Pixi.JS: Using the Pixi Loader to create textures for inline SVG images<p>Everyone seems to recommend utilizing the Pixi Loader to load textures together, ge...
72,990,309
cypress request to authorise with front end that calls rest api to login<p>I am having a problem using cy.request to authorise. Looking at what is coming back after the request, body is empty.</p> <p>I think this may be due to the setup I have so hopefully someone can tell me.</p> <p>I have a frontend svelte app with a...
<p>You may already know this, so apologies in advance if so.</p> <p>Generally, to authorise the app without having to fill in the login screen you would use <code>cy.request()</code> against the backend API and receive the token in the response.</p> <p>The token needs to be stored somewhere, either cookies, localstorag...
cypress request to authorise with front end that calls rest api to login
cypress
0
76
1
72,991,725
72,991,725
0
true
2022-07-15T07:15:25.403Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: cypress request to authorise with front end that calls rest api to login<p>I am having a problem using cy.request to authorise. Looking at what is coming bac...
73,001,659
Play Pause icon in single button (Audioplayer flutter)<pre><code>''' </code></pre> <p>i Just want create a button that controlls the audio play pause state please some body let me know how can i do that?</p> <pre><code>@override Widget build(BuildContext context) { return Scaffold( appBar: AppBar(title: con...
<p>Create a bool</p> <pre><code>bool isPlaying = false; </code></pre> <p>In place of icon check this variable</p> <pre><code>icon: (isPlaying)? Icons.stop: Icons.play, onTap: (){ setState((){ isPlaying = !isPlaying; //Manage playerto stop or play audio here }); } </code></pre>
Play Pause icon in single button (Audioplayer flutter)
flutter|flutter-layout|radio|iconbutton
0
76
1
73,001,915
73,001,915
0
true
2022-07-16T05:02:48.540Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Play Pause icon in single button (Audioplayer flutter)<pre><code>''' </code></pre> <p>i Just want create a button that controlls the audio play pause state p...
72,983,902
Angular async pipe displays only the first element of array<p>I have an array of strings that i get as a value from an observable.</p> <p>In the view I am trying to display the values with <em>async pipe</em>.</p> <p>the template displays only the value of the last item and multiplies it in the number of recieved objec...
<p>So it turns out that <strong>akita</strong> store management has to receive an Entity that has an Id field.</p> <p>I was getting an array of strings from my back end and i tried to set this array to the store.</p> <p>That didn't work since a <strong>string</strong> is not an object with an Id property. So what I ha...
Angular async pipe displays only the first element of array
angular|async-pipe|angular-akita|akita
-1
76
1
73,006,029
73,006,029
0
true
2022-07-14T16:37:14.653Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Angular async pipe displays only the first element of array<p>I have an array of strings that i get as a value from an observable.</p> <p>In the view I am tr...
73,014,558
Use word2vec in tokenized sentences<p>I am trying to create a emotion recognition model resorting to SVM. I have a big dataset of sentences each one with a labeled emotion. After text pre-processing, I have a pandas data frame containing the tokenized sentences, like it can be seen in [1.] <a href="https://i.stack.imgu...
<p>You need one vector per input instance if you want to use SVM. This means that you need to get embeddings for the words and do some operation, typically pooling, that will shrink the sequence of word embeddings into a single vector.</p> <p>The most frequently used methods are mean-pooling and max-pooling, simply tak...
Use word2vec in tokenized sentences
python|machine-learning|nlp|word-embedding
1
76
1
73,020,519
73,020,519
0
true
2022-07-17T18:58:51.853Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Use word2vec in tokenized sentences<p>I am trying to create a emotion recognition model resorting to SVM. I have a big dataset of sentences each one with a l...
73,021,329
React Redux Toolkit does not add object into a state array<p>I am redux beginner and I am using Redux Toolkit to create a reducer.</p> <p>My initialState variable is:</p> <pre><code>const initialState = { value: [], status: 'idle', }; </code></pre> <p>Then I create a slice with this reducer in it:</p> <pre><code>re...
<p>The problem was solved. The object push indeed works. The problem was not a redux toolkit but a react problem. I had indeed {state] expression in my react code, and that was that caused the problem, not redux toolkit.</p> <p>Code:</p> <pre><code>const cart = useSelector(selectCart); &lt;div&gt;{cart]&lt;/div&gt; </...
React Redux Toolkit does not add object into a state array
reactjs|arrays|object|redux|state
0
76
1
73,021,779
73,021,779
0
true
2022-07-18T11:05:16.480Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: React Redux Toolkit does not add object into a state array<p>I am redux beginner and I am using Redux Toolkit to create a reducer.</p> <p>My initialState var...
73,024,806
Using Mockito with Lambda expressions<p>I have the following class that uses Spring Security configuration and I want to write a unit test on it.</p> <pre><code>@AllArgsConstructor public class SecurityConfiguration extends WebSecurityConfigurerAdapter { private AuthenticationManager authenticationManager; @O...
<p>Your problem is not about Lambda expressions! Your problem is that you are mocking on</p> <pre><code>when(httpSecurity.authorizeRequests(any(Customizer.class))).thenReturn(httpSecurity); </code></pre> <p>and</p> <pre><code>when(httpSecurity.oauth2ResourceServer(any(Customizer.class))).thenReturn(httpSecurity); </co...
Using Mockito with Lambda expressions
java|unit-testing|lambda|spring-security|mockito
1
76
1
73,026,714
73,026,714
0
true
2022-07-18T15:25:20.743Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Using Mockito with Lambda expressions<p>I have the following class that uses Spring Security configuration and I want to write a unit test on it.</p> <pre><c...
73,025,659
Azure data factory -ingesting the data from csv file to sql table- data activity sql sink stored procedure -table type and table type parameter name<p>I am running one of the existing Azure data factory pipeline that contains instet into sql table, where the sink is a sql server stored procedure. I supplied the table t...
<p>There is nothing wrong with your approach or code. You are getting this error because of the way you specified the <code>Table type</code> value in the sink. <br> <br> <img src="https://i.imgur.com/Uhehr1H.png" alt="enter image description here" /> <br><br> I got <strong>same error</strong> as you with the above tab...
Azure data factory -ingesting the data from csv file to sql table- data activity sql sink stored procedure -table type and table type parameter name
azure-data-factory|azure-data-factory-2
0
76
1
73,037,069
73,037,069
0
true
2022-07-18T16:31:08.927Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Azure data factory -ingesting the data from csv file to sql table- data activity sql sink stored procedure -table type and table type parameter name<p>I am r...
72,998,226
FloatImage in Dash Leaflet<p>So I have been working with folium and dash-leaflet for a little bit and I have been seeing some differences in how you create maps between the two packages. One of the things that I have found in folium that is nice is an object called a <a href="https://github.com/python-visualization/fol...
<p>There is no direct equivalent of the <code>FloatImage</code> construct from Folium in <code>dash-leaflet</code>. However, you can achieve an image floating on top of the map with a few standard html elements. Here is a small example,</p> <pre><code>from dash import Dash, html import dash_leaflet as dl image_url = &...
FloatImage in Dash Leaflet
python|leaflet|plotly-dash|folium|dash-leaflet
0
76
1
73,039,939
73,039,939
0
true
2022-07-15T18:22:20.483Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: FloatImage in Dash Leaflet<p>So I have been working with folium and dash-leaflet for a little bit and I have been seeing some differences in how you create m...
73,016,454
How to monitor SignalR ConnectionState in Angular 11 after SignalR connection is established continously<p>I am trying to find a way to monitor a SignalR connection continuously like say every minute or every 3 minutes. Trying to find a way to check the connection state. Do I need to set up an observable that can be su...
<p>I was able to solve this by checking connection reconnecting(), reconnected() and onClose()events:</p> <pre><code> constructor() { this.connection = new signalR.HubConnectionBuilder() .withUrl(environment.hubAddress) .build(); this.connection.reconnecting() =&gt; {} this.connection.reconnected() ...
How to monitor SignalR ConnectionState in Angular 11 after SignalR connection is established continously
signalr|angular11|asp.net-core-signalr
1
76
1
73,078,870
73,078,870
0
true
2022-07-18T01:15:53.750Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to monitor SignalR ConnectionState in Angular 11 after SignalR connection is established continously<p>I am trying to find a way to monitor a SignalR con...
72,998,090
Custom react hook and infinite loop<p>So I have this custom hook. Every time I use the returned countries in a useEffect it seems to do an infinite loop. Like the useEffect thinks countries changes all the time and have to rerender. Now I did read something about custom hooks creating a new instance of the data on ever...
<p>Managed to change the code so that countries was not part of a useEffectr.</p>
Custom react hook and infinite loop
reactjs|react-hooks
1
76
2
73,150,284
73,150,284
0
true
2022-07-15T18:04:36.717Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Custom react hook and infinite loop<p>So I have this custom hook. Every time I use the returned countries in a useEffect it seems to do an infinite loop. Lik...
72,981,326
Redistribution not working with large messages<p>I'm using ActiveMQ Artemis 2.23.1. I have 3 masters and 3 slaves (all 60GB HD, 60GB RAM). One of my clients is having issues receiving large messages (~100mb).</p> <p>Test procedure:</p> <ol> <li>consumers on node 01 and 03</li> <li>send 100 small messages</li> <li>send ...
<p>This issue was almost certainly caused by <a href="https://issues.apache.org/jira/browse/ARTEMIS-3805" rel="nofollow noreferrer">ARTEMIS-3805</a>. Therefore the &quot;proper&quot; solution would be to specify this on your <code>cluster-connection</code>:</p> <pre class="lang-xml prettyprint-override"><code>&lt;produ...
Redistribution not working with large messages
large-files|activemq-artemis
0
76
2
73,198,066
73,198,066
0
true
2022-07-14T13:27:24.220Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Redistribution not working with large messages<p>I'm using ActiveMQ Artemis 2.23.1. I have 3 masters and 3 slaves (all 60GB HD, 60GB RAM). One of my clients ...
72,875,608
Do-while loop ends program before while statement is met<p>Right now, I'm writing a program that will allow a user to create an infinite number of exercise objects, and will only stop when the user input is equal to certain a value. Below is the relevant code:</p> <pre><code>String s = &quot;&quot;; do { UserAd...
<p>Adding to previous comments, try something like this:</p> <pre><code>public class MainClass{ static Scanner in = new Scanner(System.in); public static void main(String[] args){ String s = &quot;&quot;; do { UserAddedExercise(); System.out.print(&quot;Do you wa...
Do-while loop ends program before while statement is met
java|object|arraylist|do-while
0
76
1
72,876,071
72,876,071
0
true
2022-07-05T21:14:52.903Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Do-while loop ends program before while statement is met<p>Right now, I'm writing a program that will allow a user to create an infinite number of exercise o...
73,013,652
i want to hide the showmore button if the height of the div(ccontainer) is less than 550px<p>i want to hide the showmore button if the height of the div(ccontainer) is less than 550px and i will have more than one div and for each i will have a showmore button, and i already have a code that works (hides the btn) but i...
<p>Your question is not fully understandable.But I think you are asking that hide the top most showmore button and display other showmore button when the upper ccontainer is less than 500px.Your styling of the button looks not good to me,but I didnt change it since this is a jquery question. Inorder to test this code I...
i want to hide the showmore button if the height of the div(ccontainer) is less than 550px
javascript|html|jquery
1
76
1
73,014,114
73,014,114
0
true
2022-07-17T16:47:30.687Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: i want to hide the showmore button if the height of the div(ccontainer) is less than 550px<p>i want to hide the showmore button if the height of the div(ccon...
72,902,122
How do I store an image as base64 to be used from local data instead of having to store it on a server? Need to redraw a massive image, even offline<p>SOLUTION: simply store the base64 as the image source on an HTML image tag and then hide that image. Thanks, Kaiido!</p> <p>I need to store an image as pixel data in the...
<p>Base64 in LocalStorage is definitely not &quot;the most performant way&quot; to store an image, nor will it allow the storage of big files.</p> <p>If I understand your case correctly (the need to be able to navigate your site even when offline), then the correct solution is to</p> <ul> <li>register a ServiceWorker,<...
How do I store an image as base64 to be used from local data instead of having to store it on a server? Need to redraw a massive image, even offline
javascript|canvas|base64|blob|same-origin-policy
0
76
1
72,905,703
72,905,703
0
true
2022-07-07T17:36:55.953Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I store an image as base64 to be used from local data instead of having to store it on a server? Need to redraw a massive image, even offline<p>SOLUTI...
73,017,437
A cleaner way to write this block of JS code<p>I'm following a JS course for beginners and the first lesson was about making a &quot;rock, paper, scissors&quot; game.</p> <p>The instructor said something about this not being the most efficient way to determine the winner but didn't really touch on how to write it. All ...
<p>When solving a problem like this, it's good to think about your data model first. How would you create a data structure that made it easy to answer the question you need to answer?</p> <p>Maybe something like:</p> <pre><code>const winsVs = { rock: 'scissors', paper: 'rock', scissors: 'paper' } </code></p...
A cleaner way to write this block of JS code
javascript
0
76
4
73,017,529
73,017,529
0
true
2022-07-18T04:49:38.790Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: A cleaner way to write this block of JS code<p>I'm following a JS course for beginners and the first lesson was about making a &quot;rock, paper, scissors&qu...
72,820,133
How to get the distance in pixels between two margins in HTML/CSS?<p>HTML</p> <pre><code>&lt;div class = &quot;container&quot;&gt; &lt;p&gt; class = &quot;A&quot;&gt; One &lt;/p&gt; &lt;p&gt; class = &quot;B&quot;&gt; Two &lt;/p&gt; &lt;/div&gt; </code></pre> <p>CSS</p> <pre><code>.A{ margin-bottom: 40px;} .B{margin-to...
<p>Your HTML is invalid, so the styles are likely not applying.</p> <p>You are closing the <code>&lt;p&gt;</code> tags before you apply the classname, you are also placing spaces around the <code>=</code> in the classname declaration. Both of these things are invalid.</p> <p>Your HTML should look like this, when proper...
How to get the distance in pixels between two margins in HTML/CSS?
html|css
-1
76
2
72,820,292
72,820,292
0
true
2022-06-30T17:56:16.830Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to get the distance in pixels between two margins in HTML/CSS?<p>HTML</p> <pre><code>&lt;div class = &quot;container&quot;&gt; &lt;p&gt; class = &quot;A&...
72,988,132
Replace values inside a for loop (Python)<p>I'm working with a for loop that compares dataframes with different number of rows, and the comparison is working pretty good. However, I'd like to replace specific values inside this for loop:</p> <p>Data frame 1:</p> <pre><code>Product Color Brand 0 A Invalid Nike 1 ...
<p>This question lacks specificity. For example, there are two possible fill values in df2 for products A and C. Which fill value is it you are looking for?</p> <p>In this particular example, you might consider and alternative approach since all of your data is already in df2:</p> <pre><code>&gt;&gt;&gt; df2[~df2.dupli...
Replace values inside a for loop (Python)
python|pandas|dataframe|replace|compare
0
76
1
72,988,395
72,988,395
0
true
2022-07-15T01:18:28.060Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Replace values inside a for loop (Python)<p>I'm working with a for loop that compares dataframes with different number of rows, and the comparison is working...
72,818,535
Wpf Two-way data binding doesn't work with static classes<p>I'm very new to C# and XAML. I'm trying to do a WPF project where there will be a good amount of data binding. Right now, I am able to do one way data binding without any problems, the issue I am facing is when I try to do two-way data binding. <br><br> This i...
<ol> <li><p>WPF data binding works on public properties only, your <code>ipAddressServer</code> is a static field (aka class variable) and not a property, so it won't be used. It's also failing at following proper naming conventions.</p> </li> <li><p>Your mess of a binding is the old style static binding, use <code>{Bi...
Wpf Two-way data binding doesn't work with static classes
c#|wpf|xaml|data-binding|static
-1
76
1
72,818,607
72,818,607
0
true
2022-06-30T15:38:49.407Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Wpf Two-way data binding doesn't work with static classes<p>I'm very new to C# and XAML. I'm trying to do a WPF project where there will be a good amount of ...
72,779,952
How can I ignore undefined values when updating Firestore data from a Google Cloud Function?<p>In my index.js file, I have:</p> <pre><code>const db = admin.firestore(); db.settings({ignoreUndefinedProperties:true}); </code></pre> <p>In my other .js file with the actual function, I have:</p> <pre><code>const functions =...
<p><code>ignoreUndefinedProperties:true </code> is not a valid SetOption</p> <p>Reference for SetOptions: <a href="https://firebase.google.com/docs/reference/js/v8/firebase.firestore.SetOptions" rel="nofollow noreferrer">https://firebase.google.com/docs/reference/js/v8/firebase.firestore.SetOptions</a></p> <p>You could...
How can I ignore undefined values when updating Firestore data from a Google Cloud Function?
javascript|node.js|firebase|google-cloud-firestore|google-cloud-functions
0
76
1
72,780,853
72,780,853
0
true
2022-06-28T01:57:10.667Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I ignore undefined values when updating Firestore data from a Google Cloud Function?<p>In my index.js file, I have:</p> <pre><code>const db = admin.f...
72,802,111
How to create a directive in Angular to mask us phone number without changing model?<p>I have a directive in Angular Js that masks phone numbers to US format (xxx) xxx-xxxx ,</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snipp...
<p>Good comments under the question. If the end result is the need to mask the phone number, being able to change the number but still keep the unmasked number in the control, then I would recommend using a package for this. Complex template operations on input and form is no easy feat. <a href="https://www.npmjs.com/p...
How to create a directive in Angular to mask us phone number without changing model?
javascript|angular|angularjs|angular2-directives
0
76
1
72,809,587
72,809,587
0
true
2022-06-29T13:17:58.540Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to create a directive in Angular to mask us phone number without changing model?<p>I have a directive in Angular Js that masks phone numbers to US format...
72,774,324
how to adjust a div width to expand and shrink back on scroll<p>I was doing this and thought its easy until I got stuck.<br /> I want to expand a div with on scroll down to <code>100%</code> until the bottom of the div then at the bottom shrink back to <code>90%</code> and on scroll top doing reverse. which means the t...
<p>Looks like instead of just checking if the user has scrolled, you need to check whether the div is in view and change the width accordingly.</p> <pre><code>import React, { useEffect, useState, useRef } from 'react'; const AdjustContainer = ({ children }) =&gt; { const ele = useRef(); const [width, setWidth]...
how to adjust a div width to expand and shrink back on scroll
javascript|css|reactjs|sass|next.js
0
76
1
72,778,226
72,778,226
0
true
2022-06-27T15:04:46.803Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to adjust a div width to expand and shrink back on scroll<p>I was doing this and thought its easy until I got stuck.<br /> I want to expand a div with on...
72,777,816
Filter an array with another array with matching characters in javascript<p>Is it possible to have an array filter another array from matching each character?</p> <p>I have a set of logs and a filter that look like this:</p> <pre><code>logs = [{id:1, log: &quot;log1&quot;}], {id:2, log: &quot;log2&quot;}, {id:3, log: &...
<p>You can do something like the following:</p> <pre><code>const logs = [{id:1, log: &quot;log1&quot;}, {id:2, log: &quot;log2&quot;}, {id:3, log: &quot;fail&quot;}] const searches = [&quot;1&quot;, &quot;fai&quot;] const matchingLogs = logs.filter(l =&gt; { return searches.some(term =&gt; l.log.includes(term)) }) ...
Filter an array with another array with matching characters in javascript
javascript|arrays|filter
-1
76
3
72,777,979
72,777,979
0
true
2022-06-27T20:12:49.827Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Filter an array with another array with matching characters in javascript<p>Is it possible to have an array filter another array from matching each character...
73,018,520
Time complexity of two separate nested for loops<p>An introductory <a href="https://books.google.co.nz/books?id=f57uDwAAQBAJ&amp;lpg=PA225&amp;ots=GHH9GQ402A&amp;dq=%22potentially%20involves%20looking%20at%20each%20element%22&amp;pg=PA225#v=onepage&amp;q=%22potentially%20involves%20looking%20at%20each%20element%22&amp;...
<blockquote> <p>The author says that the running time for part (i) is order <code>Θ(len(L1)*len(L2))</code>, but this seems to imply that part (i) runs in <code>Θ(len(L1)*len(L2))</code> in all cases, is this correct?</p> </blockquote> <p>No. The author uses Big Θ in the sense that they explain in section 11.2 of that ...
Time complexity of two separate nested for loops
algorithm|time-complexity|complexity-theory
0
76
2
73,019,924
73,019,924
0
true
2022-07-18T07:15:16.937Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Time complexity of two separate nested for loops<p>An introductory <a href="https://books.google.co.nz/books?id=f57uDwAAQBAJ&amp;lpg=PA225&amp;ots=GHH9GQ402A...
72,839,920
Using Cytoscape.js how do I access a data field that has a colon in its key?<p>Having followed the <a href="https://js.cytoscape.org/" rel="nofollow noreferrer">official documentation</a> and <a href="https://blog.js.cytoscape.org/2016/05/24/getting-started/" rel="nofollow noreferrer">tutorial</a>, I am able to -- as l...
<p>I was able to solve my own problem, inspired by an answer to <a href="https://stackoverflow.com/questions/65024627/multiple-data-values-for-label-text-in-cytoscape-js">this question</a>.</p> <p>Using a function, I was able to access the field with a colon in its key:</p> <pre><code>// compare with code above style:...
Using Cytoscape.js how do I access a data field that has a colon in its key?
javascript|cytoscape.js
0
76
1
72,885,378
72,885,378
0
true
2022-07-02T14:40:16.587Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Using Cytoscape.js how do I access a data field that has a colon in its key?<p>Having followed the <a href="https://js.cytoscape.org/" rel="nofollow noreferr...
72,893,653
Create an IOMMU entry in Linux<p>I've been browsing through the Linux IOMMU code for quite a while now and couldn't find an easy approach to directly create an IOMMU entry.</p> <p>I want to specify the physical address (maybe also the virtual but it is not necessary) and the device. The range should be inserted into th...
<p>I ended up with a pretty hacky solution, not the optimal one, but it worked for my usecase. Adjusted the function <code>iommu_dma_map_page</code> in <code>dma-iommu.c</code> to look like the following and export it.</p> <p>(vanilla 5.18 except for this modification)</p> <pre class="lang-c prettyprint-override"><code...
Create an IOMMU entry in Linux
linux-kernel|kernel-module|dma|iommu
1
76
1
72,912,197
72,912,197
0
true
2022-07-07T07:13:37.650Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Create an IOMMU entry in Linux<p>I've been browsing through the Linux IOMMU code for quite a while now and couldn't find an easy approach to directly create ...
72,950,447
How to set the CornerRadius of a button programmatically [WPF/VB]?<p>I know <a href="https://stackoverflow.com/questions/6745663/how-to-create-make-rounded-corner-buttons-in-wpf">how to set the corner radius</a> of a button in XAML.</p> <p>However, I need to set the corner radius of buttons that are created programmati...
<p>Similar to the linked XAML based solution, I suggest you utilize styles when you create your dynamic buttons. Suppose you create some named resource styles in your window</p> <p>€dit: in my first version I defined a separate named style for the <code>Border</code>, but as @ASh mentioned, the <code>Border</code> styl...
How to set the CornerRadius of a button programmatically [WPF/VB]?
wpf|vb.net|button|programmatically|cornerradius
1
76
2
72,954,896
72,954,896
0
true
2022-07-12T09:58:43.847Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to set the CornerRadius of a button programmatically [WPF/VB]?<p>I know <a href="https://stackoverflow.com/questions/6745663/how-to-create-make-rounded-c...
72,811,115
Unable to parse json into list of custom Java objects<p>I am reading JSON from a file, and when trying to unmarshal the file to a java object, I am not getting expected array of custom Java object, however, getting array of LinkedHashMap</p> <p>Please see below objects</p> <pre><code> public class Result&lt;T&gt;{ ...
<p>It worked after changing</p> <pre class="lang-java prettyprint-override"><code>Result&lt;List&lt;Accounts&gt; finalResult = mapper.readValue(accounts, Result.class); </code></pre> <p>to</p> <pre class="lang-java prettyprint-override"><code>Result&lt;List&lt;Accounts&gt;&gt; finalResult = mapper.readValue(accounts, n...
Unable to parse json into list of custom Java objects
java|json|parsing|jsonpath
0
76
3
72,815,294
72,815,294
0
true
2022-06-30T06:20:52.110Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Unable to parse json into list of custom Java objects<p>I am reading JSON from a file, and when trying to unmarshal the file to a java object, I am not getti...
72,804,330
Powershell: Change properties of a Microsoft failover cluster group aka role<p>I created a generic service group (or role as it is displayed in the GUI) via powershell <code>Add-ClusterGenericServiceRole</code> Basically it is the AppReadiness service. Everything went fine so far. I would like to change some properties...
<p>I opened a ticket at Microsoft and they came back with the following working answer:</p> <pre><code>(Get-ClusterGroup -Name &quot;Testgroup&quot;).FailoverPeriod=12 </code></pre> <p>Basically, these &quot;things&quot; which are part of the cluster group are considered &quot;properties&quot; and not parameters and ca...
Powershell: Change properties of a Microsoft failover cluster group aka role
powershell|cluster-computing|failover
0
76
2
72,963,432
72,963,432
0
true
2022-06-29T15:47:21.907Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Powershell: Change properties of a Microsoft failover cluster group aka role<p>I created a generic service group (or role as it is displayed in the GUI) via ...
73,002,756
Flutter jsonDecode FlutterSession value is not loading in widget initially. but works on hotload<p>i am initializing a variable with value from session. but could not print it in the widget. but it is showing after hot load. here is my code :</p> <pre><code> class _dashboardState extends State&lt;dashboard&gt; { var ...
<p>Let me explain this first,</p> <p>lifecycle of State goes like this createState -&gt; initState -&gt;........-&gt; build</p> <p>so you're right about the order of execution</p> <p>you're calling getSessionValue() from initState and expecting widget to build right after it, but since getSessionValue() returns a Futur...
Flutter jsonDecode FlutterSession value is not loading in widget initially. but works on hotload
flutter|session|widget
0
76
2
73,040,167
73,040,167
0
true
2022-07-16T08:37:41.517Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Flutter jsonDecode FlutterSession value is not loading in widget initially. but works on hotload<p>i am initializing a variable with value from session. but ...
72,823,906
Django: Passing parameters in URL as query arguments<p>How can I pass parameters via URL as query parameters to avoid multiple and complicated url patterns?</p> <p>For example, instead of making a complicated url like <code>example.com/page/12/red/dog/japan/spot</code> or something like that, and then a corresponding e...
<p>You are looking for queryparameters and you are almost done with it. The following code is untested but should kinda work:</p> <pre><code>def page(request): animal = request.GET.get(&quot;animal&quot;,None) # default None if not present color = request.GET.get(&quot;color&quot;,None) return render(reques...
Django: Passing parameters in URL as query arguments
python|django|django-views|django-urls
1
76
1
72,826,297
72,826,297
0
true
2022-07-01T02:49:11.253Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Django: Passing parameters in URL as query arguments<p>How can I pass parameters via URL as query parameters to avoid multiple and complicated url patterns?<...
72,909,715
SQL query with 3 tables returns duplicate rows<p>Hopefully this won't get flagged as duplicate. I am struggling to understand the return of duplicate rows when more than 2 tables are in query. I have read a number of similar questions and posts online but can't wrap my head around the logic. I am hoping that if someone...
<p>Ok, I see what the issue is.</p> <p>It is with your join</p> <pre><code>INNER JOIN TargetLineCount t ON t.Branch = b.BranchNumber </code></pre> <p>It should be like this:</p> <pre><code>INNER JOIN TargetLineCount t ON t.Branch = b.BranchNumber AND o.ProductGroup = t.ProductGroup </code></pre> <p>The only thing is th...
SQL query with 3 tables returns duplicate rows
sql|sql-server|tsql
0
76
1
72,910,307
72,910,307
0
true
2022-07-08T09:58:54.670Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: SQL query with 3 tables returns duplicate rows<p>Hopefully this won't get flagged as duplicate. I am struggling to understand the return of duplicate rows wh...
72,768,661
Bootstrap tabs not changing content<p>I'm trying to integrate bootstrap tabs in one of our pages. I've copied the example from <a href="https://getbootstrap.com/docs/4.0/components/navs/#javascript-behavior" rel="nofollow noreferrer">https://getbootstrap.com/docs/4.0/components/navs/#javascript-behavior</a> but the tab...
<p>Following the official Bootstrap guide, it looks like you need to add the Javascript code manually:</p> <blockquote> <p>Enable tabbable tabs via JavaScript (each tab needs to be activated individually):</p> </blockquote> <pre class="lang-js prettyprint-override"><code>$('#myTab a').on('click', function (e) { e.pr...
Bootstrap tabs not changing content
javascript|html|twitter-bootstrap|bootstrap-4
1
76
2
72,771,025
72,771,025
1
true
2022-06-27T07:52:12.963Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Bootstrap tabs not changing content<p>I'm trying to integrate bootstrap tabs in one of our pages. I've copied the example from <a href="https://getbootstrap....
72,779,968
How to make objects move like in Count Masters? Unity<p>How to make objects move like in Count Masters?</p> <p>Here is the picture:</p> <p><a href="https://i.stack.imgur.com/kJlKx.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kJlKx.jpg" alt="enter image description here" /></a></p> <p>I thought and...
<p>&quot;stick together into an incomprehensible mess, or fly away under pressure&quot; this sounds like you are using physics (also know as Rigidbody :p) with these avatars, so this behaviour is expected when a lot of rigidbodies are trying to go to a same spot, hitting each other.</p> <p>I would suggest you to have, ...
How to make objects move like in Count Masters? Unity
c#|unity3d
0
76
1
72,792,090
72,792,090
1
true
2022-06-28T02:00:11.220Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to make objects move like in Count Masters? Unity<p>How to make objects move like in Count Masters?</p> <p>Here is the picture:</p> <p><a href="https://i...