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,898,179
nodejs express-fileupload - wrong encoding on filename in docker environment<p>I'm struggling with wrong encoded multipart form filenames uploaded to a nodejs backend.</p> <p>Running the node application locally works as expected and the filenames arrive with propert utf-8 encoding. As soon as i run the application in ...
<p>Ok i found the solution. <code>express-fileupload</code> uses <a href="https://github.com/mscdex/busboy#api" rel="nofollow noreferrer">busboy</a> under the hood. You can pass in busboy options and one of them is <code>defParamCharset</code>:</p> <blockquote> <p>&quot;For multipart forms, the default character set to...
nodejs express-fileupload - wrong encoding on filename in docker environment
node.js|docker|utf-8|express-fileupload
0
52
1
72,908,480
72,908,480
1
true
2022-07-07T12:54:07.373Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: nodejs express-fileupload - wrong encoding on filename in docker environment<p>I'm struggling with wrong encoded multipart form filenames uploaded to a nodej...
72,910,639
Incorrect use of ParentDataWidget. The ParentDataWidget Expanded(flex: 1) wants to apply ParentData of type FlexParentData to a RenderObject,<p>I am using a tab bar view in a flexible, which is inside a column. As a result, I am getting the incorrect use of ParentDataWidget.</p> <p>Here's the code to my body:</p> <pre>...
<p>You dont need the flexible widget here.. please remove the flexible. Or if you wish to keep it wrap the column with a sized box of size same as device and use expanded in place of flexible.</p>
Incorrect use of ParentDataWidget. The ParentDataWidget Expanded(flex: 1) wants to apply ParentData of type FlexParentData to a RenderObject,
flutter|dart|user-interface
2
52
1
72,911,037
72,911,037
1
true
2022-07-08T11:20:10.707Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Incorrect use of ParentDataWidget. The ParentDataWidget Expanded(flex: 1) wants to apply ParentData of type FlexParentData to a RenderObject,<p>I am using a ...
72,910,103
How to rotate object slowly in this situation in unity?<p>I am creating a building system in unity and when a key is pressed this function is run. In this function I want to rotate the <code>buildModel</code> 90 degrees <strong>slowly over time</strong>.</p> <p>Here is the function and what I tried:</p> <pre><code>publ...
<pre><code>private float _rotationSpeed = 180f; private Quaternion _targetRotation; void Start(){ _targetRotation = buildModel.transform.rotation; } public void RotateBuilding(){ _targetRotation = buildModel.transform.rotation * Quaternion.AngleAxis(90f, Vector3.up); } public void Update(){ buildModel.tr...
How to rotate object slowly in this situation in unity?
unity3d|build|rotation
0
52
1
72,911,359
72,911,359
1
true
2022-07-08T10:30:54.833Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to rotate object slowly in this situation in unity?<p>I am creating a building system in unity and when a key is pressed this function is run. In this fu...
72,894,700
Using linprog for solving a minimization problem<p>I've an absolute error loss function of the following form,</p> <p><a href="https://i.stack.imgur.com/kIavjm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kIavjm.png" alt="enter image description here" /></a></p> <p>This function is used to scale t...
<p>@Natasha. I hope I understood the question correctly and this is about finding the scale factor <code>a</code> for the function <code>f</code> which best approximates the function <code>g</code> in the least absolute deviation sense. If yes, then following remarks before I share some code:</p> <ol> <li>I placed the ...
Using linprog for solving a minimization problem
python-3.x|matlab|optimization|linear-programming|scipy-optimize-minimize
-2
52
1
72,912,151
72,912,151
1
true
2022-07-07T08:36:50.653Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Using linprog for solving a minimization problem<p>I've an absolute error loss function of the following form,</p> <p><a href="https://i.stack.imgur.com/kIav...
72,911,621
R - Fuzzy Inner Join on two fields, matching to a date range<p>I'm fairly new to R, and have been sifting through other questions all morning trying to figure this out, but can't find anything related enough <em>or</em> my knowledge of R is not good enough to understand some of the suggested solutions to my problem.</p...
<p><a href="https://cran.r-project.org/web/packages/data.table/vignettes/datatable-intro.html" rel="nofollow noreferrer">data.table</a> supports non-equi joins that are the fastest I've found. The syntax is a bit different from the tidyverse but I think it's worth it for these more complicated joins.</p> <pre><code>a &...
R - Fuzzy Inner Join on two fields, matching to a date range
r|join|dplyr|fuzzyjoin
0
52
3
72,912,876
72,912,876
1
true
2022-07-08T12:44:01.510Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: R - Fuzzy Inner Join on two fields, matching to a date range<p>I'm fairly new to R, and have been sifting through other questions all morning trying to figur...
72,917,636
How can I "pass a value" into a MYSQL subquery?<p>I need to pass the OD.ID from the parent query's current record to the subquery. I have no idea how to do this, or even if it's possible to do.</p> <p>The value of OD.ID (line 4 below) will be a unique number for each row in the parent query, and I need to limit the sub...
<p>This is called a 'correlated subquery'. You just need to use a different alias in the subquery so you can refer to OD.ID and it knows you mean the outer one:</p> <pre><code>(Select Count(Distinct OD2.Day) From OrderDetail OD2 Where OD2.Day Between :start_date And :end_date AND OD2.ID = OD.ID) </code></pre>
How can I "pass a value" into a MYSQL subquery?
php|mysql|sql|distinct
1
52
1
72,917,699
72,917,699
1
true
2022-07-08T22:38:28.127Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I "pass a value" into a MYSQL subquery?<p>I need to pass the OD.ID from the parent query's current record to the subquery. I have no idea how to do t...
72,921,170
How can I import multiple CSVs to preset sheets?<p>I have some CSV files on my G-drive that I want to import to preset sheets, based on file names. For example,</p> <ol> <li>I have CSV files named: &quot;REP1-abc&quot;, &quot;REP2-bcd&quot;, &quot;REP3-cde&quot;,...</li> <li>I have spreadsheet with sheets named: &quot;...
<h3>Loading CSVs</h3> <pre><code>function loadcsvs() { const fldr = DriveApp.getFolderById(&quot;Folder id&quot;); const files = fldr.getFileByType(MimeType.CSV); const ss = SpreadsheetApp.getActive(); const shts = ss.getSheets().map(sh =&gt; sh.getName()); while(files.hasNext()) { let file = files.next()...
How can I import multiple CSVs to preset sheets?
csv|google-apps-script|import|google-sheets-api|string-comparison
-1
52
1
72,922,391
72,922,391
1
true
2022-07-09T11:57:52.277Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I import multiple CSVs to preset sheets?<p>I have some CSV files on my G-drive that I want to import to preset sheets, based on file names. For examp...
72,906,721
GoLang tailing UTF16LE windows log file<p>How can I combine these two golang scripts to tail an active log that is UTF16LEBOM?</p> <p>I am working on a log parser for a game (Eve Online). In the game chat logs can be saved, and I would like to use GoLang to read the running log and flag on keywords &quot;die&quot; in &...
<p>You can simplify your code by removing <code>github.com/TomOnTime/utfutil</code> (this is a very thin wrapper over <code>golang.org/x/text/encoding/unicode</code>). It's also often simpler to chain tasks rather than trying to do everything at once; here I'm borrowing <code>tailReader</code> (with a minor change) fro...
GoLang tailing UTF16LE windows log file
go
1
52
1
72,925,087
72,925,087
1
true
2022-07-08T04:41:37.260Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: GoLang tailing UTF16LE windows log file<p>How can I combine these two golang scripts to tail an active log that is UTF16LEBOM?</p> <p>I am working on a log p...
72,918,543
Run vue app on Network (LAN) with Dev Container<p>I've gone through several tutorials to make access to the application available via Network, but nothing has worked so far:</p> <pre class="lang-json prettyprint-override"><code>//devcontainer.json // For format details, see https://aka.ms/devcontainer.json. For config ...
<p>In devcontainer.json comment out:</p> <pre><code>// &quot;forwardPorts&quot;: [8080], </code></pre> <p>And add:</p> <pre><code>&quot;appPort&quot;: [8080, &quot;192.168.0.10:8080:8080&quot;], </code></pre> <ul> <li>The first 8080 enables your host machine (a.k.a. your Mac) to access the remote container using either...
Run vue app on Network (LAN) with Dev Container
docker|vuejs3
0
52
2
72,925,193
72,925,193
1
true
2022-07-09T02:36:42.060Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Run vue app on Network (LAN) with Dev Container<p>I've gone through several tutorials to make access to the application available via Network, but nothing ha...
72,911,065
Replace duplicate value in pandas column by other column value<p>I'm using python 3.x</p> <p>I have a pandas dataframe df, it looks like</p> <pre><code>Sl Name Name2 1 abc abc e 2 pqr lmn o 3 abc abc e 4 abc krs 5 cde rmn </code></pre> <p>I would like to replace duplicate value in column nam...
<p>You need to add a count of occurrences of duplicate &amp; then use ouroboros1 solution with one more condition in np.where to check if count is more than 1</p> <p>import numpy as np</p> <pre><code>df['counts'] = df.groupby('Name', sort=False).cumcount() + 1 df </code></pre> <p>This will give output</p> <pre><code>sl...
Replace duplicate value in pandas column by other column value
python
1
52
3
72,928,025
72,928,025
1
true
2022-07-08T12:00:25.587Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Replace duplicate value in pandas column by other column value<p>I'm using python 3.x</p> <p>I have a pandas dataframe df, it looks like</p> <pre><code>Sl ...
72,929,409
Laravel Login attempt always return false<p>This is fresh laravel 9 Project, I didn't touch anything about auth but it is not working.</p> <pre><code>Route::get('test',function (){ $user = \App\Models\User::create([ 'name' =&gt; fake()-&gt;name(), 'email' =&gt; 'a@d.com', 'email_verified_at' =&gt; now(), ...
<p>Laravel encrypts your <code>password</code> by default, so you don't need to encrypt it anymore.</p> <p>Use this:</p> <pre><code>$user = \App\Models\User::create([ 'name' =&gt; fake()-&gt;name(), 'email' =&gt; 'a@d.com', 'email_verified_at' =&gt; now(), 'password' =&gt; 'password', // password ]); </...
Laravel Login attempt always return false
laravel|authentication
0
52
1
72,929,452
72,929,452
1
true
2022-07-10T14:53:35.887Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Laravel Login attempt always return false<p>This is fresh laravel 9 Project, I didn't touch anything about auth but it is not working.</p> <pre><code>Route::...
72,936,404
Get the clean data using dictionary<p>I get a table where I have ID and and description, so I only need desciption as output.</p> <p>DATA:</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>Language</th> <th>Product</th> </tr> </thead> <tbody> <tr> <td>9;#JS;#20;#React</td> <td>2;#Comon</td> <...
<p>Here is a custom UDF you can call:</p> <pre><code>Function RX(s As String) As String With CreateObject(&quot;vbscript.regexp&quot;) .Global = True .Pattern = &quot;(?:^|;#)\d+;#&quot; RX = .Replace(Mid(s, InStr(s, &quot;;#&quot;) + 2), &quot;, &quot;) End With End Function </code></pre> <p><a href="htt...
Get the clean data using dictionary
excel|vba|dictionary|formula|data-cleaning
0
52
1
72,937,202
72,937,202
1
true
2022-07-11T09:33:40.547Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Get the clean data using dictionary<p>I get a table where I have ID and and description, so I only need desciption as output.</p> <p>DATA:</p> <div class="s-...
72,936,663
Java exception handling: JSONObject cannot convert JSONArray<pre><code>private String getExpenseDtl() throws Exception { CommonDO commonDO = new CommonDO(this.ou); HttpServletRequest request = ServletActionContext.getRequest(); try { String getData = '&lt;Root&gt;&lt;/Root&gt;' //Sql returned xml re...
<p>In your case.</p> <p>You have</p> <pre><code>String getData = '&lt;Root&gt;&lt;/Root&gt;'; </code></pre> <p>If you convert it to JSONObject you get something like this.</p> <pre><code>{ &quot;Root&quot;: {}, } </code></pre> <p>based on what you are saying you are getting an exception here:</p> <p>if (xmlJSONObj.ge...
Java exception handling: JSONObject cannot convert JSONArray
java|arrays|json|exception
1
52
2
72,938,219
72,938,219
1
true
2022-07-11T09:52:56.263Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Java exception handling: JSONObject cannot convert JSONArray<pre><code>private String getExpenseDtl() throws Exception { CommonDO commonDO = new CommonDO...
72,908,230
How do I stop my Android code from sending Arabic text when sending a date timestamp using the Java Util Date?<p>In the app we are trying to send telemetry events to our API but users in Iran are sending through the timestamp formatted as such <code>&quot;Ϋ²Ϋ°Ϋ²Ϋ²-Ϋ°Ϋ·-Ϋ°ΫΆTΫ°Ϋ°:Ϋ°Ϋ³:Ϋ³Ϋ³.Ϋ³ΫΉΫ°Z&quot;</code>.</p> <pre class="lang-none...
<p>Setting the Locale to Locale.ENGLISH solved the problem was just difficult to test without setting my device language to Arabic</p>
How do I stop my Android code from sending Arabic text when sending a date timestamp using the Java Util Date?
android|kotlin|date|timestamp|locale
0
52
1
72,939,112
72,939,112
1
true
2022-07-08T07:43:27.657Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I stop my Android code from sending Arabic text when sending a date timestamp using the Java Util Date?<p>In the app we are trying to send telemetry e...
72,938,291
Bar with different color<p>I am working with matplotlib and below you can see my data and my plot.</p> <pre><code>data = { 'type_sale': ['g_1','g_2','g_3','g_4','g_5','g_6','g_7','g_8','g_9','g_10'], 'open':[70,20,24,150,80,90,60,90,20,20], } df = pd.DataFrame(data, columns = ['type_sale', ...
<p>The <code>ax.bar()</code> method returns a list of bars that you can then manipulate, in your case with <code>.set_color()</code>:</p> <pre><code>import matplotlib.pyplot as plt f=plt.figure() ax=f.add_subplot(1,1,1) ## bar() will return a list of bars barlist = ax.bar([1,2,3,4], [1,2,3,4]) barlist[3].set_color('...
Bar with different color
python|matplotlib
0
52
2
72,939,632
72,939,632
1
true
2022-07-11T12:03:22.270Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Bar with different color<p>I am working with matplotlib and below you can see my data and my plot.</p> <pre><code>data = { 'type_sale': ['g_1','g_2'...
72,945,390
Can I create abstract properties in Java?<p>Is this code legal in Java? I'm trying to build an abstract cards class and a sub class that will inherit methods and properties from the abstract class. I know I can create abstract methods and regular methods too, but can I also create properties in the abreact class?</p> <...
<p>Yes, abstract classes can have properties.</p> <p>An abstract class is much like a regular class, except that they cannot be instantiated. They must be implemented/extended by a subclass, this includes the abstract methods within them.</p>
Can I create abstract properties in Java?
java|abstract-class
0
52
2
72,945,468
72,945,468
1
true
2022-07-11T22:48:31.443Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can I create abstract properties in Java?<p>Is this code legal in Java? I'm trying to build an abstract cards class and a sub class that will inherit methods...
72,945,393
InfoBar FontSize cannot be changed<p><strong>No changes occur</strong> when you try to change the font size of the <code>Message</code> <strong>property</strong> of the <code>InfoBar</code> <strong>class</strong> with the <code>FontSize</code> <strong>property</strong>.</p> <h3>Problem</h3> <p><a href="https://i.stack....
<p>This was a messy workaround that I tried and looks like it works, somehow.</p> <p><a href="https://i.stack.imgur.com/4LEWF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4LEWF.png" alt="Edited Bar" /></a></p> <pre><code>&lt;InfoBar x:Name=&quot;Notification&quot; IsOpen=&quot;true&quot;&gt; ...
InfoBar FontSize cannot be changed
c#|xaml|uwp-xaml|winui-3|winui
2
52
1
72,945,745
72,945,745
1
true
2022-07-11T22:49:03.450Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: InfoBar FontSize cannot be changed<p><strong>No changes occur</strong> when you try to change the font size of the <code>Message</code> <strong>property</str...
72,948,477
how to delete all the data in a sheet in excel?<pre><code>from openpyxl import load_workbook wb = load_workbook(&quot;C:\op.xlsx&quot;) ws = wb.active </code></pre> <p>This is the code I have so far as I don't know what to do next so pls help me.</p>
<p>Try:</p> <pre class="lang-py prettyprint-override"><code>ws.delete_rows(1, ws.max_row) </code></pre> <p>You could also delete the sheet and create another one:</p> <pre class="lang-py prettyprint-override"><code>del wb[wb.active.title] wb.create_sheet() </code></pre> <p>See</p> <ul> <li><a href="https://openpyxl.rea...
how to delete all the data in a sheet in excel?
python|excel|openpyxl|python-3.10
-1
52
1
72,948,712
72,948,712
1
true
2022-07-12T07:23:39.693Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to delete all the data in a sheet in excel?<pre><code>from openpyxl import load_workbook wb = load_workbook(&quot;C:\op.xlsx&quot;) ws = wb.active </code...
72,943,997
Best way to create dynamic navigation on NextJS with firebase?<p>I'm looking forward to create a web app with NextJS and Google's Firebase. The app has an admin panel and a public site. In the admin panel should have options to edit the public site's navigation.</p> <p>So I was thinking is it wise to have client-side f...
<p>This really depends on your use case. In Next.js there are 3 diffrent types for data fetching.</p> <h3>Static site generation - SSG</h3> <p>This fetches the data and renders the pages on build time. This is greate for Pages that don't change to often. Like a blog for example.</p> <h3>Server site rendering - SSR</h3>...
Best way to create dynamic navigation on NextJS with firebase?
javascript|reactjs|ecmascript-6|next.js
2
52
1
72,950,461
72,950,461
1
true
2022-07-11T19:57:11.100Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Best way to create dynamic navigation on NextJS with firebase?<p>I'm looking forward to create a web app with NextJS and Google's Firebase. The app has an ad...
72,951,414
Get the latest time within the same date by group in R<p>I have a dataset</p> <pre><code>structure(list(country = c(&quot;US&quot;, &quot;US&quot;, &quot;US&quot;, &quot;US&quot;, &quot;US&quot;, &quot;US&quot;, &quot;UK&quot;, &quot;UK&quot;), ID = c(11, 11, 11, 11, 11, 11, ...
<p>Another possible solution, based on <code>dplyr</code> and on <code>lubridate</code>:</p> <pre class="lang-r prettyprint-override"><code>library(dplyr) library(lubridate) df %&gt;% group_by(ID, aux = date(ymd_hms(out))) %&gt;% mutate(unique_out = if_else(n() &gt; 1 &amp; row_number() == 1, max(ymd_hms(out)), ...
Get the latest time within the same date by group in R
r
1
52
5
72,951,780
72,951,780
1
true
2022-07-12T11:14:17.403Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Get the latest time within the same date by group in R<p>I have a dataset</p> <pre><code>structure(list(country = c(&quot;US&quot;, &quot;US&quot;, &quot;US&...
72,954,420
R Shiny update reactive value using a non reactive variable<p>I have a simple text and a simple button</p> <p>a variable is initialised to 0, each time the button is pressed the value of this variable is increased by 1, the dynamic text should be the concatenation of some text and the reactive value.</p> <p>This is wha...
<p>The <code>start</code> value needs to be reactive as well to working with other reactive values. Here's a re-write that will work</p> <pre><code>library(shiny) ui &lt;- fluidPage( uiOutput(&quot;text_header&quot;), actionButton(&quot;go&quot;, &quot;Go&quot;) ) server &lt;- function(input, output) { start &...
R Shiny update reactive value using a non reactive variable
r|shiny|reactive
0
52
1
72,954,492
72,954,492
1
true
2022-07-12T14:59:44.133Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: R Shiny update reactive value using a non reactive variable<p>I have a simple text and a simple button</p> <p>a variable is initialised to 0, each time the b...
72,953,978
Flutter: GroupedListView not working as it should<p>Why are my <strong>first date and first 2 items correctly built</strong> but not the rest? The first <code>date header</code> wrap my text correctly but the padding is incorrect and the rest has the correct padding but does not wrap my text. <a href="https://imgur.com...
<p>Based on your code, I tried to reproduce the effect. Is this what you want to achieve?</p> <p><a href="https://i.stack.imgur.com/itMPl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/itMPl.png" alt="Screenshot" /></a></p> <p>The code:</p> <pre><code>class TestPage extends StatelessWidget { const...
Flutter: GroupedListView not working as it should
flutter|dart|grouped-list
0
52
1
72,954,972
72,954,972
1
true
2022-07-12T14:27:56.717Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Flutter: GroupedListView not working as it should<p>Why are my <strong>first date and first 2 items correctly built</strong> but not the rest? The first <cod...
72,954,683
How to use shell regex command to split input line into tokens of decimals and operators?<p>How to use grep/sed/awk to achieve this:</p> <p>Input: a statement of decimals and numeric operators and parentheses, can have tab and spaces in between:</p> <pre><code>2 + 5* 61.2 -(32.5+7)/ 8 </code></pre> <p>Output: a string,...
<p>You may use this <code>sed</code> solution:</p> <pre class="lang-bash prettyprint-override"><code>s='2 + 5* 61.2 -(32.5+7)/ 8' sed -E 's~[[:blank:]]*([0-9]+(\.[0-9]+)?|[+/*()-])[[:blank:]]*~\1,~g; s/,$//' &lt;&lt;&lt; &quot;$s&quot; 2,+,5,*,61.2,-,(,32.5,+,7,),/,8 </code></pre>
How to use shell regex command to split input line into tokens of decimals and operators?
shell|awk|sed|split|grep
1
52
3
72,955,151
72,955,151
1
true
2022-07-12T15:19:05.753Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to use shell regex command to split input line into tokens of decimals and operators?<p>How to use grep/sed/awk to achieve this:</p> <p>Input: a statemen...
72,955,371
In R how to make a stacked barplot sum to 1 with 3 columns in dataframe<p>Here's my codes for dataframe:</p> <pre><code>position &lt;- c(1, 2, 3, 4, 5) freq_1 &lt;- c(0.1, 0.5, 0.4, 0.9, 1) freq_2 &lt;- 1 - freq_1 mydata &lt;- data.frame(position, freq_1, freq_2) </code></pre> <p>What kind of stacked barplot I want:...
<p>Using <code>base</code> you could do:</p> <pre class="lang-r prettyprint-override"><code>barplot(cbind(freq_1, freq_2) ~ position, data = mydata) </code></pre> <p><a href="https://i.stack.imgur.com/dye7O.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dye7O.png" alt="enter image description here" ...
In R how to make a stacked barplot sum to 1 with 3 columns in dataframe
r|ggplot2|bar-chart|visualization|stacked-chart
0
52
1
72,955,411
72,955,411
1
true
2022-07-12T16:14:50.490Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: In R how to make a stacked barplot sum to 1 with 3 columns in dataframe<p>Here's my codes for dataframe:</p> <pre><code>position &lt;- c(1, 2, 3, 4, 5) freq...
72,953,545
Intellij says my golang Package import contains test files only and asks me to delete import<p>IntelliJ reports an error on my import stating that package contains test files only and asks me to delete the import.</p> <p>It also doesn't recognize the object.</p> <p>However, the package contains <a href="https://github....
<p><code>containernetworking/plugins/pkg/ns</code> directory has <code>_linux.go</code> namespaces so you should configure the corresponding OS if that differs from your main one in GoLand settings: <em>Preferences | Go | Build Tags &amp; Vendoring</em> (set <em>OS</em> to <em>Linux</em>).</p>
Intellij says my golang Package import contains test files only and asks me to delete import
intellij-idea
0
52
1
72,957,823
72,957,823
1
true
2022-07-12T13:56:07.863Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Intellij says my golang Package import contains test files only and asks me to delete import<p>IntelliJ reports an error on my import stating that package co...
72,965,259
Output foreach-item in <div>, but output every 2nd and 3rd item in wrapping div<p>I have an array with items: <code>$array = ['item 1','item 2','item 3','item 4','item 5','item 6','item 7']</code></p> <p>I am looking for the following HTML:</p> <pre><code>&lt;div class=&quot;big&quot;&gt;Item 1&lt;/div&gt; &lt;div&gt; ...
<p>You can use simple if-elseif-else construct to print the divs.</p> <ul> <li><p>If the index of the current element % 3 is 0, it is a <code>big</code> div, else it is a small div.</p> </li> <li><p>If the index of the current element % 3 is greater than 0, it is a <code>small</code> div.</p> <ul> <li>If it is 1, prepe...
Output foreach-item in <div>, but output every 2nd and 3rd item in wrapping div
php|foreach
-1
52
3
72,965,576
72,965,576
1
true
2022-07-13T11:07:48.647Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Output foreach-item in <div>, but output every 2nd and 3rd item in wrapping div<p>I have an array with items: <code>$array = ['item 1','item 2','item 3','ite...
72,965,495
How to pass data from useSelector (redux) to useSate hook in react?<p>Hi i am trying to work on a app, which has some predefined code of redux, and react. I am trying to get the players data which is formated json file and pass it to useSate hook.</p> <p>The data which I get using</p> <pre><code> const players = useSel...
<p>you can set it in <code>useEffect</code> like that but my suggestion is to use the directly redux <code>players</code> variable.</p> <pre><code>useEffect(() =&gt; { setPlayerData(players); }, [players]) </code></pre>
How to pass data from useSelector (redux) to useSate hook in react?
reactjs|redux|react-hooks|react-redux|redux-thunk
0
52
1
72,966,633
72,966,633
1
true
2022-07-13T11:28:23.183Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to pass data from useSelector (redux) to useSate hook in react?<p>Hi i am trying to work on a app, which has some predefined code of redux, and react. I ...
72,966,020
Can CREATE2 be used to simulate the nonce in CREATE?<p>Let's say there is a contract deployed on BSC, using CREATE, with a high tx nonce - for example 100. Now I need to deploy a contract to the same address on another network (ETH mainnet). Is there a way to match the address of the first contract, using CREATE2? Or i...
<p>Theoretically, you could try to find a collision by providing a specific <code>salt</code> value that, combined with other params (deployer address and contract bytecode), results in the same contract address. But practically, that's impossible to find because of too many possible <code>salt</code> values.</p> <p>So...
Can CREATE2 be used to simulate the nonce in CREATE?
blockchain|ethereum|solidity|evm
0
52
1
72,966,786
72,966,786
1
true
2022-07-13T12:06:45.950Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can CREATE2 be used to simulate the nonce in CREATE?<p>Let's say there is a contract deployed on BSC, using CREATE, with a high tx nonce - for example 100. N...
72,968,834
How to store graphs in a graph database?<p>I'm currently working on a project where we want to store sets of graphs in a graph database. For this purpose im using Neo4J and I can imagine two different solutions.</p> <ol> <li><p>Put the nodes as the nodes into the database and the edges as the edges. Every edge and ever...
<p>I think you are misreading the docs. They mean that different kinds of nodes should have different labels and different kinds of edges should have different labels. If you make everything, including edges into &quot;nodes&quot; then you will not be able to apply the library's implementations of graph theory algorith...
How to store graphs in a graph database?
neo4j|graph-theory
-1
52
1
72,969,210
72,969,210
1
true
2022-07-13T15:27:27.013Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to store graphs in a graph database?<p>I'm currently working on a project where we want to store sets of graphs in a graph database. For this purpose im ...
72,970,015
Getting sum of values from Dicts in a List<pre><code>order = [{&quot;name&quot;: 'espresso', &quot;price&quot;: 1.99}, {&quot;name&quot;: 'coffee', &quot;price&quot;: 2.50}, {&quot;name&quot;: 'cake', &quot;price&quot;: 2.79}, {&quot;name&quot;: 'soup', &quot;price&quot;: 4.50}, {&qu...
<p>You can use square brackets to get the price:</p> <pre class="lang-py prettyprint-override"><code># Prints out all the prices for x in order: print(x['price']) </code></pre> <p>Now, all you have to do is add this to a variable called <code>subtotal</code></p> <pre class="lang-py prettyprint-override"><code># Add...
Getting sum of values from Dicts in a List
python|list|dictionary
0
52
4
72,970,134
72,970,134
1
true
2022-07-13T17:00:15.427Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Getting sum of values from Dicts in a List<pre><code>order = [{&quot;name&quot;: 'espresso', &quot;price&quot;: 1.99}, {&quot;name&quot;: 'coffee', ...
72,970,874
In Javascript, is there an easyish way to get a chainable Array prepend operation like the reverse of Array.concat?<p>I'm doing array manipulation in Javascript, and I want to be able to chain operations with multiple calls to map, concat, etc.</p> <pre><code>const someAmazingArrayOperation = (list) =&gt; list ....
<p>If you don't want to modify <code>Array.prototype</code>, you can consider <code>extends</code>:</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override"><code>class AmazingArray extends A...
In Javascript, is there an easyish way to get a chainable Array prepend operation like the reverse of Array.concat?
javascript|arrays
0
52
3
72,971,360
72,971,360
1
true
2022-07-13T18:16:57.097Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: In Javascript, is there an easyish way to get a chainable Array prepend operation like the reverse of Array.concat?<p>I'm doing array manipulation in Javascr...
72,976,144
Position text on top of responsive mockup image<p>I am trying to position text on top of this responsive mockup image. The text is supposed to go in the white search bar, but since it is responsive I am having trouble lining it up and having it scale accordingly.</p> <p>How can I get ensure the text is always centered ...
<p>I think this is not an efficient way to do this work, the text can't always align to the search box because the size of the image is going to change on different screen sizes, after which the text will be at different positions. I will suggest making that mobile screen with CSS along with a search bar, that will be ...
Position text on top of responsive mockup image
html|css
-1
52
2
72,976,725
72,976,725
1
true
2022-07-14T06:32:38.923Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Position text on top of responsive mockup image<p>I am trying to position text on top of this responsive mockup image. The text is supposed to go in the whit...
72,979,224
Not able to connect to mongodb running in VM (virtual Machine) from local system<p>I created an AWS EC2 (ubuntu-20.04) instance and setup a mongo server as per <a href="https://www.mongodb.com/docs/v4.4/tutorial/install-mongodb-on-ubuntu/" rel="nofollow noreferrer">https://www.mongodb.com/docs/v4.4/tutorial/install-mon...
<p>Did you modify ?</p> <blockquote> <p>/etc/mongod.conf</p> </blockquote> <p>Have a look at this tutorial, especially the step 2. Maybe this helps <a href="https://ianlondon.github.io/blog/mongodb-auth/" rel="nofollow noreferrer">https://ianlondon.github.io/blog/mongodb-auth/</a></p>
Not able to connect to mongodb running in VM (virtual Machine) from local system
mongodb|ubuntu|amazon-ec2|virtual-machine|mongo-shell
0
52
2
72,979,299
72,979,299
1
true
2022-07-14T10:44:43.067Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Not able to connect to mongodb running in VM (virtual Machine) from local system<p>I created an AWS EC2 (ubuntu-20.04) instance and setup a mongo server as p...
72,980,331
Regex expression not returning entire term<p>The intention of the regex is to capture substrings wrapped between twin expressions in parentheses, kinda like html tags. For example:</p> <pre class="lang-html prettyprint-override"><code>&lt;p id=&quot;textTwo&quot;&gt;And this shall be (blue)the ocean(blue) and this shal...
<p>The characters <code>()</code> are special in a regexp and must be escaped with a <code>\</code> if you want to match them literally. And because <code>\</code> in a JavaScript string literal is also special, it needs to be escaped with another <code>\</code>:</p> <pre><code> let color = 'blue'; let getColor ...
Regex expression not returning entire term
javascript|regex|string|escaping|match
1
52
2
72,980,612
72,980,612
1
true
2022-07-14T12:14:56.713Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Regex expression not returning entire term<p>The intention of the regex is to capture substrings wrapped between twin expressions in parentheses, kinda like ...
72,980,792
Cloud build defines more than 100 secret values<p>I include secret during Cloud build time but it's choking with error, I believe there Is some hard limit of 100 variables on GCP Secret manager.</p> <pre><code>ERROR: (gcloud.builds.submit) INVALID_ARGUMENT: invalid build: invalid secrets: build defines more than 100 se...
<p>That is correct.</p> <p>The limit is 100 args. <a href="https://cloud.google.com/build/docs/build-config-file-schema" rel="nofollow noreferrer">https://cloud.google.com/build/docs/build-config-file-schema</a></p> <p>Basically each arg counts as step, same with secret values.</p> <p><a href="https://i.stack.imgur.com...
Cloud build defines more than 100 secret values
google-cloud-platform|google-cloud-build|google-secret-manager
0
52
1
72,981,065
72,981,065
1
true
2022-07-14T12:48:55.400Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Cloud build defines more than 100 secret values<p>I include secret during Cloud build time but it's choking with error, I believe there Is some hard limit of...
72,972,431
MSBuildTreatWarningsAsErrors does not work on Visual Studio 2022<p>I want the build to fail when there's a warning. I have the following at <strong>.csproj</strong></p> <pre><code>&lt;PropertyGroup&gt; &lt;MSBuildTreatWarningsAsErrors&gt;true&lt;/MSBuildTreatWarningsAsErrors&gt; &lt;/PropertyGroup&gt; </code></pr...
<p>There is an important note on the <a href="https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-options/errors-warnings#treatwarningsaserrors" rel="nofollow noreferrer">documentation page</a> for this, which I originally thought might be the reason, but then I tried myself.</p> <p>My .csproj lo...
MSBuildTreatWarningsAsErrors does not work on Visual Studio 2022
visual-studio|.net-core|msbuild|visual-studio-2022
1
52
1
72,982,552
72,982,552
1
true
2022-07-13T20:43:12.120Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: MSBuildTreatWarningsAsErrors does not work on Visual Studio 2022<p>I want the build to fail when there's a warning. I have the following at <strong>.csproj</...
72,965,730
xlsxwriter conditional format works only after manually applying it<p>let me describe my issue below:</p> <p>I've got got two excel worksheets, one containing past, the other - current data. They both have the following structure:</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>Col_1</th> <...
<p>The reason that <code>XLOOKUP</code>doesn't work in your formula is that it is classified by Excel as a &quot;Future Function&quot;, i.e, a function added after the original file format. In order to use it you need to prefix it with <code>_xlfn.</code> This is explained in the XlsxWriter docs on <a href="https://xls...
xlsxwriter conditional format works only after manually applying it
python|excel|xlsxwriter
1
52
1
72,982,736
72,982,736
1
true
2022-07-13T11:46:23.737Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: xlsxwriter conditional format works only after manually applying it<p>let me describe my issue below:</p> <p>I've got got two excel worksheets, one containin...
72,984,049
Create variable that inherits from multiple separate interfaces<ol> <li>Say I have an interface <code>IFoo</code> with a method <code>FooMethod()</code> and a class <code>Foo : IFoo</code>.</li> <li>Say I have another interface <code>IBar</code> with method <code>BarMethod()</code> and a class <code>Bar : IBar</code>.<...
<p>You can leverage generics with constraints to achieve what you need. You can create a method like this:</p> <pre><code>public void DoFooBar&lt;T&gt;(T fooBar) where T : IFoo, IBar { fooBar.CallFooMethod(); fooBar.CallBarMethod(); } </code></pre>
Create variable that inherits from multiple separate interfaces
c#
0
52
3
72,984,398
72,984,398
1
true
2022-07-14T16:48:59.403Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Create variable that inherits from multiple separate interfaces<ol> <li>Say I have an interface <code>IFoo</code> with a method <code>FooMethod()</code> and ...
72,985,790
How to display images from object?<p>How to display image from object? I was trying to copy relative path, but it's not working for me. Output on browser:</p> <blockquote> <p>./images/avatars/image-maxblagun.png</p> </blockquote> <p>data.json</p> <pre><code>&quot;image&quot;: { &quot;png&quot;: &quot;./images...
<p>In that way the images are out of scope for <code>data.json</code> while rendering.</p> <p>You must move your images folder <code>images/avatars/</code> to the root of the <code>/public</code> folder in your project.</p> <p>Meanwhile in <code>data.json</code>, modify the locations for each image, as if it (<code>dat...
How to display images from object?
reactjs|typescript|object
1
52
2
72,986,144
72,986,144
1
true
2022-07-14T19:34:08.143Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to display images from object?<p>How to display image from object? I was trying to copy relative path, but it's not working for me. Output on browser:</p...
72,982,907
Sed replace all digits within square brackets with a new line<p>My question is a both a refinement and a continuation of <a href="https://stackoverflow.com/questions/928072/whats-the-regular-expression-that-matches-a-square-bracket">What&#39;s the regular expression that matches a square bracket?</a>.</p> <p>I am tryin...
<p>Using <code>sed</code></p> <pre><code>$ sed -i.bak 's/\[[^]]*]=/\n/g' input_file declare -a aRecs=( &quot;&quot; &quot;some text&quot; &quot;some more text&quot; &quot;three-digit text&quot;) </code></pre>
Sed replace all digits within square brackets with a new line
regex|bash|sed
-1
52
1
72,987,225
72,987,225
1
true
2022-07-14T15:18:19.337Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Sed replace all digits within square brackets with a new line<p>My question is a both a refinement and a continuation of <a href="https://stackoverflow.com/q...
72,987,192
Sorting in angular objects in an array alphabetically<p>Suppose your ts code is like this:</p> <pre><code> items: { size: number, name: string }[] = []; ngOnInit(): void { this.items = [ { size: 3, name: 'Richard' }, { size: 17, name: 'Alex' }, { size: 10, name:...
<p>Define two buttons that will pass <code>asc</code> or <code>desc</code> flag to a function. Execute the function to do the sorting:</p> <p>html:</p> <pre><code>&lt;button (click)=&quot;sort(true)&quot;&gt;ASC&lt;/button&gt; &lt;button (click)=&quot;sort(false)&quot;&gt;DESC&lt;/button&gt; </code></pre> <p>component....
Sorting in angular objects in an array alphabetically
html|angular|typescript|sorting
-3
52
1
72,988,085
72,988,085
1
true
2022-07-14T22:18:15.807Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Sorting in angular objects in an array alphabetically<p>Suppose your ts code is like this:</p> <pre><code> items: { size: number, name: string }[] = []; ng...
72,969,460
Can I add a razer view file in my wwwroot folder and use my controller to point to that .cshtml file and pass my payload?<p>I have a working ASP.NET Core 5.0 MVC application working. I want to know how I can add a razor view file in my <code>wwwroot</code> folder and use my controller to point to that <code>.cshtml</co...
<blockquote> <p>But I get this error every time:</p> <p>No webpage was found for the web address: https://localhost:5001/wwwroot/helloWorld/HelloWorld.cshtml?id=Foo</p> <p>Am I doing something wrong or is this just not possible? If it's not possible, I'd like to understand why. Many thanks in advance.</p> </blockquote>...
Can I add a razer view file in my wwwroot folder and use my controller to point to that .cshtml file and pass my payload?
asp.net-core-mvc
1
52
1
72,989,762
72,989,762
1
true
2022-07-13T16:14:23.667Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can I add a razer view file in my wwwroot folder and use my controller to point to that .cshtml file and pass my payload?<p>I have a working ASP.NET Core 5.0...
72,990,128
Type hinting an array key of a function argument<p>Let's say I have a class that takes in an array:</p> <pre class="lang-php prettyprint-override"><code>class Database { function __construct($options = ['pdo' =&gt; '' ]) { $this-&gt;pdo = $options['pdo']; } } </code></pre> <p>Is there a way to specify class...
<p>Actually it is not possible to type hint array keys with PHP. There are some possible solutions to this, but none of them will work with type hints on arrays.</p> <h2>Validating the options in the constructor</h2> <p>Since it is not possible to check the array keys for a specific type hint you can check with an if c...
Type hinting an array key of a function argument
php
0
52
2
72,990,919
72,990,919
1
true
2022-07-15T06:58:34.183Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Type hinting an array key of a function argument<p>Let's say I have a class that takes in an array:</p> <pre class="lang-php prettyprint-override"><code>clas...
72,996,251
Saving data in excel by cell rather than semi-colon with python<p>***Edit: I am originally saving the code to a .csv file but then later converting it to a .xlsx file.</p> <p>I am trying to change my code to save the values in separate cells verses in the same cell separated by a semicolon. I currently have code that s...
<p>Creation of the CSV file is not problematic. The issue is this:</p> <pre><code>readFile = pd.read_csv(r'C:\Users\PycharmProjects\FsrValues5.csv') </code></pre> <p>as was noted in the <a href="https://stackoverflow.com/questions/72996251/saving-data-in-excel-by-cell-rather-than-semi-colon-with-python#comment128927051...
Saving data in excel by cell rather than semi-colon with python
python|excel|pandas|python-2.7|csv
1
52
2
72,996,958
72,996,958
1
true
2022-07-15T15:24:42.847Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Saving data in excel by cell rather than semi-colon with python<p>***Edit: I am originally saving the code to a .csv file but then later converting it to a ....
72,960,113
How to convert pycparser ast to python anytree format?<p>I am trying to convert the ast from pycparser to python anytree for further processing tasks. But the anytree tree I am currently getting does not contain several useful information and I also cannot figure it out how to do that. Currently my code has a parsing f...
<p>You can update your get_token() function so that you can access the token names or replace the class name with values wherever you want. Here I have added some codes so that it can replace the class names with attribute names and values where it is available.</p> <pre><code>def get_token(node): token = '' if...
How to convert pycparser ast to python anytree format?
python|pycparser|anytree
1
52
1
72,997,676
72,997,676
1
true
2022-07-13T02:00:36.843Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to convert pycparser ast to python anytree format?<p>I am trying to convert the ast from pycparser to python anytree for further processing tasks. But th...
72,998,527
Resolving circular dependency between concept and constrained template function<p>I am trying to learn more about concepts. I ran into some problems with circular dependencies between concepts and constrained template functions, and I've reproduced these errors in a simple example.</p> <hr /> <p>I have a concept, <code...
<blockquote> <p>To my surprise, <code>std::vector&lt;int&gt;</code> is not considered <code>Printable</code>, even though <code>operator&lt;&lt;</code> works on it.</p> </blockquote> <p>It doesn't. Not really anyway. When you say <code>std::cout &lt;&lt; x;</code> works what you really mean is that you can write that e...
Resolving circular dependency between concept and constrained template function
c++|c++20|c++-concepts
2
52
2
72,998,784
72,998,784
1
true
2022-07-15T18:55:22.230Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Resolving circular dependency between concept and constrained template function<p>I am trying to learn more about concepts. I ran into some problems with cir...
73,000,747
SCSS nth-child select all childs<p>I am trying to set a background different for each item-icon but it selects every elements instead of the first:</p> <p>CSS part</p> <pre class="lang-css prettyprint-override"><code>.dropdown-item-icon { width: 50px; height: 50px; border-radius: 5px; &amp;:nth-child(1) { ...
<p>It doesn't work because the pseudo selection <code>nth-child</code> only tries to match the immediate nth child of a parent element. Here, you are trying to get the first child of <code>.dropdown-item-icon</code> which gets you the immediate first child of its parent which is <code>dropdown-item</code>.</p> <p>It wo...
SCSS nth-child select all childs
html|css|sass|css-selectors
1
52
1
73,001,021
73,001,021
1
true
2022-07-16T00:35:34.123Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: SCSS nth-child select all childs<p>I am trying to set a background different for each item-icon but it selects every elements instead of the first:</p> <p>CS...
73,003,111
Unable to modify value in _init_ function<p>I'm making a Button class in python and I want to give a unique number to each button because when I will draw multiple buttons on pygame window, I will need to differentiate between these buttons using those unique numbers. The problem is I'm unable to modify the unique numb...
<p>You must distinguish between the class attribute (see <a href="https://docs.python.org/3/tutorial/classes.html#class-objects" rel="nofollow noreferrer">Class Objects</a>) and the instance attribute (see <a href="https://docs.python.org/3/tutorial/classes.html#instance-objects" rel="nofollow noreferrer">Instance Obje...
Unable to modify value in _init_ function
python|pygame
1
52
2
73,004,236
73,004,236
1
true
2022-07-16T09:35:13.863Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Unable to modify value in _init_ function<p>I'm making a Button class in python and I want to give a unique number to each button because when I will draw mu...
73,003,747
Possible bug with inf or too large values?<p>I'm trying to train a neural network with keras and tesorflow. As usual, I replace -np.inf and np.inf values with np.nan to later run a dropna sequence and clear all that wrong data such as:</p> <pre><code> Data.replace([np.inf, -np.inf], np.nan, inplace=True) Data.dropna(i...
<p>Instead of specifically looking for infinities, just throw out data which is out of bounds, something like this:</p> <pre><code>bad = Data &lt; -1e20 | Data &gt; 1e20 # use whatever your valid range is Data.drop(bad.any('columns'), inplace=True) </code></pre>
Possible bug with inf or too large values?
python|pandas|numpy|infinity|float32
0
52
1
73,005,987
73,005,987
1
true
2022-07-16T11:19:02.453Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Possible bug with inf or too large values?<p>I'm trying to train a neural network with keras and tesorflow. As usual, I replace -np.inf and np.inf values wit...
73,008,373
setting a useState to true when the current value is already true causes re-render<pre><code>const [ready, set_ready] = useState(false); ... if (condition === true) { set_ready(true); } </code></pre> <p>The code above causes infinite loop.</p> <p>But if I changed it to</p> <pre><code>if (condition === true &amp;&am...
<p>When a state setter is called, it does two things:</p> <ul> <li>Updates React's internal state for that state variable</li> <li>Re-renders the component. In functional components, this will call the component function again, and the various <code>useState</code> calls return the updated internal state.</li> </ul> <p...
setting a useState to true when the current value is already true causes re-render
reactjs|use-state
0
52
1
73,009,172
73,009,172
1
true
2022-07-16T23:51:32.653Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: setting a useState to true when the current value is already true causes re-render<pre><code>const [ready, set_ready] = useState(false); ... if (condition ...
73,010,383
Coloring multiindex DataFrame based on another DataFrame<p>I have 2 multiIndex Dataframes with same index and columns. I would like to publish the first Dataframe df1 to_html() with certain cells colored by condition from the second DataFrame df2. Conditions: if value in df2 &gt;= 1.5: color red if value in in 1 &lt;= ...
<p>Since the index and columns of <code>df1</code> and <code>df2</code> matches, you can create a color <code>mask</code> by applying given conditions on <code>df2</code>, then use this color <code>mask</code> to update the style of <code>df1</code></p> <pre><code>mask = np.select( [df2.ge(1) &amp; df2.lt(1.5), df2...
Coloring multiindex DataFrame based on another DataFrame
python|pandas
1
52
1
73,011,690
73,011,690
1
true
2022-07-17T08:44:58.307Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Coloring multiindex DataFrame based on another DataFrame<p>I have 2 multiIndex Dataframes with same index and columns. I would like to publish the first Data...
73,014,318
Merge sort with TypeScript<p>I have tried to implement a simple merge sort in TypeScript. Unfortunately half of my array is missing from the result. Could someone more experienced explain to me please why it is missing?</p> <p>Source:</p> <pre><code>function mergeSort(arr:number[]):number[]{ if(arr.length &lt;= 1){...
<p>I think you are loosing a number at <code>half</code> index each time you split your array.</p> <p>Because neither of these two slices include item at <code>half</code> index.</p> <pre><code>const first:number[] = mergeSort(arr.slice(0,half)); const second:number[] = mergeSort(arr.slice(half + 1)); </code></pre> <p>...
Merge sort with TypeScript
typescript|algorithm|sorting|mergesort
0
52
1
73,014,699
73,014,699
1
true
2022-07-17T18:24:56.633Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Merge sort with TypeScript<p>I have tried to implement a simple merge sort in TypeScript. Unfortunately half of my array is missing from the result. Could so...
73,017,016
Linux:Splitting a string into an array with shell<p>I have a way to siplt the string into a array with shell ,but the array seems no value</p> <pre><code>&gt;&gt;&gt; a='11 12 13 14' &gt;&gt;&gt; echo $a | awk '{split($0,arr,&quot; &quot;)' 1 11 2 12 3 13 4 14 &gt;&gt;&gt; echo ${arr[0]} &gt;&gt;&gt; the expected res...
<p>If the values are &quot;nice&quot; - no filename expansion trigger characters and elements are nicely separated by spaces - just read the array.</p> <pre><code>arr=($a) </code></pre> <p>A way better and safer version, is to use readarray or mapfile.</p> <pre><code>readarray -d ' ' -t arr &lt; &lt;(printf &quot;%s&qu...
Linux:Splitting a string into an array with shell
linux|shell
0
52
3
73,017,548
73,017,548
1
true
2022-07-18T03:27:53.490Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Linux:Splitting a string into an array with shell<p>I have a way to siplt the string into a array with shell ,but the array seems no value</p> <pre><code>&gt...
72,949,894
Error creating bean with name 'cvpSpringBootApplication': Bean instantiation via constructor failed by Maven install<p>I want to run a Maven install, but I get an &quot;org.springframework.beans.factory.BeanCreationException&quot; exception. The start with the Maven goal works normally. Unfortunately I can not find the...
<p>I solved the problem by adding the following plugin including configuration to the pom.xml.</p> <pre><code> &lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt; &lt;version&gt;2.19.1&lt;/version&gt...
Error creating bean with name 'cvpSpringBootApplication': Bean instantiation via constructor failed by Maven install
java|spring|spring-boot|maven|spring-mvc
0
52
1
73,017,588
73,017,588
1
true
2022-07-12T09:17:41.487Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Error creating bean with name 'cvpSpringBootApplication': Bean instantiation via constructor failed by Maven install<p>I want to run a Maven install, but I g...
73,015,897
Tailwind custom pseudo element<p>I'm trying to create a single js file for a component that is used with several styles in my project. On one page I have several buttons for some features, with a default background color set in the html file (for exemple <code>bg-gray-500</code>). For buttons where the feature is activ...
<p>You may write simple plugin for custom <a href="https://tailwindcss.com/docs/plugins#adding-variants" rel="nofollow noreferrer">variants</a></p> <pre class="lang-js prettyprint-override"><code>// tailwing.config.js const plugin = require('tailwindcss/plugin') module.exports = { theme: { extend: {}, }, pl...
Tailwind custom pseudo element
javascript|tailwind-css
0
52
1
73,019,325
73,019,325
1
true
2022-07-17T22:52:30.670Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Tailwind custom pseudo element<p>I'm trying to create a single js file for a component that is used with several styles in my project. On one page I have sev...
73,011,262
afterprint not detected while hidden printing in an iFrame<p>I've spent nearly 2 days googling and trying lots of example (even here in StackOverflow), and I don't find any way to fire the event &quot;afterprint&quot;. It seems dead. I've found some fiddle, where it works, and when I try to reproduce on my system, it d...
<p>It doesn't work because detecting the print events only work for <strong>HTML-documents</strong>. The MIME type for PDF windows is <code>application/pdf</code> so it doesn't work. The events that are available on the window are not available to the <code>&lt;embed&gt;</code> like tags, as they are handled by the bro...
afterprint not detected while hidden printing in an iFrame
javascript|event-handling|microsoft-edge
0
52
1
73,019,778
73,019,778
1
true
2022-07-17T11:11:29.730Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: afterprint not detected while hidden printing in an iFrame<p>I've spent nearly 2 days googling and trying lots of example (even here in StackOverflow), and I...
73,016,236
Modulo alternative Lua<p>I don't have much coding experience so I don't really know of an efficient alternative to modulo, the issue I have is that I want to have the same funcionality but witouth it ever returning zero if that makes sense.</p> <p>So I have an arbritary value % 8 and I want my results to go (1,2,3,4,5,...
<p>I assume you're trying to make indices from <code>1</code> to <code>8</code> loop. For zero-based offsets from <code>0</code> to <code>7</code> this would be trivial by using <code>i % 8</code>; consider simply making your table zero-based.</p> <p>For one-based indices, the simplest way to go is to first subtract <c...
Modulo alternative Lua
lua|modulo
0
52
2
73,020,333
73,020,333
1
true
2022-07-18T00:18:56.763Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Modulo alternative Lua<p>I don't have much coding experience so I don't really know of an efficient alternative to modulo, the issue I have is that I want to...
73,021,194
how to avoid using for loop in spark (python)<p>I'm new to pySpark, hope someone coul'd help me.</p> <p>I have a dataframe with a bunch of filght searches results:</p> <pre><code>+------+-----------+----------+----------+-----+ |origin|destination| from| to|price| +------+-----------+----------+----------+-...
<p>I would first convert <code>date_combinations</code> to a DataFrame (using parallelize or selecting then dropping duplicates if that comes from a data set.</p> <p>The idea is to do a left join between your dates and the <code>data</code> table (we will call it).</p> <p>First, we want to clean your <code>data</code> ...
how to avoid using for loop in spark (python)
python|apache-spark|pyspark|bigdata
0
52
2
73,021,560
73,021,560
1
true
2022-07-18T10:53:59.967Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to avoid using for loop in spark (python)<p>I'm new to pySpark, hope someone coul'd help me.</p> <p>I have a dataframe with a bunch of filght searches re...
73,021,844
How to make a class from that code? In order to not mess the Activity with a ton of code<p>I want create a class called Permissions from below code and then call that in a click of a button. Because there is an @Override method in this activity and I don't know how to override methods inside a class. If I make a class ...
<p>Use TedPermission Library which is very easy to use and easy to handle . Make a Function in separate class and use it anywhere you want</p> <pre><code> implementation 'gun0912.ted:tedpermission:2.2.3' </code></pre> <pre><code>public void checkPermissions(Context context) { PermissionListener permission...
How to make a class from that code? In order to not mess the Activity with a ton of code
java|android
0
52
2
73,022,240
73,022,240
1
true
2022-07-18T11:47:40.210Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to make a class from that code? In order to not mess the Activity with a ton of code<p>I want create a class called Permissions from below code and then ...
73,022,410
Firebase/Firestore start loop from certain document ID<p>I'm getting a collection from my Firestore database and adding the document values to an array in JS:</p> <pre><code>var data = myCollection(); var myArray = []; data.forEach(function(data) { var splitPath = data.name.split('/'); var documentId = sp...
<blockquote> <p>Suppose I know a document ID, is it possible to get the collection documents from that certain document ID?</p> </blockquote> <p>When it comes to the Firebase console, all documents are sorted <a href="https://en.wikipedia.org/wiki/Lexicographic_order" rel="nofollow noreferrer">lexicographically</a> by ...
Firebase/Firestore start loop from certain document ID
javascript|firebase|google-cloud-platform|google-cloud-firestore
0
52
2
73,022,769
73,022,769
1
true
2022-07-18T12:36:50.430Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Firebase/Firestore start loop from certain document ID<p>I'm getting a collection from my Firestore database and adding the document values to an array in JS...
73,024,164
SocketException: Connection refused<p>ave created an API using Laravel and I am trying to fetch the data in flutter using HTTP but I keep getting this error.</p> <p>The error I keep getting in Emulator is <strong>SocketException:Connection refused (OS Error:Connection refused, errno=111), address = 127.0.0.1, port = 41...
<p>Because 127.0.0.1 mean the localhost of the current machine which is the android device. Your server is not runing on the android device but the PC machine. You should use the ip address of your PC like 192.168.1.100, and make sure the Android device can access this ip.</p>
SocketException: Connection refused
android|flutter|dart
0
52
1
73,024,729
73,024,729
1
true
2022-07-18T14:40:42.647Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: SocketException: Connection refused<p>ave created an API using Laravel and I am trying to fetch the data in flutter using HTTP but I keep getting this error....
73,011,334
On Shopify, check if a given product is not on any collection<p>Within the product page, I would like to hide a certain element if the current product isn't associated with any collection. Is there any way to check it with Liquid ?</p>
<p>The object product.collections is an array containing all collections where the product is listed.</p> <p>So you may use this:</p> <pre><code>{% if product.collections.size &lt; 1 %} Do something {% endif %} </code></pre> <p>Documentation about arrays here: <a href="https://shopify.dev/api/liquid/filters#size" r...
On Shopify, check if a given product is not on any collection
shopify|liquid
1
52
2
73,025,098
73,025,098
1
true
2022-07-17T11:22:52.107Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: On Shopify, check if a given product is not on any collection<p>Within the product page, I would like to hide a certain element if the current product isn't ...
73,025,796
Referencing type in different namespace with same prefix generates CS0234 error<p>I'm confused why the following C# code won't compile, and instead generates the following:</p> <p><code>error CS0234: The type or namespace name 'Module' does not exist in the namespace 'SomeName.Module.SomeName' (are you missing an assem...
<p>The problem is that <code>SomeName</code> is being resolved as the <em>final</em> part of the namespace <code>SomeName.Module.SomeName</code>, and <code>Module</code> is being resolved relative to that.</p> <p>If you absolutely can't change your namespaces, you can use the <code>global</code> namespace alias to disa...
Referencing type in different namespace with same prefix generates CS0234 error
c#
0
52
1
73,025,959
73,025,959
1
true
2022-07-18T16:43:03.137Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Referencing type in different namespace with same prefix generates CS0234 error<p>I'm confused why the following C# code won't compile, and instead generates...
73,026,726
Trying to get `sed `to fix a phpBB board - but I cannot get my regexp to work<p>I have an ancient phpBB3 board which has gone through several updates over its 15+ years of existence. Sometimes, in the distant past, such updates would partially fail, leaving all sorts of 'garbage' in the BBCode. I'm now trying to do a '...
<p>Using <code>sed</code></p> <ul> <li><code>(\[[^:]*)</code> - Retain everything up to but not including the next semi colon after a opening bracket within the parenthesis which can later be returned with back reference <code>\1</code></li> <li><code>[^]]*</code> - Exclude everything else up to but not including the n...
Trying to get `sed `to fix a phpBB board - but I cannot get my regexp to work
mysql|sed|bbcode|phpbb
0
52
1
73,029,635
73,029,635
1
true
2022-07-18T18:05:28.143Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Trying to get `sed `to fix a phpBB board - but I cannot get my regexp to work<p>I have an ancient phpBB3 board which has gone through several updates over it...
72,982,153
How to force shodan update scanning and port reports according to new values<p>Hello to this wonderful community. Recently i bought a vps machine to host a website there. i take all the necessary security measures and i am ok. My problem is that shodan finds over than 10 ports open and over than 5 domains assigned and ...
<p>The information in Shodan automatically expires after a port has remained closed. It needs to stay closed for multiple checks by the crawlers in order to confirm that it's permanently closed and not a temporary glitch.</p>
How to force shodan update scanning and port reports according to new values
security|nmap|shodan
-1
52
1
73,038,477
73,038,477
1
true
2022-07-14T14:26:33.213Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to force shodan update scanning and port reports according to new values<p>Hello to this wonderful community. Recently i bought a vps machine to host a w...
72,914,326
Is there a way to filter MS Access queries by multiple forms without creating multiple queries?<p>I maintain an MS Access database that manages forecasting, inventory, and purchasing.</p> <p>Sometimes I need to update forecasts or inventory for all items, sometimes I just need to update for a single warehouse, and some...
<p>@HansUp provided the general direction I needed. I figured I would post an answer and close this thread.</p> <p>Assuming the following is a saved query named &quot;Delete_Forecast_Days&quot;</p> <pre><code>DELETE Forecast_Days.* FROM Forecast_Days </code></pre> <p>In VBA, I can do the following:</p> <pre><code> Di...
Is there a way to filter MS Access queries by multiple forms without creating multiple queries?
sql|ms-access
1
52
1
73,127,636
73,127,636
1
true
2022-07-08T16:24:55.773Z
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 filter MS Access queries by multiple forms without creating multiple queries?<p>I maintain an MS Access database that manages forecasting, ...
72,896,023
Can not see indicators nor are the slides moving in Bootstrap carousel<p>I am making a website using bootstrap, and it seems the carousel is not working, I copied the code directly from their page and it still won't work.</p> <p>I don't see the indicators, nor do I see it moving (I have 3 slides of content).<br> This i...
<p><strong>Add these bootstrap links on the header</strong></p> <pre><code>&lt;script src=&quot;https://code.jquery.com/jquery-3.2.1.slim.min.js&quot; integrity=&quot;sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN&quot; crossorigin=&quot;anonymous&quot;&gt;&lt;/script&gt; &lt;script src=&qu...
Can not see indicators nor are the slides moving in Bootstrap carousel
html|css|bootstrap-5|bootstrap-carousel
0
52
2
72,896,667
72,896,667
1
true
2022-07-07T10:11:53.980Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can not see indicators nor are the slides moving in Bootstrap carousel<p>I am making a website using bootstrap, and it seems the carousel is not working, I c...
72,877,938
How to control reading of bits in XOR data frames?<p>I'm trying to learn to read the XOR data frames used in web sockets in Tcl.</p> <p>I was reading the HTTP requests using:</p> <pre><code>chan configure $sock -buffering line -blocking 0 -encoding iso8859-1 -translation crlf chan event $sock readable [list ReadLine $s...
<p>The <code>-buffering</code> and <code>-buffersize</code> are options used to manage the output side of the channel, i.e., when you write data to the socket with <code>puts</code> (or <code>chan puts</code>; it's an alternate name for the same thing). They're not used for input.</p> <p>When you have the channel in bi...
How to control reading of bits in XOR data frames?
binary|tcl|xor
1
52
1
72,880,815
72,880,815
1
true
2022-07-06T04:24:03.720Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to control reading of bits in XOR data frames?<p>I'm trying to learn to read the XOR data frames used in web sockets in Tcl.</p> <p>I was reading the HTT...
72,847,591
Add SwipeToRefresh to RecyclerView Android<p>Have activity page with following code:</p> <pre><code>&lt;androidx.swiperefreshlayout.widget.SwipeRefreshLayout android:id=&quot;@+id/swipeRefreshLayout&quot; android:layout_width=&quot;match_parent&quot; android:layout_height=&quot;wrap_content&quot...
<p>Initialize the <code>SwipeRefreshLayout</code> &amp; assign a refresh listener in your <code>onCreate()</code> like this:</p> <pre class="lang-kotlin prettyprint-override"><code>val swipeRefreshLayout: SwipeRefreshLayout = findViewById(R.id.swipeRefreshLayout) // load data on swipe refresh. swipeRefreshLayout.setOn...
Add SwipeToRefresh to RecyclerView Android
android|kotlin|android-recyclerview
1
52
1
72,847,627
72,847,627
1
true
2022-07-03T15:09:23.933Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Add SwipeToRefresh to RecyclerView Android<p>Have activity page with following code:</p> <pre><code>&lt;androidx.swiperefreshlayout.widget.SwipeRefreshLayout...
72,861,899
How can I find the position of a substring (list values) in a data frame column<p>#python My data frame has one column:</p> <pre><code>User name XYZ (R1) ABCD (R2) LKMNP (R2) </code></pre> <p>I want to find the position of R1, R2 and R2 in the data frame and then remove them. The output should be:</p> <pre><code>User ...
<p>You can use <code>str.split</code> or <code>str.extract</code>:</p> <pre><code>df['New name'] = df['User name'].str.split(r' (', regex=False).str[0] # OR df['New name'] = df['User name'].str.extract(r'([^ \(]+)') print(df) # Output User name New name 0 XYZ (R1) XYZ 1 ABCD (R2) ABCD 2 LKMNP (R2) ...
How can I find the position of a substring (list values) in a data frame column
python|pandas|string
-2
52
3
72,861,942
72,861,942
1
true
2022-07-04T20:48:38.370Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I find the position of a substring (list values) in a data frame column<p>#python My data frame has one column:</p> <pre><code>User name XYZ (R1) ABC...
72,866,556
Monitoring a lot of small Spark clusters with Prometheus<p>How can I use Prometheus (Which uses a 'pull' approach) to monitor my Spark clusters when I spin up a new cluster every time I need, which means I don't have one steady monitoring endpoint.</p>
<p>It depends a bit on how / where you spin up your clusters. When using Kubernetes, you can use <a href="https://prometheus.io/docs/prometheus/latest/configuration/configuration/#kubernetes_sd_config" rel="nofollow noreferrer">Kubernetes SD configurations</a> to discover your targets or use the <a href="https://github...
Monitoring a lot of small Spark clusters with Prometheus
apache-spark|kubernetes|prometheus
0
52
1
72,867,377
72,867,377
1
true
2022-07-05T08:51:33.660Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Monitoring a lot of small Spark clusters with Prometheus<p>How can I use Prometheus (Which uses a 'pull' approach) to monitor my Spark clusters when I spin u...
72,848,316
TextField repeating the input SwiftUI<p>I have a problem that when I write in the first textFiled it be repeated in the rest textfields, like it's shown in the picture:</p> <p><a href="https://i.stack.imgur.com/o9yAZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/o9yAZ.png" alt="enter image descript...
<p>Yes, because you are giving the same id to all the persons each time you instantiate a new object, and you basically end up modifying the same person. Try giving a <code>UUID</code> like this to the <code>Person</code>:</p> <pre><code>struct Person: Identifiable { var id: UUID = UUID() var name : String ...
TextField repeating the input SwiftUI
ios|swift|swiftui
2
52
1
72,848,646
72,848,646
1
true
2022-07-03T16:49:27.400Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: TextField repeating the input SwiftUI<p>I have a problem that when I write in the first textFiled it be repeated in the rest textfields, like it's shown in t...
72,804,137
Openlayer - filter layer from another layer using "in-like" clause<p>I have two Layer :</p> <pre><code> POLYGON -Feature Id:1 Territory: A -Feature Id:2 Territory: B POINT -Feature Id:1 Color:blue Territory: A -Feature Id:2 Color:orange Territory: A,B </code></pre> <p>When hovering a point the polygon feature asso...
<p>In your example, it looks like you have mixed up the calls to <code>selectedTerr</code> as if sometimes it was an array (when you index it with <code>[0]</code>) and sometimes an openlayers feature (when you call <code>selectedTerr.setStyle(...)</code>).</p> <p>The logic to implement to solve your problem should be ...
Openlayer - filter layer from another layer using "in-like" clause
javascript|json|openlayers|geojson
0
52
1
72,861,627
72,861,627
1
true
2022-06-29T15:32:43.443Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Openlayer - filter layer from another layer using "in-like" clause<p>I have two Layer :</p> <pre><code> POLYGON -Feature Id:1 Territory: A -Feature Id:2 Te...
72,775,950
How to iterate all cells in a row EXCEPT the last one?<p>I have this bit of C# code, using the ClosedXML library to read an Excel spreadsheet:</p> <pre><code>using ClosedXML.Excel; ... var workbook = new XLWorkbook(new FileStream(filePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)); var ws1 = workbook.Works...
<p>What if you just had it skip any columns that weren't integer values?</p> <p>Your code:</p> <pre><code>foreach (var row in rows) { int cellNum = 1; foreach (IXLCell cell in row.Cells()) { if( cellNum &gt; 1 ) { try { System.Console.WriteLine( Int32....
How to iterate all cells in a row EXCEPT the last one?
c#|excel|loops|closedxml
0
52
1
72,776,089
72,776,089
1
true
2022-06-27T17:11:49.577Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to iterate all cells in a row EXCEPT the last one?<p>I have this bit of C# code, using the ClosedXML library to read an Excel spreadsheet:</p> <pre><code...
72,965,627
Check if a string is at the end of the file<pre><code>const fs = require('fs'); const readline = require('readline'); const file = readline.createInterface({ input: fs.createReadStream('input.log'), output: process.stdout, terminal: false }); file.on('line', (line) =&gt; { if (line.includes('warning')) { ...
<p>You could try like this. This code won't save the last warning line at all:</p> <pre><code>const fs = require('fs'); const readline = require('readline'); const file = readline.createInterface({ input: fs.createReadStream('input.log'), output: process.stdout, terminal: false, }); let lastLine = ''; file.on('...
Check if a string is at the end of the file
javascript|node.js
0
52
1
72,966,217
72,966,217
1
true
2022-07-13T11:39:16.237Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Check if a string is at the end of the file<pre><code>const fs = require('fs'); const readline = require('readline'); const file = readline.createInterface(...
72,921,762
React - Cannot access state variable inside map function<p>I have a class component in a reactjs project. The following code segment works fine. But inside the map function, I am not able to access the state variables. I am getting the below error,</p> <p>TypeError: Cannot read properties of undefined (reading 'state')...
<p>Change the anonymous function in your map to an arrow function like this. Change from this:</p> <pre class="lang-js prettyprint-override"><code>map(function () { console.log(this.state) return ... }) </code></pre> <p>to this:</p> <pre class="lang-js prettyprint-override"><code>map(() =&gt; { console.log(this.s...
React - Cannot access state variable inside map function
reactjs
-1
52
1
72,922,460
72,922,460
1
true
2022-07-09T13:29:45.607Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: React - Cannot access state variable inside map function<p>I have a class component in a reactjs project. The following code segment works fine. But inside t...
72,826,059
Calculate coordinates of end point of a line by having the angle and the length<p>I have the coordinates of the start point of a line and also i have the angle and length of that line and i want to get the coordinates of the endpoint.</p> <p>I am using the script:</p> <pre><code>X_B = X_A + (length * round(abs(math.cos...
<p>Make sure the angle is in <strong>radians</strong>, not in <em>degrees</em>:</p> <pre><code>import math length = 1 Angle = 3.14/3 X_A = 0 Y_A = 0 X_B = X_A + round(length * math.cos(Angle), 3) Y_B = Y_A + round(length * math.sin(Angle), 3) print(X_B, Y_B) </code></pre> <p><strong>Output:</strong> <em>Also, don't...
Calculate coordinates of end point of a line by having the angle and the length
python|math
-2
52
1
72,826,136
72,826,136
1
true
2022-07-01T07:52:44.693Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Calculate coordinates of end point of a line by having the angle and the length<p>I have the coordinates of the start point of a line and also i have the ang...
72,778,243
Disable 'submit' button unless box is checked<p>Following on from a previous question I asked <a href="https://stackoverflow.com/q/72773527/18227124">Submit button not working with JS validation</a></p> <p>I have been really struggling with getting the checkbox being checked to be part of the form validation.</p> <p>my...
<p>Your code is too long and involved to examine, but the basic idea is not to let the user click the submit button until they have passed all validations, rather than allow them to click submit and then see if everything is valid.</p> <p>So we set up a <code>click</code> event handler on the checkbox that simply enabl...
Disable 'submit' button unless box is checked
javascript|forms|preventdefault
0
52
1
72,778,291
72,778,291
1
true
2022-06-27T20:58:37.467Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Disable 'submit' button unless box is checked<p>Following on from a previous question I asked <a href="https://stackoverflow.com/q/72773527/18227124">Submit ...
72,833,170
How to create multiple coloured background in a ggplot?<p>I have a dataset that contains multiple groups and exp. conditions. (here represents as <code>group &lt;- c(&quot;g1&quot;, &quot;g2&quot;)</code> and <code>con &lt;- c(&quot;A1&quot;, &quot;A2&quot;, &quot;B1&quot;, &quot;B2&quot;)</code>) I made a 3x3 plot mat...
<p>In general you could add some background rectangles using <code>geom_rect</code>. which however requires some data wrangling to get the <code>xmin</code> and <code>xmax</code> values. Basically this involves setting up a dataframe and converting your categories to numeric positions. Also at this stage we also add so...
How to create multiple coloured background in a ggplot?
r|ggplot2|statistics|data-visualization
0
52
2
72,839,261
72,839,261
1
true
2022-07-01T18:09:47.827Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to create multiple coloured background in a ggplot?<p>I have a dataset that contains multiple groups and exp. conditions. (here represents as <code>group...
72,930,359
How to scrape html tags with no classes and changing id using scrapy?<p>I want to scrape the sold price of property from <a href="http://house.speakingsame.com/p.php?q=Brisbane+City&amp;sta=qld" rel="nofollow noreferrer">http://house.speakingsame.com/p.php?q=Brisbane+City&amp;sta=qld</a></p> <p>It has no formatting, no...
<p>using xpath you could use:</p> <pre class="lang-py prettyprint-override"><code>for element in response.xpath(&quot;//table//table//table&quot;): sold = element.xpath(&quot;.//b&quot;)[0].xpath(&quot;./text()&quot;).get() print(sold) date = element.xpath(&quot;.//td&quot;)[0].xpath(&quot;./text()&quot;).g...
How to scrape html tags with no classes and changing id using scrapy?
python|web-scraping|scrapy
0
52
1
72,931,748
72,931,748
1
true
2022-07-10T17:03:29.083Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to scrape html tags with no classes and changing id using scrapy?<p>I want to scrape the sold price of property from <a href="http://house.speakingsame.c...
72,852,660
While retrieving the dataStore.js object throws undefined in js file<p>I have created a <code>dataStore.js</code> object and tried to pass below string to object as below. Getting undefined while console.log in Home.js, could someone please advise the issue here.</p> <pre><code>let dataStore = { globaldata1: {}, ...
<p>Checking out the Cypress tests, with some slight mods for folder paths and different baseUrl.</p> <p>Since Cypress v10 no longer has &quot;Run all&quot; option I also added a barrel spec called <strong>all.cy.js</strong> which allows running multiple specs and <strong>also</strong> enforces the order of the spec (wh...
While retrieving the dataStore.js object throws undefined in js file
javascript|cypress
1
52
2
72,875,900
72,875,900
1
true
2022-07-04T06:40:59.143Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: While retrieving the dataStore.js object throws undefined in js file<p>I have created a <code>dataStore.js</code> object and tried to pass below string to ob...
72,830,282
How to handle delayed http response in angular frontend when user navigates away to another page?<p>I have an Angular application, where once a person is checked in to the room, they are added to a list and their data is sent to a third party system. Now the sending of the data to the third party system happens every 3...
<p>There are two main ways you can go about sending data from your backend to your frontend:</p> <ol> <li><p>Set up a <strong>socket</strong> connection and emit an event from the server when you want the client to be notified (<em>read <a href="https://indepth.dev/tutorials/angular/how-to-implement-websockets-in-angul...
How to handle delayed http response in angular frontend when user navigates away to another page?
angular|rxjs
1
52
1
72,830,886
72,830,886
1
true
2022-07-01T13:47:38.890Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to handle delayed http response in angular frontend when user navigates away to another page?<p>I have an Angular application, where once a person is che...
72,872,269
why does my sql table treat 1000 as a middle number?<p>When I try to sort by a value descending my SQL table does it correctly, but if it sees for example &quot;1000&quot; it always puts it in the middle? for Example:</p> <p><a href="https://i.stack.imgur.com/l58QO.png" rel="nofollow noreferrer"><img src="https://i.sta...
<p>It happens because block_broken type is a varchar and not a number.</p> <p>In this case you are ordering lexycographically and not numerically.</p> <p>You can change your query to handle that as a numeric value with an explicit cast so your query should be:</p> <pre><code> SELECT uuid FROM player_stats ORDER BY cast...
why does my sql table treat 1000 as a middle number?
java|sql|minecraft|spigot
-1
52
1
72,872,353
72,872,353
1
true
2022-07-05T15:49:27.353Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: why does my sql table treat 1000 as a middle number?<p>When I try to sort by a value descending my SQL table does it correctly, but if it sees for example &q...
72,948,099
html show search result below search bar dynamically and capture the result in variable<p>I am new to HTML and css and this is my first html code after a decade, I am trying to create a simple form with 2 basic requirement. I have a search field which runs a script which does a rest call with the value inserted in text...
<p>The question wasn't perfectly clear in some details..</p> <p>Anyway I simplified your html a bit to make the solution more clear.</p> <p>Then I focused on your logic to fetch results from your api on the click event of the search button, so that after the call returns, its result gets echoed in a dedicated html targ...
html show search result below search bar dynamically and capture the result in variable
javascript|html|jquery|forms
0
52
1
72,948,633
72,948,633
1
true
2022-07-12T06:48:21.687Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: html show search result below search bar dynamically and capture the result in variable<p>I am new to HTML and css and this is my first html code after a dec...
72,803,077
Removing SQL Rows from Query if two rows have an identical ID but differences in the columns<p>IΒ΄m currently working stuck on a SQL issue (well, mainly because I canΒ΄t find a way to google it and my SQL skills do not suffice to solve it myself)</p> <p>IΒ΄m working on a system where documents are edited. If the editing p...
<p>If you need to delete all rows where every id doesn't have any &quot;<em>Solved = 'no'</em>&quot;, you can use a <code>DELETE</code> statement that will exclude all &quot;<em>id</em>&quot; values that have at least one &quot;<em>Solved = 'no'</em>&quot; in the corresponding rows.</p> <pre><code>DELETE FROM tab WHERE...
Removing SQL Rows from Query if two rows have an identical ID but differences in the columns
sql|sql-server
1
52
2
72,803,366
72,803,366
1
true
2022-06-29T14:24:58.020Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Removing SQL Rows from Query if two rows have an identical ID but differences in the columns<p>IΒ΄m currently working stuck on a SQL issue (well, mainly becau...
73,029,468
Create a Dot-Whisker plot in R for means/CIs of multiple variables<p>I'm currently looking to summarize my data visually in a Dot-Whisker plot using ggplot. Ideally, I'd create something that looks identical to what @Duck is able to produce in this <a href="https://stackoverflow.com/questions/64268001/dot-and-whisker-c...
<p>You have kept <code>ci_low</code> and <code>ci_high</code> as list when you used <code>lapply</code>. You can avoid this in future and keep it as a vector using <code>sapply</code> instead.</p> <pre><code>str(dw_append) 'data.frame': 4 obs. of 5 variables: $ County : Factor w/ 2 levels &quot;Yes&quot;,&quot;No...
Create a Dot-Whisker plot in R for means/CIs of multiple variables
r|ggplot2|plot
0
52
1
73,029,997
73,029,997
1
true
2022-07-18T23:02:45.280Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Create a Dot-Whisker plot in R for means/CIs of multiple variables<p>I'm currently looking to summarize my data visually in a Dot-Whisker plot using ggplot. ...
72,847,417
JS alter element with certain id and class name<p>I'm trying to change the style of a div with vanilla JS. The div should have a certain id and the class name <code>tab-content</code>:</p> <pre><code>function showTabContent() { document.getElementById(tabID).classList.contains(&quot;tab-content&quot;).style.display...
<p>First of all you should pass tabID to your function.</p> <p>.containe() method in JavaScript shows whether a string has a specific word or letter and if the condition is true, it will return <code>true</code>. (boolean) if you want to get the element with a specific ID and <code>tab-content</code> class, you can wor...
JS alter element with certain id and class name
javascript
1
52
3
72,847,729
72,847,729
1
true
2022-07-03T14:43:46.827Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: JS alter element with certain id and class name<p>I'm trying to change the style of a div with vanilla JS. The div should have a certain id and the class nam...
72,777,230
Reading .txt file through shell script stops after 1st line<p>I want to create a shell that reads a text file.</p> <p>The file, <code>users_test.txt</code>, looks like:</p> <p>Headers - <em>Group : Team : User</em></p> <pre><code>Group_A:Team_Red Team_Green:worker_1 worker_2 worker_2 worker_3 Group_B:Team_Blue Team_Bla...
<p>Given <a href="https://stackoverflow.com/questions/72777230/reading-txt-file-through-shell-script-stops-after-1st-line/72779286#comment128548920_72777230">your comment</a> that your file doesn't end in a linefeed, <code>0a</code>:</p> <pre><code>$ printf 'foo\n' | xxd 00000000: 666f 6f0a ...
Reading .txt file through shell script stops after 1st line
linux|shell|unix|while-loop|ifs
0
52
1
72,779,286
72,779,286
1
true
2022-06-27T19:09:06.257Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Reading .txt file through shell script stops after 1st line<p>I want to create a shell that reads a text file.</p> <p>The file, <code>users_test.txt</code>, ...
72,954,104
Copy multiple cells in excel once - paste into another app for each field<p>I need to copy a row of 10 fields in excel. I can use <kbd>Ctrl+C</kbd> for this.</p> <p>When I paste the fields - I would like to only paste 1 field at a time into different fields in a different app.</p> <p>Is it possible to copy the row fie...
<p>Windows 10 and Windows 11 have a β€œClipboard History” tool that allows the Clipboard to store multiple items that can be pasted at any time. If you copy each item you want to transfer individually, you can use this to approximate your desired functionality.</p> <p>Microsoft turns this new β€œClipboard History” feature ...
Copy multiple cells in excel once - paste into another app for each field
excel|vba
0
52
1
72,954,366
72,954,366
1
true
2022-07-12T14:37:40.190Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Copy multiple cells in excel once - paste into another app for each field<p>I need to copy a row of 10 fields in excel. I can use <kbd>Ctrl+C</kbd> for this...
72,835,538
equivalent of python's array.pop() in javascript<p>I wonder if there's an easy to implement equivalent to python's <code>array.pop()</code> which returns the deleted element while deleting it from the array in parallel in javascript.</p> <pre><code>let nums = [2, 1, 3, 4, 5, 6]; function sortArray(nums) { let arr = ...
<p>OK, you use splice. Here's an example of the implementation below:</p> <pre class="lang-js prettyprint-override"><code>Array.prototype.pythonPop = function (index) { return this.splice(index, 1)[0]; } </code></pre> <p>Now, I found the issue, you'll <em>love</em> the answer. So you were using <code>num.length</co...
equivalent of python's array.pop() in javascript
javascript|python|selection-sort
0
52
1
72,835,585
72,835,585
1
true
2022-07-01T23:53:21.113Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: equivalent of python's array.pop() in javascript<p>I wonder if there's an easy to implement equivalent to python's <code>array.pop()</code> which returns the...
73,023,431
tar.xz - how to check uncompressed files size without decompress whole archive<p>I have a problem with checking uncompressed size from archive <strong>tar.xz</strong> without extract whole archive. I know that for tar.gz I can use gzip or zcat but for tar.xz it dosnt work.</p> <p>Any sugestion how to do this ?</p>
<p><code>tar tvfa &lt;file&gt;</code> will give you a list including file sizes. Check <code>man tar</code> for details. You should also note, that file size does not equate to disk usage, since part of a file can take a full file system block.</p>
tar.xz - how to check uncompressed files size without decompress whole archive
linux|gzip|tar|xz
1
52
1
73,023,580
73,023,580
1
true
2022-07-18T13:49:29.570Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: tar.xz - how to check uncompressed files size without decompress whole archive<p>I have a problem with checking uncompressed size from archive <strong>tar.xz...
72,839,879
How can I merge 2 empty lines into one? Like cat -s<p>how can I merge 2 empty lines into one? Like <code>cat -s</code></p> <pre><code>#include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; int main() { int c; FILE *file = fopen(&quot;2.txt&quot;, &quot;r&quot;); while ((c = getc(file)) != EOF) { put...
<p>Here is a modified version that implements <code>cat -s</code>:</p> <pre><code>#include &lt;stdio.h&gt; int main() { int c, last_c = '\n', has_empty = 0; FILE *file = fopen(&quot;2.txt&quot;, &quot;r&quot;); if (file != NULL) { while ((c = getc(file)) != EOF) { if (last_c == '\n' &a...
How can I merge 2 empty lines into one? Like cat -s
c
1
52
1
72,840,724
72,840,724
1
true
2022-07-02T14:34:57.923Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I merge 2 empty lines into one? Like cat -s<p>how can I merge 2 empty lines into one? Like <code>cat -s</code></p> <pre><code>#include &lt;stdio.h&gt...
72,818,965
how to avoid duplicate insertion sqlite<p>Hi i added array of data as rows in local database which is got from backend, now i got new data with existing data from backend, i'm trying to add this data to local database but duplicates are creating</p> <pre><code>&quot;CREATE TABLE IF NOT EXISTS &quot; + this.GENRES_TABLE...
<p>Since <code>genre_id</code> already has a <code>UNIQUE</code> constraint, you should be able to use the <a href="https://www.sqlite.org/lang_insert.html" rel="nofollow noreferrer">SQLite-specific syntax</a> <code>INSERT OR IGNORE INTO &lt;table&gt;</code>, silencing what would otherwise be a unique constraint violat...
how to avoid duplicate insertion sqlite
sql|sqlite|react-native-sqlite-storage
-3
52
1
72,833,616
72,833,616
1
true
2022-06-30T16:12:33.063Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to avoid duplicate insertion sqlite<p>Hi i added array of data as rows in local database which is got from backend, now i got new data with existing data...
72,947,020
MongoDB Aggregation with Sum and Multiple Group Results<p>Let's say I have these collections members and positions</p> <pre class="lang-json prettyprint-override"><code>[ { &quot;church&quot;:&quot;60dbb265a75a610d90b45c6b&quot;, &quot;parentId&quot;:&quot;60dbb265a75a610d90b45c6b&quot;, name: &quot;Jonah J...
<p><strong>Update</strong>:</p> <ol> <li><code>$addFields</code> with <code>birthMonth</code> string</li> <li><code>$lookup</code> to add <code>positions</code></li> <li><code>$facet</code> to <code>$group</code> by <code>birthdays</code>, <code>positionsOcuppied</code>, and all docs tougher as <code>other</code></li> ...
MongoDB Aggregation with Sum and Multiple Group Results
mongodb|aggregation-framework
0
52
1
72,950,288
72,950,288
1
true
2022-07-12T04:22:44.023Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: MongoDB Aggregation with Sum and Multiple Group Results<p>Let's say I have these collections members and positions</p> <pre class="lang-json prettyprint-over...
72,917,845
How to remove previous printed line from Console in Dart<p>How I can remove previously printed line in console with print() in Dart?</p> <p>I am willing to display a progress indicator such as:</p> <pre><code>int n = 0; for (var item in list) { n++; print('${(n / list.length * 100).toStringAsFixed(0)}%'); // do s...
<p><code>print</code> always adds a newline, but you can write directly to stdout to avoid that.</p> <p>To overwrite the previous line, you can place a carriage return (<code>'\r'</code>) character at the start of your string, which tells the cursor to return to the beginning of the line. You may also want to pad the e...
How to remove previous printed line from Console in Dart
dart
1
52
2
72,917,872
72,917,872
1
true
2022-07-08T23:22:36.773Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to remove previous printed line from Console in Dart<p>How I can remove previously printed line in console with print() in Dart?</p> <p>I am willing to d...
72,846,473
How do I get the value of an Array without knowing the name of the Array<p>im currently working on a user authentication system using expressJS. Therefore to encrypt my data I am using bcrypt. Then I save the encrypted data to a MySQL Database. Then when logging in I get the saved password using <code>SELECT password F...
<p>I suspect your library's <code>query()</code> might be returning a <code>[rows, fields]</code> array.<br/> <a href="https://www.npmjs.com/package/mysql2" rel="nofollow noreferrer"><code>mysql2</code></a>'s <code>query()</code> does, at least.</p> <p>Maybe the below?:</p> <pre class="lang-js prettyprint-override"><co...
How do I get the value of an Array without knowing the name of the Array
javascript|mysql|arrays|javascript-objects|bcrypt
1
52
2
72,846,806
72,846,806
1
true
2022-07-03T12:23:52.690Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I get the value of an Array without knowing the name of the Array<p>im currently working on a user authentication system using expressJS. Therefore to...
72,785,259
Write value only once in CSV using powershell<p>I am having the below code to write the data to csv</p> <pre><code>$myVMs = @(Get-VM -Server $vc | where {$_.PowerState -eq 'PoweredOn'} | select -Unique) foreach ($myVM in $myVMs){ $VMDKs = $myVM | get-HardDisk $V...
<p>Taking the csv file you created with your code, you can use that as a basis to get the output you need like this:</p> <pre><code>$data = Import-Csv -Path 'D:\Test\VMInfo.csv' # first group the data on the Name property $data | Group-Object Name | ForEach-Object { $name = $_.Name # next, group that on propert...
Write value only once in CSV using powershell
powershell
0
52
1
72,788,675
72,788,675
1
true
2022-06-28T11:01:09.943Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Write value only once in CSV using powershell<p>I am having the below code to write the data to csv</p> <pre><code>$myVMs = @(Get-VM -Server $vc | where {$_....
73,012,457
access to x-data outside of the scope in alpinejs 3<p>I have modalform component made using AlpineJS in topbar of website. When click on SVG icon envelope modalform appears.</p> <pre class="lang-html prettyprint-override"><code>&lt;div class=&quot;topbar py-2&quot; id=&quot;topbar&quot; x-data=&quot;topbar()&quot;&gt; ...
<p>The approach to access the data property from the component itself is a quite hacky approach. A good way to tackle this without having to dig into the internal objects of Alpine (which could change any time without notice) is to use events.</p> <p>So what you would essentially do is to add an event handler to the mo...
access to x-data outside of the scope in alpinejs 3
alpine.js
0
52
1
73,012,811
73,012,811
1
true
2022-07-17T14:06:04.480Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: access to x-data outside of the scope in alpinejs 3<p>I have modalform component made using AlpineJS in topbar of website. When click on SVG icon envelope mo...
72,807,801
How to check if ball colides with edge of window in c++ with raylib<p>i am new to raylib and wanted to make a little 2d ball thing, and i don't know how to stop the sprite from going of the screen, it only works with 2 edges and not the others, would anybody please help?</p> <p>My C++ file: game.cpp:</p> <pre><code>#in...
<p>Took me a while but your problem is a combination of the offset for drawing the ball texture and how you check for the bounds of the screen (assuming the image is a 50x50, you didn't specify).</p> <p><a href="https://i.stack.imgur.com/CC5Pe.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CC5Pe.png...
How to check if ball colides with edge of window in c++ with raylib
c++|raylib
1
52
1
72,808,782
72,808,782
1
true
2022-06-29T20:59:19.903Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to check if ball colides with edge of window in c++ with raylib<p>i am new to raylib and wanted to make a little 2d ball thing, and i don't know how to s...
72,997,179
delayUntil stop delay and emit next value if notification is closed<p>I need to create a toaster.</p> <p>I have the Subject</p> <pre><code>this.toast$ = this.toastSubject.asObservable().pipe( filter(toast =&gt; toast !== null), concatMap((toast) =&gt; of(toast).pipe(delayWhen(() =&gt; timer(5000)), skip(1), startWi...
<p><code>race</code> is probably what you are looking for !</p> <pre><code>this.toast$ = this.toastSubject.pipe( concatMap((toast) =&gt; of(toast).pipe( delayWhen(() =&gt; race([this.toastClose$, timer(5000)])), skip(1), startWith(toast) ) ) ); </code></pre> <p><a href="https://stackblitz....
delayUntil stop delay and emit next value if notification is closed
angular|rxjs|observable|rxjs6
1
52
1
72,999,897
72,999,897
1
true
2022-07-15T16:37:36.373Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: delayUntil stop delay and emit next value if notification is closed<p>I need to create a toaster.</p> <p>I have the Subject</p> <pre><code>this.toast$ = this...