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,283,166
Abstracting operators by booleans<p>Lets say I have a boolean <code>bool</code>, and two ints <code>a</code> and <code>b</code>. If bool is true, I want to return a &lt; b, and if bool is false I want to return a &gt; b. Obviously I can write:</p> <pre><code>if (bool) return a &lt; b; else return a &gt; b; </co...
<p>In my opinion there's no such operator in C, plus, C doesn't have operator overloading, so that's not possible too.</p> <p>The best you can do is a function to encapsulate this logic:</p> <pre><code>function findWhetherLessOrMore(bool findWhetherLess, int operand1, int operand2) { return findWhetherLess ? operan...
Abstracting operators by booleans
c
0
67
2
72,283,227
72,283,227
0
true
2022-05-18T04:21:02.007Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Abstracting operators by booleans<p>Lets say I have a boolean <code>bool</code>, and two ints <code>a</code> and <code>b</code>. If bool is true, I want to r...
72,401,567
Server 2012 Email alert if there is a power outage<p>I have a old Windows 2012 Server, and we have AD installed in it... my question is how will i configure Email Alert on it if the server go down due to a Power outage? we don't have UPS installed for the server as well. is there any way or a PowerShell we can have to ...
<p>On the server create a scheduled task that executes on boot. This task can send an email after every server restart.</p> <p>The Windows Event log will contain events with ID 6008 (which means &quot;The previous system shutdown at time on date was unexpected&quot;) - ie power-cut or other unplanned shutdown. You migh...
Server 2012 Email alert if there is a power outage
powershell|scheduled-tasks|script|windows-server-2012
0
67
1
72,404,391
72,404,391
0
true
2022-05-27T06:55:16.207Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Server 2012 Email alert if there is a power outage<p>I have a old Windows 2012 Server, and we have AD installed in it... my question is how will i configure ...
72,256,898
Implementing a method that returns a Class<p>There is an interface with a method that returns a Class, like so.</p> <pre><code>public interface MyInterface { public Class&lt;? extends Object&gt; returnsSomething (); } </code></pre> <p>I have to create a class which implements the interface, like so.</p> <pre><...
<p><code>Object</code> is just the name of the class.</p> <p><code>Object.class</code> is the instance of the <code>Class&lt;Object&gt;</code> class that represents the <code>Object</code> class. See <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html" rel="nofollow noreferrer">Class</a>.</p> <p>So ...
Implementing a method that returns a Class
java|class
-2
67
2
72,256,951
72,256,951
0
true
2022-05-16T09:22:44.650Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Implementing a method that returns a Class<p>There is an interface with a method that returns a Class, like so.</p> <pre><code>public interface MyInterface {...
72,255,599
Python script summary data separate by col<p>I want to count the data base on certain column follow the condition from another columns.</p> <p>Raw data:</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th style="text-align: left;">Time</th> <th style="text-align: center;">Lot</th> <th style="te...
<p>Try count(), for both columns.</p> <pre><code>df.groupby(['Lot', 'Error']).count() </code></pre> <p>Output Lot Error</p> <pre><code>A X 2 B X 1 Y 1 C Z 1 </code></pre> <p>Also, if you need all the indexes that you have given, then you can do this:</p> <pre><code>df1 = df.gro...
Python script summary data separate by col
python|pivot
0
67
1
72,257,391
72,257,391
0
true
2022-05-16T07:33:19.637Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python script summary data separate by col<p>I want to count the data base on certain column follow the condition from another columns.</p> <p>Raw data:</p> ...
72,343,093
Why the shell knows the interpreter specified in the shebang-line of a file without read permission<p>I am trying to learn shell on Linux, but I've got a problem which seems confusing.</p> <ul> <li>My environment is: <ul> <li>OS: Manjaro 21.2.6 Qonos</li> <li>Kernel: x86_64 Linux 5.15.38-1-MANJARO</li> <li>Shell: zsh 5...
<blockquote> <p><em>So why the Shell knows what the shebang in the file foo is without the read permission ???</em></p> </blockquote> <p>It is not the shell that reads the shebang line but the OS/kernel.</p> <p>A shell script can be executed in the same way as a compiled program. The process uses a function of the <cod...
Why the shell knows the interpreter specified in the shebang-line of a file without read permission
unix|permissions|filesystems|interpreter|shebang
1
67
2
72,346,298
72,346,298
0
true
2022-05-23T03:54:05.683Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why the shell knows the interpreter specified in the shebang-line of a file without read permission<p>I am trying to learn shell on Linux, but I've got a pro...
72,275,692
How to find member by username?<p>Discord.js 13.6.0 | Node.js 16.14.2</p> <p>I want to find member by username, same as in bot <code>UnbelievaBoat</code> (<a href="https://i.stack.imgur.com/WNPv5.png" rel="nofollow noreferrer">https://i.stack.imgur.com/WNPv5.png</a>)</p> <p>Example: username is WorldGod</p> <p>Type e.g...
<p>the <code>.includes()</code> function returns a boolean so what you want to do is create a function based on that boolean. this is the new code i made for you.</p> <pre class="lang-js prettyprint-override"><code>// make members an array let members = [] message.guild.members.cache.filter(mems =&gt; { // if users u...
How to find member by username?
node.js|discord.js
-1
67
1
72,279,798
72,279,798
0
true
2022-05-17T14:17:47.810Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to find member by username?<p>Discord.js 13.6.0 | Node.js 16.14.2</p> <p>I want to find member by username, same as in bot <code>UnbelievaBoat</code> (<a...
72,309,604
can't push commit in sudo mode while using python<p>I have written a small python program (screen.py) that uses the <code>keyboard</code> lib. The essence of the program is to take screenshots by pressing ctrl + 1 and send them to my github repository by pressing ctrl + 2. Using the keyboard library requires that the p...
<p>You need to run the <code>git</code> commands as your regular user.</p> <p>Unfortunately, Python only allows you to drop the privileges of the current process; you can then no longer switch back if you need to run some privileged code still.</p> <p>Best practice and generally just good security hygiene would be to d...
can't push commit in sudo mode while using python
python|git
0
67
1
72,316,437
72,316,437
0
true
2022-05-19T18:40:28.103Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: can't push commit in sudo mode while using python<p>I have written a small python program (screen.py) that uses the <code>keyboard</code> lib. The essence of...
72,398,254
How do you sum multiple values gotten from inputs in javascript?<p>This is part of a series of exercises I have been doing and it's the only one I haven't been able to complete (I'm a Javascript beginner). The exercise says to &quot;Create an input, and a button, so that everytime a value is entered the total value is ...
<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>/* Declare ex15Storage outside the function otherwise it will reset everytime the function is called */ let ex15Storage = 0; functi...
How do you sum multiple values gotten from inputs in javascript?
javascript
0
67
2
72,398,366
72,398,366
0
true
2022-05-26T21:35:06.720Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do you sum multiple values gotten from inputs in javascript?<p>This is part of a series of exercises I have been doing and it's the only one I haven't be...
72,288,782
PowerApps: Filter SQL datarows by non existence in Sharepoint List<pre><code>Filter( ClearCollect( tblSQL, ShowColumns( WRH_Artikelmaster, &quot;Materialnummer&quot;, &quot;BME&quot;, &quot;Einheit_KME&quot;, &quot;Status&quot;, &quot;Materialart&quot;, &quot;Verpacku...
<p>If the tables are large or ever-growing, you likely want to rethink a different solution. These can be rather resource intensive types of Filters.</p> <p><strong>This works:</strong></p> <ul> <li>Note the <code>Not()</code> syntax.</li> </ul> <pre><code>//Get the Sharepoint list ClearCollect(colMaterialnummer, Mater...
PowerApps: Filter SQL datarows by non existence in Sharepoint List
sql|filter|sharepoint|powerapps
0
67
1
72,324,997
72,324,997
0
true
2022-05-18T11:57:48.677Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: PowerApps: Filter SQL datarows by non existence in Sharepoint List<pre><code>Filter( ClearCollect( tblSQL, ShowColumns( WRH_Artikelmaster, ...
72,376,241
Find package number based on list of products<p>So I have a spreadsheet which shows product packages and products in it</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>Package</th> <th>Product</th> </tr> </thead> <tbody> <tr> <td>Package1</td> <td>Product1</td> </tr> <tr> <td>Package1</td> ...
<p>One way would be using the newest functions:</p> <p><a href="https://i.stack.imgur.com/GgrB4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GgrB4.png" alt="enter image description here" /></a></p> <p>Formula in <code>F1</code>:</p> <pre><code>=LET(A,UNIQUE(A2:A9),B,D2:D3,C,BYROW(A,LAMBDA(a,SUM(CO...
Find package number based on list of products
excel|excel-formula|match
0
67
2
72,377,654
72,377,654
0
true
2022-05-25T10:48:56.093Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Find package number based on list of products<p>So I have a spreadsheet which shows product packages and products in it</p> <div class="s-table-container"> <...
72,362,346
Word Interop Add Document Property Field to Table - "System.Runtime.InteropServices.COMException: 'This command is not available.' "<p>I'm trying to add a field for a custom document property into a table in a Word document using the Word Interop. However, when I do this I'm getting an error:</p> <blockquote> <p>&quot;...
<p>as to my earlier comment, it is indeed that you cannot add a field to the cell.range as a whole: below sample insert a page number in a table in the footer 'foot' as &quot;x of y&quot; where x is current page number and y the total number of pages.</p> <pre><code> Dim rng As Range = footerTable.Cell(1, 3).Range.Dupl...
Word Interop Add Document Property Field to Table - "System.Runtime.InteropServices.COMException: 'This command is not available.' "
c#|ms-word|interop|word-interop
1
67
1
72,498,445
72,498,445
0
true
2022-05-24T11:47:22.877Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Word Interop Add Document Property Field to Table - "System.Runtime.InteropServices.COMException: 'This command is not available.' "<p>I'm trying to add a fi...
72,313,822
How to Copying Range from Google Sheet to Clipboard UIPath<p>I want to Copying Range from my google sheet to Clipboard using UiPath Studio. Do you guys have any idea how to do this??</p>
<p>I just found the solution for my own question. Hope it'll help you guys</p> <pre><code>String.Join(Environment.NewLine,(From r In Datatable Select r.item(&quot;Column Name&quot;)) </code></pre> <p>If you have another solution, you can feel free to answer again.</p>
How to Copying Range from Google Sheet to Clipboard UIPath
uipath|rpa|uipath-studio|uipath-robot|uipath-orchestrator
0
67
1
72,314,462
72,314,462
0
true
2022-05-20T05:08:04.340Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to Copying Range from Google Sheet to Clipboard UIPath<p>I want to Copying Range from my google sheet to Clipboard using UiPath Studio. Do you guys have ...
72,242,714
Combine two resources and then send to a node in Anylogic<p>I am simulating a warehouse inspection model where an inspection-officer (present as node1) needs to go to a different node (node2) to collect tools and then go to node where object to be inspected is laid out.</p> <p>I am using a resource pool for both inspec...
<p>You need to use the resource start task block. That way one resource will seize the other before being seized by the agent.</p>
Combine two resources and then send to a node in Anylogic
simulation|anylogic
1
67
2
72,242,827
72,242,827
1
true
2022-05-14T17:56:51.743Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Combine two resources and then send to a node in Anylogic<p>I am simulating a warehouse inspection model where an inspection-officer (present as node1) needs...
72,243,334
I get an error when I try to run t.test()<p>I am trying to perform a t.test as follows:</p> <pre><code>t.test(data = a, score ~ group, paired = T) </code></pre> <p>However, I get this error:</p> <blockquote> <p>Error in complete.cases(x, y) : not all arguments have the same length</p> </blockquote> <p>I think this is b...
<p>Responding to the comments, I am concerned about @JohnGarland's question (are you <strong>sure</strong> you really have paired data?), but provided that you do (and the different <code>ResponseID</code> values are a red herring), I think that you have to discard all <em>pairs</em> with <code>NA</code> values (you sa...
I get an error when I try to run t.test()
r|na|data-wrangling
0
67
2
72,243,725
72,243,725
1
true
2022-05-14T19:33:11.567Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: I get an error when I try to run t.test()<p>I am trying to perform a t.test as follows:</p> <pre><code>t.test(data = a, score ~ group, paired = T) </code></p...
72,244,072
How to disable scrolling of comboBox from keys arrow Up\Down when it closed?<p>The arrow keys should scroll only pictureBox (placed in panel). It works fine. But it also scroll through comboBox items though it is closed (droppedUp). How to disable it?</p> <pre><code>private void Form1_Load(object sender, EventArgs e) {...
<p>As Hans Passant commented, you must return true. Also, add some other keys that maybe change the selected item in the combobox:</p> <pre><code>protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { if (keyData == Keys.Down || keyData == Keys.Up || keyData == Keys.PageDown || ...
How to disable scrolling of comboBox from keys arrow Up\Down when it closed?
c#|winforms
0
67
1
72,244,477
72,244,477
1
true
2022-05-14T21:44:54.987Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to disable scrolling of comboBox from keys arrow Up\Down when it closed?<p>The arrow keys should scroll only pictureBox (placed in panel). It works fine....
72,245,524
getElementbyId does not work and returns null<p>When accessing the site, the image and characters are displayed for a moment with JavaScript, It takes a lot of time to load the image, and we have to lengthen the fade-out time.</p> <p>Once you visit the site, the cache will remain, so when you visit it again, the image ...
<pre class="lang-js prettyprint-override"><code>document.getElementById() </code></pre> <p>return single element</p> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementById" rel="nofollow noreferrer">document.getElementById</a></p> <pre class="lang-js prettyprint-override"><code>function fi...
getElementbyId does not work and returns null
javascript|html
0
67
3
72,245,752
72,245,752
1
true
2022-05-15T04:32:15.887Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: getElementbyId does not work and returns null<p>When accessing the site, the image and characters are displayed for a moment with JavaScript, It takes a lot ...
72,252,481
Suppress console logging on Linux<p>I am working with shell scripts for some automation tasks. I have functions defined in my script which are executed however the tasks performed by some of the functions logs a lot of data on the terminal screen which is irrelevant.</p> <p>Is there a way in which I can suppress the co...
<p>You can supress the output of a program <em>redirecting</em> it to the special file <code>/dev/null</code>.</p> <p>Note that there are two kind of output, normal output (<code>stdout</code>) and error output (<code>stderr</code>)</p> <p>To redirect all output use</p> <pre><code>command_or_function [args] &amp;&gt;/d...
Suppress console logging on Linux
bash|shell
0
67
1
72,253,666
72,253,666
1
true
2022-05-15T21:56:39.290Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Suppress console logging on Linux<p>I am working with shell scripts for some automation tasks. I have functions defined in my script which are executed howev...
72,260,412
Remove from array if parent property key has been removed<p>I am currently trying to remove from an array of objects if the parent gets removed.</p> <p>My array looks like this:</p> <pre><code>const items = [ { id: '1' generatedFrom: undefined }, { id: '2', generatedFrom: '1', }, { id: '3'...
<p>Since theoretically you could have unlimited level of depth, I don't think one <code>Array.prototype.*</code> call is sufficient here. A beginner's approach would be recursion, but you can tweak that into a queue process:</p> <pre class="lang-js prettyprint-override"><code>const items = [ { id: 1, generate...
Remove from array if parent property key has been removed
javascript|typescript
0
67
4
72,261,020
72,261,020
1
true
2022-05-16T13:59:00.953Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Remove from array if parent property key has been removed<p>I am currently trying to remove from an array of objects if the parent gets removed.</p> <p>My ar...
72,269,291
Why the VBA UDF "Range.Formula =" don't work?<p>I want to copy the formula from one cell/cells to another cell/cells by <code>Range.Formula = </code>. But it not work as expected.</p> <p>If I run the VBA step by step, the function will ended at <code>Range.Formula = </code> without error.</p> <pre><code>Function test1(...
<p>You are trying to change another cell's formula with a UDF. According to the <a href="https://support.microsoft.com/en-us/topic/description-of-limitations-of-custom-functions-in-excel-f2f0ce5d-8ea5-6ce7-fddc-79d36192b7a1" rel="nofollow noreferrer">Microsoft documentation</a> this cannot be done, but Ryan Wells has a...
Why the VBA UDF "Range.Formula =" don't work?
excel|vba|user-defined-functions
1
67
2
72,270,301
72,270,301
1
true
2022-05-17T06:48:01.703Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why the VBA UDF "Range.Formula =" don't work?<p>I want to copy the formula from one cell/cells to another cell/cells by <code>Range.Formula = </code>. But it...
72,271,728
C# process task manager kill running file<p>I try to open file using process in C#, but after that file end work.</p> <p>It is not end from task manager.</p> <p>I am running this by thread</p> <p>how i can kill fping.exe from task manager after specific time</p> <pre><code>Process cmd = new Process(); cmd.StartInfo.Wor...
<p>When you done working with the Process class, you should dispose of it. To dispose of the type directly, call its Dispose method in a try/finally block. To dispose of it indirectly, use a language construct such as using</p> <p>Here is example with <strong>using</strong></p> <pre><code>using(Process cmd = new Proces...
C# process task manager kill running file
c#|taskmanager
0
67
1
72,272,028
72,272,028
1
true
2022-05-17T09:47:26.830Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: C# process task manager kill running file<p>I try to open file using process in C#, but after that file end work.</p> <p>It is not end from task manager.</p>...
72,276,120
Convert string to List of dates in flutter<p>I have String :</p> <pre><code>String datesString= &quot;[2022-04-14 15:51:10,2022-01-29 15:51:10]&quot;; </code></pre> <p>I need to convert it to list of DateTime or String ....</p> <p>I try JsonDecode</p> <pre><code>List datesList= jsonDecode(datesString); </code></pre> <p...
<pre><code>var date = datesString.toString().replaceAll(&quot;]&quot;, &quot;&quot;).replaceAll(&quot;[&quot;, &quot;&quot;); List datesList = date.split(&quot;,&quot;); </code></pre> <p>List will be datesList</p> <p>or you can do like this</p> <pre><code> datesString = datesString.substring(1, datesString.length - 1);...
Convert string to List of dates in flutter
string|list|flutter|dart|datetime
0
67
3
72,276,501
72,276,501
1
true
2022-05-17T14:46:26.513Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Convert string to List of dates in flutter<p>I have String :</p> <pre><code>String datesString= &quot;[2022-04-14 15:51:10,2022-01-29 15:51:10]&quot;; </code...
72,262,017
Column sortorder when writing CSV file using CsvHelper<p>When writing TSVs from .Net objects file using <a href="https://joshclose.github.io/CsvHelper" rel="nofollow noreferrer">CsvHelper</a>, I would like to control column sort order using attributes. When using the CsvHelper-provided <code>Index(..)</code> attribute,...
<p>It feels a bit hacky, but this seems to work.</p> <pre class="lang-cs prettyprint-override"><code> /// &lt;summary&gt; /// Generic daily data /// &lt;/summary&gt; public class DailyData { /// &lt;summary&gt; /// /// &lt;/summary&gt; [CsvHelper.Configuration.Attribu...
Column sortorder when writing CSV file using CsvHelper
c#|.net|csv|serialization|csvhelper
1
67
1
72,282,133
72,282,133
1
true
2022-05-16T15:50:17.647Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Column sortorder when writing CSV file using CsvHelper<p>When writing TSVs from .Net objects file using <a href="https://joshclose.github.io/CsvHelper" rel="...
72,295,671
pymysql error attempting to run query : sqlalchemy.exc.ProgrammingError<p>I am running a query using <code>pymysql</code> and passing a string as a parameter for the <code>where</code> clause condition. Code and Error Traceback below:</p> <pre><code>import pandas as pd # mysql connection import pymysql from sqlalchem...
<p>The value needs to be quoted. It's best to let the database connector do it, to protect against injection attacks:</p> <pre><code>query = ''' select * from schema_name.table1 where city = %s;''' df = pd.read_sql(query, con, params=[c]) </code></pre>
pymysql error attempting to run query : sqlalchemy.exc.ProgrammingError
python|mysql|pandas|pymysql
0
67
1
72,295,713
72,295,713
1
true
2022-05-18T20:35:52.600Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: pymysql error attempting to run query : sqlalchemy.exc.ProgrammingError<p>I am running a query using <code>pymysql</code> and passing a string as a parameter...
72,301,460
CSS/HTML - Input boxes are not aligned by a few pixels for a form<p>I've been stuck on this issue for a few hours now and tried everything I could think of.</p> <p>Essentially, I have a form that takes an email address and a token in two separate input boxes/fields, I have centred the entire form and put the two boxes ...
<p>It's because your labels don't have the same width. Words, even with the same number of letters, can be smaller / wider than each other, depending on the font you use. An &quot;W&quot; take generally more space than a &quot;I&quot;, for exemple.</p> <p>What to need to do is to either put a width / min-width on your ...
CSS/HTML - Input boxes are not aligned by a few pixels for a form
html|css|forms
0
67
5
72,301,638
72,301,638
1
true
2022-05-19T08:51:52.570Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: CSS/HTML - Input boxes are not aligned by a few pixels for a form<p>I've been stuck on this issue for a few hours now and tried everything I could think of.<...
72,305,638
'join' two MongoDB collections on a key, without creating a nested structure<p>I'd like to 'join' two MongoDB collections on a key, without creating a nested structure.</p> <p>Code:</p> <pre class="lang-py prettyprint-override"><code># Init client client_mongo = pymongo.MongoClient( host=&quot;mongo&quot;, port=270...
<p>Just perform simple <code>$unwind</code> and <code>$project</code> after you do the <code>$lookup</code></p> <pre class="lang-js prettyprint-override"><code>db.twitter.aggregate([ { &quot;$lookup&quot;: { &quot;from&quot;: &quot;wikipedia&quot;, &quot;localField&quot;: &quot;name&quot;, &quot...
'join' two MongoDB collections on a key, without creating a nested structure
python|mongodb|mongodb-query|aggregation-framework|pymongo
0
67
1
72,306,006
72,306,006
1
true
2022-05-19T13:41:07.713Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: 'join' two MongoDB collections on a key, without creating a nested structure<p>I'd like to 'join' two MongoDB collections on a key, without creating a nested...
72,313,043
Shooting cooldown for enemy in unity2d<p>I'm doing a top-down shooter in unity, I'm trying to make the enemy shoot when it sees the player. So far, this is my code:</p> <pre><code>public class EnemyShooting : MonoBehaviour { public Transform firePoint; public GameObject bulletPrefab; public float bulletForc...
<p>The following code defines two times. The current cooldown and shoot cooldown. Add the bottom and your problem will be solved.</p> <pre class="lang-cs prettyprint-override"><code>public float shootCooldown = 5; // 5sec for e.g. private float currentCooldown; void Update() { if (currentCooldown &gt; 0) // If sho...
Shooting cooldown for enemy in unity2d
c#|visual-studio|unity3d
2
67
1
72,314,362
72,314,362
1
true
2022-05-20T02:48:57.257Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Shooting cooldown for enemy in unity2d<p>I'm doing a top-down shooter in unity, I'm trying to make the enemy shoot when it sees the player. So far, this is m...
72,315,988
How to remove domain of a websites on pandas dataframe<p>Here's the dataset</p> <pre><code>Id Websites 1 facebook.com 2 linked.in 3 stackoverflow.com 4 harvard.edu 5 ugm.ac.id </code></pre> <p>Heres's my expected output</p> <pre><code>Id Name 1 facebook 2 linked 3 stackoverflow 4 harvard 5 ugm </c...
<p>You can use a regex to get the part before the first dot, combined with <code>pop</code> to remove the Website column:</p> <pre><code>df['Name'] = df.pop('Websites').str.extract('([^.]+)') </code></pre> <p>output:</p> <pre><code> Id Name 0 1 facebook 1 2 linked 2 3 stackoverflow 3 ...
How to remove domain of a websites on pandas dataframe
python|pandas
0
67
3
72,316,010
72,316,010
1
true
2022-05-20T08:42:15.727Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to remove domain of a websites on pandas dataframe<p>Here's the dataset</p> <pre><code>Id Websites 1 facebook.com 2 linked.in 3 stackoverflow.com ...
72,304,638
Is there a function for closing app on mouse or keyboard movement in PyQT5?<p>I want my app to close when mouse or keyboard movement is detected, it does not detect anything, only when I close the app</p> <pre><code>class MainWindow(QMainWindow, Ui_MainWindow): def __init__(self, parent=None): QMainWindow.__i...
<p>Input events are not propagated to the parent if a child handles them.</p> <p>If a widget accepts keyboard events, they will not be received by its parent(s).</p> <p>A widget receives mouse move events only if it <em>grabs</em> the mouse (normally, after clicking on <em>that</em> widget) or if it has the <code>mouse...
Is there a function for closing app on mouse or keyboard movement in PyQT5?
python|pyqt5
-1
67
1
72,322,395
72,322,395
1
true
2022-05-19T12:34:00.403Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is there a function for closing app on mouse or keyboard movement in PyQT5?<p>I want my app to close when mouse or keyboard movement is detected, it does not...
72,324,043
Can't Create .NET 5 Console App In Visual Studio 2019<p>I need to be able to create .NET 5 Console applications in Visual Studio 2019.</p> <p>I have the .NET 5 SDK installed. The Terminal command &quot;dotnet --list-sdks&quot; proves that:</p> <pre><code>5.0.408 [C:\Program Files\dotnet\sdk] 6.0.300 [C:\Program Files\...
<p>in fact, on my VS19 there is no .NET5 either, but on VS22, there I can .NET5 and even .NET6 (see picture)</p> <p><a href="https://i.stack.imgur.com/56a1a.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/56a1a.png" alt="enter image description here" /></a></p>
Can't Create .NET 5 Console App In Visual Studio 2019
visual-studio|.net-5
1
67
2
72,324,871
72,324,871
1
true
2022-05-20T19:38:19.950Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can't Create .NET 5 Console App In Visual Studio 2019<p>I need to be able to create .NET 5 Console applications in Visual Studio 2019.</p> <p>I have the .NET...
72,317,733
Powershell - Match multiple 5-digit substrings in a string<p>We send sales invoices with a prefix of INV. Some customers pay the invoices without the prefix. I want to add the prefix in that case to have the ERP-system recognise these payments. An example of the date is below.</p> <blockquote> <p>:61:2204210421C1339,57...
<p>You might use the <code>\G</code> anchor to get <a href="https://docs.microsoft.com/en-us/dotnet/standard/base-types/anchors-in-regular-expressions#contiguous-matches-g" rel="nofollow noreferrer">contiguous matches</a> for the last 5 digits separated by either a space or dot.</p> <p>Note that you can omit <code>{1}<...
Powershell - Match multiple 5-digit substrings in a string
regex|powershell
0
67
2
72,325,798
72,325,798
1
true
2022-05-20T10:53:26.060Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Powershell - Match multiple 5-digit substrings in a string<p>We send sales invoices with a prefix of INV. Some customers pay the invoices without the prefix....
72,327,854
get wrong textbox.TextLength in winforms<p>I am making a simple email sender and what I want to do is to check if the textbox.text has 14 characters. If it's 14 - then text turns to green, if less it turns to red. I've encountered a problem when I type 14th character. It doesn't turn green. It does when I type another ...
<p>Instead of using the <code>trackBox1_Keypress</code> put your <code>if statement</code> in the <code>trackBox1_TextChanged</code> event and to count the length of the text you should use <code>trackbox.Text.Length</code> instead of <code>trackbox1.TextLength</code></p> <p>Here is a sample snippet int the <code>TextC...
get wrong textbox.TextLength in winforms
c#|winforms
1
67
3
72,328,023
72,328,023
1
true
2022-05-21T08:24:08.220Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: get wrong textbox.TextLength in winforms<p>I am making a simple email sender and what I want to do is to check if the textbox.text has 14 characters. If it's...
72,331,439
Is there a better way to write this code in Flutter?<p>I know I can apply switch-case operators but I think still looks a little bit verbose. Basically is a list of dynamic values wrapped in a Widget, and returns a BaseItemWidget to a ListView.</p> <p>Here is the list:</p> <pre><code>class MyListView extends StatelessW...
<p>You could consider having each of your <code>XItem</code> classes extend an abstract <code>BaseItem</code> class, which has a <code>widget</code> method which constructs the right widget for the item. Something like this:</p> <pre class="lang-dart prettyprint-override"><code>abstract class BaseItem { Widget widget...
Is there a better way to write this code in Flutter?
flutter|dart
0
67
2
72,331,903
72,331,903
1
true
2022-05-21T16:35:53.217Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is there a better way to write this code in Flutter?<p>I know I can apply switch-case operators but I think still looks a little bit verbose. Basically is a ...
72,333,655
Uncaught SyntaxError: JSON.parse: unexpected character ierror after include php file<p><code>Uncaught SyntaxError: JSON.parse: unexpected character at line 1 column 2 of the JSON data site:stackoverflow.com</code> error is showing in firefox debug console.</p> <p>I have a form in my website and on submit button this fu...
<p>Your problem is that <code>mail.php</code> has this code in it:</p> <pre class="lang-php prettyprint-override"><code> try { $mail-&gt;send(); echo &quot;Message has been sent successfully&quot;; return true; } catch (Exception $e) { echo &quot;Mailer Error: &quot; . $mail-&gt;E...
Uncaught SyntaxError: JSON.parse: unexpected character ierror after include php file
javascript|php|json
0
67
1
72,333,831
72,333,831
1
true
2022-05-21T22:33:15.137Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Uncaught SyntaxError: JSON.parse: unexpected character ierror after include php file<p><code>Uncaught SyntaxError: JSON.parse: unexpected character at line 1...
72,336,813
How can I get Vue Router to append the 'link-exact-active-class' at the end of the classlist?<p>I'm trying to highlight the active link inside my navigation bar by using the <code>linkExactActiveClass</code> parameter in the router construtor.<br /> My issue is that the active class is being added at the start of the c...
<p>A simple workaround is to prepend a <code>!</code> in your class using the <strong>built-in important modifier</strong> of tailwind <a href="https://tailwindcss.com/docs/configuration#important-modifier" rel="nofollow noreferrer">(docs)</a></p> <p>Try to use it in this way:</p> <pre class="lang-js prettyprint-overri...
How can I get Vue Router to append the 'link-exact-active-class' at the end of the classlist?
css|vue.js|vue-router
0
67
1
72,337,313
72,337,313
1
true
2022-05-22T10:40:14.043Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I get Vue Router to append the 'link-exact-active-class' at the end of the classlist?<p>I'm trying to highlight the active link inside my navigation ...
72,331,450
Error on Heroku when trying to post data ( error:0909006C Pem routines..._<p>I am trying to make a small nodeJS server deployed on Heroku, saving data to Firestore database. The server is deployed and running correctly. I use Insomnia to test my requests and when I use it locally I can send a post request and save my d...
<p>I solved it by copy-pasting the key with break lines directly into Heroku config variables and removing <code>.replace(/\\n/gm, &quot;\n&quot;)</code> from the code.</p> <pre><code>privateKey: process.env.PRIVATE_KEY ? process.env.PRIVATE_KEY : undefined </code></pre>
Error on Heroku when trying to post data ( error:0909006C Pem routines..._
javascript|node.js|firebase|heroku|google-cloud-firestore
1
67
1
72,338,047
72,338,047
1
true
2022-05-21T16:37:32.733Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Error on Heroku when trying to post data ( error:0909006C Pem routines..._<p>I am trying to make a small nodeJS server deployed on Heroku, saving data to Fir...
72,346,745
Why is my document.querySelector() returning a [object HTMLDivElement] instead of the value?<p>I have the value <code>60%</code> stored inside a <code>&lt;div class=&quot;value-container&quot;&gt; 60% &lt;/div&gt;</code>, however when use this query function <code>document.querySelector(.value-container)</code> to get ...
<p>The other commenters are correct - you need do something with the object you get back from your querySelector.</p> <p>But if you only care about the raw text (which it looks like in this case as you just want the 60% value), then <code>document.querySelector('.value-container').textContent</code> is slightly more ef...
Why is my document.querySelector() returning a [object HTMLDivElement] instead of the value?
javascript|html|jquery-selectors
-1
67
2
72,347,304
72,347,304
1
true
2022-05-23T10:07:29.320Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why is my document.querySelector() returning a [object HTMLDivElement] instead of the value?<p>I have the value <code>60%</code> stored inside a <code>&lt;di...
72,343,587
Filtering Array with Array Mongodb<p>I have one data example like this one in <strong>MongoDB</strong></p> <pre><code>{ id: 628a8683fc489c315b330ade, examName : 'Final Exam', schedule: { scheduleDate : '2021-10-18T17:00:00.000+00:00' scheduleName : 'Package Test' package:[ { exclude...
<p>Here's another way to do it.</p> <pre class="lang-js prettyprint-override"><code>db.collection.aggregate([ { &quot;$set&quot;: { &quot;question&quot;: { &quot;$filter&quot;: { &quot;input&quot;: &quot;$question&quot;, &quot;as&quot;: &quot;q&quot;, &quot;cond&quot;: ...
Filtering Array with Array Mongodb
mongodb|mongodb-query|aggregation-framework|aggregate|aggregate-functions
1
67
3
72,351,419
72,351,419
1
true
2022-05-23T05:26:05.320Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Filtering Array with Array Mongodb<p>I have one data example like this one in <strong>MongoDB</strong></p> <pre><code>{ id: 628a8683fc489c315b330ade, exa...
72,350,528
How to group and sort a nested array and keep the original order based on the first occurrence?<p>I have an array that is flat and already properly ordered. To display it in the UI, I need to sort it, by the <code>placeId</code>, keeping the <code>placeId</code> order, as well as the order of elements in the <code>data...
<p>Since your <code>sortedArray</code> is already properly ordered, it seems running your code without <code>.sortBy</code> in the lodash chain would already give you the expected result.</p> <p>However, if I understand the question correctly, you would like to keep the groupBy order based on <code>placeId</code> as it...
How to group and sort a nested array and keep the original order based on the first occurrence?
javascript|arrays|lodash
0
67
1
72,354,642
72,354,642
1
true
2022-05-23T14:48:00.637Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to group and sort a nested array and keep the original order based on the first occurrence?<p>I have an array that is flat and already properly ordered. ...
72,357,249
gnuplot: how to set the different fill and border colors for `with points`?<p>I would like to achieve a similar <a href="https://clauswilke.com/dataviz/color-basics.html#color-as-a-tool-to-highlight" rel="nofollow noreferrer">effect</a> in gnuplot.</p> <p><img src="https://clauswilke.com/dataviz/color_basics_files/figu...
<p>I think the closest you could come to what you describe is to draw the points in two passes.</p> <p><strong>First pass</strong>: draw using a point type that produces only the outlines (point types N = 4 6 8 10 12 ...).</p> <p><strong>Second pass</strong>: draw using the corresponding point type N+1 that produces on...
gnuplot: how to set the different fill and border colors for `with points`?
gnuplot
0
67
1
72,357,757
72,357,757
1
true
2022-05-24T04:33:09.793Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: gnuplot: how to set the different fill and border colors for `with points`?<p>I would like to achieve a similar <a href="https://clauswilke.com/dataviz/color...
72,359,391
How to check if string exists within a string?<p>Lets say I have the string <code>&quot;My name is Henricksen&quot;</code> how do check if <code>&quot;Henricksen&quot;</code> name exists in the string?</p>
<pre><code>&quot;My name is Henricksen&quot;.contains(&quot;Henricksen&quot;) </code></pre>
How to check if string exists within a string?
rust
-4
67
1
72,359,462
72,359,462
1
true
2022-05-24T08:12:52.873Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to check if string exists within a string?<p>Lets say I have the string <code>&quot;My name is Henricksen&quot;</code> how do check if <code>&quot;Henric...
72,308,008
How to moq the method of multilevel interfaces inheritance which is injected to another class<p><strong>My First Interface</strong></p> <pre><code>public interface IBaseRepository { Task&lt;T&gt; FirstOrDefault&lt;T&gt;(Expression&lt;Func&lt;T, bool&gt;&gt; predicate, Expression&lt;Func&lt;T, object&gt;&gt;[] inclu...
<pre><code>x.FirstOrDefault&lt;RequestType&gt;(It.IsAny&lt;Expression&lt;Func&lt;RequestType, bool&gt;&gt;&gt;(), ...) </code></pre> <p>is worked for me.</p>
How to moq the method of multilevel interfaces inheritance which is injected to another class
c#|asp.net-core|moq|repository-pattern|xunit
-1
67
1
72,371,477
72,371,477
1
true
2022-05-19T16:25:00.060Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to moq the method of multilevel interfaces inheritance which is injected to another class<p><strong>My First Interface</strong></p> <pre><code>public int...
72,378,188
compare and print 2 columns from 2 files in awk ou perl<p>I have 2 files with 2 million lines. I need to compare 2 columns in 2 different files and I want to print the lines of the 2 files where there are equal items. this awk code works, but it does not print lines from the 2 files:</p> <pre><code>awk 'NR == FNR {a[$3...
<p>Assuming your <code>$3</code> values are unique within each input file as shown in your sample input/output:</p> <pre><code>$ cat tst.awk NR==FNR { foos[$3] = $1 bars[$3] = $2 next } $3 in foos { print foos[$3] &quot;-&quot; $1, bars[$3] &quot;-&quot; $2, $3 } </code></pre> <p> <pre><code>$ awk -f ts...
compare and print 2 columns from 2 files in awk ou perl
awk
2
67
5
72,378,966
72,378,966
1
true
2022-05-25T13:03:11.803Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: compare and print 2 columns from 2 files in awk ou perl<p>I have 2 files with 2 million lines. I need to compare 2 columns in 2 different files and I want to...
72,380,204
Blogger feed posts showing CORS Error on different site<p>With reference to <a href="https://support.google.com/blogger/answer/97933" rel="nofollow noreferrer">this answer of Google</a>, I tried to use the json version of my feeds by using the URL: <code>https://[blog address].blogspot.com/feeds/posts/default?alt=json<...
<p>Try <a href="https://developers.google.com/gdata/docs/json?hl=en#json-in-script-output" rel="nofollow noreferrer"><code>alt=json-in-script</code></a> instead:</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-html ...
Blogger feed posts showing CORS Error on different site
javascript|jquery|json|cors|blogger
0
67
1
72,381,881
72,381,881
1
true
2022-05-25T15:13:25.880Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Blogger feed posts showing CORS Error on different site<p>With reference to <a href="https://support.google.com/blogger/answer/97933" rel="nofollow noreferre...
72,380,217
Customizing template plugin update for CKAN 2.8.2 to CKAN 2.9.5<p>A template plugin previously written for ckan 2.8.2 version does not work stable in ckan version 2.9.5. Are there any ways to update it for ckan 2.9.5? Or do I need to update the template manually ?</p>
<p>Upgrading from CKAN 2.8.x to 2.9.x is a minor version release but still contains backward-incompatible changes and a major change from Python 2 to Python 3 and Pylons to Flask.</p> <p>First, you can go over the <a href="https://docs.ckan.org/en/2.9/changelog.html#v-2-9-5-2022-01-19" rel="nofollow noreferrer">Changel...
Customizing template plugin update for CKAN 2.8.2 to CKAN 2.9.5
ckan
1
67
1
72,384,901
72,384,901
1
true
2022-05-25T15:14:08.780Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Customizing template plugin update for CKAN 2.8.2 to CKAN 2.9.5<p>A template plugin previously written for ckan 2.8.2 version does not work stable in ckan ve...
72,369,152
What is the best way to let a child class communicate with the parent class<p>my question is, what is the best way to let a child class communicate with the parent class. For example: I have a main class simply called Main, and another class SomeClass. Now the Main class creates an instance of SomeClass, once the state...
<p>As a good practice it is better to avoid write code in GUI class. So we can use <a href="https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93viewmodel" rel="nofollow noreferrer">MVVM pattern</a> here.</p> <p>Let me show a simple example for your case. This is a <code>ViewModel</code> class. View model does not ...
What is the best way to let a child class communicate with the parent class
oop|design-patterns|communication|observer-pattern
1
67
2
72,387,975
72,387,975
1
true
2022-05-24T20:33:26.107Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What is the best way to let a child class communicate with the parent class<p>my question is, what is the best way to let a child class communicate with the ...
72,361,154
multiple database backends per session along with db.execute when using sqlaclhemy<p>I have this database connection in a fast API app. I am using multiple binds to the same session, I followed the documentation <a href="https://docs.sqlalchemy.org/en/14/orm/persistence_techniques.html#simple-vertical-partitioning" rel...
<p>Remove the below mentioned line as we would be configuring the engine while creating the respective session instances.</p> <pre><code>SessionLocal.configure(binds={Base: engine, mroi_Base: engine2}) </code></pre> <p>Initialize the session class with respective engine values.</p> <pre><code>def get_db(): db = Non...
multiple database backends per session along with db.execute when using sqlaclhemy
python|sqlalchemy
1
67
1
72,387,992
72,387,992
1
true
2022-05-24T10:17:20.983Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: multiple database backends per session along with db.execute when using sqlaclhemy<p>I have this database connection in a fast API app. I am using multiple b...
72,386,609
Is letrec only meant for defining procedures?<p>Is Scheme's <code>letrec</code> only meant for defining procedures, especially recursive ones? I am asking because it appears to be possible to bind non-procedures using <code>letrec</code>. For example, <code>(letrec ((x 1) (y 2)) (+ x y))</code>. If Scheme's <code>letre...
<p>It is <em>mostly</em> useful for binding procedures, yes: the variables bound by <code>letrec</code> can't refer to their own bindings until afterwards, so something like</p> <pre><code>(letrec ((x (list x))) x) </code></pre> <p>Does not work: see <a href="https://stackoverflow.com/a/72388910/17026934">my other an...
Is letrec only meant for defining procedures?
scheme|letrec
0
67
2
72,389,086
72,389,086
1
true
2022-05-26T04:13:58.087Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is letrec only meant for defining procedures?<p>Is Scheme's <code>letrec</code> only meant for defining procedures, especially recursive ones? I am asking be...
72,261,230
Importing OrbitControl.js gives uncaught type error<p>I'm writing some Javascript that loads a glb 3d model into a webpage. Everything is working.</p> <p>But as soon as I import the <code>OrbitControl.js</code> (either from my local folder or online) the browser gives me this error:</p> <blockquote> <p>Uncaught TypeErr...
<p>I am not sure if u have notice the code in OrbitControls.js . Cuz it shows</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-html lang-html prettyprint-override"><code>import { EventDispatcher, MOUSE, Q...
Importing OrbitControl.js gives uncaught type error
javascript|three.js
0
67
2
72,793,151
72,793,151
1
true
2022-05-16T14:54:43.050Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Importing OrbitControl.js gives uncaught type error<p>I'm writing some Javascript that loads a glb 3d model into a webpage. Everything is working.</p> <p>But...
72,794,508
MYSQL Error Code: 1005. Can't create table `db_xcruz`.`users` (errno: 150 "Foreign key constraint is incorrectly formed")<p>I'm having the #1005 error code in MySQL workbench and errno 150:</p> <p>MYSQL Error Code: 1005. Can't create table <code>db_xcruz</code>.<code>users</code> (errno: 150 &quot;Foreign key constrain...
<p>create your <code>foreign</code> tables first before creating the <code>user</code> table.</p> <pre><code>###Database creation### CREATE DATABASE IF NOT EXISTS `DB_XCRUZ`; USE `DB_XCRUZ`; ###Tables creation### /*User categories - Table*/ DROP TABLE IF EXISTS `USER_CATEGORIES`; CREATE TABLE `USER_CATEGORIES`( `...
MYSQL Error Code: 1005. Can't create table `db_xcruz`.`users` (errno: 150 "Foreign key constraint is incorrectly formed")
mysql|sql|foreign-keys
0
67
1
72,794,720
72,794,720
1
true
2022-06-29T00:26:43.023Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: MYSQL Error Code: 1005. Can't create table `db_xcruz`.`users` (errno: 150 "Foreign key constraint is incorrectly formed")<p>I'm having the #1005 error code i...
72,798,212
Inject Instance of Service in WebMvcTest<p>I have a test for MyController.java</p> <pre><code>@WebMvcTest(controllers = MyController.class) class MyControllerTest { @Autowired private MockMvc mockMvc; @MockBean private SomeService service; //dependency of MyService @SpyBean private MyService myService; /...
<p>Based on your question description it looks like your coverage scan is ignoring <code>test/java/controller</code> package.</p> <p>If it is so, can you please check if that is the case.</p> <p>For calling <code>Service</code>, you can either use it with <code>@Autowired</code> or even create instance of your service ...
Inject Instance of Service in WebMvcTest
java|spring|spring-mvc|spring-test
1
67
2
72,798,472
72,798,472
1
true
2022-06-29T08:31:24.770Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Inject Instance of Service in WebMvcTest<p>I have a test for MyController.java</p> <pre><code>@WebMvcTest(controllers = MyController.class) class MyControlle...
72,798,878
CS50 Problem Set 6, IndexError: list index out of range<p>I don't know what is wrong here but I get an error message when trying to use a large database, an error keeps popping up. For example:</p> <pre><code>dna/ $ python dna.py databases/large.csv sequences/10.txt Traceback (most recent call last): File &quot;/work...
<p>When you multiply a list, what happens is, the whole list gets multiplied not the elements. See this example.</p> <pre><code>a = [[0]*2]*5 print(a) &gt; [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0]] print(a[4][1]) &gt; 0 </code></pre> <p>As you are using <code>check = [[0]*len(database)]*len(STRs)</code> where the index ...
CS50 Problem Set 6, IndexError: list index out of range
python|cs50
0
67
2
72,799,190
72,799,190
1
true
2022-06-29T09:18:29.867Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: CS50 Problem Set 6, IndexError: list index out of range<p>I don't know what is wrong here but I get an error message when trying to use a large database, an ...
72,802,598
How to add items to MutableLiveData arraylist?<p>I have a <code>MainViewModel</code>with the code:</p> <pre><code>private val locationList: MutableLiveData&lt;ArrayList&lt;Location&gt;&gt; = MutableLiveData() fun getLocationList(): MutableLiveData&lt;ArrayList&lt;Location&gt;&gt; = locationList </code></pre> <p>and a f...
<pre class="lang-kotlin prettyprint-override"><code>mainViewModel.getLocationList.value?.add(newLocation) mainViewModel.getLocationList.value = mainViewModel.getLocationList.value // notify observers </code></pre>
How to add items to MutableLiveData arraylist?
kotlin|arraylist|mutablelivedata
0
67
1
72,802,707
72,802,707
1
true
2022-06-29T13:52:22.763Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to add items to MutableLiveData arraylist?<p>I have a <code>MainViewModel</code>with the code:</p> <pre><code>private val locationList: MutableLiveData&l...
72,802,740
How do array filter function work in javascript?<p>Here is piece of code I am trying to fully understand:</p> <pre><code>const words = ['chair', 'music', 'pillow', 'brick', 'pen', 'door']; const shortWords = words.filter(word =&gt; { return word.length &lt; 6; }); </code></pre> <p>My current assumption is that sho...
<p>Yes, you are correct except the fact that <code>shortWords</code> is a variable that stores an array returned by .filter function.</p> <p>The types of <code>words</code> is an array.</p> <p><code>const words = ['chair', 'music', 'pillow', 'brick', 'pen', 'door']; </code></p> <p><a href="https://developer.mozilla.org...
How do array filter function work in javascript?
javascript|function
-1
67
2
72,802,985
72,802,985
1
true
2022-06-29T14:03:01.250Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do array filter function work in javascript?<p>Here is piece of code I am trying to fully understand:</p> <pre><code>const words = ['chair', 'music', 'pi...
72,821,368
Count the number sequence same for same item but restart to 1 when enter new month<p>I want to get sequential number as in column AB as image attached below:</p> <p><a href="https://i.stack.imgur.com/U7Skg.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/U7Skg.jpg" alt="Expected outcome in column AB" ...
<pre><code>=query({unique(filter(Y$2:Y,Z$2:Z=Z2)),sequence(rows(unique(filter(Y$2:Y,Z$2:Z=Z2))))},&quot;select Col2 where Col1 = '&quot;&amp;Y2&amp;&quot;'&quot;) </code></pre> <p><a href="https://i.stack.imgur.com/G8Nfd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/G8Nfd.png" alt="enter image desc...
Count the number sequence same for same item but restart to 1 when enter new month
excel|google-sheets|excel-formula|google-sheets-formula|spreadsheet
0
67
3
72,822,457
72,822,457
1
true
2022-06-30T19:58:01.900Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Count the number sequence same for same item but restart to 1 when enter new month<p>I want to get sequential number as in column AB as image attached below:...
72,824,644
How to make html input tag accept xlsm?<p>Im trying to accept .xlsm file using the input tag.. but i able to accept xlsx only Here is my html</p> <pre><code> &lt;input type=&quot;file&quot; accept=&quot;image/png, image/jpeg, application/pdf, application/msword, application/vnd.openxmlformats-officedocument.word...
<p>Can you check if this works for you!</p> <pre><code>&lt;input type=&quot;file&quot; accept=&quot;.xl*&quot;&gt; ng-maxlength=&quot;100&quot; required /&gt; </code></pre>
How to make html input tag accept xlsm?
html
2
67
2
72,824,790
72,824,790
1
true
2022-07-01T05:12:58.900Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to make html input tag accept xlsm?<p>Im trying to accept .xlsm file using the input tag.. but i able to accept xlsx only Here is my html</p> <pre><code>...
72,835,956
Which is the fastest way of querying strings in python<p>Assume you have to query the prices of like 100 items (in the example I will query just 2) that are unique, which would be the fastest (measured in seconds per query) way of querying the name of these items using a python data structure?</p> <p>Here is the exampl...
<p>I doubt you'll get much better than using a mask:</p> <pre><code>import pandas as pd df = pd.DataFrame({&quot;price&quot;:[11,33,5,29,999]*100000},index=[&quot;car&quot;,&quot;boat&quot;,&quot;axe&quot;,&quot;fork&quot;,&quot;plane&quot;]*100000) items = [&quot;car&quot;,&quot;boat&quot;,&quot;plane&quot;] def v1(d...
Which is the fastest way of querying strings in python
python|pandas|memory-efficient
-3
67
1
72,836,253
72,836,253
1
true
2022-07-02T01:58:44.170Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Which is the fastest way of querying strings in python<p>Assume you have to query the prices of like 100 items (in the example I will query just 2) that are ...
72,830,934
React.js Animation of 3 components ends at the same time<p>I have 3 components with different numbers. What I want is something like this:</p> <ol> <li>All 3 numbers should increase for 2 seconds.</li> <li>I want this animation effect to end at the same time.</li> <li>I don't want to use another library.</li> </ol> <p>...
<p>If the component's only purpose is to display this number then you could avoid state altogether and use a ref and update the span's innerText directly</p> <p><a href="https://jsfiddle.net/KyleBelle/q5bLrfpm/2/" rel="nofollow noreferrer">JsFiddle</a></p> <pre class="lang-js prettyprint-override"><code>const {useState...
React.js Animation of 3 components ends at the same time
javascript|reactjs
1
67
2
72,837,355
72,837,355
1
true
2022-07-01T14:41:57.047Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: React.js Animation of 3 components ends at the same time<p>I have 3 components with different numbers. What I want is something like this:</p> <ol> <li>All 3...
72,841,544
RegExp matching @ mention tags with optional space<p>I'm working with some code that uses the regex <code>/(@\w+) ?/g</code> for matching tagged mentions</p> <p>This will match the following text returning the groups correctly without the additional <code>space</code></p> <blockquote> <p>testing <code>@one</code> and <...
<p>If there is a space the regex will match it, but it won't affect the matching groups because the space isn't in any group. Only the whole match will have the space.</p> <pre class="lang-js prettyprint-override"><code>console.log(...'testing @one and @two and @three'.matchAll(/(@\w+) ?/g)); // [ &quot;@one &quot;, &q...
RegExp matching @ mention tags with optional space
javascript|regex
-2
67
1
72,842,090
72,842,090
1
true
2022-07-02T18:33:42.553Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: RegExp matching @ mention tags with optional space<p>I'm working with some code that uses the regex <code>/(@\w+) ?/g</code> for matching tagged mentions</p>...
72,844,672
How would I use PIL to "extend" an image, and then draw a black rectangle with text on it?<p>Basically, what I want to do with Pillow is:</p> <p>I want to get an image, and then extend the size of the image from the bottom so I'm able to fit a black rectangle with a four digit code on it. How would I do this? I tried t...
<p>I would suggest <a href="https://pillow.readthedocs.io/en/stable/reference/ImageOps.html" rel="nofollow noreferrer">ImageOps.expand</a> to expand your canvas:</p> <pre><code>#!/usr/bin/env python3 from PIL import Image, ImageDraw, ImageFont, ImageOps # Load image im = Image.open('o9eYr.jpg') # Define font size, a...
How would I use PIL to "extend" an image, and then draw a black rectangle with text on it?
python|image|python-imaging-library
1
67
2
72,845,238
72,845,238
1
true
2022-07-03T07:31:46.430Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How would I use PIL to "extend" an image, and then draw a black rectangle with text on it?<p>Basically, what I want to do with Pillow is:</p> <p>I want to ge...
72,835,764
Ejs form, send array of data that can be converted into postgresql update queries<p>My app includes a scoresheet grid where each cell represents a student's score in one topic. The teacher can enter scores in each cell before clicking a submit button that sends them all at once.</p> <p>Here is the ejs form that I have...
<blockquote> <p>This is my best solution so far to include a <code>student_id</code> and <code>topic_id</code> along with the teacher's score input.</p> </blockquote> <p>Yes, it's fine. You just have to parse the <code>scores_${student_id}_${topic_id}</code> format on the server back into the data structure you expect....
Ejs form, send array of data that can be converted into postgresql update queries
node.js|postgresql|express|ejs|node-postgres
0
67
1
72,845,327
72,845,327
1
true
2022-07-02T00:59:02.783Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Ejs form, send array of data that can be converted into postgresql update queries<p>My app includes a scoresheet grid where each cell represents a student's ...
72,845,162
Converting to "int" failed for parameter "num"<p>I have this code that should just send a picture with some numbers but it doesn't work</p> <pre><code>class crafting(commands.Cog): &quot;info about user&quot; def __init__(self, bot:commands.bot): self.bot = bot @commands.command() async def crafting(ctx, n...
<p>As @Łukasz Kwieciński mentioned, the 'crafting' method needs to take 'self' as first argument, as it's a member of a class.</p> <p>Cheers</p>
Converting to "int" failed for parameter "num"
python|discord.py|python-imaging-library
-3
67
1
72,846,148
72,846,148
1
true
2022-07-03T08:55:29.097Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Converting to "int" failed for parameter "num"<p>I have this code that should just send a picture with some numbers but it doesn't work</p> <pre><code>class ...
72,846,633
Jenkins Pipeline Error ProxyException in variable declaration<pre><code> stage (&quot;install_new_image&quot;) { when { expression {IMAGE_FILE_PATH_VAR} } steps { script { def IMAGE_FILE_VAR = IMAGE_FILE_PATH_VAR.split('/').last() def INSTALL_I...
<p>You can either declare variables globally, before the pipeline, and then initialize them at any point in the pipeline, these will be accessible from anywhere in the pipeline, or you can declare/initialize variables within a <code>script</code> block, these variables are accessible only within the scope of the <code>...
Jenkins Pipeline Error ProxyException in variable declaration
jenkins|groovy|jenkins-pipeline
0
67
1
72,846,719
72,846,719
1
true
2022-07-03T12:46:17.560Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Jenkins Pipeline Error ProxyException in variable declaration<pre><code> stage (&quot;install_new_image&quot;) { when { expression {IMAGE_FILE_PAT...
72,856,485
Remove default `application/json` header from fastapi response<p>I have taken this (<a href="https://fastapi.tiangolo.com/advanced/response-directly/#returning-a-custom-response" rel="nofollow noreferrer">https://fastapi.tiangolo.com/advanced/response-directly/#returning-a-custom-response</a>) example from fastapi docu...
<p>You should put in a <code>response_class=</code> parameter in your endpoint. Below is a fully working example:</p> <pre class="lang-py prettyprint-override"><code>from fastapi import FastAPI, Response app = FastAPI() response_examples = { 200: { &quot;description&quot;: &quot;Success&quot;, &qu...
Remove default `application/json` header from fastapi response
python|openapi|fastapi
0
67
1
72,861,778
72,861,778
1
true
2022-07-04T12:07:28.217Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Remove default `application/json` header from fastapi response<p>I have taken this (<a href="https://fastapi.tiangolo.com/advanced/response-directly/#returni...
72,845,706
Move Datatables Filter and Other Options to other Positions<p>I want to position the filter bar and other elements from my <a href="https://datatables.net/" rel="nofollow noreferrer">datatables</a> table to a complete other part of my page. In particular, I'd like to move the search filter bar to the section titled 'fi...
<p>I figured out a solution.</p> <p>You can add an input into the HTML, then call that input and use the following,</p> <pre><code>$('#searchInput').keyup(function () { oTable.search($(this).val()).draw(); }); </code></pre> <p>Full solution:</p> <p><strong>HTML</strong></p> <pre><code>&lt;script src...
Move Datatables Filter and Other Options to other Positions
javascript|html|jquery|css|datatables
1
67
1
72,863,492
72,863,492
1
true
2022-07-03T10:26:09.257Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Move Datatables Filter and Other Options to other Positions<p>I want to position the filter bar and other elements from my <a href="https://datatables.net/" ...
72,864,289
Navigate to external link in react js<p>trying to navigate the users to differrent websites upon registration</p> <pre><code>handleSubmit = () =&gt; { code if(registered){ Navigate to external link } } </code></pre> <p>Im trying to use <code>&lt;Link to={{ pathname: 'res.data.storeRegistrationLink' }}/&gt;</code> b...
<p>Try this and let me know if you face any issues. Here you can use window.location.replace too while i write window.location because it allows the user to go back to the route that redirected them.</p> <pre><code> handleSubmit = () =&gt; { if(registered){ window.location.href = 'https://google.com'; }} </code></p...
Navigate to external link in react js
reactjs
2
67
5
72,865,631
72,865,631
1
true
2022-07-05T05:13:44.920Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Navigate to external link in react js<p>trying to navigate the users to differrent websites upon registration</p> <pre><code>handleSubmit = () =&gt; { code i...
72,870,725
Typescript - How to get keys behind specific values from an object<p>I have a super simple use-case. I want have a function <code>pluckOnlyStringValues</code> on which I pass an object <code>obj</code> and a <code>key</code> and I want to ensure that I can pass only such keys whose values are <code>string</code>. In su...
<p>If you change the constraint of <code>O</code> to <code>Record&lt;string, any&gt;</code>, TypeScript will know that <code>O</code> is indexable with a <code>string</code>.</p> <pre><code>const pluckOnlyStringValues = &lt;O extends Record&lt;string, any&gt;&gt;( obj: O, key: PickKeysByValue&lt;O, string&gt;, ): s...
Typescript - How to get keys behind specific values from an object
typescript|typescript-generics|typescript-utility
2
67
2
72,872,132
72,872,132
1
true
2022-07-05T13:59:35.117Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Typescript - How to get keys behind specific values from an object<p>I have a super simple use-case. I want have a function <code>pluckOnlyStringValues</code...
72,873,508
How to error out cleanly in CMake if CMAKE_CXX_STANDARD cannot be met?<p>CMake provides <code>CMAKE_CXX_STANDARD</code> for specifying the required C++ Standard.</p> <p><code>set (CMAKE_CXX_STANDARD 17)</code></p> <p>However, if your compiler is old... say gcc4... it will still attempt to compile the sources, and it wi...
<p>From <a href="https://cmake.org/cmake/help/latest/variable/CMAKE_CXX_STANDARD.html" rel="nofollow noreferrer">https://cmake.org/cmake/help/latest/variable/CMAKE_CXX_STANDARD.html</a> :</p> <blockquote> <p>See the cmake-compile-features(7) manual for information on compile features and a list of supported compilers.<...
How to error out cleanly in CMake if CMAKE_CXX_STANDARD cannot be met?
cmake
0
67
2
72,873,584
72,873,584
1
true
2022-07-05T17:38:28.633Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to error out cleanly in CMake if CMAKE_CXX_STANDARD cannot be met?<p>CMake provides <code>CMAKE_CXX_STANDARD</code> for specifying the required C++ Stand...
72,875,707
calculate percentages using tidyverse<p>I'm looking to divide the counts of each group from Type and Stream_Order by the total counts of all groups. I have the dataframe below. For example, for the Sediment Sample with Stream Order &quot;1&quot; in group &quot;stoich&quot;, I'd like to divide the &quot;n&quot; value ...
<p>We can subset 'n' using a logical expression on the 'Group' column (<code>Group == 'all'</code>)</p> <pre><code>library(dplyr) perc &lt;- perc %&gt;% group_by(Type, Stream_Order) %&gt;% mutate(percentage = n/n[Group == 'all']*100) %&gt;% ungroup </code></pre> <p>-output</p> <pre><code>perc # A tibble: 16 × 8 ...
calculate percentages using tidyverse
r|tidyverse
1
67
1
72,875,727
72,875,727
1
true
2022-07-05T21:25:20.850Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: calculate percentages using tidyverse<p>I'm looking to divide the counts of each group from Type and Stream_Order by the total counts of all groups. I have ...
72,876,657
How to specify a type for iterator in rust?<p>When I try running following code</p> <pre class="lang-rust prettyprint-override"><code>fn main(){ let a= vec![1,2,3,4,5]; let values = a.iter().map(|_| None); println!(&quot;{:?}&quot;,values.len()); } </code></pre> <p>I get following error</p> <blockquote> <p>...
<p>In this case, you have a call to <code>map</code> that always emits <code>None</code>. The compiler can usually intuit the type for <code>Some(T)</code>, but not for <code>None</code>, since it's the same regardless of the type of the option.</p> <p>In this case, the easiest way to go about it is to use the turbofi...
How to specify a type for iterator in rust?
rust
0
67
2
72,876,810
72,876,810
1
true
2022-07-06T00:03:37.710Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to specify a type for iterator in rust?<p>When I try running following code</p> <pre class="lang-rust prettyprint-override"><code>fn main(){ let a= v...
72,878,780
How to get the size of the file stored in firebase storage and its link in realtime database?<p>here is my code to get the file size but I am unable to get it.:-</p> <p>ImageURL is stored in realtime database</p> <pre><code> Picasso.get().load(ImageURL).placeholder(R.drawable.ic_baseline_image_200) .into(se...
<p>Use this code. You will get the desired results.</p> <pre><code> val storageReference = FirebaseStorage.getInstance().getReferenceFromUrl(ImageURL) storageReference.getBytes(Long.MAX_VALUE).addOnSuccessListener {it-&gt; ImageSize = it.size.toLong() ImageSize /= 1024 } </code>...
How to get the size of the file stored in firebase storage and its link in realtime database?
android|kotlin|firebase-realtime-database|firebase-storage
1
67
1
72,882,700
72,882,700
1
true
2022-07-06T06:25:35.907Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to get the size of the file stored in firebase storage and its link in realtime database?<p>here is my code to get the file size but I am unable to get i...
72,887,303
Calling function defined within a react function component on a click event form another function component - React.js<p>I am constructing some node objects in a function(prepareNodes) to pass to React Flow within a functional component A (lets say), and I have defined a custom node component(CardNode) stateless, which...
<p>You can add an onClick handler to the each node, and within the node view you call this handler on click.</p> <p>In the parent Component within the onClick handler you can call prepareNode as needed.</p> <pre><code>useEffect(() =&gt; { setElements( elements.map(item =&gt; { ...item, onClick: (i) =&gt; { ...
Calling function defined within a react function component on a click event form another function component - React.js
javascript|reactjs|asynchronous|react-hooks|react-flow
0
67
2
72,890,034
72,890,034
1
true
2022-07-06T16:55:14.820Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Calling function defined within a react function component on a click event form another function component - React.js<p>I am constructing some node objects ...
72,890,980
Dataweave Filter and groupBy<p>I tried to implement API in mule</p> <p>From below CSV data I am looking to implement</p> <pre><code>Region,Country,ItemType,SalesChannel,OrderPriority,OrderDate,OrderID,ShipDate,UnitsSold,UnitPrice,UnitCost,TotalRevenue,TotalCost,TotalProfit Central America and the Caribbean,Antigua and ...
<p>There are two problems:</p> <ol> <li><p>groupBy() is being applied only to the object, not to the results of the mapping. Put parenthesis around the parameter of map().</p> </li> <li><p>The output of map() doesn't contains a Country key but a country key.</p> </li> </ol> <pre><code>%dw 2.0 output application/json --...
Dataweave Filter and groupBy
dataweave|mulesoft|mule4
0
67
1
72,891,173
72,891,173
1
true
2022-07-06T23:57:07.833Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Dataweave Filter and groupBy<p>I tried to implement API in mule</p> <p>From below CSV data I am looking to implement</p> <pre><code>Region,Country,ItemType,S...
72,918,103
How do I change my Azure function deployment publish configuration from release to debug?<p>I have created an Azure function app and a function called &quot;Stripe&quot; for listening for Stripe webhooks. I've installed all Azure extensions in VS Code and in the workspace dropdown I can click on deploy and it deploys a...
<p><strong>As of now, Visual Studio Code doesn't support Azure Functions remote debugging</strong>.</p> <p>Remote debugging is possible from the specific versions of Visual Studio - Azure Functions: <img src="https://i.imgur.com/f1RDCDj.png" alt="VSRemotedebugging" /></p> <p>There is a <a href="https://code.visualstudi...
How do I change my Azure function deployment publish configuration from release to debug?
azure|visual-studio-code|azure-functions|azure-functions-core-tools
0
67
1
72,918,365
72,918,365
1
true
2022-07-09T00:26:10.560Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I change my Azure function deployment publish configuration from release to debug?<p>I have created an Azure function app and a function called &quot;...
72,922,993
Display:inline-block before transition with pure Javascript<p>I am trying to animate a hidden menu box to appear and slide down when the mouse is over the button. It works properly, but when adding the transition <code>display:inline-block</code> -&gt; <code>display:none</code> -&gt; <code>display:inline-block</code> t...
<p>No need for any JavaScript in this case. You can solve this by using CSS, and more specifically, the <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/:hover" rel="nofollow noreferrer"><code>:hover</code></a> pseudo-class and the <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Adjacent_sibling_comb...
Display:inline-block before transition with pure Javascript
javascript|css|css-transitions|transform
-1
67
2
72,923,233
72,923,233
1
true
2022-07-09T16:22:27.550Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Display:inline-block before transition with pure Javascript<p>I am trying to animate a hidden menu box to appear and slide down when the mouse is over the bu...
72,935,307
How to display dialog on any screen (fragment or activity) in android<p>User is in Fragment/Activity &quot;A&quot; <br> In the onCreate() of screen &quot;A&quot; i fire some network call on a background thread. User navigates to some other Fragment/Activity, now when i get the response from the network i need to show t...
<p>Create a <a href="https://stackoverflow.com/a/2700683/8738231">transparent activity</a> and in its onCreate method show your dialog. Set an OnDismissListener for the dialog and in this callback finish the activity. Every where you need showing your dialog you can start this transparent activity</p>
How to display dialog on any screen (fragment or activity) in android
java|android|kotlin|android-dialog
0
67
3
72,935,850
72,935,850
1
true
2022-07-11T07:52:51.263Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to display dialog on any screen (fragment or activity) in android<p>User is in Fragment/Activity &quot;A&quot; <br> In the onCreate() of screen &quot;A&q...
72,938,139
How can I split a string with no delimeter?<p>I need to import CSV file which contains all values in one column although it should be on 3 different columns.</p> <p>The value I want to split is looking like this &quot;2020-12-30 13:17:00Mojito5.5&quot;. I want to look like this: &quot;2020-12-30 13:17:00 Mojito 5.5&quo...
<p>Assuming you always want to add spaces around a word without special characters and numbers you can use this regex:</p> <pre><code>def add_spaces(m): return f' {m.group(0)} ' import re s = &quot;2020-12-30 13:17:00Mojito5.5&quot; re.sub('[a-zA-Z]+', add_spaces, s) </code></pre>
How can I split a string with no delimeter?
python|python-3.x|regex|split
0
67
2
72,938,302
72,938,302
1
true
2022-07-11T11:50:53.400Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I split a string with no delimeter?<p>I need to import CSV file which contains all values in one column although it should be on 3 different columns....
72,952,586
AWS lambda policy to invoke another lambda<p>I need to invoke the lambda <code>function2</code> from lambda <code>function1</code> using aws sdk.</p> <p>So far I have the following policy on <code>function1</code></p> <pre><code> { &quot;Sid&quot;: &quot;AllowToInvokeLambda&quot;, &quot;E...
<p>I think you need to double-check again your <strong>Lambda Permissions</strong> with <em>Execution Role</em> as below.</p> <p><a href="https://i.stack.imgur.com/q0YC0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/q0YC0.png" alt="lambda-execution-role" /></a></p> <p>Ensure that it has the permiss...
AWS lambda policy to invoke another lambda
amazon-web-services|aws-lambda|policy
0
67
1
72,952,847
72,952,847
1
true
2022-07-12T12:47:21.253Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: AWS lambda policy to invoke another lambda<p>I need to invoke the lambda <code>function2</code> from lambda <code>function1</code> using aws sdk.</p> <p>So f...
72,957,592
Exception: STATUS_ACCESS_VIOLATION when trying to read value of pointer from another program<p>I am practicing the use of ReadProcessMemory and one task I have is to read the value of a pointer, and then read the value of the address stored in that pointer.</p> <p>I can get up to the part of reading the value of the po...
<p>You can't just retrieve a pointer with <code>ReadProcessMemory()</code> and then dereference it normally, like you would with pointers in your own process. You have to use <code>ReadProcessMemory()</code> for each value you want to read from the remote process.</p> <p><code>0x00F3F990</code> is the <em>address</em>...
Exception: STATUS_ACCESS_VIOLATION when trying to read value of pointer from another program
c++|pointers|winapi
-2
67
2
72,958,310
72,958,310
1
true
2022-07-12T19:42:44.997Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Exception: STATUS_ACCESS_VIOLATION when trying to read value of pointer from another program<p>I am practicing the use of ReadProcessMemory and one task I ha...
72,959,647
Restrict access to resources in AWS based on name<p>I am trying to restrict the user to have access to only the resources starting with a particular string. For example, I would like to restrict the user with all permissions to only RDS instances starting with <code>&quot;new-database-change&quot;</code>. Basically, in...
<p>I don't think you can do this.</p> <p>In reviewing <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonrds.html" rel="nofollow noreferrer">Actions, resources, and condition keys for Amazon RDS - Service Authorization Reference</a>:</p> <ul> <li><code>AddTagsToResource</code> does n...
Restrict access to resources in AWS based on name
amazon-web-services|aws-lambda|amazon-rds
0
67
2
72,959,765
72,959,765
1
true
2022-07-13T00:25:18.473Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Restrict access to resources in AWS based on name<p>I am trying to restrict the user to have access to only the resources starting with a particular string. ...
72,962,908
How to run migrations for a specific tenant/schema in Django multi-tenant framework?<p>The tenant_command was not working properly according to my requirements. So, I found out this solution after tweaking the command below</p> <pre><code>python3 manage.py tenant_command migrate --schema=schema_name </code></pre>
<p>To run a migration for a specific tenant we just need to specify schema_name for the tenant after the command migrate like --schema=schemaname</p> <pre><code>python3 manage.py migrate --schema=schema_name </code></pre>
How to run migrations for a specific tenant/schema in Django multi-tenant framework?
python-3.x|django|multi-tenant|django-migrations|django-tenants
1
67
1
72,962,909
72,962,909
1
true
2022-07-13T08:09:48.267Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to run migrations for a specific tenant/schema in Django multi-tenant framework?<p>The tenant_command was not working properly according to my requiremen...
72,965,587
start() method of QuarkusTestResourceLifecycleManager is not updating the system properties<p>In a setup as described in the <a href="https://quarkus.io/guides/getting-started-testing#altering-the-test-class" rel="nofollow noreferrer">docs</a>:</p> <pre class="lang-java prettyprint-override"><code>public class MyWireMo...
<p>The system properties mentioned in the javadoc is confusing. The returned map will as expected override the configurations.</p> <p>It was not working for me to access it with the <code>@ConfigProperty</code> annotation because I was reading the value in the constructor and not in the method annotated with <code>@Pos...
start() method of QuarkusTestResourceLifecycleManager is not updating the system properties
java|testing|quarkus
0
67
1
72,966,474
72,966,474
1
true
2022-07-13T11:35:55.790Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: start() method of QuarkusTestResourceLifecycleManager is not updating the system properties<p>In a setup as described in the <a href="https://quarkus.io/guid...
72,971,871
Compare 3 columns in same table for a group of rows<p>I have to compare values in 3 columns of the same table for every group based on id. It's better to illustrate what I am trying to achieve :</p> <pre><code>create table test1 (id nvarchar(8), Name1 nvarchar(10), current_sem nvarchar(10), next_sem nvarchar(10), prev...
<p>Thank you for this reminder of how grateful I am to be working with PostgreSQL instead of SQL Server nowadays. This was downright painful mostly because of your data model but also because of SQL Server's limitations.</p> <p>I normalized your data, and that simplified calculating the necessary changes.</p> <pre><co...
Compare 3 columns in same table for a group of rows
sql|sql-server
0
67
1
72,972,925
72,972,925
1
true
2022-07-13T19:50:08.727Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Compare 3 columns in same table for a group of rows<p>I have to compare values in 3 columns of the same table for every group based on id. It's better to il...
72,972,914
Resizing BayerRG8 image using PySpin(FLIR) changes it to grayscale<p>I am using a FLIR Blackfly S BFS-PGE-31S4C to collect video and writing the video with python, using the PySpin package. I wanted to add a real time video preview so I could see what was being recorded and wanted to downsize the image so I could easil...
<p>It is very tricky to resize a Bayer image. Remember that the color components are interleaved:</p> <pre><code>R G R G R G ... G B G B G B ... R G R G R G ... </code></pre> <p>Your simple decimation is not going to honor the pixel values. If you decimate by 2, you will end up just with the R plane. You should use ...
Resizing BayerRG8 image using PySpin(FLIR) changes it to grayscale
python|numpy|flir|pyspin|spinnaker-cam
1
67
1
72,972,991
72,972,991
1
true
2022-07-13T21:38:51.717Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Resizing BayerRG8 image using PySpin(FLIR) changes it to grayscale<p>I am using a FLIR Blackfly S BFS-PGE-31S4C to collect video and writing the video with p...
72,968,492
Is there quick a way to find what tables are between two or more "unrelated" tables in SQL Server Management Studio?<p>I have a large database with 100+ tables and I need to run reports between varying tables that have no direct relationship with each other, but have relationships with other tables leading to each othe...
<p>You should be able to use a recursive CTE for this.</p> <p>e.g. As below</p> <pre><code>WITH R AS ( --Start with root objects that don't reference any others SELECT referenced_object_id, referenced_path = CAST(QUOTENAME(OBJECT_SCHEMA_NAME(referenced_object_id)) + '.' + QUOTENAME(O...
Is there quick a way to find what tables are between two or more "unrelated" tables in SQL Server Management Studio?
sql|sql-server
0
67
1
72,973,059
72,973,059
1
true
2022-07-13T15:03:52.150Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is there quick a way to find what tables are between two or more "unrelated" tables in SQL Server Management Studio?<p>I have a large database with 100+ tabl...
72,975,108
Re-Charts Not Rendering Data using ReactJS<p>I have created the following component in <code>ReactJS</code>.</p> <pre><code>import { BarChart, Bar, XAxis, YAxis, CartesianGrid, Tooltip, Legend, ResponsiveContainer } from 'recharts'; import React, { useEffect, useState } from &quot;react&quot;; import axios from &quot;a...
<p>You should use <code>async - await</code> for your http requests. Data is not getting set properly.</p> <pre><code>useEffect(() =&gt; { fetchData = async () =&gt; { await axios.get(&quot;http://127.0.0.1:8000/fail-count&quot;) .then((resp) =&gt; { setData(resp.data.message); } } fetchData...
Re-Charts Not Rendering Data using ReactJS
reactjs|recharts
0
67
2
72,976,313
72,976,313
1
true
2022-07-14T04:11:07.667Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Re-Charts Not Rendering Data using ReactJS<p>I have created the following component in <code>ReactJS</code>.</p> <pre><code>import { BarChart, Bar, XAxis, YA...
72,977,803
Expression Tree calling an Expression with third parameter<p>been dealing with Expression Trees the last couple days and found a problem while trying to call nested Expressions with a second parameter. I'm using the following <a href="https://github.com/lukemcgregor/LinqExpander" rel="nofollow noreferrer">https://githu...
<p>It is not new library which is doing the same thing. I prefer <a href="https://github.com/scottksmith95/LINQKit" rel="nofollow noreferrer">LINQKit</a>.</p> <p>So if functionality is similar, choose the following:</p> <pre class="lang-cs prettyprint-override"><code>public static Expression&lt;Func&lt;TEntity, short, ...
Expression Tree calling an Expression with third parameter
c#|expression-trees
0
67
1
72,980,686
72,980,686
1
true
2022-07-14T08:52:17.837Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Expression Tree calling an Expression with third parameter<p>been dealing with Expression Trees the last couple days and found a problem while trying to call...
72,984,558
Python: Creating better rooms in text RPG with unique elements that change based on player actions<p>I am very new to coding and I'm probably biting off more than I can chew here, so please try to excuse my ignorance.</p> <p>I am attempting to make a text based RPG in Python. My goal is to make something that isn't jus...
<p>I think you have found one of the reasons for the existance of object oriented programming... it's a way to structure code that makes the rules of the domain problem <strong>explicit</strong>. That means that the code is more readable, which means that in six months, after you took a break from your code and want to...
Python: Creating better rooms in text RPG with unique elements that change based on player actions
python
1
67
2
72,985,963
72,985,963
1
true
2022-07-14T17:35:44.637Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python: Creating better rooms in text RPG with unique elements that change based on player actions<p>I am very new to coding and I'm probably biting off more...
72,973,696
Using the Coverage Python API to get coverage results after a run<p>I want to generate a Markdown report after a coverage run, so I tried to use the <a href="https://coverage.readthedocs.io/en/6.4.2/api.html" rel="nofollow noreferrer">Python API</a>, particularly the <code>CoverageData</code> class. I can get the line...
<p>You should use the <code>coverage json</code> command to get a JSON data file, then process it however you like. It will be easier than using the API.</p>
Using the Coverage Python API to get coverage results after a run
python|markdown|coverage.py
0
67
1
72,988,083
72,988,083
1
true
2022-07-13T23:32:53.927Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Using the Coverage Python API to get coverage results after a run<p>I want to generate a Markdown report after a coverage run, so I tried to use the <a href=...
72,991,582
Why does it say "double free or corruption (out) Aborted"<p>I wrote this code and it says that there is error <code>double free or corruption(out)</code> I don't really understand where I messed up.</p> <pre class="lang-c prettyprint-override"><code>int main(void) { node *list = NULL; node *n = malloc(4 * sizeo...
<p>You allocate the nodes as a single block of 4 nodes, you cannot free them one at a time as you do in the final loop. You should either:</p> <ul> <li>allocate each node separately</li> <li>or only free the node array pointed to by <code>n</code>.</li> </ul> <p>Here is a modified version using the first approach:</p> ...
Why does it say "double free or corruption (out) Aborted"
c|memory
2
67
1
72,991,815
72,991,815
1
true
2022-07-15T09:02:34.660Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why does it say "double free or corruption (out) Aborted"<p>I wrote this code and it says that there is error <code>double free or corruption(out)</code> I d...
72,990,640
flutter dynamic Checkboxes don't check<p>Hi im new to Flutter and coding and tried do build my first to do app. I've created a textformfield to add new todos with a button in a container above. By pressing a button, a new todo will appear on the todo Container. I managed to dynamically give a column new todos with a Ch...
<p>Every variable declared inside the build method will be redeclared on each build. You could move its declaration outside and assign a value in the <code>initState</code> method.</p> <p>Also, the use of the <code>StatefulBuilder</code> is not justified in your code. You could simply use the StatefulWidget as it is.</...
flutter dynamic Checkboxes don't check
flutter|dart|flutter-state
0
67
3
72,992,515
72,992,515
1
true
2022-07-15T07:44:35.730Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: flutter dynamic Checkboxes don't check<p>Hi im new to Flutter and coding and tried do build my first to do app. I've created a textformfield to add new todos...
72,986,192
search header loop through in multiple files if matched then copy entire column and paste into single column<p>I have multiple workbooks in a Folder around 8 and there are Similar columns in some of these workbooks.</p> <p>For Example:</p> <p>There are 6 Workbooks out of 8 have similar column which Header name is &quot...
<h2>Import Columns From Workbooks</h2> <pre class="lang-vb prettyprint-override"><code>Option Explicit Sub ImportColumns() ' Source Const sFilePattern As String = &quot;*.xlsx&quot; Const sExceptionsList As String = &quot;Sheet1&quot; ' comma-separated, no spaces Const sHeader As String = &quot;So...
search header loop through in multiple files if matched then copy entire column and paste into single column
excel|vba
2
67
1
72,995,389
72,995,389
1
true
2022-07-14T20:15:23.950Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: search header loop through in multiple files if matched then copy entire column and paste into single column<p>I have multiple workbooks in a Folder around 8...
72,996,594
Deploy project on Gitlab.com to Local Minikube<p>I'm playing with Gitlab and trying to build a basic pipeline for a microservices project in java and spring boot. Each microservice has its own repo in gitlab.com, they are public. I managed to complete the steps:</p> <ol> <li>build -&gt; mvn compile</li> <li>test -&gt; ...
<p>No need, you can do that with minikube. just take note external ip is the minikube ip and it is the ip that will be used. scaling node might be more complex down the road as u will need to reconfigure add/remove them down the road or hardcore.</p> <p>Also, i am not very fond of the crud of memory used for for my loc...
Deploy project on Gitlab.com to Local Minikube
docker|deployment|gitlab|gitlab-ci|minikube
0
67
1
72,998,968
72,998,968
1
true
2022-07-15T15:47:39.603Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Deploy project on Gitlab.com to Local Minikube<p>I'm playing with Gitlab and trying to build a basic pipeline for a microservices project in java and spring ...
73,002,244
OBJ Model not loading in react three fiber<p>I'm trying to add an OBJ Model (armchair.obj) but it's not being loaded. I'm using React three fiber library.</p> <p>Here's my codesandbox: <a href="https://codesandbox.io/s/nostalgic-hill-fxyl4y?file=/src/App.js" rel="nofollow noreferrer">CodeSandbox</a></p> <p>There's no p...
<p>You can improve the rendering of the SpongeBob model by adding a directional light to your scene. A single ambient light is not sufficient for proper illumination. Try adding the following line to your codesandbox:</p> <pre><code>&lt;directionalLight /&gt; </code></pre> <p>The chair model has unfortunately some desi...
OBJ Model not loading in react three fiber
reactjs|three.js|react-three-fiber
2
67
1
73,002,824
73,002,824
1
true
2022-07-16T07:07:51.750Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: OBJ Model not loading in react three fiber<p>I'm trying to add an OBJ Model (armchair.obj) but it's not being loaded. I'm using React three fiber library.</p...
73,001,485
C++ compiler reordering read and write across thread start<p>I have a piece of multithreaded that I'm not sure is not liable to a data race because of compiler reordering.</p> <p>Here is a minimal example:</p> <pre><code>int main() { int x = 0; x = 5; auto t = std::thread([&amp;x]() { ++x; }); t.join(...
<p>Short answer: The code will work as expected. No reordering will take place</p> <p>Long answer:</p> <h2>Compile time reordering</h2> <p>Let's consider what's going on.</p> <ol> <li>You put a variable in automatic storage (x)</li> <li>You create an object that holds a reference to this variable (the lambda)</li> <li>...
C++ compiler reordering read and write across thread start
c++|multithreading
0
67
1
73,003,513
73,003,513
1
true
2022-07-16T04:19:11.647Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: C++ compiler reordering read and write across thread start<p>I have a piece of multithreaded that I'm not sure is not liable to a data race because of compil...
73,004,036
Keep the LocatedSpan of an "outer" parser with nom in Rust<p>I am trying to write a parser using the <code>nom</code> crate (and the <code>nom_locate</code>) that can parse strings such as <code>u{12a}</code>, i.e.:</p> <pre><code>u\{([0-9a-fA-F]{1,6})\} </code></pre> <p>I wrote the following parser combinator:</p> <pr...
<p>I think you misunderstand the purpose of the first parameter of <a href="https://docs.rs/nom/latest/nom/type.IResult.html" rel="nofollow noreferrer"><code>IResult</code></a>.</p> <p>Quote from the documentation:</p> <blockquote> <p>The Ok side is a pair containing the remainder of the input (the part of the data tha...
Keep the LocatedSpan of an "outer" parser with nom in Rust
rust|lexer|nom
1
67
1
73,004,814
73,004,814
1
true
2022-07-16T12:04:07.780Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Keep the LocatedSpan of an "outer" parser with nom in Rust<p>I am trying to write a parser using the <code>nom</code> crate (and the <code>nom_locate</code>)...
73,024,840
React Router Equivalent of render props in Router v6<p>I found this interesting piece of code <a href="https://medium.com/@mattywilliams/generating-an-automatic-breadcrumb-in-react-router-fed01af1fc3" rel="nofollow noreferrer">(here)</a> that generates breadcrumbs together with dynamically rendered routes:</p> <p><stro...
<p>Convert the <code>routes</code> into a routes config so the routed component is passed on the <code>element</code> prop. Create a layout route that reads the current <code>pathname</code> and string splits it to get each path segment and rebuilds an array of crumbs. <code>BreadCrumbLayout</code> renders an <code>Out...
React Router Equivalent of render props in Router v6
reactjs|react-router
2
67
1
73,025,613
73,025,613
1
true
2022-07-18T15:27:24.390Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: React Router Equivalent of render props in Router v6<p>I found this interesting piece of code <a href="https://medium.com/@mattywilliams/generating-an-automa...
72,793,309
Are there any functions in the `fungible-v2` interface for minting/burning coins?<p>I'd like to create a function <code>(deposit-fungible-v2-burn (account:string amount:decimal token:module{fungible-v2}))</code> that burns <code>amount</code> <code>token</code>s from the <code>account</code>.</p> <p>Are there any funct...
<p>No, though I believe the <code>credit</code>/<code>debit</code> functions provide similar functionality. To my knowledge, the burn function from ERC-20 is actually part of an extension to the ERC-20 standard and is not part of the standard itself (see <a href="https://docs.openzeppelin.com/contracts/3.x/api/token/er...
Are there any functions in the `fungible-v2` interface for minting/burning coins?
blockchain|smartcontracts|pact-lang|kadena
1
67
1
73,028,961
73,028,961
1
true
2022-06-28T21:23:57.933Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Are there any functions in the `fungible-v2` interface for minting/burning coins?<p>I'd like to create a function <code>(deposit-fungible-v2-burn (account:st...
72,979,415
How to cross check multiple IP's using robot framework<p>How to cross check multiple IP's using robot framework:</p> <p>Ex:</p> <pre><code> ${Debug IP}= 192.168.101.103 ${Gateway IP}= 191.168.104.102 ${Subnet mask IP}= 132.145.128.101 ${NEW IP}= 192.168.101.24 </code></pre> <p>Here I created 4 v...
<p>Using keyword <code>List Should Not Contain Duplicates</code> will help you out.</p> <pre><code>*** Settings *** Library Collections *** Variables *** ${Debug IP} = 192.168.101.103 ${Gateway IP} = 191.168.104.102 ${Subnet mask IP} = 132.145.128.101 ${New IP} = 192.168.101.24 *** ...
How to cross check multiple IP's using robot framework
python|selenium|validation|robotframework|ip-address
0
67
2
73,038,763
73,038,763
1
true
2022-07-14T10:59:58.877Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to cross check multiple IP's using robot framework<p>How to cross check multiple IP's using robot framework:</p> <p>Ex:</p> <pre><code> ${Debug IP}= ...
72,897,302
ngFor Angular not showing array object sub object<p>So I've got a Array of Object.<br></p> <pre><code>0: createdBy: null createdDate: &quot;2022-06-12T11:35:15.087&quot; description: null moduleId: &quot;b60d4fd5-7052-40e3-8abe-0f45ce1fc71e&quot; moduleName: &quot;Factoring&quot; sectionId: &quot;f17942f4-770f-42ea-bc3...
<p>The solution which I stumbled upon is this.<br></p> <pre><code>if (gP.filter(mo =&gt; mo.type === 'M')?.length &gt; 0){ levelData.moduleList.forEach(mL =&gt; { gP.filter(mo =&gt; mo.type === 'M').find((val, index) =&gt; { if (val.levelId === mL.moduleId) { ...
ngFor Angular not showing array object sub object
angular|typescript
1
67
3
73,056,954
73,056,954
1
true
2022-07-07T11:49:25.367Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: ngFor Angular not showing array object sub object<p>So I've got a Array of Object.<br></p> <pre><code>0: createdBy: null createdDate: &quot;2022-06-12T11:35:...
72,842,401
why doesnt the persian word add behind a number?<p>i have a really strange problem in java script. look at these codes and run the app:</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...
<p>As stated by <a href="https://stackoverflow.com/users/902497/raymond-chen">Raymand Chen</a>. My understanding is that you want to have the currency name تومان after the number 200000. To keep the Arabic/Persian word in the same direction as the Latin word i.e. in a Left-To-Right LTR direction.</p> <p>One possible wa...
why doesnt the persian word add behind a number?
javascript|string|concatenation|string-concatenation
2
67
1
73,061,899
73,061,899
1
true
2022-07-02T21:04:29.150Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: why doesnt the persian word add behind a number?<p>i have a really strange problem in java script. look at these codes and run the app:</p> <p><div class="sn...