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,820,810
typescript - create object from values in array<p>let's say I have a model definition like this.</p> <pre><code>export interface Basicdata { materialnumber: number; type: string; materialclass: string; } </code></pre> <p>I furthermore have an array with values, which match exactly the order of the Basicdata...
<p>As others have mentioned, use a class so that you can use the spread operator (technically you could create a function that returns an objects that meets the interface <code>Basicdata</code>, but you should use a class)</p> <pre><code>class Basicdata { materialnumber: number; type: string; materialclass: strin...
typescript - create object from values in array
javascript|typescript
0
46
2
72,820,989
72,820,989
1
true
2022-06-30T18:58:52.980Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: typescript - create object from values in array<p>let's say I have a model definition like this.</p> <pre><code>export interface Basicdata { materialnumb...
72,820,920
Flutter - Add a Tappable Icon to the TextField label - onTap not executing<p>I'm trying all sorts of things to add a little tappable icon to a textField that moves up and down with the floating label:</p> <p><a href="https://i.stack.imgur.com/5KsPt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5KsP...
<p>A label is not clickable, as a click is meant to shift it upwards.</p> <p>You might find a workaround, but a simpler solution might be to use a <code>suffixIcon</code>:</p> <pre class="lang-dart prettyprint-override"><code>TextField( decoration: InputDecoration( labelText: &quot;label text&quot;, suffixI...
Flutter - Add a Tappable Icon to the TextField label - onTap not executing
flutter|flutter-layout|flutter-textformfield
0
46
2
72,821,312
72,821,312
1
true
2022-06-30T19:10:20.470Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Flutter - Add a Tappable Icon to the TextField label - onTap not executing<p>I'm trying all sorts of things to add a little tappable icon to a textField that...
72,824,084
Limit leaderboard to 10 users / Divide the leaderboard into pages<p>My current leaderboard shows every user that is in the dictionary, I would like to have a paged leaderboard, showing 10 users per page rather than showing every user in the leaderboard, but I can't really find a way to do so with my current code.</p> <...
<p>Wow... Apparently it's easier than I thought, I was testing and found the solution to my problem, god how could I not think of it before.</p> <p>Just had to modify this part a little:</p> <pre><code>em.description = '\n'.join(f'**{index + 1}.**' f&quot;{'None' if self.bot.get_user(int(user)) == None else self.bot.ge...
Limit leaderboard to 10 users / Divide the leaderboard into pages
python|python-3.x|discord.py
0
46
1
72,825,244
72,825,244
1
true
2022-07-01T03:26:12.393Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Limit leaderboard to 10 users / Divide the leaderboard into pages<p>My current leaderboard shows every user that is in the dictionary, I would like to have a...
72,828,788
How to split and iterate over a string in Javascript?<p>On a React Page inside <code>render</code> I have the code below, which produces the error:</p> <blockquote> <p>topic.language.map is not a function</p> </blockquote> <pre><code>{console.log(JSON.stringify(topic.language))} //this returns &quot;English,French,Ot...
<p>If your <code>language</code> value is a string, you will need to split the string into an array before calling <code>map</code>.</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override"><...
How to split and iterate over a string in Javascript?
javascript|reactjs
-3
46
2
72,828,862
72,828,862
1
true
2022-07-01T11:46:26.593Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to split and iterate over a string in Javascript?<p>On a React Page inside <code>render</code> I have the code below, which produces the error:</p> <bloc...
72,829,118
Vala - How to join string[] to string?<p>I have a string array:</p> <pre class="lang-cs prettyprint-override"><code>string[] arr = {&quot;Hello&quot;, &quot;World&quot;}; </code></pre> <p>I want to print it or convert it to a string like:</p> <pre class="lang-cs prettyprint-override"><code>print(arr.join(&quot;,&quot;)...
<p>Use <a href="https://valadoc.org/glib-2.0/string.joinv.html" rel="nofollow noreferrer">string.joinv()</a>:</p> <pre class="lang-cs prettyprint-override"><code>string[] arr = {&quot;Hello&quot;, &quot;World&quot;}; print(string.joinv(&quot;,&quot;, arr)); </code></pre> <p>Result:</p> <pre><code>Hello,World </code></...
Vala - How to join string[] to string?
arrays|string|vala
1
46
1
72,829,119
72,829,119
1
true
2022-07-01T12:15:37.147Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Vala - How to join string[] to string?<p>I have a string array:</p> <pre class="lang-cs prettyprint-override"><code>string[] arr = {&quot;Hello&quot;, &quot;...
72,827,774
How to find intersection points between two colums in a dataframe<p>How to find the intersection points in two lists of numbers that do not necessarily have any but the lines do intersect at some point</p> <pre class="lang-py prettyprint-override"><code>lst0 = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15] lst1 = [2,4,1,4,1,5,...
<p>If <code>lst1</code> and <code>lst2</code> share the same x values (<code>lst0</code>), you can do it with simple maths: just get the slope and offset for each line segment (<code>m</code> and <code>n</code> for <code>lst1</code> vs. <code>lst0</code>, and <code>k</code> and <code>l</code> for <code>lst2</code> vs <...
How to find intersection points between two colums in a dataframe
python|pandas
1
46
1
72,829,445
72,829,445
1
true
2022-07-01T10:17:22.937Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to find intersection points between two colums in a dataframe<p>How to find the intersection points in two lists of numbers that do not necessarily have...
72,826,891
IntersectionObserver - transform properties targets the whole SVG animation and not class<p>I'm trying to get a svg animation to start when it's in the viewport. It works but when adding <code>transform properties</code> the whole svg and not just the targeted class is affected.</p> <pre><code>import React, { useEffect...
<p>Currently, the are two objects with the class <code>lamp-fill</code>, and both get animated.</p> <pre><code>&lt;div className={`animation_container ${visibleAnimation ? 'lamp_fill' : ''}`} &gt; </code></pre> <p>and</p> <pre><code>&lt;path className=&quot;lamp_fill&quot; d=&quot;...&quot; /&gt; </code></pre> <p>If yo...
IntersectionObserver - transform properties targets the whole SVG animation and not class
reactjs|animation|svg|transform|react-intersection-observer
0
46
1
72,829,671
72,829,671
1
true
2022-07-01T09:05:16.847Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: IntersectionObserver - transform properties targets the whole SVG animation and not class<p>I'm trying to get a svg animation to start when it's in the viewp...
72,821,909
Material UI react select all children except for last child not working?<p>I can select all children:</p> <pre><code>const useStyles = makeStyles(theme =&gt; ({ icons: { &quot;&amp;&gt;*&quot;: { backgroundColor: &quot;red&quot;, }, }, })) </code></pre> <p>JSX:</p> <pre><code> &lt;Grid item&gt; ...
<p>I used <code>sx</code> and was able to achieve what you are looking for.</p> <pre><code>const gridSx = { &quot;&amp; &gt;*&quot;: { backgroundColor: &quot;green&quot; }, &quot;&amp; :not(:last-of-type)&quot;: { backgroundColor: &quot;red&quot; } }; ... &lt;Grid container direction=&quot;column&quot; ...
Material UI react select all children except for last child not working?
css|reactjs|material-ui
0
46
1
72,829,751
72,829,751
1
true
2022-06-30T20:54:47.493Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Material UI react select all children except for last child not working?<p>I can select all children:</p> <pre><code>const useStyles = makeStyles(theme =&gt;...
72,824,763
Firebase google cloud function to return a Snapshot<p>Is it possible to return a snapshot like this from a Firebase google cloud function?</p> <pre><code>exports.getFreshData = functions.https.onCall(async (data, context) =&gt; { const ref = data.ref; try { const snap = await admin.database().ref(ref).once(&quo...
<p>Callable Cloud Functions can only return JSON types, as mentioned in the documentation on <a href="https://firebase.google.com/docs/functions/callable#sending_back_the_result" rel="nofollow noreferrer">returning a value</a>:</p> <blockquote> <p>To send data back to the client, return data that can be JSON encoded.</...
Firebase google cloud function to return a Snapshot
node.js|firebase|firebase-realtime-database|google-cloud-functions
1
46
1
72,830,730
72,830,730
1
true
2022-07-01T05:31:12.003Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Firebase google cloud function to return a Snapshot<p>Is it possible to return a snapshot like this from a Firebase google cloud function?</p> <pre><code>exp...
72,832,646
Svelte component text doesn't update<p>I'm using Blockly + SvelteJS, now I am trying to add language support. So I have Toolbox.svelte component that looks like this:</p> <pre><code>&lt;xml id=&quot;toolbox&quot; bind:this={toolbox} style=&quot;display:none&quot;&gt; &lt;category name={Msg.CATEGORY_LOGIC} colour=&quo...
<p>This will not work:</p> <pre class="lang-js prettyprint-override"><code>$: Msg = Blockly.Msg; </code></pre> <p>Reactivity does not cross certain boundaries; it only works within components and via props from component to component.</p> <p>You will have to do this via events or use a <a href="https://svelte.dev/docs#...
Svelte component text doesn't update
javascript|svelte|blockly|google-blockly
0
46
1
72,833,087
72,833,087
1
true
2022-07-01T17:13:06.667Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Svelte component text doesn't update<p>I'm using Blockly + SvelteJS, now I am trying to add language support. So I have Toolbox.svelte component that looks l...
72,833,304
How to get Resttemplate Bean in Entity class using autowired<p>i am trying to write a method in my Entity class before populating the properties of entity class. To Do that i need to call a rest service . I like to bring my resttemplate into my Entity class using Autowired . Is that something possible , If yes how we c...
<p>Entities belong to the domain layer. It is better to make them not depends on any external framework or library stuff such as <code>RestTemplate</code> as much as you can. Also, having the domain layer interacts with the external systems directly just does not feel right to me. They should be done in a higher level ...
How to get Resttemplate Bean in Entity class using autowired
spring|spring-boot|jpa|resttemplate
0
46
1
72,834,981
72,834,981
1
true
2022-07-01T18:24:59.740Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to get Resttemplate Bean in Entity class using autowired<p>i am trying to write a method in my Entity class before populating the properties of entity cl...
72,839,725
How to connect to Elasticsearch using Pyton Flask<p>I'm writing a site on Flask, I decided to make a search system on the site using Elasticsearch, I did it according to the guide <a href="https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-xvi-full-text-search" rel="nofollow noreferrer">https://blog.migu...
<p>I think you have simply not degined the elasticsearch key inside your app config. According to the <a href="https://flask.palletsprojects.com/en/2.1.x/config/" rel="nofollow noreferrer">documentation</a> you should first make</p> <pre class="lang-py prettyprint-override"><code>app.config['ELASTICSEARCH_URL'] = os.en...
How to connect to Elasticsearch using Pyton Flask
python|elasticsearch|flask
0
46
1
72,839,761
72,839,761
1
true
2022-07-02T14:13:47.470Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to connect to Elasticsearch using Pyton Flask<p>I'm writing a site on Flask, I decided to make a search system on the site using Elasticsearch, I did it ...
72,842,010
Update table by Preference and reorder table accordingly<p>I have this app when you drag and drop rows in a list it reorders and SETS that row by preference number, 1-5 for example, 1 being most priority. So if I have 5 records in the list, I can then drag each row and when dropped it will reorder the list by preferenc...
<p>To insert a new record with <code>Preference=Max(Preference)+1</code> use the following query:</p> <pre><code>insert into Rad5 values(10,(select max(Preference)+1 from Rad5)); -- inserts a new record with id=10 </code></pre> <p>To reorder the records according to the <code>Preference</code> after deleting a record t...
Update table by Preference and reorder table accordingly
sql|sql-server
0
46
1
72,843,438
72,843,438
1
true
2022-07-02T19:46:47.020Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Update table by Preference and reorder table accordingly<p>I have this app when you drag and drop rows in a list it reorders and SETS that row by preference ...
72,843,205
how to manage multiple 'executable and datadir profile' for parallelizing the launch of scrappers?<p>I am using , and have difficulties to launch 4 scripts at the same time. I have used theses variable for local browser</p> <pre><code>let CHROMIUM_DATA_DIR = `/Users/yo/dataDir/datadir${this.cmd}` let CHROMIUM_EXEC_PATH...
<p>Since you are using playwright, you can use <a href="https://playwright.dev/docs/api/class-browsertype#browser-type-launch-persistent-context" rel="nofollow noreferrer">persistent contexts</a>.</p> <p>You do not need to create your own data directories or executables by copying them, simply pass location of an empty...
how to manage multiple 'executable and datadir profile' for parallelizing the launch of scrappers?
google-chrome|playwright|multiple-instances
0
46
1
72,844,071
72,844,071
1
true
2022-07-03T00:12:27.563Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to manage multiple 'executable and datadir profile' for parallelizing the launch of scrappers?<p>I am using , and have difficulties to launch 4 scripts a...
72,845,204
Laravel 8.5's Validation is not working and getting an error<p><a href="https://i.stack.imgur.com/6osbW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6osbW.png" alt="enter image description here" /></a>I am just calling an API with one array parameter with the required validation. But I am getting ...
<p>first, try to dump all the input data using <code>dd</code> helper and see if the input format is correct so in the first line of your function dump it like below the check the output</p> <pre><code>dd( $request ); </code></pre> <p>secondly, use the <a href="https://laravel.com/docs/9.x/validation#quick-writing-the-...
Laravel 8.5's Validation is not working and getting an error
json|laravel|validation
0
46
1
72,846,577
72,846,577
1
true
2022-07-03T09:00:23.657Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Laravel 8.5's Validation is not working and getting an error<p><a href="https://i.stack.imgur.com/6osbW.png" rel="nofollow noreferrer"><img src="https://i.st...
72,849,150
How do i get the year to change with each tournament?<p>I don't understand why i am struggling with this but how do i get the year to change for each iteration. So when it goes through season 2020, all those tournaments and id's should say 2020 but its only saying the last iteration ran.</p> <pre><code>from bs4 import ...
<p>You can create list with all information as tuples and at the end create final dataframe. For example:</p> <pre class="lang-py prettyprint-override"><code>import requests import pandas as pd from bs4 import BeautifulSoup seasonid = [&quot;2021&quot;, &quot;2020&quot;, &quot;2019&quot;] all_data = [] for season in ...
How do i get the year to change with each tournament?
python|pandas|dataframe|loops|beautifulsoup
1
46
1
72,849,214
72,849,214
1
true
2022-07-03T18:57:24.537Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do i get the year to change with each tournament?<p>I don't understand why i am struggling with this but how do i get the year to change for each iterati...
72,845,446
How to export Tree object from Rich library to a text(.txt) file in Python?<p>Is there anyway to export tree object from Rich?</p> <pre><code>from rich.tree import Tree from rich import print as rprint tree = Tree(&quot;Family Tree&quot;) tree.add(&quot;Mom&quot;) tree.add(&quot;Dad&quot;) tree.add(&quot;Brother&quot;...
<p><code>rich.print</code> uses the same syntax as print so you can write directly to an object with a write method. E.g.</p> <pre><code>with open('my_tree.txt', 'w') as f: rprint(tree, file=f) </code></pre>
How to export Tree object from Rich library to a text(.txt) file in Python?
python|python-3.x|tree|rich
0
46
2
72,849,383
72,849,383
1
true
2022-07-03T09:40:09.890Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to export Tree object from Rich library to a text(.txt) file in Python?<p>Is there anyway to export tree object from Rich?</p> <pre><code>from rich.tree ...
72,852,259
Java having problems with Scanner, probably .close() function<p>I want to make a simple loop that will only end when user chooses to quit. I am having problems with Scanner and I can't really pinpoint it but I think it might be the .close() function. I've tried to put .close() almost everywhere, but the error still per...
<p>The root of the problem is <code>main(null);</code>. Don't do that, your program starts all over again, you have managed to do something like hidden recursion and the flow gets all jumbled up. Just use the while loop. Step through the code with a debugger to better understand what's actually happening and why it's h...
Java having problems with Scanner, probably .close() function
java|loops|java.util.scanner
0
46
2
72,852,588
72,852,588
1
true
2022-07-04T05:51:16.627Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Java having problems with Scanner, probably .close() function<p>I want to make a simple loop that will only end when user chooses to quit. I am having proble...
72,838,166
Taipy: No chart displayed probably due to "Invalid tag name 'text' in line"<p>I'm using <strong>taipy==1.1</strong> and I have an issue with the rendering of my charts.</p> <p>Here is a snippet of my code:</p> <pre><code>import pandas as pd from taipy import Gui ... total_cost = dataset['costInUsd'].sum() daily_cos...
<p>Try to delete the <code>f</code> before the page string. Taipy is formatting by itself the string to create controls (charts, buttons, tables, ...) and make the connections between the different variables.</p> <pre><code>page = &quot;&quot;&quot; # Cost Analysis Month to day cost: &lt;|{total_cost}|&gt; &lt;| Dail...
Taipy: No chart displayed probably due to "Invalid tag name 'text' in line"
python|pandas|dataframe|taipy
1
46
1
72,857,942
72,857,942
1
true
2022-07-02T09:59:38.847Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Taipy: No chart displayed probably due to "Invalid tag name 'text' in line"<p>I'm using <strong>taipy==1.1</strong> and I have an issue with the rendering of...
72,858,120
Strictly positive values in normal distribution in Python<p>Is it possible to define a strictly positive range for normal distribution like I want to have a distribution in the range <code>(0,10)</code> with a certain <code>mu, sigma</code>?</p> <p>Using <code>np.random.normal</code>, sometimes I get negative values wh...
<p>You should try 'scipy.stats.truncnorm' - quote <strong>The standard form of this distribution is a standard normal truncated to the range</strong></p> <p><a href="https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.truncnorm.html" rel="nofollow noreferrer">https://docs.scipy.org/doc/scipy/reference/gene...
Strictly positive values in normal distribution in Python
python|numpy
0
46
1
72,858,531
72,858,531
1
true
2022-07-04T14:13:41.197Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Strictly positive values in normal distribution in Python<p>Is it possible to define a strictly positive range for normal distribution like I want to have a ...
72,859,909
Can I inject a custom (Path)LocationStrategy?<p>I'm using a custom <a href="https://angular.io/api/common/PathLocationStrategy" rel="nofollow noreferrer">PathLocationStrategy</a>:</p> <pre><code>@Injectable() // also tried @Injectable({providedIn: 'root'}) export class CustomPathLocationStrategy extends PathLocationStr...
<p>When you add a provider. The <code>provide</code> property defines the <code>InjectionToken</code> or key to identify that provider. The <code>useClass</code>, <code>useFactory</code>,... only tells the injector how to create that dependency if someone ask for it.</p> <p>So when you add a provider like this:</p> <pr...
Can I inject a custom (Path)LocationStrategy?
angular|angular-injector
0
46
1
72,860,401
72,860,401
1
true
2022-07-04T16:51:37.870Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can I inject a custom (Path)LocationStrategy?<p>I'm using a custom <a href="https://angular.io/api/common/PathLocationStrategy" rel="nofollow noreferrer">Pat...
72,861,728
Regular Expressions: Return Null when a group does not appear<p>After a week struggling with this problem, I need help with this pattern:</p> <pre><code>&quot;^(?&lt;Id&gt;\d+) - (?&lt;Agent&gt;.*)(?&lt;Registry&gt;\(S (.*)\))+?. \((?&lt;Date&gt;\d{2}[/]\d{2}[/]\d{4})\).?$&quot; </code></pre> <p>My test with <a href="h...
<p>You can use</p> <pre class="lang-cs prettyprint-override"><code>^(?&lt;Id&gt;\d+) - (?&lt;Agent&gt;.*?)(?:\((?&lt;Registry&gt;[^()]*)\))?\W*\((?&lt;Date&gt;\d{2}/\d{2}/\d{4})\)$ </code></pre> <p>See the <a href="https://regex101.com/r/cwHlIy/1" rel="nofollow noreferrer">regex demo</a>. If you have <code>.?</code> at...
Regular Expressions: Return Null when a group does not appear
c#|regex
3
46
1
72,861,770
72,861,770
1
true
2022-07-04T20:25:51.457Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Regular Expressions: Return Null when a group does not appear<p>After a week struggling with this problem, I need help with this pattern:</p> <pre><code>&quo...
72,861,930
Pandas - Grouping related data entries, with imperfect data<p>This likely isn't an easy question. I am looking at public trade data, and trying to group 'related' items. But the data itself isn't perfect (the human element) or is misleading. The good news, is that related items generally follow similar patterns.</p>...
<p>so this actually might be more of a statistical issue than anything a programming issue. It sounds like you want to measure the distance of similarity between items, and if they are very similar, group them together. Distance metrics like the Gowers Distance could work for you, as they allow to &quot;measure&quot; t...
Pandas - Grouping related data entries, with imperfect data
python|pandas|machine-learning|data-science|data-analysis
-1
46
1
72,862,122
72,862,122
1
true
2022-07-04T20:52:31.157Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Pandas - Grouping related data entries, with imperfect data<p>This likely isn't an easy question. I am looking at public trade data, and trying to group 're...
72,862,142
Angular Toggle values in array changes position<p>I have an array with 4 values which I toggle (remove and Add to the array).</p> <pre><code>selectedSections: any[] = ['one', 'two', 'three', 'four']; </code></pre> <p>Then I have a button which I would click to make each selected appear and disappear.</p> <pre><code>&lt...
<pre><code>&lt;button (click)=&quot;toggleVal('one', 1)&quot;&gt;Toggle One&lt;/button&gt; &lt;button (click)=&quot;toggleVal('two', 2)&quot;&gt;Toggle Two&lt;/button&gt; &lt;button (click)=&quot;toggleVal('three', 3)&quot;&gt;Toggle Three&lt;/button&gt; &lt;button (click)=&quot;toggleVal('four', 4)&quot;&gt;Toggle Fou...
Angular Toggle values in array changes position
javascript|angular|typescript
0
46
2
72,862,185
72,862,185
1
true
2022-07-04T21:22:03.007Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Angular Toggle values in array changes position<p>I have an array with 4 values which I toggle (remove and Add to the array).</p> <pre><code>selectedSections...
72,863,061
Read SQL query output to a Python dataframe<p>I need to read from a SQL output file which has the following format to a python or Pandas dataframe, what could be the best possible approach?</p> <pre><code>-[ RECORD 1 ]-------------------------------- a | test b | test c | test -[ RECORD 2 ]-----------...
<p>This code will transform the input file into a &quot;normal&quot; csv - it isn't general purpose so since your example is probably artificial (you may not really have columns called <code>a</code>, <code>b</code>, <code>c</code> and values that are all <code>test</code>) there may be tweaks needed - but this is a st...
Read SQL query output to a Python dataframe
python|sql
0
46
1
72,863,556
72,863,556
1
true
2022-07-05T00:49:33.883Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Read SQL query output to a Python dataframe<p>I need to read from a SQL output file which has the following format to a python or Pandas dataframe, what coul...
72,862,744
Is there a way to loop dynamic links parameters to avoid repetition of values?<p>I'm using kotlin and I have implemented dynamic links to my app, and when ever the user clicks the link, it will retrieve specific data from Firebase depending on the link. I try to query the parameters of the link but I was unsuccessful s...
<p>You can try something like this:</p> <pre class="lang-kotlin prettyprint-override"><code>val id = link.removeSuffix(&quot;/&quot;).split('/').last() // This will give you the id present in the deepLink if(&quot;DrinksCoffeeShops&quot; in link) drinksCoffeeShopsFB.collection(id).get() if(&quot;FoodFastFood&quot; ...
Is there a way to loop dynamic links parameters to avoid repetition of values?
firebase|kotlin|repeat|deep-linking|firebase-dynamic-links
1
46
1
72,863,957
72,863,957
1
true
2022-07-04T23:24:29.393Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is there a way to loop dynamic links parameters to avoid repetition of values?<p>I'm using kotlin and I have implemented dynamic links to my app, and when ev...
72,864,940
Why does CROSS JOIN LATERAL break up array's SDO_GEOMETRY object into individual attributes?<p><em>Oracle 18c:</em></p> <p>I have mapping software that has a limitation where it can only handle a single geometry column per table. If there are multiple geometry columns in a given table, then it will throw an error.</p> ...
<blockquote> <p>Why does the <code>CROSS JOIN LATERAL</code> break up the array's <code>SDO_GEOMETRY</code> object into individual attributes? (but the function doesn't)</p> </blockquote> <p><code>CROSS JOIN LATERAL</code> is treating the table collection expression as if it is an object-derived table (which it effecti...
Why does CROSS JOIN LATERAL break up array's SDO_GEOMETRY object into individual attributes?
sql|oracle|oracle18c|oracle-spatial|lateral-join
0
46
1
72,865,440
72,865,440
1
true
2022-07-05T06:37:53.207Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why does CROSS JOIN LATERAL break up array's SDO_GEOMETRY object into individual attributes?<p><em>Oracle 18c:</em></p> <p>I have mapping software that has a...
72,863,456
Can I call a custom function in DAX?<p>I have created a custom function <strong>networkdays</strong> in Power Query Editor.</p> <p><a href="https://i.stack.imgur.com/UiQgi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UiQgi.png" alt="networkdays" /></a></p> <p>and I would like to call it while writ...
<p>You cannot call a PQ function from DAX. They are completely separate environments. BTW, DAX already has a NETWORKDAYS() function.</p>
Can I call a custom function in DAX?
powerbi|dax|powerquery|powerbi-desktop
1
46
1
72,865,509
72,865,509
1
true
2022-07-05T02:30:36.470Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can I call a custom function in DAX?<p>I have created a custom function <strong>networkdays</strong> in Power Query Editor.</p> <p><a href="https://i.stack.i...
72,864,827
Saving the input in the table using JS<p>I want my table to actually &quot;save&quot; the input (the input dialog box should disappear and the new value should take place of the old value - of course until the next reload). Now it stays in the dialog box after the click out.</p> <p>How to fix it?</p> <p><div class="sni...
<p>You get wrong variable <code>var target = ...</code>. There is a <code>&lt;input&gt;</code> tag in <code>targetDescription</code>, this <code>&lt;input&gt;</code> has attribute <code>data-target</code>. So try this. In stead of:</p> <pre><code>var target = targetDescription.attr(&quot;data-target&quot;); </code></pr...
Saving the input in the table using JS
javascript|html-table
0
46
1
72,866,108
72,866,108
1
true
2022-07-05T06:26:19.087Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Saving the input in the table using JS<p>I want my table to actually &quot;save&quot; the input (the input dialog box should disappear and the new value shou...
72,865,730
Pandas DataFrame: update all values in all columns, based on condition<p>I have 102 columns and I want to check all their values. If their values are greater than 100,000: I want to subtract 4294967295 from these values and then add 1 to them</p> <p>I did it but for one column like this:</p> <p><code>df.loc[df['12:00AM...
<p>I did it like this: where # A-B = -B+A</p> <pre><code>df[df&gt; 100000] = -1*df[df&gt; 100000] + 4294967295+1 </code></pre>
Pandas DataFrame: update all values in all columns, based on condition
python|pandas|dataframe
0
46
1
72,866,666
72,866,666
1
true
2022-07-05T07:44:30.203Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Pandas DataFrame: update all values in all columns, based on condition<p>I have 102 columns and I want to check all their values. If their values are greater...
72,869,435
Moving files to a subfolder based on partial filename in VBA without using FSO<p>This code is run from a macro-enabled workbook. It checks if there is already any files in the same folder as the workbook which names start with &quot;repositorio nóminas&quot; and moves them to a subfolder.</p> <p>It uses the method &quo...
<p>As already written, you need to rename your files one by one. So the logic is: Loop over all files that matches the filename pattern and execute the <code>name</code> command.</p> <p>To loop over all files in a folder, you can use the <code>Dir</code>-command (or use the FileSystemObject). The logic of the <code>Dir...
Moving files to a subfolder based on partial filename in VBA without using FSO
excel|vba
1
46
1
72,869,844
72,869,844
1
true
2022-07-05T12:27:11.320Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Moving files to a subfolder based on partial filename in VBA without using FSO<p>This code is run from a macro-enabled workbook. It checks if there is alread...
72,841,669
Disable DoubleTapGesture Zoom out on MKMapView<p>I have observed <code>MKMapView</code> zoom-out on Double tap gesture, I didn't find any way to disable it. I tried to add own Double Tap Gesture to catch Double tap action but it still zoom out. Any thought?</p>
<p>There is no API to disable or change double-tap behavior with <code>MKMapView</code>.</p> <p>But, if you really want to do so, one approach would be to find and remove the double-tap gesture recognizer from the <code>MKMapView</code> object.</p> <p>In the project you shared, you could do that in <code>makeUIView</co...
Disable DoubleTapGesture Zoom out on MKMapView
ios|swift|mkmapview
0
46
1
72,870,330
72,870,330
1
true
2022-07-02T18:53:09.950Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Disable DoubleTapGesture Zoom out on MKMapView<p>I have observed <code>MKMapView</code> zoom-out on Double tap gesture, I didn't find any way to disable it. ...
72,869,824
How to load into HTML table just first 5 items from json file with JavaScript and JQuery?<p>I want to display first e.g. 5 items from json file using JavaScript/JQuery.</p> <p>I have the following .json file named draws.json which is like this:</p> <pre><code>{&quot;history&quot;: [[&quot;2022-07-04&quot;, &quot;22:50&...
<p>Maybe this is what you need?</p> <p><strong>show_json.js:</strong></p> <pre><code>function ajaxGetJson() { var hr = new XMLHttpRequest(); hr.open('GET', 'draws.json', true); hr.setRequestHeader('Content-type', 'application/json', true); hr.onload = function () {//==&gt; CHANGED TO ONLOAD if (...
How to load into HTML table just first 5 items from json file with JavaScript and JQuery?
javascript|html|jquery|json
0
46
1
72,870,801
72,870,801
1
true
2022-07-05T12:56:36.100Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to load into HTML table just first 5 items from json file with JavaScript and JQuery?<p>I want to display first e.g. 5 items from json file using JavaScr...
72,872,297
Timestamp not Appearing in Azure Table Storage Query Result Entities in Python<p>I am querying an Azure Data Table using Python:</p> <pre><code># create azure table storage client table_client = TableClient.from_connection_string(conn_str=key1, table_name=&quot;Table&quot;) # query table entities = table_client.query_...
<p>Looking at the SDK source code <a href="https://github.com/Azure/azure-sdk-for-python/blob/db129d0020160815d2a5cd52be5b6777a6cbefaf/sdk/tables/azure-data-tables/azure/data/tables/_deserialize.py#L133" rel="nofollow noreferrer"><code>here</code></a>, it looks the SDK is not including the <code>Timestamp</code> proper...
Timestamp not Appearing in Azure Table Storage Query Result Entities in Python
python|azure
0
46
2
72,872,650
72,872,650
1
true
2022-07-05T15:51:35.707Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Timestamp not Appearing in Azure Table Storage Query Result Entities in Python<p>I am querying an Azure Data Table using Python:</p> <pre><code># create azur...
72,865,494
Unrecognised ImageMagick Add Profile after upgrading to 11.2 from 7.4<p>I have a C# project using the ImageMagick library Magick.Net Q16 AnyCPU net40 targeting .Net 4.7.2 using VS 2022. After upgrading this from 7.4.6 to 11.2.1 using Nuget Package Manager the function image.AddProfile (where image is an ImageMagick ima...
<p>You can find your answer in the release notes: <a href="https://github.com/dlemstra/Magick.NET/releases/tag/7.16.0.0" rel="nofollow noreferrer">https://github.com/dlemstra/Magick.NET/releases/tag/7.16.0.0</a>. The <code>AddProfile</code> method has been renamed to <code>SetProfile</code>.</p>
Unrecognised ImageMagick Add Profile after upgrading to 11.2 from 7.4
c#|imagemagick
0
46
1
72,875,287
72,875,287
1
true
2022-07-05T07:25:25.983Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Unrecognised ImageMagick Add Profile after upgrading to 11.2 from 7.4<p>I have a C# project using the ImageMagick library Magick.Net Q16 AnyCPU net40 targeti...
72,878,721
Converting Dataframe to json format with root level<p>I have a data frame in Databricks with the following data columns</p> <p>OBJECTID, SingleLine</p> <p>1234, sample Address</p> <p>I want to create a JSON output file per the below specification using PySpark or Python / Scala on Databricks Platform How can I do that ...
<p>If you looking to get all data in above format you can use query below and write it to a file output</p> <pre><code>from pyspark.sql import functions as F dfp=spark.createDataFrame([(1,&quot;abc&quot;),(2,&quot;def&quot;)],&quot;OBJECTID int, Address string&quot;) dfp.selectExpr(&quot; to_json(map('records',collect_...
Converting Dataframe to json format with root level
python|json|scala|pyspark|databricks
0
46
1
72,879,229
72,879,229
1
true
2022-07-06T06:19:10.513Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Converting Dataframe to json format with root level<p>I have a data frame in Databricks with the following data columns</p> <p>OBJECTID, SingleLine</p> <p>12...
72,878,456
How to apply one to many table join and get the value in same column?<p>I have Table A</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th style="text-align: left;">left</th> <th style="text-align: center;">center</th> <th style="text-align: center;">east</th> </tr> </thead> <tbody> <tr> <td st...
<p>Try this:</p> <pre><code>WITH A (left, center, east) AS ( VALUES (1, 'Bob', 1) , (2, 'Tom', 2) ) , B (left, top, colour) AS ( VALUES (1, 'Bob', 'Red') , (2, 'Tom', 'Blue') ) , C (East, west, colour) AS ( VALUES (1, 'Bob', 'Yellow') , (2, 'Tom', 'Orange') ) SELE...
How to apply one to many table join and get the value in same column?
sql|db2
0
46
1
72,879,464
72,879,464
1
true
2022-07-06T05:45:31.513Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to apply one to many table join and get the value in same column?<p>I have Table A</p> <div class="s-table-container"> <table class="s-table"> <thead> <t...
72,880,009
Using jQuery to build a link that can be copied and shared<p>I am trying to create a utility to help mobile users share a YouTube link and have it start at a specified time (YouTube does not offer this feature in their mobile website and apps).</p> <p>The user pastes their link:</p> <p>e.g. <code>https://www.youtube.co...
<p>Use the <a href="https://developer.mozilla.org/en-US/docs/Web/API/URL" rel="nofollow noreferrer">URL API</a> and the <a href="https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams" rel="nofollow noreferrer">searchparams</a></p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" d...
Using jQuery to build a link that can be copied and shared
javascript|jquery|onchange
-1
46
1
72,880,263
72,880,263
1
true
2022-07-06T08:14:36.107Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Using jQuery to build a link that can be copied and shared<p>I am trying to create a utility to help mobile users share a YouTube link and have it start at a...
72,880,366
Vuetify wrap v-columns<p>I have a v-row that is built like this:</p> <pre><code>&lt;v-row class=&quot;mt-3 d-flex flex-wrap&quot;&gt; &lt;v-col cols=&quot;4&quot;&gt; &lt;v-text-field v-model=&quot;search&quot; placeholder=&quot;Suche&quot; filled rounded ...
<p>The <code>cols</code> attribute define the col width for all viewports. To set a different col width in small viewport you should use the <code>xs</code> or <code>sm</code> attributes. For ex:</p> <pre><code>&lt;v-col cols=&quot;4&quot; xs=&quot;12&quot; sm=&quot;6&quot;&gt;&lt;/v-col&gt; </code></pre>
Vuetify wrap v-columns
vue.js|vuetify.js
0
46
1
72,880,475
72,880,475
1
true
2022-07-06T08:41:29.383Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Vuetify wrap v-columns<p>I have a v-row that is built like this:</p> <pre><code>&lt;v-row class=&quot;mt-3 d-flex flex-wrap&quot;&gt; &lt;v-col cols=&quo...
72,871,072
Is there a way to loop through many attached images using active storage<p>I have installed active storage and I want a <strong>Post</strong> class or model to have one or many images so I created an association like below:</p> <pre><code>class Post &lt; ApplicationRecord has_many_attached :images end </code></pre> ...
<p>I implemented this previously by doing it this way.</p> <pre><code>class Post &lt; ApplicationRecord has_many_attached :images end </code></pre> <p>The images for your post should included in the params as such:</p> <pre><code>def car_params params.require(:car).permit(:name, :description, :comments, images:[]) e...
Is there a way to loop through many attached images using active storage
ruby-on-rails|ruby|rails-activestorage
1
46
1
72,880,796
72,880,796
1
true
2022-07-05T14:24:30.043Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is there a way to loop through many attached images using active storage<p>I have installed active storage and I want a <strong>Post</strong> class or model ...
72,881,870
Replace all numeric values with NaN Pandas<p>I have a dataframe that looks like this:</p> <pre><code>data = {'Region': ['Africa','Africa','Africa','Africa','Africa','Africa','Africa','Africa','Asia','Asia','Asia','Asia'], 'Country': ['South Africa','South Africa','South Africa','South Africa','South Africa','S...
<p>Select numeric columns by <a href="http://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.select_dtypes.html" rel="nofollow noreferrer"><code>DataFrame.select_dtypes</code></a> and set missing values:</p> <pre><code>df[df.select_dtypes(np.number).columns] = np.nan </code></pre> <p>Or if possible ...
Replace all numeric values with NaN Pandas
python|pandas|numpy
2
46
1
72,881,886
72,881,886
1
true
2022-07-06T10:25:40.890Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Replace all numeric values with NaN Pandas<p>I have a dataframe that looks like this:</p> <pre><code>data = {'Region': ['Africa','Africa','Africa','Africa','...
72,883,431
Pandas: convert a dictionary of dataframes into a single one with keys as columns and fields as new sub columns<p>This question is related to <a href="https://stackoverflow.com/q/72881696/3436831">my previous question</a>, but now I want to know how to convert a dict of dataframes into a single dataframe where keys are...
<p>You can create multi index for the columns, then concat them into a single row.</p> <pre><code>import pandas as pd dict1 = { &quot;exchange&quot;: &quot;binance&quot;, &quot;base&quot;: &quot;kp3r&quot;, &quot;quote&quot;: &quot;busd&quot;, &quot;resolution&quot;: 15, &quot;ohlcv&quot;: [ ...
Pandas: convert a dictionary of dataframes into a single one with keys as columns and fields as new sub columns
python|pandas|dataframe|dictionary
0
46
1
72,883,659
72,883,659
1
true
2022-07-06T12:17:12.743Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Pandas: convert a dictionary of dataframes into a single one with keys as columns and fields as new sub columns<p>This question is related to <a href="https:...
72,884,347
why react post to localhost not working? (mock API)<p>I'm going to use the fetch function to send a &quot;post&quot; using MOCK API. However, the post is not sent and 404 errors continue to appear.</p> <p>Is it not possible to post on the localhost?</p> <pre><code>&lt;WriteSubmitButton onClick={onDiaryPost}&gt; Make ! ...
<p>You can't use <code>POST</code> on local <code>json</code> file. Instead of you can create a basic <code>json-server</code> on your local machine. It is very simple and usable. You only need to install it</p> <pre class="lang-bash prettyprint-override"><code>npm install -g json-server </code></pre> <p>then start it<...
why react post to localhost not working? (mock API)
reactjs|http|post
0
46
1
72,884,520
72,884,520
1
true
2022-07-06T13:23:23.720Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: why react post to localhost not working? (mock API)<p>I'm going to use the fetch function to send a &quot;post&quot; using MOCK API. However, the post is not...
72,884,473
variables lose their labels after mutate() function is applied in R<p>so assume some of my df columns have labels.</p> <pre><code>library(Hmisc) df1 &lt;- data.frame(a = c(0,1,2), b = c(0,1,2), d = c(0,1,2), e = c(0,1,2), f= c(&quot;m&quot;,&quot;f&quot;,&quot;o&quot;), output = c(0,1,2)) var_labs &lt...
<p>You could first save the labels of <code>df1</code> and after that assign again the labels to <code>match</code>ing columns to <code>df2</code> like this:</p> <pre><code>labs &lt;- Hmisc::label(df1) library(dplyr) df2 &lt;- df1 %&gt;% mutate_if(is.character, .funs = as.factor) label(df2) &lt;- as.list...
variables lose their labels after mutate() function is applied in R
r|dplyr|label|mutation|hmisc
0
46
2
72,884,571
72,884,571
1
true
2022-07-06T13:31:47.077Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: variables lose their labels after mutate() function is applied in R<p>so assume some of my df columns have labels.</p> <pre><code>library(Hmisc) df1 &lt;- da...
72,883,894
Deleting from a database Laravel9<p>I am trying to delete from a database in Laravel 9, My code in the blade php file is:</p> <pre><code>&lt;form action=&quot;/waifus/{{ $waifu-&gt;id }}&quot; method=&quot;POST&quot;&gt; @csrf @method('DELETE') &lt;button class=&quot;text...
<p>You cannot have nested form elements. Place your form outside the main form with a button inside that submits the delete form.</p> <pre><code>&lt;button type=&quot;submit&quot; form=&quot;delete_waifu&quot; class=&quot;text-red-500&quot;&gt; Delete&lt;/button&gt; </code></pre> <p>then outside of the main form</p> <p...
Deleting from a database Laravel9
php|laravel|forms
-1
46
4
72,885,628
72,885,628
1
true
2022-07-06T12:51:45.643Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Deleting from a database Laravel9<p>I am trying to delete from a database in Laravel 9, My code in the blade php file is:</p> <pre><code>&lt;form action=&quo...
72,890,808
Django: 'int' object has no attribute 'course'<p>i filter a course using <code>id</code>, i got the <code>profile</code> of the course creator and i want to add the user that purchsed the course the <code>course_creator</code> students, but i keep getting this error <code>'int' object has no attribute 'course'</code></...
<p>The problem lies on the line-</p> <pre class="lang-py prettyprint-override"><code>user_course = UserCourse.objects.filter(id=user_course_id).update(paid=True) </code></pre> <p><code>.update()</code> method returns the number of rows updated after applying the update. Since you are filtering by ID, there is only one ...
Django: 'int' object has no attribute 'course'
python|django|django-models|django-rest-framework|django-views
0
46
2
72,890,873
72,890,873
1
true
2022-07-06T23:23:37.657Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Django: 'int' object has no attribute 'course'<p>i filter a course using <code>id</code>, i got the <code>profile</code> of the course creator and i want to ...
72,892,004
Selecting a mixed item inside a cell and then summing it through column<p>Essentially I have a list of food items in one column and the various categories they fall into (contains meat, contains fish, is eaten cold, is eaten warm, is water) in another column. Food items can fall into various categories, and each catego...
<p>I post that answer based on your provided sample data. Now I have purified it to make it more flexible. Try this one</p> <pre><code>=SUM(--(FILTERXML(&quot;&lt;t&gt;&lt;s&gt;&quot;&amp;TEXTJOIN(&quot;&lt;/s&gt;&lt;s&gt;&quot;,TRUE,SUBSTITUTE($C$3:$C$10,&quot;,&quot;,&quot;&lt;/s&gt;&lt;s&gt;&quot;))&amp;&quot;&lt;/s...
Selecting a mixed item inside a cell and then summing it through column
excel|vba|excel-formula
0
46
1
72,892,066
72,892,066
1
true
2022-07-07T03:31:42.623Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Selecting a mixed item inside a cell and then summing it through column<p>Essentially I have a list of food items in one column and the various categories th...
72,893,485
Django csv upload to db works but throws error<p>I have created an app named customer within a project named Website using django. I have created a csv upload in the admin area which is connected to the Postgres db.</p> <pre><code>An error occurs when I upload the CSV returning: Exception Type: IndexError Exception...
<p>Due to the nature of csv, you need to check if the length of your <code>field</code> item is 2.</p> <p>i.e.</p> <pre><code> for x in csv_data: fields = x.split(&quot;,&quot;) if len(fields) == 2: created = customer.objects.update_or_create( ...
Django csv upload to db works but throws error
python|django|postgresql|csv|upload
0
46
1
72,895,054
72,895,054
1
true
2022-07-07T06:57:58.170Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Django csv upload to db works but throws error<p>I have created an app named customer within a project named Website using django. I have created a csv uploa...
72,894,143
How to change data type in pyspark dataframe automatically<p>I have data from csv file, and use it in jupyter notebook with pysaprk. I have many columns and all of them have string data type. I know how to change data type manually, but there is any way to do it automatically?</p>
<p>You can use the <code>inferSchema</code> option when you load your csv file, to let spark try to infer the schema. With the following example csv file, you can get two different schemas depending on whether you set <code>inferSchema</code> to true or not:</p> <pre><code>seq,date 1,13/10/1942 2,12/02/2013 3,01/02/195...
How to change data type in pyspark dataframe automatically
python|python-3.x|apache-spark|pyspark|jupyter-notebook
0
46
2
72,895,119
72,895,119
1
true
2022-07-07T07:51:59.797Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to change data type in pyspark dataframe automatically<p>I have data from csv file, and use it in jupyter notebook with pysaprk. I have many columns and ...
72,871,543
Mocked JPA repository bean is not returning assigned value from a mocked method call<p>I have a interface <code>CalculatorService</code> whose implementation contains business logic.</p> <p>Interface:</p> <pre class="lang-java prettyprint-override"><code>public interface CalculatorService { LoanWeb calculateSi...
<p><a href="https://javadoc.io/doc/org.mockito/mockito-core/latest/org/mockito/ArgumentMatchers.html#anyDouble()" rel="nofollow noreferrer">ArgumentMatchers.anyDouble()</a> matches any double (primitive) or <strong>non-null</strong> Double (boxed) value.</p> <p>If you happen to pass a null value, it won't be matched.</...
Mocked JPA repository bean is not returning assigned value from a mocked method call
spring-boot|spring-data-jpa|mockito|spring-test
0
46
1
72,900,555
72,900,555
1
true
2022-07-05T14:57:40.127Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Mocked JPA repository bean is not returning assigned value from a mocked method call<p>I have a interface <code>CalculatorService</code> whose implementation...
72,886,198
cairo graphics library: how can I transfer data between two xlib surfaces?<p>I want to use the Cairo graphics library to copy the content of one X11 window to another X11 window. I create two surfaces using <code>cairo_xlib_surface_create()</code>. Now I want to copy a region from the source surface (position <code>xs<...
<p>Cairo does not care what kind of surfaces you have. The following function should copy a rectangular area between two <code>cairo_surface_t</code>s. Variable names should be just as in your question.</p> <pre class="lang-c prettyprint-override"><code>// Untested, treat this as pseudo-code void copy_some_area(cairo_s...
cairo graphics library: how can I transfer data between two xlib surfaces?
x11|cairo
0
46
1
72,900,668
72,900,668
1
true
2022-07-06T15:25:46.513Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: cairo graphics library: how can I transfer data between two xlib surfaces?<p>I want to use the Cairo graphics library to copy the content of one X11 window t...
72,897,620
How to infer in TypeScript template parameters<p>I have tree nodes with values in TypeScript defined like this</p> <pre><code>class Node&lt;T&gt; { public readonly value: T; constructor (value: T) { this.value = value; } // ... } class Container&lt;U, N extends Node&lt;T&gt;, T&gt; extends Node&lt;U&gt...
<p>TypeScript doesn't currently have <em>partial type argument inference</em> when calling <a href="https://www.typescriptlang.org/docs/handbook/2/generics.html" rel="nofollow noreferrer">generic</a> functions (or <a href="https://www.typescriptlang.org/docs/handbook/2/classes.html#generic-classes" rel="nofollow norefe...
How to infer in TypeScript template parameters
typescript
1
46
1
72,903,201
72,903,201
1
true
2022-07-07T12:12:41.643Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to infer in TypeScript template parameters<p>I have tree nodes with values in TypeScript defined like this</p> <pre><code>class Node&lt;T&gt; { public ...
72,903,348
How to sort alphanumeric columns in a dataframe?<p>I'm trying to get this order:</p> <pre><code>ID Q1 Q2 Q3 Q4 Q10 </code></pre> <p>But I'm getting this order with <code>dplyr::arrange</code>:</p> <pre><code>Q1 Q10 Q2 Q3 Q4 </code...
<p>Another option, <code>dplyr</code>/base only. This relies on the assumption that there is only one such &quot;number&quot; within each value, and it is not interrupted. (For instance, <code>&quot;A1B2C&quot;</code> will sort here as <code>12</code>.)</p> <pre class="lang-r prettyprint-override"><code>dat %&gt;% ar...
How to sort alphanumeric columns in a dataframe?
r
0
46
2
72,903,483
72,903,483
1
true
2022-07-07T19:36:15.540Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to sort alphanumeric columns in a dataframe?<p>I'm trying to get this order:</p> <pre><code>ID Q1 Q2 Q3 Q4 ...
72,904,052
Daemon setTimeout in js<p>I am writing a node.js library that requires setup in order to run. I have used setTimeout to show a warning if the setup function isn't run within 5 seconds.</p> <p>However, this makes the program wait for 5 seconds before exiting, even if all the other code is finished.</p> <p>I want to show...
<blockquote> <p>However, this makes the program wait for 5 seconds before exiting, even if all the other code is finished.</p> </blockquote> <p>You can utilize <a href="https://nodejs.org/api/timers.html#timers_timeout_unref" rel="nofollow noreferrer"><code>timeout.unref()</code></a>:</p> <blockquote> <p>When called, t...
Daemon setTimeout in js
javascript|settimeout
1
46
1
72,904,681
72,904,681
1
true
2022-07-07T20:48:44.120Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Daemon setTimeout in js<p>I am writing a node.js library that requires setup in order to run. I have used setTimeout to show a warning if the setup function ...
72,902,131
How to return the highest sum of a dataset according to a set date range?<p>I have a column with different dates and another column with a series of expenses associated to the dates. I can have several expenses on the same date. I want it to return the date on which there has been the highest sum of expenses of the who...
<p>try in E3:</p> <pre><code>=SUMPRODUCT(FILTER(B:B; A:A=E2)) </code></pre>
How to return the highest sum of a dataset according to a set date range?
arrays|google-sheets|filter|sum|sumifs
1
46
1
72,904,784
72,904,784
1
true
2022-07-07T17:37:45.783Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to return the highest sum of a dataset according to a set date range?<p>I have a column with different dates and another column with a series of expenses...
72,904,932
Adding and removing byte from a file in a loop<p>I'm a security researcher and am wondering how I could remove the added bytes from a file. This function below adds a byte every 4 bytes. But I'd like to know how I could remove those bytes as well. Need a function that will remove these bytes in the order they were adde...
<pre class="lang-c prettyprint-override"><code>int RemoveByte(BYTE* bIn, BYTE* bOut, DWORD dwSize, int inc_every) { int increased = 0; for (int i = 0; i &lt; dwSize; i++) { if ((i - 1) % inc_every != 0) { *(bOut + increased) = *(bIn + i); increased++; } ...
Adding and removing byte from a file in a loop
c|memory|byte|entropy
0
46
1
72,905,695
72,905,695
1
true
2022-07-07T22:38:06.577Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Adding and removing byte from a file in a loop<p>I'm a security researcher and am wondering how I could remove the added bytes from a file. This function bel...
72,905,287
Keep rows with one particular value in one column using some condition in another column in same dataframe<p>I have the below dataframe:</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>col1</th> <th>col2</th> <th>col3</th> </tr> </thead> <tbody> <tr> <td>Device1</td> <td>A</td> <td>true</td...
<p>You can do it with window functions: partitioning by col1 and col2, ordering by col3 descending. Use the <a href="https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.functions.first.html#pyspark.sql.functions.first" rel="nofollow noreferrer"><strong><code>first</code></strong></a> f...
Keep rows with one particular value in one column using some condition in another column in same dataframe
apache-spark|pyspark|filter|apache-spark-sql|multiple-columns
1
46
1
72,907,539
72,907,539
1
true
2022-07-07T23:43:26.803Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Keep rows with one particular value in one column using some condition in another column in same dataframe<p>I have the below dataframe:</p> <div class="s-ta...
72,908,308
New to regex - retrieve a question mark<p>I am quite new to regex and I would like to know if there was a way to match something that is either a normal character : <code>\w+</code> or a question mark. I am trying to retrieve the value after the <code>n</code>.</p> <p>The line has this format :</p> <p><code>n : ?, t : ...
<p>You want to use the &quot;Alternate&quot; regex symbol.</p> <p>Your regex should therefore be: <code>\w : (\w+|\?), \w : \d\.\d+</code>. Do not forget to escape the question mark, since it is also a regex symbol.</p> <p>EDIT: If the value following <code>n</code> must be either an integer or a <code>?</code>, you ca...
New to regex - retrieve a question mark
python|regex
-1
46
1
72,908,344
72,908,344
1
true
2022-07-08T07:52:39.970Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: New to regex - retrieve a question mark<p>I am quite new to regex and I would like to know if there was a way to match something that is either a normal char...
72,845,028
Why does Pusher update the UI only after navigating to another tab?<p>I used pusher to add real-time updates to my web app. Like if a user hits the like button on a post, the number of likes increases instantaneously in the UI.</p> <p>That works fine when I run the app locally (<a href="https://media.giphy.com/media/3q...
<p>It was Vercel. It worked once I tried Heroku.</p>
Why does Pusher update the UI only after navigating to another tab?
mongodb|next.js|pusher
0
46
1
72,912,766
72,912,766
1
true
2022-07-03T08:36:58.230Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why does Pusher update the UI only after navigating to another tab?<p>I used pusher to add real-time updates to my web app. Like if a user hits the like butt...
72,874,961
How do I bind with multiple Active Directory OU with LDAP<p>I am creating a login page that uses Active Directory credentials. I found some documentation about LDAP in the PHP Manual and managed to successfully login using Active Directory credentials by binding with LDAP.</p> <p>My challenge is that I have multiple O...
<p>The most common generic method (i.e. one that'll work with any kind of LDAP system) is:</p> <ol> <li><p>Bind using a preconfigured &quot;service&quot; account and password. (Ask the AD admins to create a dedicated account for your webapp. They <em>might</em> need to add it to the &quot;Pre-Win2000 systems&quot; grou...
How do I bind with multiple Active Directory OU with LDAP
php|ldap
1
46
1
72,916,162
72,916,162
1
true
2022-07-05T20:03:34.933Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I bind with multiple Active Directory OU with LDAP<p>I am creating a login page that uses Active Directory credentials. I found some documentation ab...
72,911,068
Intellij-Run Application which profile does it use?<p>In my POM I have two profiles, Dev and Prod but there's also dependencies not enclosed within those profiles.Does it mean that there's a <strong>default</strong> profile too?</p> <p>When you do Run Application from within Intellij which profile does it use to run th...
<p>In IntelliJ you can create multiple run configurations (it’s a dropdown next to the run button). Within a configuration you can specify the active profiles you want to use.</p>
Intellij-Run Application which profile does it use?
spring-boot|maven|intellij-idea|dependencies
0
46
1
72,916,652
72,916,652
1
true
2022-07-08T12:00:33.043Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Intellij-Run Application which profile does it use?<p>In my POM I have two profiles, Dev and Prod but there's also dependencies not enclosed within those pro...
72,916,598
Parsing Python hex string in half<p>I'm having troubles wrapping my head around splitting this hex string by the following request.</p> <pre><code>#hex string byte layout Description #0-799 Load data, 4 bytes each #800-1599 Position data, 4 bytes each #leading 0x has been removed </code></pre> <p>I am attempting to us...
<blockquote> <p>When I split the string on &quot;middle_of_string&quot; i get equal numbers on both sides. Does this mean that I am duplicating the last value of the first half and the first value of the second half?</p> </blockquote> <p>No! You're dividing the string exactly in half correctly. Assuming <code>s</code...
Parsing Python hex string in half
python|python-3.x|parsing|hex
0
46
1
72,916,667
72,916,667
1
true
2022-07-08T20:19:42.397Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Parsing Python hex string in half<p>I'm having troubles wrapping my head around splitting this hex string by the following request.</p> <pre><code>#hex strin...
72,915,536
How to infer default generic parameter from a function type?<p>How could I extract the function's default type parameter to get something like this statement to compile?</p> <pre class="lang-js prettyprint-override"><code>const fails: string = &quot;&quot; as ReturnType&lt;&lt;T = string&gt;() =&gt; T&gt;; </code></pre...
<p><code> ReturnType&lt;&lt;T = string&gt;() =&gt; T&gt;</code> is <code>unknown</code> and not <code>string</code>:</p> <pre><code>type F = &lt;T = string&gt;() =&gt; T; type X = ReturnType&lt;F&gt;; // type X = unknown </code></pre> <p>According to <a href="https://github.com/microsoft/TypeScript/issues/42064#issue...
How to infer default generic parameter from a function type?
typescript
1
46
1
72,916,719
72,916,719
1
true
2022-07-08T18:23:57.253Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to infer default generic parameter from a function type?<p>How could I extract the function's default type parameter to get something like this statement...
72,905,032
Calculate Percent Change From IGrouping Count in Linq/C#<p>I would like to have a &quot;percent change for 'Investigations' and 'Breaches' by each quarter. I'm currently grouping by quarter and getting counts but I cannot figure out how to add percent change.</p> <p>This is what I want to have a IEnumerable/List of:</p...
<p>Using an extension method based on the APL scan operator, which is like <code>Aggregate</code> but returns the intermediate results, you can run through the data and refer back to previous counts.</p> <pre><code>// TRes combineFn(TRes PrevResult, T CurItem) // First PrevResult is TRes seedFn(T FirstItem) // FirstIte...
Calculate Percent Change From IGrouping Count in Linq/C#
c#|linq
0
46
1
72,917,341
72,917,341
1
true
2022-07-07T22:56:34.287Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Calculate Percent Change From IGrouping Count in Linq/C#<p>I would like to have a &quot;percent change for 'Investigations' and 'Breaches' by each quarter. I...
72,915,033
Spacing out stacked bars in chart.js<p>I am trying to do a stacked bar chart with only one bar in Chart.js using JS, CSS, and HTML. This is the chart I have constructed so far: <a href="https://i.stack.imgur.com/gUNvU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gUNvU.png" alt="enter image descrip...
<p>Regarding adding spaces between the bars, I wasn't either able to find any direct configuration that allowed such behavior.</p> <p>My first thought was to add borders and make them invisible, however you wouldn't see the effect of <code>borderRadius</code>.</p> <p>Then, I come to another approach that interleaves th...
Spacing out stacked bars in chart.js
javascript|html|css|chart.js
1
46
2
72,917,709
72,917,709
1
true
2022-07-08T17:34:47.663Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Spacing out stacked bars in chart.js<p>I am trying to do a stacked bar chart with only one bar in Chart.js using JS, CSS, and HTML. This is the chart I have ...
72,916,335
How to enable CDN for a subdomain with external web server?<p>My landing page is a static built website on Netlify. Then I have a subdomain, which is an A record in DNS (set in Netlify). This subdomain is points to an external web server (nginx+Django), which provides REST API and serves static content. The question is...
<p>You can use Netlify's Proxy Rewrites: <a href="https://docs.netlify.com/routing/redirects/rewrites-proxies/" rel="nofollow noreferrer">https://docs.netlify.com/routing/redirects/rewrites-proxies/</a> to add some level of CDN to your site. However, it will totally be upto Netlify to decide how much time your content ...
How to enable CDN for a subdomain with external web server?
cdn|cloudflare|netlify
0
46
1
72,919,247
72,919,247
1
true
2022-07-08T19:48:40.560Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to enable CDN for a subdomain with external web server?<p>My landing page is a static built website on Netlify. Then I have a subdomain, which is an A re...
72,919,755
Angular: How to drop a line in an array in HTML?<p>for exmple:<a href="https://i.stack.imgur.com/UlP23.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UlP23.png" alt="enter image description here" /></a></p> <p>Where I marked I want to go down a line. I have an array of userName, Password errors.</p>...
<p>I think on your class CSS error you can make the display is block, that make every data error in the new row.</p>
Angular: How to drop a line in an array in HTML?
angular
0
46
1
72,921,429
72,921,429
1
true
2022-07-09T07:39:23.333Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Angular: How to drop a line in an array in HTML?<p>for exmple:<a href="https://i.stack.imgur.com/UlP23.png" rel="nofollow noreferrer"><img src="https://i.sta...
72,907,960
Web Accessibility. window.speechSynthesis vs role "alert"<p>To immediately announce error for control/input I have 2 choices:</p> <ol> <li>append HTMLElement to document with role 'alert' and error-message. NVDA reads <code>alert. [errorMessageHere]</code></li> </ol> <p><div class="snippet" data-lang="js" data-hide="fa...
<p>You should definitely prefer live regions and role alert over speech API.</p> <p>When using live regions or role alert, the message goes through the screen reader, which brings several important advantages:</p> <ul> <li>It is read with the voice settings configured in the screen reader (voice, language, rate, pitch...
Web Accessibility. window.speechSynthesis vs role "alert"
javascript|accessibility|alert|screen-readers|speech-synthesis
0
46
1
72,924,719
72,924,719
1
true
2022-07-08T07:16:46.097Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Web Accessibility. window.speechSynthesis vs role "alert"<p>To immediately announce error for control/input I have 2 choices:</p> <ol> <li>append HTMLElement...
72,859,830
Feign call URL with comma<p>I'm trying to call a URL with commas, curly braces and square brackets in it.</p> <p>With Feign, here is how I begin :</p> <pre><code>@FeignClient(name=&quot;FinancialTimesFeignClient&quot;, url=&quot;https://markets.ft.com/data/equities/ajax/updateScreenerResults&quot;) public interface Fin...
<p>You can pass the value of <code>data</code> as a String <code>RequestParam</code> to your method <code>getTickers</code> so that it will be append to the URL :</p> <pre class="lang-java prettyprint-override"><code>... @GetMapping FinancialTimesDto getTickers(@RequestParam String data); ... </code></pre>
Feign call URL with comma
spring|feign|request-mapping
0
46
1
72,929,849
72,929,849
1
true
2022-07-04T16:40:29.027Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Feign call URL with comma<p>I'm trying to call a URL with commas, curly braces and square brackets in it.</p> <p>With Feign, here is how I begin :</p> <pre><...
72,933,432
Firebase Functions: when to call initializeApp/deleteApp<p>I have a variety of functions for <a href="https://firebase.google.com/docs/functions" rel="nofollow noreferrer">Cloud Functions</a> that use things derived from <code>firebase-admin/app</code>'s <code>initializeApp()</code>. Since multiple functions use this, ...
<p>A call to deleteApp is not necessary. When a Cloud Functions instance terminates, all memory gets shut down with it (which is what deleteApp would do). The entire server instance is completely gone.</p> <p>You only need to call deleteApp if you are controlling a process that needs to continue after the call to del...
Firebase Functions: when to call initializeApp/deleteApp
firebase|google-cloud-functions|firebase-admin
0
46
1
72,933,644
72,933,644
1
true
2022-07-11T03:33:09.423Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Firebase Functions: when to call initializeApp/deleteApp<p>I have a variety of functions for <a href="https://firebase.google.com/docs/functions" rel="nofoll...
72,936,782
Subtract hours from date object in bash<p>I need to find a time X hours before the previous midnight, thus I would like to subtract X hours from a date object.</p> <p><strong>Example</strong></p> <pre><code># Finding the previous midnight date -d &quot;yesterday 23:59:59&quot; Mon Jul 11 00:00:00 CEST 2022 </code></pre...
<p>It seems one can just write the following:</p> <pre><code>date --date 'yesterday 23:59:59 CEST -4 hours' </code></pre>
Subtract hours from date object in bash
bash|date
1
46
2
72,937,192
72,937,192
1
true
2022-07-11T10:02:12.377Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Subtract hours from date object in bash<p>I need to find a time X hours before the previous midnight, thus I would like to subtract X hours from a date objec...
72,937,383
Rerendering a component - ReactJS, Axios<p>After calling <code>canBookSlot</code> I want to update the <code>slotsList</code> I figure i have to make a new Axios request, can i reuse the useEffect whitin the <code>then()</code> method to rerender the component with updated properties or is there any other smart way of ...
<p>You can create common function and reuse when you want to call that axios api and update the data.</p> <pre><code>updateData = () =&gt; { Axios.post(&quot;http://localhost:3001/api/get/week1/ex&quot;).then((response) =&gt; { setSlotsList(response.data); }); } useEffect(() =&gt; { updatedData(); }, []);...
Rerendering a component - ReactJS, Axios
reactjs|axios
0
46
1
72,937,463
72,937,463
1
true
2022-07-11T10:50:54.427Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Rerendering a component - ReactJS, Axios<p>After calling <code>canBookSlot</code> I want to update the <code>slotsList</code> I figure i have to make a new A...
72,939,061
Sort array of object based on nested api call Angular<p>I have to sort array of object based on array response of first API call. The data should be sorted in ascending order.</p> <p>Currently I have first api call which returns list of array that will be used in the next api call.</p> <pre><code> this.service.fetchSto...
<p>The best solution would be to make app-cards dumb and provide the already fetched story to app-card.</p> <p>Component</p> <pre><code>this.service.fetchStories().pipe( switchMap(idArray =&gt; forkJoin(idArray.map(id =&gt; this.service.fetchStoryItems(this.id)))), map(storyArray =&gt; storyArray.sort((a,b) =&gt; a...
Sort array of object based on nested api call Angular
javascript|angular|typescript
1
46
3
72,939,836
72,939,836
1
true
2022-07-11T13:04:16.423Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Sort array of object based on nested api call Angular<p>I have to sort array of object based on array response of first API call. The data should be sorted i...
72,932,581
Emoji typewriting animation via pure JavaScript cause rendering<p>I am trying to recreate the idea of <a href="https://www.youtube.com/watch?v=POX3dT-pB4E" rel="nofollow noreferrer">this video</a> by creating a typewriting logo of the site that contains emojis. However, it seems that rendering emoji on browser takes a ...
<p>If all you want is to change the emoji, the code you have overcomplicates it.</p> <p>Attempting to change as little of your existing code as possible, the example below should show the emoji for 800ms and hide it for 500ms.</p> <pre class="lang-js prettyprint-override"><code>class TypeWriter { constructor(txtEleme...
Emoji typewriting animation via pure JavaScript cause rendering
javascript|html
0
46
1
72,942,317
72,942,317
1
true
2022-07-10T23:46:02.607Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Emoji typewriting animation via pure JavaScript cause rendering<p>I am trying to recreate the idea of <a href="https://www.youtube.com/watch?v=POX3dT-pB4E" r...
72,941,475
Is it possible to concurrently read from RocksDB?<p>I have the case where multiple Linux processes need to link with RocksDB library and concurently read (high load) the same database.<br /> The only one process updates database several times a day.</p> <p>Is it possible to concurrently read from within multiple proces...
<p>Seems that <a href="https://github.com/facebook/rocksdb/wiki/Read-only-and-Secondary-instances" rel="nofollow noreferrer">Rocksdb supports</a> multiple read-only or secondary instances (two variations of read-only mode):</p> <blockquote> <p>Read-only Instance - Opens the database in read-only mode. When the Read-onl...
Is it possible to concurrently read from RocksDB?
database|database-design|concurrency|synchronization|rocksdb
2
46
2
72,944,615
72,944,615
1
true
2022-07-11T16:05:22.510Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is it possible to concurrently read from RocksDB?<p>I have the case where multiple Linux processes need to link with RocksDB library and concurently read (hi...
72,943,945
How to capture all screen in C# and change the resolution of the bitmap<p>I tried to capture my screen in C# (.NET 4.6.2 in console mode) to get a base64 string of the bitmap.</p> <p>My issue is that the base64 is too big in my case so I want to decrease the resolution of the Bitmap, I tried this code:</p> <pre class="...
<p>As requested, i hope this helps. I can explain better if the comments are not enough.</p> <pre><code>using System; using System.Drawing; using System.Drawing.Drawing2D; using System.IO; using System.Windows.Forms; namespace BitMapResize { public partial class Form1 : Form { /// &lt;summary&gt; ...
How to capture all screen in C# and change the resolution of the bitmap
c#|bitmap
1
46
1
72,945,355
72,945,355
1
true
2022-07-11T19:51:51.770Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to capture all screen in C# and change the resolution of the bitmap<p>I tried to capture my screen in C# (.NET 4.6.2 in console mode) to get a base64 str...
72,946,510
Laravel Keeps rounding Numbers<p>I have a laravel project that for some reasons keeps on rounding numbers when saving them into the database.</p> <p>Here is my model:</p> <pre><code>/** * Adds a pur order. * * @param &lt;array&gt; $data The data * * @return boolean , int id purchase order */ public f...
<p>You should use <code>DECIMAL(X,Y)</code>. <code>X</code> being the total length and <code>Y</code> being the number of decimals you would like to keep.</p> <p>Using string might give you more problems in the future when you're trying to ensure integrity of the data type.</p> <p><a href="https://www.w3schools.com/sql...
Laravel Keeps rounding Numbers
php|laravel
1
46
1
72,946,979
72,946,979
1
true
2022-07-12T02:44:47.707Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Laravel Keeps rounding Numbers<p>I have a laravel project that for some reasons keeps on rounding numbers when saving them into the database.</p> <p>Here is ...
72,947,178
Integrating If, While, Try Statements into a Single Program<p>I have the following code:</p> <pre><code>count = 0 def thisisapgoram(): while True: try: x = int(input('Input a number:')) count = count + int(x) except NameError: print('Try again, sunshine') ...
<p>There are multiple problems in program:</p> <p>1.Better to make count a local scope variable.</p> <p>2.When casting a Value error is raised not Name error</p> <p>3.You are not printing the return value</p> <p>4.Line where you are casting will throw error, so x='done' will never be a case.</p> <pre><code>def thisisap...
Integrating If, While, Try Statements into a Single Program
python|loops|if-statement|while-loop
-1
46
2
72,947,394
72,947,394
1
true
2022-07-12T04:50:56.010Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Integrating If, While, Try Statements into a Single Program<p>I have the following code:</p> <pre><code>count = 0 def thisisapgoram(): while True: ...
72,946,051
Laravel On click Event Button [Enable button after upload file]<p>I have a table which contain two buttons, one is for uploading a file and the other one is for giving score. What I want to do is to give a condition for the second button which is the scoring button, whereby it can't be clicked (disabled) if there is no...
<pre><code>@if(isset($pekerjaans-&gt;yourFileCulmnName)) &lt;td&gt; &lt;a href=&quot;/nilai/{{$pekerjaans-&gt;id}}&quot; type=&quot;button&quot; class=&quot;btn btn-outline-primary&quot;&gt;Penilaian&lt;/a&gt; //disabled untill file uploaded &lt;/td&gt; @endif </code></pre>
Laravel On click Event Button [Enable button after upload file]
php|laravel
-1
46
1
72,948,616
72,948,616
1
true
2022-07-12T01:05:41.883Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Laravel On click Event Button [Enable button after upload file]<p>I have a table which contain two buttons, one is for uploading a file and the other one is ...
72,948,649
Cannot deserialize the current JSON - DeserializeObject - Bad model<p>I try downloading data from API, but I get an error when <code>DeserializeObject</code></p> <p>I suppose I have a badly built model: <code>ObjectResponse</code></p> <p>but I can't think of how else to build it</p> <p>I use Newtonsoft.Json</p> <p>Cont...
<p>The <code>data</code> property in the JSON was an <code>ObjectResponse</code> object, but not an <code>ObjectResponse</code> array.</p> <p>Remove the <code>IEnumerable&lt;&gt;</code>.</p> <pre class="lang-cs prettyprint-override"><code>return JsonConvert.DeserializeObject&lt;Response&lt;ObjectResponse&gt;&gt;(result...
Cannot deserialize the current JSON - DeserializeObject - Bad model
c#|json|.net|json.net|ienumerable
0
46
1
72,948,685
72,948,685
1
true
2022-07-12T07:38:15.710Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Cannot deserialize the current JSON - DeserializeObject - Bad model<p>I try downloading data from API, but I get an error when <code>DeserializeObject</code>...
72,948,565
DLL starts with MZx in DOS header - what does it mean?<p>I found a program which uses a dll-file, which starts with MZx in the DOS header. I never saw this before in my life. I get ZERO results at google when i try to find explanations what this means. Here is a screenshot:</p> <p><a href="https://i.stack.imgur.com/Ow1...
<p>Only the first two bytes are part of the signature, the rest is <a href="https://www.nirsoft.net/kernel_struct/vista/IMAGE_DOS_HEADER.html" rel="nofollow noreferrer">the configuration</a> of the DOS program:</p> <pre><code>typedef struct _IMAGE_DOS_HEADER { WORD e_magic; // MZ WORD e_cblp; // Bytes on las...
DLL starts with MZx in DOS header - what does it mean?
windows|header|dos
0
46
1
72,949,783
72,949,783
1
true
2022-07-12T07:30:47.347Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: DLL starts with MZx in DOS header - what does it mean?<p>I found a program which uses a dll-file, which starts with MZx in the DOS header. I never saw this b...
72,947,736
how to prevent stacking function callbacks while exiting a screen react/react-native<p>I have a local state <code>selectedProducts</code> holding a number representing the number of products the client has selected, while exiting the screen I want to update the number in redux so it can be viewed in the cart on a diffe...
<p>You can try this:</p> <pre><code>useEffect(()=&gt;{ navigation.addListener('beforeRemove', () =&gt; { console.log('check this', selectedProducts); if (!selectedProducts) { return; } dispatch(addToCartMultipleQty(selectedProducts)); }); return () =&gt; { navigation.removeListener('be...
how to prevent stacking function callbacks while exiting a screen react/react-native
javascript|reactjs|react-native|react-hooks|react-navigation
1
46
2
72,950,254
72,950,254
1
true
2022-07-12T06:09:28.757Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to prevent stacking function callbacks while exiting a screen react/react-native<p>I have a local state <code>selectedProducts</code> holding a number re...
72,952,631
How can I use BeforeDoubleClick to cycle through more than two colours?<p>I have a <a href="https://i.stack.imgur.com/pMoi2.png" rel="nofollow noreferrer">worksheet</a> that plots my personal targets down the left with the methods of completion along the top. For cell in the matrix, I want to be able to double click to...
<p>My advice: Separate the tasks. Don't put too much logic into the trigger (the event routine) itself. In the following example, the event routine just checks if the target cells qualifies for the logic: You don't want to overwrite the content of the first columns or the header row. If okay, it calls a routine (<code>...
How can I use BeforeDoubleClick to cycle through more than two colours?
excel|vba
0
46
2
72,954,172
72,954,172
1
true
2022-07-12T12:50:27.620Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I use BeforeDoubleClick to cycle through more than two colours?<p>I have a <a href="https://i.stack.imgur.com/pMoi2.png" rel="nofollow noreferrer">wo...
72,932,315
Facebook Graph API unable to get comments from user's post<p>The Facebook Graph API seems no way to get any comments other than user itself posted from users' any Post, Album, Photo or Video nowadays. The <a href="https://developers.facebook.com/docs/graph-api/reference/v14.0/object/comments" rel="nofollow noreferrer">...
<p>If this is for &quot;personal use&quot; your own user token then yeah you won't have a choice to bring anything else but if you're using a Page Token for a page that you manage then you can get the posts and comments but I'm currently unable to get the Comments &quot;from&quot; data so I can know who the User is (Na...
Facebook Graph API unable to get comments from user's post
facebook|facebook-graph-api
2
46
1
72,958,962
72,958,962
1
true
2022-07-10T22:37:31.220Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Facebook Graph API unable to get comments from user's post<p>The Facebook Graph API seems no way to get any comments other than user itself posted from users...
72,959,798
How to retrieve id of object that has min value of a complex nested field<p>This is my file <strong>myfile.gz</strong>, it's a stream of objects like this:</p> <pre><code>{ &quot;id&quot;: &quot;12345&quot;, &quot;type&quot;: &quot;A&quot;, &quot;count&quot;: 23, &quot;monday&quot;: { &quot;totalM...
<p>Use <code>-s</code> to turn the stream into an array, then <code>map(select(…))</code> to filter by your criteria, find the minimum using <code>min_by(…)</code> with your other criteria, and finally output your desired field <code>.id</code>. Add parameter <code>-r</code> (next to <code>-s</code>) if you want the ou...
How to retrieve id of object that has min value of a complex nested field
json|jq
0
46
1
72,959,884
72,959,884
1
true
2022-07-13T00:53:14.830Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to retrieve id of object that has min value of a complex nested field<p>This is my file <strong>myfile.gz</strong>, it's a stream of objects like this:</...
72,960,622
What's the meaning of starting with :: Rust macro<p>I saw macro coding right below.</p> <p>Why should <strong>::</strong> be first of the statement and what does it mean?</p> <p>::std::collections::HashMap::new()</p> <pre><code>macro_rules! hashmap { () =&gt; { { ::std::collections::HashMap::ne...
<p>Path starting with <code>::</code> means that search in global namespace. Since @Chayin already pointed the documentation, A example might be useful for you and future readers. When you run this program: <strong>test-program/src/main</strong></p> <pre class="lang-rust prettyprint-override"><code>mod std { pub mo...
What's the meaning of starting with :: Rust macro
rust
0
46
2
72,960,739
72,960,739
1
true
2022-07-13T03:35:51.323Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What's the meaning of starting with :: Rust macro<p>I saw macro coding right below.</p> <p>Why should <strong>::</strong> be first of the statement and what...
72,966,254
NSIS - Get command line argument and store it in a text file<p>I build an app in electron and making exe using electron-builder. I need a URL field during installation so I wrote a script that ask for URL field and store it in a <em>credentials.txt</em> file. <strong>Installing manually(double clicking) is working fine...
<p>Only .onInit and Sections are executed in silent installers, not the pages.</p> <pre><code>Var URL !include LogicLib.nsh !include nsDialogs.nsh !include FileFunc.nsh Page Custom MyPageCreate MyPageLeave Page InstFiles Function .onInit ${GetParameters} $0 ${GetOptions} &quot;$0&quot; &quot;/URL=&quot; $URL ; If th...
NSIS - Get command line argument and store it in a text file
nsis|electron-builder
0
46
1
72,973,034
72,973,034
1
true
2022-07-13T12:25:34.717Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: NSIS - Get command line argument and store it in a text file<p>I build an app in electron and making exe using electron-builder. I need a URL field during in...
72,971,067
NextJs - load dynamic data to the main page from different file<p>I am trying to add dynamic data from one file to another and am having issues with that.</p> <p><strong>The data I am trying to load from</strong></p> <p>path: /src/components/Subnav.js</p> <pre><code>import React, { Component } from &quot;react&quot;; c...
<p><a href="https://nextjs.org/docs/api-reference/data-fetching/get-initial-props" rel="nofollow noreferrer">getInitialProps</a> is data fetching method for page, it means you only can use it inside <code>/pages</code> folder. If you want fetching data for components, you can use useEffect.</p> <pre><code>import React,...
NextJs - load dynamic data to the main page from different file
reactjs|api|next.js
0
46
1
72,974,109
72,974,109
1
true
2022-07-13T18:32:36.867Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: NextJs - load dynamic data to the main page from different file<p>I am trying to add dynamic data from one file to another and am having issues with that.</p...
72,974,121
JSON_VALUE and path as variable in MySQL 8.x not working<p>I use Mysql 8.0 and trying to use JSON_VALUE to work with arrays in stored procedures</p> <pre><code>CREATE PROCEDURE `tJS` () BEGIN DECLARE _counter INT DEFAULT 0; SET @arr = '[&quot;123&quot;,&quot;3&quot;,&quot;15&quot;]'; WHILE _counter &lt; JSON_...
<p><a href="https://dev.mysql.com/doc/refman/8.0/en/json-search-functions.html#function_json-value" rel="nofollow noreferrer">https://dev.mysql.com/doc/refman/8.0/en/json-search-functions.html#function_json-value</a> says:</p> <blockquote> <p><code>path</code> is a JSON path pointing to a location in the document. This...
JSON_VALUE and path as variable in MySQL 8.x not working
mysql|sql
0
46
1
72,974,587
72,974,587
1
true
2022-07-14T00:56:23.087Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: JSON_VALUE and path as variable in MySQL 8.x not working<p>I use Mysql 8.0 and trying to use JSON_VALUE to work with arrays in stored procedures</p> <pre><co...
72,975,826
TypeScript each() as an Arrow function<p>I have the following TypeScript function:</p> <pre><code>$.each($(&quot;[data-static-map-image]&quot;), function () { $(this).attr(&quot;src&quot;, $(this).data(&quot;mapImageUrl&quot;)); }); </code></pre> <p>I would like to convert this into an Arrow function. Unfortunately...
<p>The jQuery documentation on <a href="https://api.jquery.com/jQuery.each/" rel="nofollow noreferrer">jQuery.each</a> explains that the callback gets arguments:</p> <blockquote> <p><strong>callback</strong><br> Type: Function( Integer indexInArray, Object value )<br> The function that will be executed on every value.<...
TypeScript each() as an Arrow function
javascript|jquery|typescript|each|arrow-functions
0
46
2
72,975,974
72,975,974
1
true
2022-07-14T05:55:34.843Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: TypeScript each() as an Arrow function<p>I have the following TypeScript function:</p> <pre><code>$.each($(&quot;[data-static-map-image]&quot;), function () ...
72,977,232
How to correctly chain Mono/Flux calls<p>I'm having trouble with understanding how to achieve my goal with reactive approach. Let's assume that I have a Controller, that will return Flux:</p> <pre><code>@PostMapping(value = &quot;/mutation/stream/{domainId}&quot;, produces = MediaType.TEXT_EVENT_STREAM_VALUE) public Fl...
<p>You are ignoring the value of the inner <code>flatMap</code> hence the warning.</p> <p>Without trying you need something like this</p> <pre><code>private Mono&lt;Mutation&gt; getMutation(int gameId, int typeId, int domainId) { return mutationProvider.findByGameIdAndTypeId(gameId, typeId) .flatMap...
How to correctly chain Mono/Flux calls
spring|spring-boot|spring-webflux|reactive-streams
0
46
1
72,978,667
72,978,667
1
true
2022-07-14T08:09:24.770Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to correctly chain Mono/Flux calls<p>I'm having trouble with understanding how to achieve my goal with reactive approach. Let's assume that I have a Cont...
72,973,098
Get first element from PySpark data frame<p>I have a PySpark data frame which only contains one element. How can I extract the number from the data frame?</p> <p>For the example, how can I get the number 5.0 from the PySpark data frame?</p> <pre class="lang-none prettyprint-override"><code>+-----------------+ | ...
<p>Several alternatives:</p> <pre class="lang-py prettyprint-override"><code>df.head()[0] df.head().count df.head()['count'] </code></pre> <p><code>first</code> does the same, but <code>head</code> is 1 letter shorter ;)</p>
Get first element from PySpark data frame
dataframe|apache-spark|pyspark|extract
1
46
2
72,979,179
72,979,179
1
true
2022-07-13T22:03:10.517Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Get first element from PySpark data frame<p>I have a PySpark data frame which only contains one element. How can I extract the number from the data frame?</p...
72,979,250
How to make reactivity work with a Promise started from a constructor?<p>I have a class <code>Thing</code>, whose constructor starts an asynchronous <code>fetch</code> operation. When the <code>fetch</code> completes, the result is assigned to a field on the <code>Thing</code> object:</p> <pre><code> class Thing { ...
<p>define your class attribute as a ref</p> <pre class="lang-js prettyprint-override"><code>&lt;script setup&gt; import { reactive, ref } from 'vue' class Thing { constructor() { this.image = ref(null) this.load() } async load() { const response = await fetch('https://placekitten.com...
How to make reactivity work with a Promise started from a constructor?
javascript|vue.js|promise|vuejs3
2
46
1
72,979,740
72,979,740
1
true
2022-07-14T10:47:14.520Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to make reactivity work with a Promise started from a constructor?<p>I have a class <code>Thing</code>, whose constructor starts an asynchronous <code>fe...
72,980,617
More efficient way to search through Pandas groups<p>I want to get the list of values from <code>col2</code> that belong to the same <code>groupId</code>, given corresponding value in <code>col1</code>. <code>Col1</code> values can belong to multiple groups and in that case only top-most group should be considered (gro...
<p>The <code>sort</code> parameter of groupby defaults to true, which means the first group will be the topmost by default. You can change the <code>col_to_search</code> to <code>b</code> and get the other answer.</p> <pre><code>import pandas as pd df = pd.DataFrame({'groupId': [2, 1, 2, 1, 3, 3, 1], 'col1': ['a', 'b...
More efficient way to search through Pandas groups
python|pandas|pandas-groupby
1
46
4
72,980,874
72,980,874
1
true
2022-07-14T12:35:58.190Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: More efficient way to search through Pandas groups<p>I want to get the list of values from <code>col2</code> that belong to the same <code>groupId</code>, gi...
72,980,814
Impossible to enter values via an input<p>I would like to enter a value into the input, but nothing happens. However, after 2 clicks the image is selected automatically.</p> <p><a href="https://i.stack.imgur.com/oZg8X.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oZg8X.jpg" alt="enter image descrip...
<p>As others suggested in the comments above, <code>logoDigipass1</code> is overlapping <code>section_instruction</code>.</p> <p>To solve this problem add this to your CSS:</p> <pre><code>.section_instruction { position: relative; /* Add this */ z-index: 1; /* Add this */ } </code></pre> <p>See the snippet below.</...
Impossible to enter values via an input
html|css|bootstrap-5|bootstrap5-modal
0
46
1
72,981,477
72,981,477
1
true
2022-07-14T12:50:15.393Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Impossible to enter values via an input<p>I would like to enter a value into the input, but nothing happens. However, after 2 clicks the image is selected au...
72,905,211
In Sage: No module named 'Crypto' --> ssl errors with pip<p>I see from <a href="https://stackoverflow.com/questions/40787908/no-module-named-crypto-import-error-for-sage">this answer</a> that the solution is to run:</p> <pre><code>sage --pip install pycrypto </code></pre> <p>Yet, when I try this, I get the following er...
<p>Since you have Sage 9.2, I would suggest upgrading.</p> <p>The best way to do so depends on</p> <ul> <li>whether you intend to develop Sage or only use it</li> <li>what extra packages you need to install with Sage</li> </ul> <p>If you</p> <ul> <li>only intend to use Sage</li> <li>only need pip-installable packages</...
In Sage: No module named 'Crypto' --> ssl errors with pip
ssl|pip|pycrypto|sage
2
46
1
72,981,803
72,981,803
1
true
2022-07-07T23:26:55.830Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: In Sage: No module named 'Crypto' --> ssl errors with pip<p>I see from <a href="https://stackoverflow.com/questions/40787908/no-module-named-crypto-import-er...
72,983,264
List shifting in React JS<p>So basicly what I want is,</p> <p>I am passing one array in List component like this :</p> <p>&lt;List items={[&quot;A&quot;, &quot;B&quot;, &quot;C&quot;]} /&gt;</p> <p>Now I need to print each element in list like this :</p> <p>● A ● B ● C</p> <p>But whenever someone will click any l...
<p>you can do something like this</p> <pre><code>const List = ({items}) =&gt; { const [list, setList] = useState(items) return &lt;ul&gt;{list.map((l, i) =&gt; &lt;li onClick={() =&gt; setList([l, ...items.filter(item =&gt; item !== l)])} key={i}&gt; ...
List shifting in React JS
javascript|reactjs|arrays|list
0
46
3
72,983,334
72,983,334
1
true
2022-07-14T15:43:41.750Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: List shifting in React JS<p>So basicly what I want is,</p> <p>I am passing one array in List component like this :</p> <p>&lt;List items={[&quot;A&quot;, &qu...
72,975,572
Step Counter Sprite Kit<p>I am trying to implement a step counter in my sprite Kit game.</p> <p>And it should work like this:</p> <ol> <li><p>The counter adds 1 to a value each second.</p> </li> <li><p>Every fifth second the duration (in this case 1) gets divided by 1.1</p> </li> </ol> <p>But if I create a func that re...
<p>you should make an action that calls itself, rather than using <code>SKAction.repeatForever(...)</code>. you can recalculate values that way. not sure i entirely understand your use case, but here is an example that fires an event after a duration, and modifies that duration every fifth cycle.</p> <pre><code>var isL...
Step Counter Sprite Kit
swift|sprite-kit
0
46
1
72,983,450
72,983,450
1
true
2022-07-14T05:23:43.023Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Step Counter Sprite Kit<p>I am trying to implement a step counter in my sprite Kit game.</p> <p>And it should work like this:</p> <ol> <li><p>The counter add...
72,985,754
"Ambiguous column name" in SQLite using update and set<p>First of all, I'm sorry because I know there are many questions regarding &quot;Ambiguous column name&quot; error here in Stack but I'm really newbie in SQL and doing my first queries using SQLite I found this error. After analyzing other several questions I didn...
<p>Your syntax is wrong.<br/> There is no need to refer to the updated table after <code>FROM</code> and the <code>ON</code> clause must be replaced with a <code>WHERE</code> clause.<br/></p> <p>This is the correct syntax (if your SQLite version is 3.33.0+) for a join-like <a href="https://www.sqlite.org/lang_update.ht...
"Ambiguous column name" in SQLite using update and set
sql|sqlite|join|sql-update|ambiguous
0
46
1
72,986,029
72,986,029
1
true
2022-07-14T19:30:55.067Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: "Ambiguous column name" in SQLite using update and set<p>First of all, I'm sorry because I know there are many questions regarding &quot;Ambiguous column nam...
72,987,167
Nodemailer Attachment Empty but filename is attached<p>My nodemailer is sending the attachment with the filename, and it's empty.</p> <p>I asked previously for help on this and haven't gotten any response, hopefully, this time, I will. <a href="https://stackoverflow.com/questions/72263941/nodemailer-sending-attachment-...
<p>You need to include <code>content</code> or <code>path</code> (or one of the other options <a href="https://nodemailer.com/message/attachments/" rel="nofollow noreferrer">shown here</a>):</p> <pre><code>let mail = { from: &quot;hello@gmail.com&quot;, to: &quot;email@gmail.com&quot;, subject: `Complaint f...
Nodemailer Attachment Empty but filename is attached
reactjs|nodemailer
1
46
1
72,987,960
72,987,960
1
true
2022-07-14T22:15:21.337Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Nodemailer Attachment Empty but filename is attached<p>My nodemailer is sending the attachment with the filename, and it's empty.</p> <p>I asked previously f...