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,151,039
Take a class as a parameter which has a particular method in it<p>I know that we can pass a class in a param which has a particular class as its super. For example, see this:</p> <pre class="lang-java prettyprint-override"><code>public void sampleMethod(Class&lt;? super MyParentClass&gt; class){ // my random code }...
<p>You need to use an <em>interface</em> to do that. When an object implements an interface, that guarantees that it has the methods, properties etc that the interface defines. You don't need to know what <em>class</em> the object is, just that it can be treated as the interface's type:</p> <pre><code>interface MethodH...
Take a class as a parameter which has a particular method in it
java|class|kotlin|methods
-1
85
1
72,155,307
72,155,307
3
true
2022-05-07T09:06:19.247Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Take a class as a parameter which has a particular method in it<p>I know that we can pass a class in a param which has a particular class as its super. For e...
72,164,700
select(.key="value") emits even non-matching items<p>I have the following test.json</p> <pre><code>{&quot;type&quot;:&quot;RECORD&quot;,&quot;record&quot;:{&quot;key_A&quot;: &quot;apples&quot;,&quot;key_B&quot;:&quot;bananas&quot;}} {&quot;type&quot;:&quot;RECORD&quot;,&quot;record&quot;:{&quot;key_A&quot;: &quot;appl...
<p><code>=</code> is an assignment operator. <code>==</code> is an equality-comparison operator.</p> <p>You want <code>select(.record.key_B == &quot;oranges&quot;)</code>.</p>
select(.key="value") emits even non-matching items
jq
-1
40
1
72,164,749
72,164,749
3
true
2022-05-08T20:03:33.933Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: select(.key="value") emits even non-matching items<p>I have the following test.json</p> <pre><code>{&quot;type&quot;:&quot;RECORD&quot;,&quot;record&quot;:{&...
72,168,796
Shopware: Injecting 'requestStack' in an event subscriber<p>I need to inject the requestStack in an event subscriber but it looks like I'm doing something wrong (when the class gets constructed) but I'm not sure what it is.</p> <p>First I'm subscribing to <code>onLineItemAdded</code> then I want to set a new field in t...
<p>You have to inject the request stack in the XML:</p> <pre class="lang-xml prettyprint-override"><code>&lt;?xml version=&quot;1.0&quot; ?&gt; &lt;container xmlns=&quot;http://symfony.com/schema/dic/services&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation...
Shopware: Injecting 'requestStack' in an event subscriber
symfony|shopware|shopware6
-1
101
1
72,168,870
72,168,870
3
true
2022-05-09T08:07:49.063Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Shopware: Injecting 'requestStack' in an event subscriber<p>I need to inject the requestStack in an event subscriber but it looks like I'm doing something wr...
72,180,926
Replace string with symbol using javascript?<p>I have this text <code>@abc some text here</code>. How can I make it into <code>&lt;a href=&quot;some_url&quot;&gt;@abc&lt;/a&gt; some text here</code> using javascript? any library to do that?</p>
<p>Use a regex replacement:</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>var input = "@abc some text here"; var output = input.replace(/(@\S+)/, "&lt;a href=\"some_url\"&gt;...
Replace string with symbol using javascript?
javascript|reactjs|typescript|vue.js
-1
54
1
72,180,935
72,180,935
3
true
2022-05-10T04:56:38.607Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Replace string with symbol using javascript?<p>I have this text <code>@abc some text here</code>. How can I make it into <code>&lt;a href=&quot;some_url&quot...
72,198,098
Converting a list of strings that represent hex values into actual hex values<p>So, I have a list containing strings that represent hex values like:</p> <pre><code>['02', 'ff', '98', '80', '39', '31', '03'] </code></pre> <p>I would like to generate a new list that contains the actual hex values like:</p> <pre><code>[0x...
<p>You can convert the hexadecimal string representations like this:</p> <pre><code>a = ['02', 'ff', '98', '80', '39', '31', '03'] b = [int(x, 16) for x in a] </code></pre> <p>This will create a list with integer equivalents of the input strings</p>
Converting a list of strings that represent hex values into actual hex values
python|list|type-conversion|hex
-1
108
1
72,198,160
72,198,160
3
true
2022-05-11T08:50:38.887Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Converting a list of strings that represent hex values into actual hex values<p>So, I have a list containing strings that represent hex values like:</p> <pre...
72,198,769
Access a json field in python<p>Im using a get request in python</p> <pre><code>x = requests.get(url, headers = ... ) print(x.json()) </code></pre> <p>and the result im getting is</p> <pre><code>{ 'organization': { 'id': '6', 'name': 'TestPostman', 'displayName': 'TestPostman', 'canHaveGateways': True, 'maxGateway...
<p>If you want to access the ID in the Organization try this:</p> <pre><code>x = x.json() print(x[&quot;organization&quot;][&quot;id&quot;]) </code></pre>
Access a json field in python
python|json
-1
43
2
72,198,792
72,198,792
3
true
2022-05-11T09:40:16.920Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Access a json field in python<p>Im using a get request in python</p> <pre><code>x = requests.get(url, headers = ... ) print(x.json()) </code></pre> <p>and t...
72,208,446
Searching Pandas column for words in list and adding found words into new column<p>I have a list of words as well as a dataframe</p> <pre><code>data = {'test':['dog is happy', 'dog is hap', 'dog is hap']} df = pd.DataFrame(data) list = ['dog', 'hap', 'happy'] df test 0 dog is happy 1 dog is hap 2 ...
<p>This is pretty straight forward using <code>set.intersection</code>:</p> <pre class="lang-py prettyprint-override"><code>&gt;&gt;&gt; words = {'dog', 'hap', 'happy'} &gt;&gt;&gt; df[&quot;matches&quot;] = df[&quot;test&quot;].str.split().apply(set(words).intersection) &gt;&gt;&gt; df test matches 0 ...
Searching Pandas column for words in list and adding found words into new column
python|pandas
-1
172
3
72,208,498
72,208,498
3
true
2022-05-11T22:57:13.183Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Searching Pandas column for words in list and adding found words into new column<p>I have a list of words as well as a dataframe</p> <pre><code>data = {'test...
72,217,400
How to add link to Revolution Slider button?<p>I purchased an HTML theme, while editing it there is some Revolution Slider code.</p> <p>I have the following for now - This makes the text inside the button i.e. Get Started into a link. I can't figure out how to make full button into a clickable link.</p> <pre><code>&lt;...
<p>try this, if you put the &quot;a&quot; at the begining of the code, the link work in all seccion inside:</p> <pre><code>&lt;a href=&quot;form_for_information.html&quot; style=&quot;color:#1a1a1a&quot;&gt; &lt;rs-layer id=&quot;slider-1-slide-1-layer-1&quot; class=&quot;rev-btn&quot; data-type=&quot;button&quot; dat...
How to add link to Revolution Slider button?
html|revolution-slider
-1
270
1
72,217,605
72,217,605
3
true
2022-05-12T14:25:52.517Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to add link to Revolution Slider button?<p>I purchased an HTML theme, while editing it there is some Revolution Slider code.</p> <p>I have the following ...
72,218,780
sql assigned to a variable couldn't be printed/queried when executing a procedure<pre><code>DECLARE @DROP_SQL NVARCHAR(MAX) DECLARE @create_Sql NVARCHAR(MAX) DECLARE @tablename2 NVARCHAR(MAX) DECLARE @insert_sql NVARCHAR(MAX) DECLARE @db_schema NVARCHAR(MAX) SET @db_schema='GGW' SET @tablename2='VIEW_LOG' DECLARE @coun...
<p>There's so much wrong with the above... The comments under the question touch why the above fails, you concatenate <code>NULL</code> to your string which results in <code>NULL</code>, and I highlight some more below and in the comments of the SQL. Of course, you shouldn't be using that concatenation at all and shoul...
sql assigned to a variable couldn't be printed/queried when executing a procedure
sql|sql-server
-1
41
1
72,219,140
72,219,140
3
true
2022-05-12T16:00:23.893Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: sql assigned to a variable couldn't be printed/queried when executing a procedure<pre><code>DECLARE @DROP_SQL NVARCHAR(MAX) DECLARE @create_Sql NVARCHAR(MAX)...
72,235,449
How can I set one array as a value of another array in PHP?<p>I have the following array:</p> <pre><code>Array ( [0] =&gt; James [1] =&gt; Mike [2] =&gt; Liam [3] =&gt; Shantel [4] =&gt; Harry ) Array ( [0] =&gt; Green [1] =&gt; Blue [2] =&gt; Yellow [3] =&gt; Purple [4] =&gt; Re...
<p>You want to set a specific key of <code>$final</code> to a specific value. So instead of using <code>array_push</code> (or <code>$final[]</code>), which just adds a value to an indexed array, you want to define the key/value of the associated array <code>$final</code> like:</p> <pre><code>$final[$names[$i]] = $color...
How can I set one array as a value of another array in PHP?
php|arrays|string|list
-1
36
2
72,235,472
72,235,472
3
true
2022-05-13T21:08:21.663Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I set one array as a value of another array in PHP?<p>I have the following array:</p> <pre><code>Array ( [0] =&gt; James [1] =&gt; Mike [...
72,235,720
how can I preserve my class after list clear<p>I have 2 classes</p> <pre><code>public class Product { public DateTime Date { get; set; } public string Name { get; set; } public int Amount { get; set; } } public class Campaign { public long CampaignId { get; set; } public string CampaignName { get; ...
<pre><code>campaign.Products = new List&lt;Product&gt;(productList); </code></pre>
how can I preserve my class after list clear
c#|asp.net
-1
188
2
72,235,754
72,235,754
3
true
2022-05-13T21:47:23.823Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how can I preserve my class after list clear<p>I have 2 classes</p> <pre><code>public class Product { public DateTime Date { get; set; } public strin...
72,213,849
MongoDB get intersection from result set<p>I am new to MongoDB. I have pymongo to access mongodb.</p> <p>The data is in this format</p> <pre><code>{ shop:&quot;shop A&quot;, city:&quot;xxx&quot;, electronics:[&quot;phone&quot;,&quot;laptop&quot;,&quot;television&quot;], stationary:[&quot;pen&quot;,&quot;pencil&quot;,&q...
<p>Query</p> <ul> <li>if <code>$setIntersection</code> could be used as accumulator we could group and intersect those, but it cant be used as accumulator</li> <li>group by city and push those arrays</li> <li>reduce in each and intersect (its 3x the same code)</li> </ul> <p><a href="https://cmql.org/playmongo/?q=627ce2...
MongoDB get intersection from result set
mongodb|pymongo|intersection
-1
29
1
72,214,029
72,214,029
3
true
2022-05-12T10:20:41.860Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: MongoDB get intersection from result set<p>I am new to MongoDB. I have pymongo to access mongodb.</p> <p>The data is in this format</p> <pre><code>{ shop:&qu...
72,184,084
Does declaring struct Name make Name equivalent to struct Name?<p>I am a bit confused when using struct in c/c++. Traditionally, when I use <code>struct</code>, I usually use it as:</p> <pre><code>typedef struct Name{ int a; }; Name var; </code></pre> <p>Although it is considered a bad practice <a href="https://ww...
<p>For:</p> <pre><code>typedef struct Name{ int a; }; Name var; </code></pre> <p>The definition should be:</p> <pre><code>typedef struct Name{ int a; } Name; Name var; </code></pre> <p>Otherwise you are not aliasing the type.</p> <hr /> <p>In C++ this doesn't make sense, when you declare <code>struct Name</co...
Does declaring struct Name make Name equivalent to struct Name?
c++|c|struct|typedef
-1
128
3
72,184,282
72,184,282
3
true
2022-05-10T09:46:04.437Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Does declaring struct Name make Name equivalent to struct Name?<p>I am a bit confused when using struct in c/c++. Traditionally, when I use <code>struct</cod...
72,217,076
How to speed up my SUPER SLOW search script<p><strong>UPDATE (06/21/22): See my updated script below, which utilizes some of the answer.</strong></p> <p>I am building a script to search for <code>$name</code> through a large batch of CSV files. These files can be as big as 67,000 KB. This is my script that I use to sea...
<p>Give this one a try, it should be a bit faster. <code>Select-Object</code> has to reconstruct your object, if you use it before filtering, you're actually recreating your entire CSV, you want to filter first (<code>Where-Object</code> / <code>.Where</code>) before reconstructing it.</p> <p><a href="https://docs.micr...
How to speed up my SUPER SLOW search script
powershell|csv|foreach
-1
202
1
72,217,383
72,217,383
3
true
2022-05-12T14:04:13.840Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to speed up my SUPER SLOW search script<p><strong>UPDATE (06/21/22): See my updated script below, which utilizes some of the answer.</strong></p> <p>I am...
72,144,794
Find a probability of Poisson distribution in R<p>Can somebody help me how can I calculate a probability p from the Poisson equation (programming in R)? I know that there is the ppois function, but I'm not sure if I'm able to use it here somehow ... The equation:</p> <p><img src="https://i.stack.imgur.com/43mQs.png" al...
<p>Perhaps you can try <code>uniroot</code> + <code>ppois</code> like below to solve <code>p</code></p> <pre><code>&gt; (p &lt;- uniroot(function(p) ppois(5, 650 * p) - 0.5, c(0, 1), tol = 1e-10)$root) [1] 0.008723325 </code></pre> <p>and you can verify</p> <pre><code>&gt; ppois(5, 650 * p) [1] 0.5 </code></pre> <p>or<...
Find a probability of Poisson distribution in R
r|probability|poisson
-1
93
1
72,147,461
72,147,461
3
true
2022-05-06T16:37:58.937Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Find a probability of Poisson distribution in R<p>Can somebody help me how can I calculate a probability p from the Poisson equation (programming in R)? I kn...
72,185,673
Clear terminal in c<p>I am facing problem to understand this line of code.</p> <pre><code>printf(&quot;\033[2J\033[1;1H&quot;); </code></pre> <p>This printf statement is used to clear the terminal in c. Can anybody explain this to me?</p> <p>Thanks.</p>
<p>Take a look at the list of ANSI escape sequences: <br/> <a href="https://gist.github.com/fnky/458719343aabd01cfb17a3a4f7296797" rel="nofollow noreferrer">https://gist.github.com/fnky/458719343aabd01cfb17a3a4f7296797</a></p> <p><code>ESC[2J</code> : erases the entire screen</p> <p>General information:<br/> <a href="h...
Clear terminal in c
c|terminal|printf
-1
228
1
72,185,706
72,185,706
3
true
2022-05-10T11:40:29.187Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Clear terminal in c<p>I am facing problem to understand this line of code.</p> <pre><code>printf(&quot;\033[2J\033[1;1H&quot;); </code></pre> <p>This printf ...
72,149,968
Appending values to existing values of environment variables in go<p>How can I append another value to an existing value of a <strong>go</strong> environment variable?</p> <p>If <strong>CGO_CXXFLAGS</strong> has the value <strong>&quot;-I/blah/blah&quot;</strong></p> <p>Since the following doesn't work</p> <pre><code>$...
<p>Since <code>go env &lt;var_name&gt;</code> <a href="https://pkg.go.dev/cmd/go#hdr-Environment_variables" rel="nofollow noreferrer">outputs the effective setting of the variable</a> (i.e. not necessarily the default value), a reliable way to get at the current default value of an environment variable is using <a href...
Appending values to existing values of environment variables in go
shell|go|environment-variables
-1
74
1
72,150,469
72,150,469
3
true
2022-05-07T06:15:37.867Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Appending values to existing values of environment variables in go<p>How can I append another value to an existing value of a <strong>go</strong> environment...
72,166,473
JavaFX XYChart warnings<p>Lets take this small example, what are those warnings / what am i doing wrong here?</p> <pre><code>Raw use of parameterized class 'XYChart.Data' Unchecked assignment: 'javafx.scene.chart.XYChart.Data' to 'javafx.scene.chart.XYChart.Data&lt;java.lang.String,java.lang.Number&gt;' Unchecked call ...
<p>Use parameterized type</p> <pre><code>courseSeriesTimespan.get(1).getData().add(new XYChart.Data&lt;String,Number&gt;(&quot;Jän&quot;, 1)); </code></pre> <p><strong>Update</strong>. Or without specifying specific types</p> <pre><code>courseSeriesTimespan.get(1).getData().add(new XYChart.Data&lt;&gt;(&quot;Jän&quot;,...
JavaFX XYChart warnings
java|javafx
-1
56
1
72,166,925
72,166,925
3
true
2022-05-09T02:38:48.957Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: JavaFX XYChart warnings<p>Lets take this small example, what are those warnings / what am i doing wrong here?</p> <pre><code>Raw use of parameterized class '...
72,186,008
python join strings in list of lists<p>I have a list of lists of individual litters, however I I would like a list of lists of a string.</p> <p>What I have:</p> <pre><code>[ ['a', 'b', 'c', 'd', 'e'], ['b', 'c', 'd', 'e', 'a'], ['c', 'd', 'e', 'a', 'b'], ['d', 'e', 'a', 'b', 'c'], ['e', 'a', 'b', 'c', 'd'] ] ...
<p>I guess below will work as you wish.</p> <pre class="lang-py prettyprint-override"><code>list = [ ['a', 'b', 'c', 'd', 'e'], ['b', 'c', 'd', 'e', 'a'], ['c', 'd', 'e', 'a', 'b'], ['d', 'e', 'a', 'b', 'c'], ['e', 'a', 'b', 'c', 'd'] ] newList = [[' '.join(elem)] for elem in list] print(newList) </code></pr...
python join strings in list of lists
python
-1
127
4
72,186,089
72,186,089
3
true
2022-05-10T12:05:57.683Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: python join strings in list of lists<p>I have a list of lists of individual litters, however I I would like a list of lists of a string.</p> <p>What I have:<...
72,178,774
How can I view the fossil documentation offline?<p>There are lots of docs on the fossil page, am I just supposed to checkout the whole repository to view them offline?</p> <p>The man-pages are rather sparse, and unlike in <code>git</code>, there seem to be no meta-manpages encompassing topics covered in the online docu...
<p>(A long-time fossil contributor here...)</p> <p>Fossil, as it has always been distributed by the Fossil project, is only a single binary, not a bundle with the docs. Getting offline access to all of the docs requires cloning the repository:</p> <pre><code>fossil clone https://fossil-scm.org/home fossil.fossil </code...
How can I view the fossil documentation offline?
version-control|documentation|dvcs|offline-caching|fossil
-1
53
1
72,189,141
72,189,141
3
true
2022-05-09T22:19:47.107Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I view the fossil documentation offline?<p>There are lots of docs on the fossil page, am I just supposed to checkout the whole repository to view the...
72,205,654
How do i split a list and and turn it into two dimensional list?<p>I have a list: <code>lst = [1,2,3,4,'-',5,6,7,'-',8,9,10]</code><br /> that needs to be split when the '-' character is encountered. and turned into a two dimensional list like so:<br /> <code>[[1,2,3,4],[5,6,7],[8,9,10]]</code><br /> I have this so far...
<p>You can build a new list that will contain only the numeric values:</p> <pre><code>new_list = [] #final result l=[] #current nested list to add for item in lst: if item != '-': l.append(item) # not a '-', so add to current nested list else: #if item is not not '-', then must be '-' new_list.a...
How do i split a list and and turn it into two dimensional list?
python|python-3.x|list|split|sublist
-1
84
2
72,205,738
72,205,738
3
true
2022-05-11T18:03:43.977Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do i split a list and and turn it into two dimensional list?<p>I have a list: <code>lst = [1,2,3,4,'-',5,6,7,'-',8,9,10]</code><br /> that needs to be sp...
72,164,333
Oracle: Error in converting DateTime to Epoch<p>While trying to convert datetime to epoch, I am getting an error: <strong>ORA-01810: format code appears twice</strong></p> <p><em>QracleSQL query:</em></p> <pre><code>select (trunc(TO_TIMESTAMP('2022-05-08T19:09:17Z', 'yyyy-MM-dd&quot;T&quot;HH:mm:ssXXX')) - TO_DATE('01/...
<p>You should use:</p> <ul> <li><code>TO_TIMESTAMP_TZ</code> instead of <code>TO_TIMESTAMP</code></li> <li>the format model <code>YYYY-MM-DD&quot;T&quot;HH24:MI:SS.FF TZD</code> rather than incorrectly using <code>MM</code> twice, <code>HH24</code> instead of <code>HH</code>, <code>.FF</code> instead of <code>XXX</code...
Oracle: Error in converting DateTime to Epoch
sql|oracle
-1
90
2
72,164,877
72,164,877
3
true
2022-05-08T19:10:34.717Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Oracle: Error in converting DateTime to Epoch<p>While trying to convert datetime to epoch, I am getting an error: <strong>ORA-01810: format code appears twic...
72,219,707
why does my program not print out the final result?<p>why when i run this code to take in a string input by the user why does it not print out the final result ?</p> <pre><code>#include &lt;stdio.h&gt; #include &lt;string.h&gt; #include &lt;stdlib.h&gt; /* Function Declerations */ /* Global Variables */ char *text = ...
<p><code>text</code> is already a <code>char *</code>, so you don't have to pass <code>&amp;text</code> to <code>scanf</code>, but only <code>text</code>.</p> <p><code>scanf</code> takes a pointer as argument in order to modify the pointed value, but if you pass a <code>char **</code> as an argument, you will modify th...
why does my program not print out the final result?
c|printf|malloc
-1
42
2
72,219,736
72,219,736
3
true
2022-05-12T17:13:58.230Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: why does my program not print out the final result?<p>why when i run this code to take in a string input by the user why does it not print out the final resu...
72,235,557
How to convert value of optional type Binding<T?>? to Binding<T?> in SwiftUI?<p>I have an init like so:</p> <pre><code>@Binding var height: Double? init(height: Binding&lt;Double?&gt;? = nil) { self._height = height } </code></pre> <p>I am getting an error:</p> <blockquote> <p>Value of optional type 'Binding&lt;Doub...
<p>The process of &quot;converting&quot; an optional to a non-optional is unwrapping. The only way you can convert an optional to a non-optional is to provide some default value in the case where the optional is <code>nil</code>.</p> <p>You have got a little confused about Swift <code>optional</code> vs default parame...
How to convert value of optional type Binding<T?>? to Binding<T?> in SwiftUI?
ios|swift|xcode|swiftui
-1
259
2
72,235,737
72,235,737
3
true
2022-05-13T21:23:33.513Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to convert value of optional type Binding<T?>? to Binding<T?> in SwiftUI?<p>I have an init like so:</p> <pre><code>@Binding var height: Double? init(hei...
72,219,744
How to cross compile a c program to aarch64 with cpuid.h?<p>I'm trying to cross-compile a simple C program to aarch64 (arm64) from a 64bit Ubuntu Linux. Can someone please help me why i'm getting this error.</p> <p>It says 'cpuid.h' is not found. I've tried compiling it on the 64bit linux, it works fine. But when using...
<p>As explained in the comments, you need to port this program to the Aarch64 architecture, you cannot just compile the code as is. The features implemented in your SoC are exposed through the various <a href="https://developer.arm.com/documentation/ddi0595/2021-06/AArch64-Registers" rel="nofollow noreferrer">AArch64 f...
How to cross compile a c program to aarch64 with cpuid.h?
c|linux|cross-compiling
-1
305
1
72,223,657
72,223,657
3
true
2022-05-12T17:17:34.583Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to cross compile a c program to aarch64 with cpuid.h?<p>I'm trying to cross-compile a simple C program to aarch64 (arm64) from a 64bit Ubuntu Linux. Can ...
72,232,717
LEFT JOIN to return only first row<p>I am making a join with two tables, tab_usuarios (users) and tab_enderecos (address).</p> <p>tab_usuarios structure:</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>id_usuario</th> <th>nome</th> <th>usuario</th> </tr> </thead> <tbody> <tr> <td>1</td> <td...
<p>This should do it, assuming you have MySql 8.0 and not some ancient 5.x version:</p> <pre><code>SELECT * FROM ( SELECT u.id_usuario, u.usuario, u.nome, e.id_endereco, e.cidade, e.uf, row_number() over (partition by u.id_usuario order by e.id_endereco) rn FROM tab_usuarios u LEFT JOIN tab_ender...
LEFT JOIN to return only first row
mysql|sql|left-join|greatest-n-per-group
-1
104
1
72,233,165
72,233,165
3
true
2022-05-13T16:28:34.057Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: LEFT JOIN to return only first row<p>I am making a join with two tables, tab_usuarios (users) and tab_enderecos (address).</p> <p>tab_usuarios structure:</p>...
72,236,753
Not able to move the button to the right of the page and the text to the center of the page<p>Not able to move the button to the right of the page and the text to the center of the page even though I have added the necessary CSS ( float right etc.,)</p> <p><div class="snippet" data-lang="js" data-hide="false" data-cons...
<p><strong>display, float, etc.</strong><br /> are all CSS variables that should be included in the style=&quot;&quot; part of the HTML, not as keyword parameters. I have demonstrated the correct way to insert them in the snippet below. You can also use <code>right: 0</code> to align an element to the right side of it...
Not able to move the button to the right of the page and the text to the center of the page
html|css
-1
57
2
72,236,806
72,236,806
3
true
2022-05-14T01:46:58.983Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Not able to move the button to the right of the page and the text to the center of the page<p>Not able to move the button to the right of the page and the te...
72,167,141
Go: How do I pass a JSON response without unmarshalling it<p>Using Go, I'm attempting to fetch a few JSON responses concurrently from multiple endpoints. I'd like to attach each of these responses to fields in a struct or map and return this struct/map as a JSON object. (Backend for Frontend pattern). So I will make a ...
<p>Use <a href="https://pkg.go.dev/encoding/json#RawMessage" rel="nofollow noreferrer">json.RawMessage</a> to copy a <code>[]byte</code> containing JSON directly to the response JSON document:</p> <pre><code>type main_response struct { Service1 json.RawMessage `json:&quot;service1&quot;` ... } response := &amp...
Go: How do I pass a JSON response without unmarshalling it
json|go|go-fiber
-1
306
1
72,167,276
72,167,276
4
true
2022-05-09T04:54:39.260Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Go: How do I pass a JSON response without unmarshalling it<p>Using Go, I'm attempting to fetch a few JSON responses concurrently from multiple endpoints. I'd...
72,177,171
What does *&Var - 1.0f means?<p>Working with some tutorial, I met a strange C++ expression:</p> <pre><code>uint64_t var = .... return (*&amp;var) - 1.f; </code></pre> <p>What does this mean? Is it a reference to a pointer? What's the point of substracting <code>1</code> from reference? It should be an implementation of...
<p><code>var</code> is an identifier. It names a variable.</p> <p>The unary <code>&amp;</code> operator is the addressof operator. The result of addressof operator is a pointer to the object named by its operand. <code>&amp;var</code> is a pointer to the variable <code>var</code>.</p> <p>The unary <code>*</code> operat...
What does *&Var - 1.0f means?
c++|pointers|reference|linear-algebra|lcg
-1
83
1
72,177,230
72,177,230
4
true
2022-05-09T19:15:46.783Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What does *&Var - 1.0f means?<p>Working with some tutorial, I met a strange C++ expression:</p> <pre><code>uint64_t var = .... return (*&amp;var) - 1.f; </co...
72,190,595
Why NumPy and pandas packages are always problematic when setting up first time Python interpreter as Anaconda provided<p>Below is simple Line of code to try NumPy</p> <pre><code>import numpy as np my_list = [1, 2, 3] print(my_list) print(type(my_list)) my_list_arr = np.array(my_list) # Here we are converting pyth...
<p>As explained in <a href="https://stackoverflow.com/questions/60585818/what-does-it-mean-to-inherit-global-site-packages-in-pycharm">this answer</a>, the <code>inherit-global-site-packages</code> inherits from your <em>Global</em> python install. This is the install that comes with your machine or is installed &quot;...
Why NumPy and pandas packages are always problematic when setting up first time Python interpreter as Anaconda provided
python|pandas|numpy|pycharm|anaconda
-1
344
1
72,190,817
72,190,817
4
true
2022-05-10T17:19:32.943Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why NumPy and pandas packages are always problematic when setting up first time Python interpreter as Anaconda provided<p>Below is simple Line of code to try...
72,190,769
Fetch API CORS error: Request header field authorization is not allowed by Access-Control-Allow-Headers in preflight response<p>I'm trying to get data from an API of mine and I'm getting this error message in Chrome:</p> <pre><code>Access to fetch at 'https://myapi.amazonaws.com/accounts' from origin 'http://localhost:...
<p>You need to set <code>access-control-allow-headers</code> in the preflight response, e.g.:</p> <pre><code>access-control-allow-headers: * </code></pre> <p>You can read more about <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Request-Headers" rel="nofollow noreferrer">Access-Contro...
Fetch API CORS error: Request header field authorization is not allowed by Access-Control-Allow-Headers in preflight response
javascript|cors|http-headers|fetch-api
-1
1,976
1
72,190,904
72,190,904
4
true
2022-05-10T17:36:43.087Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Fetch API CORS error: Request header field authorization is not allowed by Access-Control-Allow-Headers in preflight response<p>I'm trying to get data from a...
72,192,278
Split a string and find the occurrence percentage<p>I have a vector value where the separator is <code>'</code> and I would like to find the occurrence of each text. How to get around with this? many thanks in advance.</p> <pre><code>val1 &lt;- c(&quot;ab, cd, ef&quot;, &quot;&quot;, &quot;gh&quot;, &quot;ab&quot;) </c...
<p>In base R:</p> <pre class="lang-r prettyprint-override"><code>tab &lt;- table(trimws(unlist(strsplit(val1, &quot;,&quot;)))) 100 * tab / sum(tab) #&gt; #&gt; ab cd ef gh #&gt; 40 20 20 20 </code></pre> <p><sup>Created on 2022-05-10 by the <a href="https://reprex.tidyverse.org" rel="nofollow noreferrer">reprex pack...
Split a string and find the occurrence percentage
r|string|split|tidyr|data-manipulation
-1
45
2
72,192,423
72,192,423
4
true
2022-05-10T19:57:24.813Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Split a string and find the occurrence percentage<p>I have a vector value where the separator is <code>'</code> and I would like to find the occurrence of ea...
72,193,735
IDXGIFactory2::CreateSwapChainForHwnd fails<p><a href="https://1drv.ms/u/s!AkVRV9eGJ20rgTu13uTcNkhp0eZb?e=lwMe70" rel="nofollow noreferrer">https://1drv.ms/u/s!AkVRV9eGJ20rgTu13uTcNkhp0eZb?e=lwMe70</a></p> <p>That links takes you to my OneDrive where you can download my Visual Studio 2022 solution and project (it is a ...
<p>When you program with DirectX make sure you <em>always</em> enable the &quot;debug layer&quot; in dev and check the output in Visual Studio's &quot;Output&quot; window (or other debugger output).</p> <p>Check these links: <a href="https://docs.microsoft.com/en-us/windows/win32/direct3d11/using-the-debug-layer-to-tes...
IDXGIFactory2::CreateSwapChainForHwnd fails
directx|directx-11|direct3d|direct3d11|dxgi
-1
129
1
72,205,200
72,205,200
4
true
2022-05-10T22:54:48.043Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: IDXGIFactory2::CreateSwapChainForHwnd fails<p><a href="https://1drv.ms/u/s!AkVRV9eGJ20rgTu13uTcNkhp0eZb?e=lwMe70" rel="nofollow noreferrer">https://1drv.ms/u...
72,222,015
Change Two Rows Into Two Columns<p>Oracle newbie here just trying to learn something.</p> <p>I have a query that returns two rows per ID:</p> <pre><code>SELECT B1_ALT_ID, B1_CHECKLIST_COMMENT FROM PERMIT WHERE (B1_CHECKBOX_DESC = 'Certificate Number' OR B1_CHECKBOX_DESC = 'DIF_Category'); </code></pre> <h2>Current Outp...
<p>You can use <code>PIVOT</code>:</p> <pre class="lang-sql prettyprint-override"><code>SELECT B1_ALT_ID, B1_CHECKLIST_1, B1_CHECKLIST_2 FROM PERMIT PIVOT ( MAX(B1_CHECKLIST_COMMENT) FOR B1_CHECKBOX_DESC IN ( 'Certificate Number' AS B1_CHECKLIST_1, 'DIF_Category' AS B1_CHECKLIST_2 ) ); </code></pre>...
Change Two Rows Into Two Columns
sql|oracle|oracle12.1
-1
31
1
72,222,086
72,222,086
4
true
2022-05-12T21:01:16.790Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Change Two Rows Into Two Columns<p>Oracle newbie here just trying to learn something.</p> <p>I have a query that returns two rows per ID:</p> <pre><code>SELE...
72,194,239
searching for a string that contains 2 or more known sub strings<p>That's my approach</p> <pre><code>title = ('one two three four') if 'one' and 'three' in title: print('Found') else: print('not found') </code></pre> <p>but it always returns <code>found</code></p> <p>I want it to return found only when both o...
<p>That’s because it checks conditions on both side of <code>and</code>. Instead you should be doing;</p> <pre class="lang-py prettyprint-override"><code>if &quot;one&quot; in title and &quot;three&quot; in title: print(&quot;Found&quot;) else: print(&quot;Not Found&quot;) </code></pre>
searching for a string that contains 2 or more known sub strings
python
-1
37
2
72,194,271
72,194,271
4
true
2022-05-11T00:37:37.017Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: searching for a string that contains 2 or more known sub strings<p>That's my approach</p> <pre><code>title = ('one two three four') if 'one' and 'three' in...
72,144,312
axios returns promise instead of data<p>I am querying some data from IPFS using axios, the problem is that after calling the specific api the return value is a promisse from axios.</p> <pre><code>const getNFTDetail = async (url: string) =&gt; { const urlIPF = url.replace(&quot;ipfs://&quot;, &quot;https://cloudflar...
<p>just, decide if you use <em>async / await</em> or <em>.then / .catch</em>:</p> <pre><code>const getNFTDetail = async (url: any) =&gt; { const urlIPF = url.replace(&quot;ipfs://&quot;, &quot;https://cloudflare-ipfs.com/ipfs/&quot;); const { data } = await axios.get(urlIPF); return data; }; </code></pre> <p>or...
axios returns promise instead of data
reactjs|axios
-1
483
2
72,144,423
72,144,423
4
true
2022-05-06T15:54:19.590Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: axios returns promise instead of data<p>I am querying some data from IPFS using axios, the problem is that after calling the specific api the return value is...
72,198,091
VBA (MS Access) Remove whitespace from string and start next word with upper case<p>I want to convert a &quot;title&quot; which can have whitespaces in it like <code>&quot; this is a Test title &quot;</code> to a string where all whitespaces are removed and the words which were previously separated by the whitspace...
<p>In MsAccess VBA:</p> <pre><code>replace(strconv(&quot; this is a Test title &quot;,vbProperCase),&quot; &quot;,&quot;&quot;) </code></pre> <p>returns <strong>ThisIsATestTitle</strong></p> <p>Thanks @June7 for giving this useful info:</p> <blockquote> <p>If expression in query or textbox, use 3 in place of vbProp...
VBA (MS Access) Remove whitespace from string and start next word with upper case
vba|ms-access
-1
137
2
72,198,898
72,198,898
4
true
2022-05-11T08:50:00.207Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: VBA (MS Access) Remove whitespace from string and start next word with upper case<p>I want to convert a &quot;title&quot; which can have whitespaces in it li...
72,236,026
how to format String to Date with format dd-mm-yyyy in java<p>I need some support. I desired convert a variable String to Date. The variable Date should be format dd-MM-yyyy.</p> <pre><code> import java.util.Date; .... ... String a = &quot;2022-05-12&quot;; Date b; // should be dd-MM-yyyy do s...
<h1>tl;dr</h1> <pre><code>LocalDate .parse( &quot;2022-05-12&quot; ) .format( DateTimeFormatter.ofPattern( &quot;dd-MM-uuuu&quot; ) ) </code></pre> <blockquote> <p>12-05-2022</p> </blockquote> <h1><em>java.time</em></h1> <p>Use modern <em>java.time</em> classes. Never use the terrible <code>Date</code>, <code>Calen...
how to format String to Date with format dd-mm-yyyy in java
java|date|java-time
-1
937
2
72,236,893
72,236,893
4
true
2022-05-13T22:41:46.157Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to format String to Date with format dd-mm-yyyy in java<p>I need some support. I desired convert a variable String to Date. The variable Date should be f...
72,193,031
No match for ‘boost::shared_ptr::operator=’<p>This is the code I have that causes the error below:</p> <pre class="lang-cpp prettyprint-override"><code>class CAlternateMerchantList { public: CAlternateMerchant::SP m_pAlternateMerchantList[MAX_PLAYER_LIST]; int m_nMax; int m_nCur; CAlternateMerchantList...
<p>You don't need to set <code>boost::shared_ptr</code>s to null. They have a <a href="https://www.boost.org/doc/libs/1_65_0/libs/smart_ptr/doc/html/smart_ptr.html#shared_ptr_default_constructor" rel="nofollow noreferrer">default constructor</a> which does it automatically. You can simply delete the entire <code>for</c...
No match for ‘boost::shared_ptr::operator=’
c++|boost|shared-ptr
-1
82
2
72,193,077
72,193,077
4
true
2022-05-10T21:15:19.577Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: No match for ‘boost::shared_ptr::operator=’<p>This is the code I have that causes the error below:</p> <pre class="lang-cpp prettyprint-override"><code>class...
72,165,352
Why is import * not valid syntax in Python 3?<p>I recently tried this code, just to satisfy a curiosity.</p> <pre><code>from * import * as * if __name__ == '__main__': z = *.zeros((3,3)) print(z) </code></pre> <p>Can somebody tell me why <code>import *</code> is not considered a valid option? I really would li...
<p>In terms of <em>why</em> this would be a bad idea --</p> <p>From the <a href="https://peps.python.org/pep-0020/" rel="noreferrer">Zen of Python</a>:</p> <blockquote> <p><em>In the face of ambiguity, refuse the temptation to guess.</em></p> </blockquote> <p>It's part of Python's design rationale to avoid ambiguity, a...
Why is import * not valid syntax in Python 3?
python|python-import
-1
63
2
72,165,571
72,165,571
5
true
2022-05-08T21:55:10.627Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why is import * not valid syntax in Python 3?<p>I recently tried this code, just to satisfy a curiosity.</p> <pre><code>from * import * as * if __name__ == ...
72,177,973
MySQL -> You have an error in your SQL syntax error how can i fix this<p>MySql.Data.MySqlClient.MySqlException: 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'not=41, durum='BASARISIZ' Where id=2' at line 1'</p> <pre><code> int ...
<p><code>not</code> is a <a href="https://dev.mysql.com/doc/refman/8.0/en/keywords.html" rel="noreferrer">reserved word</a> in MySQL so it must be escaped with back ticks</p>
MySQL -> You have an error in your SQL syntax error how can i fix this
c#|mysql|database|syntax
-1
49
1
72,178,086
72,178,086
5
true
2022-05-09T20:37:44.200Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: MySQL -> You have an error in your SQL syntax error how can i fix this<p>MySql.Data.MySqlClient.MySqlException: 'You have an error in your SQL syntax; check ...
72,200,966
Pods error trying to build Expo managed workflow app on SDK 45 using EAS build<p>I'm trying to build my Expo (managed workflow) app using EAS build:</p> <pre><code>eas build -p ios </code></pre> <p>and it's failing with the following error (expo.dev / build details):</p> <pre><code>Installing pods Using Expo modules Au...
<p>Looks like there's a major CDN outage. <a href="https://status.cocoapods.org" rel="noreferrer">https://status.cocoapods.org</a></p>
Pods error trying to build Expo managed workflow app on SDK 45 using EAS build
ios|react-native|expo|cocoapods
-1
738
1
72,201,574
72,201,574
5
true
2022-05-11T12:20:38.140Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Pods error trying to build Expo managed workflow app on SDK 45 using EAS build<p>I'm trying to build my Expo (managed workflow) app using EAS build:</p> <pre...
72,233,769
Is there a way to find exact location ( adress ) of file on disk?<p>I'm developing a software using C++ for Windows/Linux.</p> <p>I want to create a file (txt, json, license, you name it) at runtime, and save it somewhere. Is it possible in C++ to get the exact position of that file on disk, so that if I restart the ap...
<p>An image of a disk copies it byte by byte, meaning that all addresses (locations) on disk stay exactly the same. So your copy protection won't actually work - you can still easily clone the disk while preserving your special copy protection file. Additionally, a file may not even have a defined location on disk: It ...
Is there a way to find exact location ( adress ) of file on disk?
c++|linux|windows|memory|disk
-1
68
1
72,233,809
72,233,809
5
true
2022-05-13T18:03:50.073Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is there a way to find exact location ( adress ) of file on disk?<p>I'm developing a software using C++ for Windows/Linux.</p> <p>I want to create a file (tx...
72,228,010
Return a lambda from a lambda<p>I want to use a lambda to evaluate (switch-case) some conditions and return a lambda accordingly.</p> <pre><code>const auto lmb1 = []() { printf(&quot;1\n&quot;); }; const auto lmb2 = []() { printf(&quot;2\n&quot;); }; const auto select = [](auto const &amp;ref) { switch(ref)...
<p>The problem is that a lambda, by default, deduce (as an <code>auto</code> function) the returned type and in your lambda you return two different lambdas. Every lambda has a different type, so the compiler can't choose a type for the returned lambda</p> <pre><code>[](auto const &amp;ref) { switch(ref) { case...
Return a lambda from a lambda
c++|lambda|return-type-deduction
-1
96
1
72,228,823
72,228,823
5
true
2022-05-13T10:21:35.473Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Return a lambda from a lambda<p>I want to use a lambda to evaluate (switch-case) some conditions and return a lambda accordingly.</p> <pre><code>const auto l...
72,232,396
Is it possible to determine if a pointer points to a valid object, and if so how?<p>I was reading <a href="https://stackoverflow.com/questions/17202570/c-is-it-possible-to-determine-whether-a-pointer-points-to-a-valid-object">C++ Is it possible to determine whether a pointer points to a valid object?</a> and the correc...
<blockquote> <p>Is it possible to determine if a pointer points to a valid object</p> </blockquote> <p>No, it isn't generally possible to determine whether a pointer points to a valid object.</p> <blockquote> <p>I wanted to know if anything has changed</p> </blockquote> <p>Nothing has changed in this regard.</p> <block...
Is it possible to determine if a pointer points to a valid object, and if so how?
c++|pointers|smart-pointers
-1
68
1
72,232,569
72,232,569
5
true
2022-05-13T15:59:14.120Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is it possible to determine if a pointer points to a valid object, and if so how?<p>I was reading <a href="https://stackoverflow.com/questions/17202570/c-is-...
72,183,950
Why does * in my Java calculator not work<p>So I'm working on a really simple java calculator without any scanner. The calculator can calculate +, -, / and * Every operator works, except * but I cant figure out why</p> <pre class="lang-java prettyprint-override"><code>public class Calculator2 { public static void ...
<p>I would say that the problem is not in your program, but in your operating system (OS).</p> <p>I am going to assume that you execute this from a Linux shell, although other OSes may have a similar issue.</p> <p>When you run the command line <code>java Calculator2 10 * 2</code> the OS is going to expand the <code>*</...
Why does * in my Java calculator not work
java|calculator
-1
93
1
72,184,038
72,184,038
5
true
2022-05-10T09:35:55.147Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why does * in my Java calculator not work<p>So I'm working on a really simple java calculator without any scanner. The calculator can calculate +, -, / and ...
72,150,774
Delete table row with JavaScript?<p>I am adding some data with JavaScript with no problem but I wanted to delete a row by adding delete button inside the row which I add, but I couldn't do it. The code is below. The delete button doesn't work:</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="t...
<p>Use This Javascript</p> <pre><code>&lt;script&gt; const ad=document.querySelector(&quot;#ad&quot;); const soyad=document.querySelector(&quot;#soyad&quot;); const yas=document.querySelector(&quot;#yas&quot;); const ekle=document.querySelector(&quot;#ekle&quot;); const liste=document.querySelector(&quot;#liste&quot;);...
Delete table row with JavaScript?
javascript
-1
45
1
72,150,825
72,150,825
-2
true
2022-05-07T08:25:58.067Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Delete table row with JavaScript?<p>I am adding some data with JavaScript with no problem but I wanted to delete a row by adding delete button inside the row...
72,156,007
How to remove scroll bar after making the website responsive?<p>After I made responsive using vanilla CSS, I am getting scroll bar in the bottom, how to get rid of this? Does Tailwind CSS provides a better solution to it?</p>
<p>You can hide scrollbars on HTML elements using css rule <code>overflow: hidden</code>. Browsers show a scrollbar by default if the contents of an element overflow the parent element's size. The equivalent Tailwind class is <code>overflow-hidden</code></p>
How to remove scroll bar after making the website responsive?
html|css|tailwind-css
-1
95
1
72,156,048
72,156,048
-2
true
2022-05-07T20:06:42.430Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to remove scroll bar after making the website responsive?<p>After I made responsive using vanilla CSS, I am getting scroll bar in the bottom, how to get ...
72,198,757
Why is ESLint complaining about "Unnecessary conditional" when checking if an array value exists?<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 array = [1,2,3] if (array[5]...
<p>Because <code>array[5]</code> has the type of <code>number</code>, rather than <code>number | undefined</code>.</p> <p>In the following example, the error <a href="https://typescript-eslint.io/play/#ts=4.6.4&amp;sourceType=script&amp;code=MYewdgzgLgBAhgJwXAnjAvDA2gRgDQBMeAzALoBQoksAllAKYC2G8SqWArKfBDGAK6MARvQQwAPjH5...
Why is ESLint complaining about "Unnecessary conditional" when checking if an array value exists?
typescript|eslint
-1
359
1
72,198,797
72,198,797
-2
true
2022-05-11T09:39:18.253Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why is ESLint complaining about "Unnecessary conditional" when checking if an array value exists?<p><div class="snippet" data-lang="js" data-hide="false" dat...
72,147,860
How to detect if the user is in dark mode ( Tailwind / Angular )<p>I have a navbar with a dark mode button that I would like to change when the user is on dark mode and back to the old one when he is back to light mode. <a href="https://i.stack.imgur.com/SzKOe.png" rel="nofollow noreferrer">picture</a></p> <pre><code> ...
<p>Nevermind, i managed it myself :</p> <p>html:</p> <pre><code>&lt;a (click)=&quot;toggleDarkMode()&quot; class=&quot;cursor-pointer px-3 py-2 flex items-center text-xs uppercase font-bold leading-snug text-white hover:opacity-75&quot; &gt; &lt;i (click)=&quot;clickEvent()&quot; [ngClass]=&quot;status ...
How to detect if the user is in dark mode ( Tailwind / Angular )
angular|tailwind-css
-1
164
1
72,148,156
72,148,156
-1
true
2022-05-06T22:13:02.100Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to detect if the user is in dark mode ( Tailwind / Angular )<p>I have a navbar with a dark mode button that I would like to change when the user is on da...
72,169,430
Using JavaScript reflection to invoke a function<p>I am new to JavaScript and am struggling with how reflection works there. What I want to do is: Given a String which is the function's name, invoke that function. E.g. var myString = &quot;myFunctionName()&quot; is given and then I want to invoke myFunctionName() using...
<p>It all depends on the context in which the function is declared.</p> <p>For the browser's <code>window</code> context:</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>functi...
Using JavaScript reflection to invoke a function
javascript|reflection
-1
56
2
72,169,467
72,169,467
-1
true
2022-05-09T09:03:47.203Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Using JavaScript reflection to invoke a function<p>I am new to JavaScript and am struggling with how reflection works there. What I want to do is: Given a St...
72,176,248
How to lock thread in javascript energy efficient?<p>I want to patch the <code>alert</code> object in the browser, to show additional text, but I need to await some data to show the necessary content in the alert. However, I can't postpone the <code>alert</code> call.</p> <p>Also, I don't know about a way to close the ...
<p>The only way I can think of to &quot;block&quot; without consuming CPU this would be to make a synchronous XMLHttpRequest (which are deprecated because blocking is not user-friendly). You'll need to set up a server that can read the payload of the request and reply after the specified amount of time.</p> <pre><code>...
How to lock thread in javascript energy efficient?
javascript|performance
-1
67
1
72,176,322
72,176,322
-1
true
2022-05-09T17:50:22.643Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to lock thread in javascript energy efficient?<p>I want to patch the <code>alert</code> object in the browser, to show additional text, but I need to awa...
72,180,767
how to make underline use Swift?<p><a href="https://i.stack.imgur.com/GWHO0.png" rel="nofollow noreferrer">sample text image</a></p> <p><strong>I want to draw underline like picture. but &quot;NSUnderlineStyleAttributeName&quot; is not working please help me</strong></p>
<p>You can do this using <a href="https://developer.apple.com/documentation/foundation/nsattributedstring" rel="nofollow noreferrer">NSAttributedString</a></p> <p>Example :</p> <pre><code> let underlineAttribute = [NSAttributedString.Key.underlineStyle: NSUnderlineStyle.thick.rawValue] let underlineAttributedString = ...
how to make underline use Swift?
ios|swift|objective-c|iphone|xcode
-1
90
1
72,181,570
72,181,570
-1
true
2022-05-10T04:28:14.833Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to make underline use Swift?<p><a href="https://i.stack.imgur.com/GWHO0.png" rel="nofollow noreferrer">sample text image</a></p> <p><strong>I want to dra...
72,192,725
VLookup formula not working per the documentation<p>Before y'all tell me to search please look at the formulas. I have searched and tried all variations mentioned in the docs. The spreadsheet is dead simple. I am trying to populate the driver name cell based on previously recorded license plates. Why is this not workin...
<p>use:</p> <pre><code>=VLOOKUP(F11, {E1:E10, B1:B10}, 2, 0) </code></pre>
VLookup formula not working per the documentation
arrays|google-sheets|range|google-sheets-formula|vlookup
-1
22
1
72,193,096
72,193,096
-1
true
2022-05-10T20:44:48.393Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: VLookup formula not working per the documentation<p>Before y'all tell me to search please look at the formulas. I have searched and tried all variations ment...
72,196,151
Is there a answer to color specific word in python using tkinter?<p>I should simulate ide with python and the problem is that i can't color specific words like import or def etc. I did it with tkinter. Is there a answer for that?? Thanks.</p>
<p>Suggest to direct embed a browser control inside your project. Then you can leverage all the existing syntax highlight solutions from web technologies. Three of the available solutions are:</p> <ol> <li><a href="https://github.com/cztomczak/cefpython" rel="nofollow noreferrer">https://github.com/cztomczak/cefpython<...
Is there a answer to color specific word in python using tkinter?
python|tkinter
-1
21
1
72,196,215
72,196,215
-1
true
2022-05-11T06:10:16.857Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is there a answer to color specific word in python using tkinter?<p>I should simulate ide with python and the problem is that i can't color specific words li...
72,188,735
Multiple frontend_enpoint in Azure Front Door with Terraform<p>I am trying to build an Azure FrontDoor with Terraform but I am having an issue when I am trying to configure two Front Ends and then bind one of them to a custom HTTPS configuration. But I am getting the following error <code>The argument &quot;frontend_en...
<p>I fixed this in the end, following this post on github: <a href="https://github.com/hashicorp/terraform-provider-azurerm/pull/11456" rel="nofollow noreferrer">https://github.com/hashicorp/terraform-provider-azurerm/pull/11456</a></p> <p>What I had to in the end was change a couple of things, first I had to change th...
Multiple frontend_enpoint in Azure Front Door with Terraform
azure|azure-devops|terraform|terraform-provider-azure
-1
291
3
72,199,208
72,199,208
-1
true
2022-05-10T15:02:55.357Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Multiple frontend_enpoint in Azure Front Door with Terraform<p>I am trying to build an Azure FrontDoor with Terraform but I am having an issue when I am tryi...
72,167,133
passing input value to asp-route<p>Ok so I am trying to pass the value from the input Quantite in the asp-route-qt, but I can't seem to wrap my head around it. This one <code>asp-route-idBillet</code> is working just fine but the other isn't. If anyone could help me solve this problem with an example it would be very m...
<p>Here's what I found that works.</p> <p>Here's the view:</p> <pre><code>&lt;form method=&quot;post&quot;&gt; &lt;div class=&quot;row&quot;&gt; @foreach(var billet in Model) { &lt;br&gt; &lt;div class=&quot;col-sm-6&quot;&gt; &lt;div class=&quot;card&quot;&gt; &l...
passing input value to asp-route
asp.net|asp.net-mvc|html-input|asp.net-core-tag-helpers
-1
202
1
72,202,030
72,202,030
-1
true
2022-05-09T04:53:05.117Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: passing input value to asp-route<p>Ok so I am trying to pass the value from the input Quantite in the asp-route-qt, but I can't seem to wrap my head around i...
72,208,554
compare two tables having same column name but different date column names<p>I have table A</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>id1</th> <th>dt</th> </tr> </thead> <tbody> <tr> <td>x1</td> <td>2022-04-10</td> </tr> <tr> <td>a2</td> <td>2022-04-10</td> </tr> <tr> <td>a1</td> <td>...
<p>This worked as well</p> <pre><code>with A as ( select distinct id1 from Table_A where dt = '2022-04-10' ) , B as ( select distinct id1 from Table_B where date = '2022-04-10') select id1 from A where id1 not in (select id1 from B) </code></pre>
compare two tables having same column name but different date column names
mysql|sql|r|join|databricks
-1
324
3
72,235,330
72,235,330
-1
true
2022-05-11T23:17:18.997Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: compare two tables having same column name but different date column names<p>I have table A</p> <div class="s-table-container"> <table class="s-table"> <thea...
72,173,490
Iterate nested array items and, upon the same value of a specific key, collect any other entry value as data of a merger which is grouped by key+value<p>I have an array that looks like this:</p> <p><a href="https://i.stack.imgur.com/lmHzo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lmHzo.png" alt...
<p>If I'm not missing something, you are looking for this:?</p> <pre><code>var merged = Array.prototype.concat.apply([], original); </code></pre> <p>like:</p> <pre><code>Array.prototype.concat.apply([], [[1,2,3],[4,5], [6]]); // returns: // [1, 2, 3, 4, 5, 6] </code></pre> <p>Another way:</p> <pre><code>var merged = []...
Iterate nested array items and, upon the same value of a specific key, collect any other entry value as data of a merger which is grouped by key+value
javascript|arrays|merge|grouping|lodash
-1
229
3
72,173,837
72,173,837
-1
true
2022-05-09T14:17:21.897Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Iterate nested array items and, upon the same value of a specific key, collect any other entry value as data of a merger which is grouped by key+value<p>I ha...
72,186,890
How to remove duplicate values in a dictionary?<p>I want to remove duplicate values inside a dictionary.</p> <p>Let's say this is my dictionary:</p> <pre><code>dict = {'X' : [ {id : 1, Name: 'RandomName', Brand: 'RandomBrand'}, {id: 2, Name: 'RandomName2', Brand: 'RandomBrand2'} ], 'Y': [ {id: 1, Name: 'RandomNam...
<p>Dictionaries by default don't accept duplicates. Look closely, you have <code>dict[str:list[dict[...]]</code> there. So you want to filter duplicated dictionaries from list.</p> <p><strong>Answer:</strong> If order doesn't matter, and you want to remove only exact duplicates, just go this way:</p> <pre><code>structu...
How to remove duplicate values in a dictionary?
python|python-3.x|dictionary
-1
98
2
72,187,003
72,187,003
-1
true
2022-05-10T13:05:22.453Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to remove duplicate values in a dictionary?<p>I want to remove duplicate values inside a dictionary.</p> <p>Let's say this is my dictionary:</p> <pre><co...
72,139,147
share hooks across components<p>I am trying to understand how to share hooks state across components. But it doesn't seem to be sharing. Am I doing something wrong here?</p> <p>Home.js</p> <pre><code>export default function Home() { const [search, setSearch]= useState(''); return ( &lt;di...
<p>You pass <code>handleSearch</code> as prop in your <code>Home</code> component but <code>Input</code> is expecting <code>setSearch</code>, so just change this line in your <code>Home</code></p> <pre><code>return ( &lt;div&gt; &lt;Input search={search} setSearch={setSearch} /&gt; // change here &lt;Produc...
share hooks across components
reactjs|react-hooks
-1
26
1
72,139,370
72,139,370
-1
true
2022-05-06T09:26:13.030Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: share hooks across components<p>I am trying to understand how to share hooks state across components. But it doesn't seem to be sharing. Am I doing something...
72,237,404
Check if user input is between two floats - Python<p>I am currently working on a small project that will take a user input such as &quot;50&quot;, and convert it to a float while also placing the decimal to the left, such as &quot;0.50&quot; - This part I have working the way I want, but the issue I am having now that ...
<p>welcome to SO.</p> <p>EDIT: Solution that should fit with your comment.</p> <pre class="lang-py prettyprint-override"><code>value = float(input(&quot;Input a number&quot;)) if value &gt;= 0.61 and value &lt;= 0.69: #whatever should happen here elif value &gt;= 0.70 and value &lt;= 0.79: #whatever you wan...
Check if user input is between two floats - Python
python|if-statement|floating-point|range
-1
47
1
72,237,502
72,237,502
-1
true
2022-05-14T04:45:22.437Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Check if user input is between two floats - Python<p>I am currently working on a small project that will take a user input such as &quot;50&quot;, and conver...
72,231,564
WinSCP .net library - Protocol.Ftp - System.FormatException Invalid length for a Base-64 char array or string<p>I have SFTP working, just to trying to add Ftp to our existing program. Is SshHostKeyFingerprint recommended for Ftp protocol the same as with SFtp?</p> <p>If needed, how would I format this key? Does it need...
<p>The program did not have a full stack trace in the error. When I added that, I see the module that contains the error: &quot;WinSCPWrapperGet.Program.get_Password()&quot; (where &quot;WinSCPWrapperGet&quot; is the program I'm modifying).</p> <p>I made a poor assumption that since I had a before and after log stateme...
WinSCP .net library - Protocol.Ftp - System.FormatException Invalid length for a Base-64 char array or string
c#|winscp-net
-1
53
1
72,232,802
72,232,802
-1
true
2022-05-13T14:54:12.537Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: WinSCP .net library - Protocol.Ftp - System.FormatException Invalid length for a Base-64 char array or string<p>I have SFTP working, just to trying to add Ft...
71,388,035
live-server doesn't cache JavaScript code while using live server<p>My project is React.js/Babel.js based. I have no errors with my code which I'm certain of, but the live server isn't responding to changes made via JavaScript. I made changes to the HTML file, changes take place without any errors. When I make changes ...
<p>I solved it!</p> <p>You Need to make sure that <strong>Babel Presets</strong> are properly installed and compiling JSX with Babel into JavaScript. You could use the following script to clarify the requested compilation files, the output, and the presets. <code>babel src/app.js --out-file=public/scripts/app.js --pres...
live-server doesn't cache JavaScript code while using live server
reactjs|babeljs|browser-cache|liveserver|npm-live-server
-1
262
1
71,431,074
71,431,074
0
true
2022-03-07T22:34:57.283Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: live-server doesn't cache JavaScript code while using live server<p>My project is React.js/Babel.js based. I have no errors with my code which I'm certain of...
71,441,180
One page application in the browser<p>ich möchte eine Webanwendung schreiben. Da ich aber noch ziemlich neu in der Webentwicklung bin weiß ich garnicht wo ich anfangen soll.</p> <p><a href="https://i.stack.imgur.com/J7UUE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/J7UUE.png" alt="Web Application...
<p>Start simple by building basic static websites (not web applications) first so you get to know the absolute basics of HTML, CSS (and JavaScript) as well as HTTP (what it is and how it works).</p> <p>Then you could move on to web applications and creating REST APIs. There are thousands of videos out there showing you...
One page application in the browser
web-applications
-1
29
1
71,441,467
71,441,467
0
true
2022-03-11T15:51:46.167Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: One page application in the browser<p>ich möchte eine Webanwendung schreiben. Da ich aber noch ziemlich neu in der Webentwicklung bin weiß ich garnicht wo ic...
71,791,679
Access SQL for multiple LEFT JOIN cant work<p>TableA</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>Shop ID</th> <th>Item</th> <th>Price</th> </tr> </thead> <tbody> <tr> <td>Shop A</td> <td>Item1</td> <td>101</td> </tr> <tr> <td>Shop A</td> <td>Item2</td> <td>102</td> </tr> <tr> <td>Shop A...
<p>One approach is to use a pivot query:</p> <pre class="lang-sql prettyprint-override"><code>SELECT [Shop ID], MAX(IIF([Item] = &quot;Item1&quot;, Price, NULL)) AS Item1, MAX(IIF([Item] = &quot;Item2&quot;, Price, NULL)) AS Item2, MAX(IIF([Item] = &quot;Item3&quot;, Price, NULL)) AS Item3, ... ...
Access SQL for multiple LEFT JOIN cant work
ms-access|left-join
-1
35
2
71,791,707
71,791,707
0
true
2022-04-08T04:25:57.423Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Access SQL for multiple LEFT JOIN cant work<p>TableA</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>Shop ID</th> <th>Item</th> ...
71,792,378
PHP add key data to json<p>Have a nice day. I have created the following basics:</p> <pre><code>{ &quot;1111&quot;: { &quot;h264&quot;: { &quot;url&quot;: &quot;TEST&quot;, &quot;expire&quot;: 1649453177 } } } </code></pre> <p>I need to add the following lines to the same...
<p>Change:</p> <pre><code>$post_data = array($codec =&gt; array('url' =&gt; $last_line,'expire' =&gt; $time)); array_push($data[$id], $post_data); </code></pre> <p>To:</p> <pre><code>$post_data = array($codec =&gt; array('url' =&gt; $last_line,'expire' =&gt; $time)); $data[$id]['h265'] = $post_data; </code></pre>
PHP add key data to json
php|json
-1
32
1
71,792,421
71,792,421
0
true
2022-04-08T06:12:38.277Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: PHP add key data to json<p>Have a nice day. I have created the following basics:</p> <pre><code>{ &quot;1111&quot;: { &quot;h264&quot;: { ...
71,794,960
Tokio macro requires rt or rt-multi-thread in Solana program<p>Anyone able to guide me on why I can be getting this error on my tests?</p> <p><code>The #[tokio::test] macro requires rt or rt-multi-thread.</code></p> <p>It is more a Rust question than a Solana one, but I have been following the examples (and I am learni...
<p>Hrm... I'm not sure then. Maybe try adding <a href="https://github.com/solana-labs/solana/blob/364af3a3e01e258694e16aed57838d36305aa9c3/program-test/Cargo.toml#L25" rel="nofollow noreferrer">https://github.com/solana-labs/solana/blob/364af3a3e01e258694e16aed57838d36305aa9c3/program-test/Cargo.toml#L25</a> explicitly...
Tokio macro requires rt or rt-multi-thread in Solana program
rust|solana|rust-tokio|solana-program-library
-1
266
1
71,794,971
71,794,971
0
true
2022-04-08T09:51:21.593Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Tokio macro requires rt or rt-multi-thread in Solana program<p>Anyone able to guide me on why I can be getting this error on my tests?</p> <p><code>The #[tok...
71,806,121
remove square brackets and it content from string in javascript<p>How to remove characters between two brackets and brackets. For example</p> <pre><code>Let it [Am]be, let it [C/G]be, let it [F]be, let it [C]be [C]Whisper words of [G]wisdom, let it [F]be [C/E] [Dm] [C] </code></pre> <p>I want above string to</p> <pre><...
<p>You need to escape the <em>outer</em> <code>[]</code> so you're matching those literally, and allow anything except a <code>]</code> inside. So:</p> <pre><code>var reg = /\[[^\]]*\]/g; </code></pre> <p>Here's a breakdown (also on <a href="https://regex101.com/r/2oTQ6T/1" rel="nofollow noreferrer">regex101</a>):</p> ...
remove square brackets and it content from string in javascript
javascript
-1
27
1
71,806,166
71,806,166
0
true
2022-04-09T07:39:32.637Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: remove square brackets and it content from string in javascript<p>How to remove characters between two brackets and brackets. For example</p> <pre><code>Let ...
71,808,700
How to check if there is greater than one item in a list python<p>I am making a code that generates a Rubik's cube scramble and I used <code>if scramble:</code> to see if there was anything in the list in the for loop. I am unsure of how to check if there is anything in list index &gt; 0. The code is here (please don't...
<p>You can check the length of the list:</p> <pre class="lang-py prettyprint-override"><code>if len(scramble) &gt; 1: #... </code></pre>
How to check if there is greater than one item in a list python
python|rubiks-cube
-1
30
1
71,808,725
71,808,725
0
true
2022-04-09T13:55:33.530Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to check if there is greater than one item in a list python<p>I am making a code that generates a Rubik's cube scramble and I used <code>if scramble:</co...
71,809,849
how to give parameters when connecting to different webpages in django framework<p>I'm trying to link two webpages in django framework, using anchor tags in template. One of my view takes an argument and I can't figure out how to pass a parameter in template. This is a url pattern that takes argument. <br> <code>path(&...
<pre><code>path(&quot;&lt;str:entry&gt;&quot;, views.display_entry, name=&quot;entry-detail&quot;) {% for entry in entries %} &lt;a href=&quot;{% url 'entry-detail' entry %}&quot;&gt;{{ entry }}&lt;/a&gt; {% endfor %} </code></pre>
how to give parameters when connecting to different webpages in django framework
python|html|django|django-views|django-templates
-1
24
1
71,810,709
71,810,709
0
true
2022-04-09T16:22:36.523Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to give parameters when connecting to different webpages in django framework<p>I'm trying to link two webpages in django framework, using anchor tags in ...
71,831,628
Convert alphabatical date into datetime<p>I want to convert dates like these:</p> <pre class="lang-none prettyprint-override"><code>January 2022 -&gt; 01-2022 February 2022 -&gt; 02-2022 </code></pre>
<pre class="lang-py prettyprint-override"><code>month = {&quot;january&quot;: &quot;01&quot;, &quot;february&quot;: &quot;02&quot;, &quot;march&quot;: &quot;03&quot;, &quot;april&quot;: &quot;04&quot;, &quot;may&quot;: &quot;05&quot;, &quot;june&quot;: &quot;06&quot;, &quot;july&quot;: &quot;07&quot;, &quot;august&quot...
Convert alphabatical date into datetime
python|datetime
-1
35
2
71,831,707
71,831,707
0
true
2022-04-11T16:58:23.023Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Convert alphabatical date into datetime<p>I want to convert dates like these:</p> <pre class="lang-none prettyprint-override"><code>January 2022 -&gt; 01-202...
71,839,363
delete files recursively in windows<p>I have a folder. Inside that folder, there are many sub-directories. In each sub-directory, I have different kinds of files.</p> <p>I want to delete all the files with <code>.WAV</code> extension. I also have <code>.WAV.wav</code> files there which I don't want to delete.</p> <p>I ...
<p>Well: a <code>.wav.wav</code> file <strong>is</strong> as <code>.wav</code> file, so isn't that obvious behaviour?<br /> I would advise you to rename your <code>.wav.wav</code> files into <code>.wav.whatever</code> files, delete the <code>.wav</code> files and rename your <code>.wav.whatever</code> files back into <...
delete files recursively in windows
windows|file|delete-file
-1
33
1
71,839,719
71,839,719
0
true
2022-04-12T08:26:35.683Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: delete files recursively in windows<p>I have a folder. Inside that folder, there are many sub-directories. In each sub-directory, I have different kinds of f...
71,841,290
How to create custom Tailwind colors based on media-query?<p>How would I change the entire Tailwind color scheme based on the users preferences. Is this even possible or do I have to add &quot;dark:&quot; before every class?</p> <p>Here is my current tailwind.config.js:</p> <pre><code>module.exports = { purge: [&qu...
<p>Why are you making it so difficult? Tailwind has a darkmode class utility.</p> <p>When you add the dark mode class to the HTML attribute you can specify a different color.</p> <pre><code> &lt;!-- Dark mode not enabled --&gt; &lt;html&gt; &lt;body&gt; &lt;!-- Will be white --&gt; &lt;div class=&quot;bg-white d...
How to create custom Tailwind colors based on media-query?
css|reactjs|tailwind-css
-1
25
1
71,841,349
71,841,349
0
true
2022-04-12T10:46:34.157Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to create custom Tailwind colors based on media-query?<p>How would I change the entire Tailwind color scheme based on the users preferences. Is this even...
71,844,545
Looping on each line and each position in python<p>I'm stuck in a small looping problem. I have a file with different positions.</p> <pre class="lang-py prettyprint-override"><code>p = [10, 11, 16] </code></pre> <p>I have an input (have 5 line for example) file like this:</p> <pre class="lang-py prettyprint-override"><...
<p>You just have to print each iteration in seperate line, then just use print statement like this</p> <pre><code>print(line [int(i)], end='\n') </code></pre>
Looping on each line and each position in python
python|loops|char
-1
36
2
71,844,621
71,844,621
0
true
2022-04-12T14:32:36.113Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Looping on each line and each position in python<p>I'm stuck in a small looping problem. I have a file with different positions.</p> <pre class="lang-py pret...
71,842,760
how to fetch a wikipedia geosearch with a correct origin?<p>I want to add a &quot;wikipedia-geosearch&quot; feature to my interactive map. Here is the simplest code for that operation, first attempt:</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet...
<p><code>origin=*</code> is <a href="https://www.mediawiki.org/wiki/API:Cross-site_requests#CORS_usage" rel="nofollow noreferrer">a part of the MediaWiki API</a>. MediaWiki uses the parameter to return correct Cross-Origin Resource Sharing (CORS) headers on its HTTP response, which tells your browser that it's okay for...
how to fetch a wikipedia geosearch with a correct origin?
javascript|cors|fetch-api|wikipedia-api
-1
30
1
71,846,425
71,846,425
0
true
2022-04-12T12:29:40.593Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to fetch a wikipedia geosearch with a correct origin?<p>I want to add a &quot;wikipedia-geosearch&quot; feature to my interactive map. Here is the simple...
71,841,547
Why I got TypeError if calling staticmethod without class-body?<p>Why it happens? is this &quot;binding behavior”? using staticmethod in class body</p> <pre><code>&gt;&gt;&gt; class Test: @staticmethod def test(msg=&quot;asd&quot;): print(msg) &gt;&gt;&gt; test = Test() &gt;...
<p>A static method is a method that is bound to a class but does not require the class instance to function. For example, you may have a class built around a file type to retrieve raw data from a source file and pass it to a lexer, your constructor could have you pass in the raw file however you may want another functi...
Why I got TypeError if calling staticmethod without class-body?
python|static-methods
-1
32
2
71,848,148
71,848,148
0
true
2022-04-12T11:06:52.697Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why I got TypeError if calling staticmethod without class-body?<p>Why it happens? is this &quot;binding behavior”? using staticmethod in class body</p> <pre>...
71,855,753
Reading and saving images from http://assets URLs<p>I'm trying to download a bunch of images from different URLs and save them locally on my PC. Using the first two links below, I get the error: <code>HTTPError: Forbidden</code> and I have no idea why. Can it be because the site has protection from this?</p> <p>Here is...
<p>Like you said it must a protection from bots from the website, the solution would be specifying a known user agent</p> <pre><code>import urllib.request opener = urllib.request.build_opener() opener.addheaders = [('User-agent', 'Mozilla/5.0')] urllib.request.install_opener(opener) imgURL = &quot;one of your links&qu...
Reading and saving images from http://assets URLs
python|python-3.x|python-requests
-1
19
1
71,856,807
71,856,807
0
true
2022-04-13T10:14:23.840Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Reading and saving images from http://assets URLs<p>I'm trying to download a bunch of images from different URLs and save them locally on my PC. Using the fi...
71,859,921
Is there any React plugin similar to jquery's infinitysliderv2 plugin?<p>I am looking for a react plugin to perform the same function as jquery's infinitysliderv2 plugin. Here is its demo page: <a href="https://wood-roots.com/sample/infiniteslidev2/" rel="nofollow noreferrer">https://wood-roots.com/sample/infiniteslide...
<p>Were you able to come across Swiper.js? They have a lot to offer when it comes to carousels and it also has a lot of properties too which you can add to your carousel for it to be fully-customizable. Here is the docs for reference. <a href="https://swiperjs.com/demos" rel="nofollow noreferrer">https://swiperjs.com/d...
Is there any React plugin similar to jquery's infinitysliderv2 plugin?
reactjs|slider|carousel|infinite-scroll
-1
25
1
71,860,123
71,860,123
0
true
2022-04-13T15:19:25.603Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is there any React plugin similar to jquery's infinitysliderv2 plugin?<p>I am looking for a react plugin to perform the same function as jquery's infinitysli...
71,864,798
Summarising 2 columns<p>So I'm not sure if I'll be explaining this question well, but As you can see in one columns there are counties and the other one is the number of herds and what I wanna do is the find out how many herds are in each country rather than counting how many times the county appears and than adding th...
<pre><code>df.groupby('COUNTY')['NUMBER_OF_HERDS'].sum() </code></pre>
Summarising 2 columns
python|pandas
-1
25
1
71,864,911
71,864,911
0
true
2022-04-13T23:19:08.980Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Summarising 2 columns<p>So I'm not sure if I'll be explaining this question well, but As you can see in one columns there are counties and the other one is t...
71,866,307
Batch scripting 'start' does not seem to have access to system PATH<p>I am writing batch scripts to start up some services. One of them is driven by docker-compose, and so I would like to call <code>docker-compose up</code>. I would like to have a persistent window with its log output to monitor and debug the system.</...
<p><code>path</code> is a system-established variable which contains a list of directories which tells the OS where to look for executables that are not contained in the current directory. Use another variable name. –</p>
Batch scripting 'start' does not seem to have access to system PATH
batch-file|docker-compose|path
-1
26
1
71,866,542
71,866,542
0
true
2022-04-14T03:50:51.020Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Batch scripting 'start' does not seem to have access to system PATH<p>I am writing batch scripts to start up some services. One of them is driven by docker-c...
71,869,705
Wuapilib how to detect Definition Updates<p>I need to know when an update, detecting with Wuapilib, is of type <em>Definition updates</em> (like Defender updates). Using <em>ICategory</em> interface of Wuapilib I can get a property named <em>CategoryId</em> but I can't find documentation about it.</p>
<p><a href="https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85)" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85)</a></p> <pre><code>Classification Type Classification GUID Application 5C9376AB-8CE6-464A-B136-22113DD69801 Con...
Wuapilib how to detect Definition Updates
windows-defender|automatic-updates
-1
26
1
71,871,395
71,871,395
0
true
2022-04-14T09:53:44.073Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Wuapilib how to detect Definition Updates<p>I need to know when an update, detecting with Wuapilib, is of type <em>Definition updates</em> (like Defender upd...
71,874,968
What does this GIT command do while publishing a git project?<p>I have published my local angular v13 project to github remote. While pushing the repo to remote I was given instruction from git like to do these commands:</p> <p><code>git branch -M master</code></p> <p><code>git push -u origin master</code></p> <p>I wou...
<p>Based on git documentation <a href="https://git-scm.com/docs/git-branch" rel="nofollow noreferrer">https://git-scm.com/docs/git-branch</a> <code>git branch -M master</code> renames your current branch to <code>master</code>, thus keeping a standard for git.</p> <p>Up until this point, your repository on github is no...
What does this GIT command do while publishing a git project?
git|github|github-for-windows
-1
27
1
71,875,203
71,875,203
0
true
2022-04-14T16:37:54.400Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What does this GIT command do while publishing a git project?<p>I have published my local angular v13 project to github remote. While pushing the repo to rem...
71,874,965
What does the word 'X' GB Memory refers to in the App Service Plan Pricing Tiers Image?<p><a href="https://i.stack.imgur.com/wqTH7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wqTH7.png" alt="ASP Specs" /></a></p> <p>In every model of App Service Plan, there is 1 word called 1.75 GB, 3.5GB, 7GB, 1...
<p><strong>Yes! It's similar to a provisioned RAM on a VM</strong>.</p> <p>When upgrading to the Premium App Service Plan, it will show how many CPU Cores are along with the RAM.</p> <p>Whatever you mentioned 1.75 GB, 3.5 GB, and 7 GB belong to RAM in <strong>Standard App Service Plan</strong>!</p> <p><strong>Reference...
What does the word 'X' GB Memory refers to in the App Service Plan Pricing Tiers Image?
azure-app-service-plans
-1
33
1
71,878,717
71,878,717
0
true
2022-04-14T16:37:44.867Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What does the word 'X' GB Memory refers to in the App Service Plan Pricing Tiers Image?<p><a href="https://i.stack.imgur.com/wqTH7.png" rel="nofollow norefer...
71,879,430
how to display list cours randomly using angular?<p>I have displayed a list of courses, but I want to display them randomly, and I don't know how to do it.</p> <p><strong>random.component.ts</strong></p> <pre><code>export class RandomComponent implements OnInit { constructor() { } ngOnInit(): void { } course...
<p>At file .ts you can use function to make an Array random.</p> <pre><code>function shuffle(array) { let currentIndex = array.length, randomIndex; // While there remain elements to shuffle. while (currentIndex != 0) { // Pick a remaining element. randomIndex = Math.floor(Math.random() * currentIndex); currentIndex--...
how to display list cours randomly using angular?
angular
-1
31
1
71,879,499
71,879,499
0
true
2022-04-15T02:22:28.950Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to display list cours randomly using angular?<p>I have displayed a list of courses, but I want to display them randomly, and I don't know how to do it.</...
71,880,264
How to calculate sum of an object each 2 its value in js<p>i have an object like this, how can i calculate total value of code and codePrev :</p> <pre><code>{ &quot;code01Prev&quot;: 3756743628, &quot;code01&quot;: 10346000, &quot;code02Prev&quot;: 0, &quot;code02&quot;: 0, &quot;code10Prev&quot;: 3...
<p>Going with plain vanilla. The code is a little bit imperative (not explaining what but how). If possible it would be good to consider changing data structure.</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 la...
How to calculate sum of an object each 2 its value in js
object|sum|reduce
-1
23
1
71,880,674
71,880,674
0
true
2022-04-15T04:58:20.910Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to calculate sum of an object each 2 its value in js<p>i have an object like this, how can i calculate total value of code and codePrev :</p> <pre><code>...
71,885,184
Render docx in React js<p>I would like to properly render a docx file in React JS with the correct formatting, as it would appear in Word or a similar service. Currently, when displaying the text, all formatting is removed and appears as plain text. I obtain the file from the server, and process it, by:</p> <pre><code>...
<p><a href="https://www.npmjs.com/package/docxtemplater" rel="nofollow noreferrer">Docxtemplater</a> is</p> <blockquote> <p>a library to generate docx/pptx documents from a docx/pptx template</p> </blockquote> <p>If you need to render a docx file I think you should use <a href="https://www.npmjs.com/package/react-doc-v...
Render docx in React js
javascript|reactjs
-1
790
1
71,885,276
71,885,276
0
true
2022-04-15T14:19:14.043Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Render docx in React js<p>I would like to properly render a docx file in React JS with the correct formatting, as it would appear in Word or a similar servic...
71,887,487
Change version of Android Studio<p>I recently downloaded the latest version of android Studio and this is giving me a lot of problems. Some of my old projects don't work due to compatibility issues, so I wanted to know if it was possible to revert to an older version of Android Studio and how I can do it</p>
<p>Yes, it is possible. You can uninstall the current Android Studio and then, you can search <a href="https://developer.android.com/studio/archive" rel="nofollow noreferrer">here</a> for the version you would like to download.</p>
Change version of Android Studio
android|android-studio
-1
35
1
71,887,709
71,887,709
0
true
2022-04-15T18:13:41.587Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Change version of Android Studio<p>I recently downloaded the latest version of android Studio and this is giving me a lot of problems. Some of my old project...
71,892,845
How to load same page again in laravel using Ajax?<p>my function for removing the cart from a panel:</p> <pre><code>function removeFromCart(key) { $.post('{{ route('cart.remove') }}', {_token: '{{ csrf_token() }}', key: key}, function (response) { console.log(response) updateNavCart(); $('#c...
<p>You Can Use This To Reload Your Page From Ajax.</p> <pre><code>location.reload(); </code></pre>
How to load same page again in laravel using Ajax?
jquery|ajax|laravel
-1
27
1
71,893,509
71,893,509
0
true
2022-04-16T09:54:33.910Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to load same page again in laravel using Ajax?<p>my function for removing the cart from a panel:</p> <pre><code>function removeFromCart(key) { $.post...
71,882,595
By default, the server runs a writing document instead of the browser<p>I tried to change the run through the folder without success.</p> <p>'jupyter notebook --generate-config'</p> <p>I signed up and changed the target address and still when I register in CMD jupyter notebook I ran a writing document</p> <p>Suggestion...
<p><strong>The problem was solved</strong>, the default file for html beats was assigned to the writer. All that had to be done was: My Computer&gt; Properties&gt; Search Bar: Set Default Apps&gt; Search Explorer&gt; In html extension redefine Explorer.</p> <p>Hope I helped those who also encountered this stupid proble...
By default, the server runs a writing document instead of the browser
jupyter-notebook
-1
26
1
71,894,087
71,894,087
0
true
2022-04-15T09:55:03.447Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: By default, the server runs a writing document instead of the browser<p>I tried to change the run through the folder without success.</p> <p>'jupyter noteboo...
71,893,764
React Thunk Resolver reasie error: A computed property name must be of type 'string', 'number', 'symbol', or 'any'<p>Got this error:</p> <blockquote> <p>A computed property name must be of type 'string', 'number', 'symbol', or 'any'.</p> </blockquote> <p>In this line</p> <pre><code>&gt; [getAuthnUser.fulfilled](state, ...
<p>We do not recommend the object notation for <code>extraReducers</code> any more, especially with TypeScript you should be using the <a href="https://redux-toolkit.js.org/api/createSlice#the-extrareducers-builder-callback-notation" rel="nofollow noreferrer">&quot;builder notation&quot;</a>.</p> <p>As you see, the obj...
React Thunk Resolver reasie error: A computed property name must be of type 'string', 'number', 'symbol', or 'any'
redux-thunk|redux-toolkit
-1
284
1
71,894,425
71,894,425
0
true
2022-04-16T12:11:51.237Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: React Thunk Resolver reasie error: A computed property name must be of type 'string', 'number', 'symbol', or 'any'<p>Got this error:</p> <blockquote> <p>A co...
71,888,758
Add update and delete functions to Solidity struct<p>I'm trying to add an update function and a delete function to my struct, however it doesn't work.</p> <p>Does someone know how to make those functions work?</p> <pre><code>pragma solidity 0.7.5; contract dogs{ struct Person{ uint age; string nam...
<p>Try smart contract below, I also inserted some comments to understand you what you wrong in your contract:</p> <pre><code>// SPDX-License-Identifier: MIT pragma solidity 0.7.5; contract Dogs { struct Person{ uint age; string name; } Person[] people; function addNewPerson(uint _age...
Add update and delete functions to Solidity struct
solidity
-1
265
1
71,894,764
71,894,764
0
true
2022-04-15T20:39:45.857Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Add update and delete functions to Solidity struct<p>I'm trying to add an update function and a delete function to my struct, however it doesn't work.</p> <p...
71,895,975
Why don't the child elements fill in the parent ones?<p>There is a scrollView with an orange background, it has an image with a white background, a gray label and a button. ScrollView fills the entire screen, including the status bar. How can I make the image also go to the status bar, and not be attached to its bottom...
<p>Head over to your favorite search engine and search for <code>UIScrollView contentLayoutGuide frameLayoutGuide</code></p> <p>In order to get your content to scroll, you need constraints to the scrollView's<code>.contentLayoutGuide</code>.</p> <p>To size the content correctly - such as to fill the width of the scroll...
Why don't the child elements fill in the parent ones?
ios|swift
-1
24
1
71,897,517
71,897,517
0
true
2022-04-16T17:20:24.510Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why don't the child elements fill in the parent ones?<p>There is a scrollView with an orange background, it has an image with a white background, a gray labe...
71,906,330
python: <bound_named_property 'IKeithley2450MeasurementTrace.GetAverageReading' at 14280b4c448><p>I'm trying to read some values from an instrument (keithly 2460) using ivi driver (ke2450_64.dll).</p> <p>Here is the code:</p> <pre><code>import comtypes from comtypes import client KeithleyInstruments = client.GetModule(...
<p>I assume you are trying to access an <a href="https://pythonhosted.org/comtypes/#properties-with-optional-arguments" rel="nofollow noreferrer">optional property</a>.</p> <p>Try calling it like so <code>SMU.Measurement.Trace.GetAverageReading()</code>.</p> <p>Alternatively you can try <code>str(SMU.Measurement.Trace....
python: <bound_named_property 'IKeithley2450MeasurementTrace.GetAverageReading' at 14280b4c448>
python
-1
23
1
71,906,352
71,906,352
0
true
2022-04-17T23:50:36.623Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: python: <bound_named_property 'IKeithley2450MeasurementTrace.GetAverageReading' at 14280b4c448><p>I'm trying to read some values from an instrument (keithly ...
71,910,422
A thin line appears when the keyboard dismisses - SwiftUI<p>I am new to SwiftUI, and I am creating a simple view which contains 3 textfields and a button. When I focus on a textfield the keyboard appears and it moves the view upwards, then when I dismiss the keyboard , the view is moved downwards to its original positi...
<p>Try using <code>.ignoresSafeArea(.keyboard)</code> on your view embedding the textfield (not the textfield itself), and let the view take the whole space by adding <code>Spacer()</code> to the bottom of your view.</p>
A thin line appears when the keyboard dismisses - SwiftUI
swift|swiftui|swift-keyboard
-1
31
1
71,911,495
71,911,495
0
true
2022-04-18T10:08:25.393Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: A thin line appears when the keyboard dismisses - SwiftUI<p>I am new to SwiftUI, and I am creating a simple view which contains 3 textfields and a button. Wh...
71,911,395
Is there a way to communicate angular component with native php backend ( not rest api )<p>I'm currently working on a migration of a project that is developed with native PHP, HTML, js to a new technology Angular The client asks if there is a possibility to create a list of components that somehow can communicate and f...
<p>Since angular is a client-side and PHP is a server-side, the only way to communicate both is using requests or websockets</p> <p>You can create a server API that exposes the required logic to be used by client, and a service in your angular application that implements the requests to that API. Then any component cou...
Is there a way to communicate angular component with native php backend ( not rest api )
php|angular|frontend
-1
33
1
71,912,437
71,912,437
0
true
2022-04-18T11:47:23.633Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is there a way to communicate angular component with native php backend ( not rest api )<p>I'm currently working on a migration of a project that is develope...
71,916,083
FontAwesome Kit vs CDN<p>Does anybody know what's the difference between using FontAwesome Kit and FontAwesome CDN?(in terms of advantages not the HTML tags)</p> <p>Which one is better to use?</p> <p>And what exactly is the Kit?</p> <p>I've looked it up on their website but there's no clear explanation about the Kit co...
<p>In my experience two benefits in using a &quot;Kit&quot; is it allows restricting icons to specific domains. This might not be crucial if you are using a free account, but if you are using a pro account it is a nice feature. Plus, you can upload custom icons to your kit and call them like any other font awesome ico...
FontAwesome Kit vs CDN
html|css|font-awesome
-1
530
1
71,916,317
71,916,317
0
true
2022-04-18T19:13:03.543Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: FontAwesome Kit vs CDN<p>Does anybody know what's the difference between using FontAwesome Kit and FontAwesome CDN?(in terms of advantages not the HTML tags)...
71,918,512
How to make program print a string for every item in a numerical list according to the value of the item in the list?<pre><code>numbers = [5, 2, 5, 2, 2] for item in numbers: print(&quot;...&quot;) </code></pre> <p>This just prints the string for each item in the list, but I don't know how to make it print said str...
<p>In python you are allowed to use <a href="https://www.pythoncentral.io/use-python-multiply-strings/" rel="nofollow noreferrer">multiplication (<code>*</code>) between an integer and a string</a> which should do what you want.</p> <pre><code>numbers = [5, 2, 5, 2, 2] for item in numbers: print(item * &quot;...&qu...
How to make program print a string for every item in a numerical list according to the value of the item in the list?
python-3.x
-1
23
1
71,918,531
71,918,531
0
true
2022-04-19T00:52:49.220Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to make program print a string for every item in a numerical list according to the value of the item in the list?<pre><code>numbers = [5, 2, 5, 2, 2] for...
71,873,549
GIT - HEAD one commit ahead<p>I have the following message:</p> <p><code>fatal: Not possible to fast-forward, aborting.</code></p> <p>when trying to do <code>GIT PULL</code></p> <p>I did <code>GIT REBASE</code> and it works to PULL remote commits to the branches, but HEAD still not pointing to the branches!?</p> <p>I w...
<p>I could solve my case doing the following:</p> <pre><code>$git checkout –b temp #makes a new branch from current detached HEAD $git branch –f master temp #update master to point to the new &lt;temp&gt; branch $git branch –d temp #delete the &lt;temp&gt; branch $git push origin master #push the re-established history...
GIT - HEAD one commit ahead
git
-1
35
1
71,923,056
71,923,056
0
true
2022-04-14T14:49:59.320Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: GIT - HEAD one commit ahead<p>I have the following message:</p> <p><code>fatal: Not possible to fast-forward, aborting.</code></p> <p>when trying to do <code...
71,921,584
How to solve template error in Arcgis AR for iOS<p>I am trying to create an AR App for navigation, so i downloaded the templates suggested by arcgis for that, while there were no errors in xamarin.forms there are lot of namespace errors in xamarin.ios where i wanted to build my app, the errors are attached below[</p> <...
<p>There was some import bug in Esri Xamarin.iOS templates alone, to rectify that problem, we need to go to Tools-&gt;Package Manager-&gt; Manage Nuget Packages for solution-&gt;Search for all ArcGIS Packages-&gt; once the search results are out, go to a ESRI.ArcGISRuntime package-&gt; click the checkbox on the right w...
How to solve template error in Arcgis AR for iOS
xamarin.ios|arcgis-runtime|esri-maps
-1
29
1
71,933,390
71,933,390
0
true
2022-04-19T08:06:51.767Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to solve template error in Arcgis AR for iOS<p>I am trying to create an AR App for navigation, so i downloaded the templates suggested by arcgis for that...