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,192,215
How do I get specific values from a lua table?<p>I have a local that prints <code>{&quot;text1&quot;:value1, &quot;text2&quot;:value2, &quot;text3&quot;:value3}</code>.</p> <p>The local is from an export that returns a table, so I used <code>json.encode</code> to get the table, but I don't know where to go from here. H...
<p><code>d=json.decode('{&quot;text1&quot;:&quot;value1&quot;, &quot;text2&quot;:&quot;value2&quot;, &quot;text3&quot;:&quot;value3&quot;}'); print(d.text1)</code></p> <p>Solved by @Egor Skriptunoff</p>
How do I get specific values from a lua table?
lua
0
41
1
72,192,946
72,192,946
1
true
2022-05-10T19:51:28.683Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I get specific values from a lua table?<p>I have a local that prints <code>{&quot;text1&quot;:value1, &quot;text2&quot;:value2, &quot;text3&quot;:valu...
72,192,939
Setting a (tricky) active class on react tabs<p>I have some very basic react tabs:</p> <pre><code> const tabItems = ['Tab 1', 'Tab 2']; function TabGroup() { const [activeItem, setActive] = useState(tabItems[0]); return ( &lt;&gt; &lt;div className={styles.tabs}&gt; {tabItems.m...
<p>Try removing the braces around your styles.</p> <pre><code> className={activeItem === tabItem ? styles.on : styles.off} </code></pre> <p>The first set of curly braces indicates jsx.</p>
Setting a (tricky) active class on react tabs
reactjs|tabs
0
227
2
72,193,023
72,193,023
1
true
2022-05-10T21:05:55.753Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Setting a (tricky) active class on react tabs<p>I have some very basic react tabs:</p> <pre><code> const tabItems = ['Tab 1', 'Tab 2']; function TabGroup...
72,190,488
How to customize the menu in Flutter?<p>I'm developing a dynamic menu in Getx and I'm iterating through a list. It wouldn't be a problem if all the menus were the same, the problem is that the Editores menu is not the default as you can see in the image. Is there a way to leverage my code and print the Editores menu to...
<p>Solved, envolve the card in some OBX then use the controller.selectedIndex = index with the route like this.</p> <pre><code>onTap: () { controller.selectedIndex = index ; Get.toNamed(_item['rota']); } </code></pre>
How to customize the menu in Flutter?
flutter
0
110
1
72,193,116
72,193,116
1
true
2022-05-10T17:12:00.047Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to customize the menu in Flutter?<p>I'm developing a dynamic menu in Getx and I'm iterating through a list. It wouldn't be a problem if all the menus wer...
72,192,292
UDP Networking with multiple sockets<p>I'm trying to create a server application which essentially controls multiple sockets for data sent over a local network.</p> <p>I firstly did some tests both on linux and windows with they're libraries (such as Winsock) and also with the ASIO library as well, but the goal is to h...
<p>As the comments suggested, you can monitor multiple ports with the <code>select</code> function. It takes lists of ports to check for readability, writability, or errors and returns lists of ports in the requested state.</p> <p>Below is an example watching 5 ports for readability, and exits when all 5 ports have re...
UDP Networking with multiple sockets
linux|sockets|udp|asio
0
54
1
72,193,162
72,193,162
1
true
2022-05-10T19:58:39.213Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: UDP Networking with multiple sockets<p>I'm trying to create a server application which essentially controls multiple sockets for data sent over a local netwo...
72,188,293
How to transfer ether to smart contract by msg.value?<p>I want to transfer some ether form my address to the smart contract, I have tried the code below but it doesn't work. How to transfer ether through msg.sender?</p> <pre><code>pragma solidity &gt;=0.7.0 &lt;0.9.0; contract Test { function testTransfer() exter...
<p>The transaction fails because the smart contract is trying to transfer the ether to himself, and the smart contract doesn't have defined the receive function so it can receive ether that way, for your example you could simply remove all the code inside the function and make another function to check the contract bal...
How to transfer ether to smart contract by msg.value?
ethereum|solidity
0
693
1
72,193,267
72,193,267
1
true
2022-05-10T14:34:31.990Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to transfer ether to smart contract by msg.value?<p>I want to transfer some ether form my address to the smart contract, I have tried the code below but ...
72,192,866
Updating profile picture in firebase<p>i'm not sure what i'm doing wrong here, i upload a new picture to firebase storage, then i retrieve it with getDownloadUrl, and then i update the user profile photoURL, but for some reason it's not working.</p> <pre><code>const imgPath = ref(storage, &quot;images/&quot;); const ...
<p>It is unlikely the current user is updated by the time the updateProfile then statement runs.</p> <p>Instead update the useState hook as with the imgUrl[0].</p> <pre><code>updateProfile(auth.currentUser, { photoURL: `${imgUrl[0]}` }) .then(() =&gt; { setProfileImg(imgUrl[0]); console.log(&quot;s...
Updating profile picture in firebase
reactjs|firebase
0
167
1
72,193,396
72,193,396
1
true
2022-05-10T20:58:18.557Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Updating profile picture in firebase<p>i'm not sure what i'm doing wrong here, i upload a new picture to firebase storage, then i retrieve it with getDownloa...
72,193,388
SQL to retrieve only duplicated values for a certain key<p>I have a table in Postgres as below :</p> <pre><code>Key Value 1234 QAB009 1234 QAB009 1234 QAB010 1235 QAB011 1236 QAB012 1236 QAB012 1236 QAB013 </code></pre> <p>I want output something similar to this , only values which are repeated more th...
<p>You can use simple aggregation with a <em>having</em> filter:</p> <pre><code>select key, value from t group by key, value having Count(*) &gt; 1; </code></pre>
SQL to retrieve only duplicated values for a certain key
sql|postgresql
0
35
2
72,193,420
72,193,420
1
true
2022-05-10T22:04:01.097Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: SQL to retrieve only duplicated values for a certain key<p>I have a table in Postgres as below :</p> <pre><code>Key Value 1234 QAB009 1234 QAB009 1234...
72,193,439
Show alert if style is not supported, without HTML<p>I would need something like this:</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override"><code>if { @supports not(display: grid) { ...
<p>You're making this too complicated </p> <pre><code>if (document.documentElement.style.grid === undefined) { alert(&quot;Please use a different browser.&quot;); } </code></pre> <p>In modern browsers, <code>grid</code> is a property of the style of every element. If it's undefined, then the browser doesn't support...
Show alert if style is not supported, without HTML
javascript|jquery|css
0
34
2
72,193,477
72,193,477
1
true
2022-05-10T22:11:04.560Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Show alert if style is not supported, without HTML<p>I would need something like this:</p> <p><div class="snippet" data-lang="js" data-hide="false" data-cons...
72,193,410
getting a doc read count of a sub collection in firebase?<p>I am trying to change the structure of part of my Db, it a part that is getting called pretty frequently, thus I am afraid it is going to cost more than one read per call due to my new nesting nature, I want to nest it under a sub doc due so I can protect the ...
<p>The nesting of a document doesn't affect how much it costs to read it. One document read is always going to cost the same, no matter what the collection it comes from.</p>
getting a doc read count of a sub collection in firebase?
google-cloud-firestore
0
37
1
72,193,480
72,193,480
1
true
2022-05-10T22:06:43.553Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: getting a doc read count of a sub collection in firebase?<p>I am trying to change the structure of part of my Db, it a part that is getting called pretty fre...
72,193,460
I want to select duplicate rows between 2 dataframes<p>I want to filter rolls (<code>df1</code>) with date column that in <code>datetime64[ns]</code> from <code>df2</code> (same column name and dtype). I tried searching for a solution but I get the error:</p> <blockquote> <p>Can only compare identically-labeled Series ...
<p>Use <code>isin</code>:</p> <pre><code>&gt;&gt;&gt; df1[df1[&quot;date&quot;].isin(df2[&quot;date&quot;])] id date value 0 1 2018-10-09 120 1 2 2018-10-09 60 2 3 2018-10-10 59 </code></pre> <p>If you want to create <code>df2</code> with the dates for the past week, you can simply use <c...
I want to select duplicate rows between 2 dataframes
python|pandas|dataframe
0
20
1
72,193,505
72,193,505
1
true
2022-05-10T22:14:30.793Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: I want to select duplicate rows between 2 dataframes<p>I want to filter rolls (<code>df1</code>) with date column that in <code>datetime64[ns]</code> from <c...
72,192,988
Populating initial roles in a production database<p>When deploying an app to production for the first time (for example using Asp.Net Identity for user management and Entity Framework Core for an ORM) and there is a need for an initial administrator account to be created after it is deployed, what is the best way to ac...
<p>The pattern will depend on your use case, and how you expect the app to be deployed. You need to consider the risk profile of the setup environment.</p> <p>In general, hard coded values are a bad idea, particularly for anything network facing. There are also some issues with automatic &quot;no users&quot; detectio...
Populating initial roles in a production database
c#|asp.net-core|entity-framework-core|asp.net-identity
0
30
1
72,193,714
72,193,714
1
true
2022-05-10T21:11:23.357Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Populating initial roles in a production database<p>When deploying an app to production for the first time (for example using Asp.Net Identity for user manag...
72,192,302
Can not get response from urllib.request.urlopen with an url ending with a dot<p>I have a script looking like this, with a username ending with a &quot;.&quot; dot.</p> <pre><code>import urllib.request url = &quot;https://likee.video/@evadecarle.&quot; response = urllib.request.urlopen(url) print(response) </code></pr...
<p>If we try to fetch <code>https://likee.video/@evadecarle.</code> using <code>urllib.requests</code>, we see:</p> <pre><code>&gt;&gt;&gt; import urllib.request &gt;&gt;&gt; response = urllib.request.urlopen('https://likee.video/@evadecarle.') Traceback (most recent call last): File &quot;&lt;stdin&gt;&quot;, line 1...
Can not get response from urllib.request.urlopen with an url ending with a dot
python|python-3.x|urllib
0
476
1
72,193,734
72,193,734
1
true
2022-05-10T19:59:15.483Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can not get response from urllib.request.urlopen with an url ending with a dot<p>I have a script looking like this, with a username ending with a &quot;.&quo...
72,176,539
Cant find AddHandler of PHP inside Apache configuration files<p>I have a fresh install of CentOS (latest 8 and Stream 9) and I did this do install PHP and Apache:</p> <pre><code>dnf install httpd php </code></pre> <p>Everything works fine and PHP files are being interpreted correctly.</p> <p>I realized there is a file ...
<p>Here's a fragment from one of my configurations (Apache/2.4.25):</p> <pre><code>&lt;FilesMatch &quot;.+\.ph(ar|p|tml)$&quot;&gt; SetHandler application/x-httpd-php &lt;/FilesMatch&gt; </code></pre> <p>Try <code>grep -R php</code> in your /etc/APACHE_CONFIG_DIR</p>
Cant find AddHandler of PHP inside Apache configuration files
php|apache|lamp
0
119
1
72,193,736
72,193,736
1
true
2022-05-09T18:17:48.820Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Cant find AddHandler of PHP inside Apache configuration files<p>I have a fresh install of CentOS (latest 8 and Stream 9) and I did this do install PHP and Ap...
72,193,265
How can I have ranks layout in different directions, in order to to double back?<p>I have a graph of a process that has an &quot;outbound&quot; phase and a &quot;return&quot; phase. I want the return phase to rum back in the other direction.</p> <pre><code>strict digraph { rankdir=&quot;TB&quot; code PO SLP_out {rank...
<p>Swap head &amp; tail of the edges you want to go right-to-left then add <code>dir=back</code> (<a href="https://graphviz.org/docs/attrs/dir/" rel="nofollow noreferrer">https://graphviz.org/docs/attrs/dir/</a>) to get the arrowheads placed correctly</p> <pre><code>// https://stackoverflow.com/questions/72193265/how-c...
How can I have ranks layout in different directions, in order to to double back?
nodes|graphviz|dot
0
19
1
72,193,864
72,193,864
1
true
2022-05-10T21:45:35.333Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I have ranks layout in different directions, in order to to double back?<p>I have a graph of a process that has an &quot;outbound&quot; phase and a &...
72,193,516
for-loop controlling the number of times the Dice are rolled. (Java)<p>I am making a Java program to allow the user to input the number of times the dice are to be rolled. I am using a for loop with a timesRolled variable to control how many times to loop through the program. I want to add all of the random dice values...
<p>You'll want to add the current value of result to the newly determined dice value in every iteration, and assign that to the result so: <code>result = result + rand1</code> or <code>result += rand1</code> for short. Also calling the <code>outputln(result);</code> inside the for loop, will output the cumulative sum e...
for-loop controlling the number of times the Dice are rolled. (Java)
java|for-loop
0
29
1
72,193,870
72,193,870
1
true
2022-05-10T22:22:47.010Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: for-loop controlling the number of times the Dice are rolled. (Java)<p>I am making a Java program to allow the user to input the number of times the dice are...
72,193,871
Python: I'm trying to use math contained in a variable<p>How can I make this:</p> <pre><code>a = '3,3,3,3' b = a.replace(',','+') print(b) </code></pre> <p>Have the output of 12? I want the math inside the variable to be solved.</p>
<pre><code>a = '3,3,3,3' b = [int(el) for el in a.split(&quot;,&quot;)] print(sum(b)) </code></pre> <p>What is going on in the code:</p> <ol> <li>separate input into a list of numbers.</li> <li>cast strings in that list to ints</li> <li>sum a list of ints.</li> </ol>
Python: I'm trying to use math contained in a variable
python
0
30
1
72,193,881
72,193,881
1
true
2022-05-10T23:20:03.920Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python: I'm trying to use math contained in a variable<p>How can I make this:</p> <pre><code>a = '3,3,3,3' b = a.replace(',','+') print(b) </code></pre> <p>H...
72,193,989
Creating a dictionary of a cross-column label encoder<p>I have used <code>sklearn</code>'s <code>LabelEncoder</code> to generate unique encoding of combination of two columns:</p> <pre><code>import pandas as pd import numpy as np from sklearn.preprocessing import LabelEncoder df = pd.read_csv(&quot;data.csv&quot;, sep...
<p>One option is to set the index by A and B, then call <code>to_dict</code>:</p> <pre class="lang-py prettyprint-override"><code>out = df.set_index(['A','B'])['C'].to_dict() </code></pre> <p>Output:</p> <pre class="lang-none prettyprint-override"><code>{(1, 'Yes'): 3, (2, 'No'): 1, (3, 'Yes'): 0, (4, 'Yes'): 2} </code...
Creating a dictionary of a cross-column label encoder
python|pandas|dictionary|scikit-learn|hash
0
59
1
72,194,029
72,194,029
1
true
2022-05-10T23:43:30.497Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Creating a dictionary of a cross-column label encoder<p>I have used <code>sklearn</code>'s <code>LabelEncoder</code> to generate unique encoding of combinati...
72,186,973
Checking for user permissions with Spatie package fails in routes and in controller<p>I tried to use <strong>spatie/laravel-permission</strong> (<a href="https://spatie.be/docs/laravel-permission/v5/installation-laravel" rel="nofollow noreferrer">https://spatie.be/docs/laravel-permission/v5/installation-laravel</a>) to...
<p>step by step every time you run command check the table in database and be sure what the data inserted you got it ?</p> <p><strong>first we insert permission i prefer to write the premission in this way as example</strong> &quot;read_tags&quot; in your example</p> <pre><code>Permission::create(['name' =&gt; 'manage...
Checking for user permissions with Spatie package fails in routes and in controller
laravel
0
213
1
72,194,030
72,194,030
1
true
2022-05-10T13:10:35.700Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Checking for user permissions with Spatie package fails in routes and in controller<p>I tried to use <strong>spatie/laravel-permission</strong> (<a href="htt...
72,193,997
Font Awesome code as string not rendering as expected<p>I have a <code>Label</code> like this:</p> <pre><code> new Label { FontFamily = FontAwesome.Light, FontSize = 50, TextColor = Palette.Common.Accent, Backgr...
<p>Based on <a href="https://stackoverflow.com/a/9303629/199364">https://stackoverflow.com/a/9303629/199364</a>, try</p> <pre class="lang-cs prettyprint-override"><code>= System.Text.RegularExpressions.Regex.Unescape(@&quot;\u&quot; + myCodeString); </code></pre> <p>For example, if <code>myCodeString</code> contains <c...
Font Awesome code as string not rendering as expected
c#|xamarin
0
46
1
72,194,059
72,194,059
1
true
2022-05-10T23:44:41.627Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Font Awesome code as string not rendering as expected<p>I have a <code>Label</code> like this:</p> <pre><code> new Label { ...
72,191,614
How do I fetch similar posts from database where text length can be more than 2000 characters<p>As far as I'm aware, there is no simple, quick solution. I am trying to do a full-text keyword or semantic search, which is a very advanced topic. There are dedicated search servers created specifically for that reason, but ...
<p>Your redundant/overlapping query conditions aren't helpful. Setting similarity_threshold=0.3 then doing</p> <pre><code>t % q and t &lt;-&gt; q &lt; 0.5 </code></pre> <p>just throws away index selectivity for no reason. Set similarity_threshold to as stringent of a value as you want to use, then get rid of the unn...
How do I fetch similar posts from database where text length can be more than 2000 characters
sql|postgresql|similarity|pg-trgm
0
87
1
72,194,305
72,194,305
1
true
2022-05-10T18:49:28.413Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I fetch similar posts from database where text length can be more than 2000 characters<p>As far as I'm aware, there is no simple, quick solution. I am...
72,194,183
Trying to do a slightly larger than average AXIOS.post to a .NET Web API<p>I'm trying to do an AXIOS.post in a Vue.JS application. It seems that when I get over about 1500 characters the process fails. What I mean by fails it does not even go to the Web API. It goes straight to the error area. This is normally a funct...
<p>Your issue is you are trying to pass that big stringified JSON object as a <em>query parameter</em>. IIS has a hard cap of 2048 bytes for url length.</p> <p>Large data objects should be passed as part of a request body, the property your looking for is <code>data</code>. Check the Axios docs for more information.</p...
Trying to do a slightly larger than average AXIOS.post to a .NET Web API
javascript|.net|axios|asp.net-web-api2
0
88
1
72,194,306
72,194,306
1
true
2022-05-11T00:26:58.553Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Trying to do a slightly larger than average AXIOS.post to a .NET Web API<p>I'm trying to do an AXIOS.post in a Vue.JS application. It seems that when I get ...
72,194,111
Why are all irq disabled for retarget write on STM32?<p>I am looking at the following function which retargets stdout to UART in the STM32 Std peripheral library.</p> <pre><code>int _write(int fd, char *ptr, int len) { uint32_t primask = __get_PRIMASK(); __disable_irq(); for (int i = 0; i &lt; len; i++) { wh...
<p>I suspect the author of that code is disabling all interrupts just because there might be some interrupts that write bytes to the UART, and the author wants to ensure that all the bytes sent to the <code>_write</code> function get written consecutively, instead of having other, unrelated bytes in the middle.</p> <p>...
Why are all irq disabled for retarget write on STM32?
c|arm|embedded|stm32|irq
0
107
2
72,194,353
72,194,353
1
true
2022-05-11T00:08:44.863Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why are all irq disabled for retarget write on STM32?<p>I am looking at the following function which retargets stdout to UART in the STM32 Std peripheral lib...
72,194,165
how to have my background run through div elements?<p>I have a animated background I created with javascript for my website. The problem is that whenever I add a new element to my html the background animation simply starts below the element on the bottom of the page. I am trying to have the background fill all the bla...
<p>Set the background with absolute position so other elements won't be affected:</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override"><code>var canvas = document.body.appendChild( docume...
how to have my background run through div elements?
javascript|html|css
0
46
1
72,194,362
72,194,362
1
true
2022-05-11T00:21:58.590Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to have my background run through div elements?<p>I have a animated background I created with javascript for my website. The problem is that whenever I a...
72,194,407
The value of the placeholder in HTML form input cannot be changed with JavaScript from inside of a function<p><strong>Problem &amp; Research:</strong> I have to automatically change the value of the placeholder of an HTML form input inside a JavaScript function. I did some research. The given code does not work for my ...
<p>Due to the <code>required</code> attribute, the browser is preventing the form from being submitted when the input is empty. But if you type something into the form to satisfy the validity, the placeholder will no longer be seen because there's text in the input.</p> <p>Either remove the <code>required</code> attrib...
The value of the placeholder in HTML form input cannot be changed with JavaScript from inside of a function
javascript|html|forms|input|placeholder
0
177
1
72,194,427
72,194,427
1
true
2022-05-11T01:15:18.483Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: The value of the placeholder in HTML form input cannot be changed with JavaScript from inside of a function<p><strong>Problem &amp; Research:</strong> I have...
72,194,064
Typescript equal generics "No overload matches this call"<p>So, I'm building a TypeScript application and I'm having issues with generics and overload. Here's a <a href="https://www.typescriptlang.org/play?#code/GYVwdgxgLglg9mABDAzgUQI4gIYBsAUAJtlNgFyIpQBOMYA5gDSIBueIAphVbQwJQUARnDi4O2MAG4AUKEiwEydFjxES5RGBABbQR2rM2uTh...
<p>ValueType is defined like this: <code>ValueType extends string | number | boolean</code></p> <p>Typescript can't infer the type of the values when they get to isEqual, because either one could be any of the three you defined. Therefore the function signature of compareVals doesn't match any of the isEqual signature...
Typescript equal generics "No overload matches this call"
typescript|react-native
0
131
1
72,194,432
72,194,432
1
true
2022-05-10T23:57:38.660Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Typescript equal generics "No overload matches this call"<p>So, I'm building a TypeScript application and I'm having issues with generics and overload. Here'...
72,194,396
Adding text to the right of aligned box<p>I have this HTML template and I am not understanding how to add text to center left of the box I have in the top right corner.</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-cod...
<p>You can add a flexbox for <code>holder</code> and align content accordingly</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;table class="label"&gt; &lt;tr&gt; ...
Adding text to the right of aligned box
html|css
0
36
1
72,194,481
72,194,481
1
true
2022-05-11T01:13:07.710Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Adding text to the right of aligned box<p>I have this HTML template and I am not understanding how to add text to center left of the box I have in the top ri...
72,191,413
Google Script Line Break on Section Header<p>I am currently creating a line break for Google Script. I managed to create a line break for title and the content inside. However, when I tried to create line break for a new header title. I could not find the attribute or variable for new section title, do anyone know how ...
<p>Building a little upon liquidkat's comment, you can check the Google Forms Apps Script <a href="https://developers.google.com/apps-script/reference/forms/item" rel="nofollow noreferrer">documentation</a> for this.</p> <p>The form is composed of <em>items</em>. You can get a list by calling <a href="https://developer...
Google Script Line Break on Section Header
google-apps-script|google-forms
0
64
1
72,194,549
72,194,549
1
true
2022-05-10T18:31:51.243Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Google Script Line Break on Section Header<p>I am currently creating a line break for Google Script. I managed to create a line break for title and the conte...
72,191,429
How to add additional attribute to many-to-many relationship<p>I have a database that keeps tracks of my (registered) users. Every user can be (and is by default) part of a team. A team groups together multiple users.</p> <p>Since users can be part of multiple teams, I would like for them to be able to toggle on and of...
<p>As <code>@Barmar</code> said, you can use a juntion table to accomplish this.</p> <p>The schema will look somthing like this:</p> <pre><code>model User { id String @id @default(cuid()) name String? userTeams User_Team[] } model Team { id String @id @default(cuid()) name String? userTeams User_Te...
How to add additional attribute to many-to-many relationship
mysql|sql|node.js|prisma
0
49
1
72,194,570
72,194,570
1
true
2022-05-10T18:33:30.470Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to add additional attribute to many-to-many relationship<p>I have a database that keeps tracks of my (registered) users. Every user can be (and is by def...
72,186,636
How to fix Xamarin Android: Mono Shared MonoRuntime is not supported<p>When I deploy (or archive) my Xamarin.Android application and attempt to use the .APK file in a UI test I am met with this error. My configuration is exactly how it should be for a release build. <strong>(PLEASE READ TO THE END)</strong></p> <pre><c...
<p>We've had similar problems before, you can try the following methods:</p> <p>1.in release mode,please make sure you uncheck <code>use Fast Deployment(debug mode only)</code>;</p> <p>2.make sure update your nuget to the latest one,the old Nuget had this issue;</p> <p>3.If the problem persists,you can try the followin...
How to fix Xamarin Android: Mono Shared MonoRuntime is not supported
xamarin|xamarin.forms|xamarin.android|xamarin.ios|monodevelop
0
169
1
72,194,581
72,194,581
1
true
2022-05-10T12:50:14.887Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to fix Xamarin Android: Mono Shared MonoRuntime is not supported<p>When I deploy (or archive) my Xamarin.Android application and attempt to use the .APK ...
72,193,888
Move items and read values from QTableWidget with spinbox widget (PyQt5)<p>I have a software tool that has a table filled with two columns: parameter and precision. Some parameters in the &quot;Precision&quot; column have spinbox widget and some parameters have just text &quot;N/A&quot;. I have two questions:</p> <ol> ...
<p>You cannot directly do that with QTableWidget, as it is an higher level widget that doesn't implement index movements in its model.</p> <p>A <em>proper</em> solution would be to create a QAbstractTableItem subclass that would also implement <a href="https://doc.qt.io/qt-5/qabstractitemmodel.html#moveRows" rel="nofol...
Move items and read values from QTableWidget with spinbox widget (PyQt5)
python|python-3.x|pyqt5|qtablewidget
0
60
1
72,194,591
72,194,591
1
true
2022-05-10T23:23:44.003Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Move items and read values from QTableWidget with spinbox widget (PyQt5)<p>I have a software tool that has a table filled with two columns: parameter and pre...
72,194,117
DocuSign permanent authentication?<p>I'm sure that I'm missing something, but I'm a little stuck. As part of a sign-up process we are building, we need to send a signature request to the person that signs up. For that, we want to use the eSignatures API.</p> <p>I'm getting stuck on the Authentication process. Not the a...
<p>If you use <a href="https://developers.docusign.com/platform/auth/authcode/" rel="nofollow noreferrer">Auth Code Grant</a>, then yes, you will have to <a href="https://developers.docusign.com/platform/auth/authcode/authcode-get-token/#using-refresh-tokens" rel="nofollow noreferrer">use refresh tokens</a> and then ev...
DocuSign permanent authentication?
docusignapi
0
67
1
72,194,624
72,194,624
1
true
2022-05-11T00:10:01.330Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: DocuSign permanent authentication?<p>I'm sure that I'm missing something, but I'm a little stuck. As part of a sign-up process we are building, we need to se...
72,189,992
Certificate Pinning not working when trust user certificates in network security configuration<p>I am learning network security configuration in Android. Here is my configuration file</p> <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt; &lt;network-security-config&gt; &lt;base-config clea...
<p>I made a mistake. The domain should be xx.com here not *.xx.com, while *.xx.com is used in OkHttp CertificatePinner.</p>
Certificate Pinning not working when trust user certificates in network security configuration
android-network-security-config|sslpinning
0
109
1
72,194,711
72,194,711
1
true
2022-05-10T16:32:47.923Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Certificate Pinning not working when trust user certificates in network security configuration<p>I am learning network security configuration in Android. Her...
72,194,369
flutter inappwebview url not updated<p>I have 4 menu in bottom navigation, and two of them is webview using inappwebview.</p> <p>first webview is : <a href="https://google.com" rel="nofollow noreferrer">https://google.com</a></p> <p>second webview is : <a href="https://flutter.dev/" rel="nofollow noreferrer">https://fl...
<p>Finally, I found some solution</p> <p>add <code>ValueNotifier</code> to listen if variable url is changed</p> <p>add <code>ValueNotifier&lt;String&gt; newurl = ValueNotifier&lt;String&gt;('');</code> to webviewPage as a global variable</p> <p>add <code>newurl.addListener(changeUrl);</code> to initstate in webviewpag...
flutter inappwebview url not updated
flutter|webview
0
613
1
72,194,740
72,194,740
1
true
2022-05-11T01:07:40.533Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: flutter inappwebview url not updated<p>I have 4 menu in bottom navigation, and two of them is webview using inappwebview.</p> <p>first webview is : <a href="...
72,194,545
Getting a name of a key from a dictionary<p>I'm currently learning python and I'm struggling in a problem which I need to get a name as input from a user and get the first letter of the name and depending on the letter, tell him what day of the week he needs to go (context doesn't matter), so: Monday: A - C; Tuesday: D...
<p>You can, it might make a bit more logical sense. Working with dictionaries can be easy in Python since they follow the standards of JSON. Obligatory reading here: <a href="https://www.w3schools.com/python/python_dictionaries.asp" rel="nofollow noreferrer">https://www.w3schools.com/python/python_dictionaries.asp</a><...
Getting a name of a key from a dictionary
python|list
0
65
4
72,194,762
72,194,762
1
true
2022-05-11T01:43:50.787Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Getting a name of a key from a dictionary<p>I'm currently learning python and I'm struggling in a problem which I need to get a name as input from a user and...
72,193,627
within a dataframe find rows with the same id and compare values in another column to decide which row to keep<p>I'm working with a dataset and I need to find wherever there are matching PATIENT_ID values and then compare compare the dx_specific value between those rows and only keep the row with the dx_specific value ...
<p>I would probably code <code>dx_specific</code> as a factor. <code>slice_min</code> would then select the values based on the factor level after grouping.</p> <pre><code>library(&quot;dplyr&quot;) dx_weights &lt;- c(&quot;Bipolar 1&quot;, &quot;Bipolar 2&quot;, &quot;MDD recurrent&quot;, &quot;Anxiety&quot;, &quot;O...
within a dataframe find rows with the same id and compare values in another column to decide which row to keep
r
0
44
2
72,194,771
72,194,771
1
true
2022-05-10T22:39:25.787Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: within a dataframe find rows with the same id and compare values in another column to decide which row to keep<p>I'm working with a dataset and I need to fin...
72,193,532
How do you get data and bind to a table?<p>I am trying to get data from a database and just bind the output to a table. I am using AJAX because some of my other codes won't allow me to mix with the IEnumerable. It doesn't seem to run the command and never trips breakpoints... Not sure what I might be doing wrong. I hav...
<p>After I tested it, it seems that this is just your grammar problem.</p> <p>First,if you don't have a data variable,you need to delete <code>console.log(data);</code>.</p> <p>Second,you should change <code>html += + '&lt;td&gt;' + item.companyName + '&lt;/td&gt;'</code> to <code>html += '&lt;td&gt;' + item.companyNam...
How do you get data and bind to a table?
asp.net-core|asp.net-ajax
0
49
1
72,194,786
72,194,786
1
true
2022-05-10T22:25:56.973Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do you get data and bind to a table?<p>I am trying to get data from a database and just bind the output to a table. I am using AJAX because some of my ot...
72,194,655
How to pass a data between different classes defined for tabs in my tkinter GUI?<p>I have this code below, and I want to pass variable <code>n</code> in class <code>Data</code> to be used in class <code>tab1</code> and be used as the <code>textvariable</code> of <code>entry1</code>. however, I get this error:</p> <pre>...
<p>You never create an instance of <code>Data</code>. Instead, you're initializing <code>self.data</code> to an empty dictionary. You need to create an instance of <code>Data</code> and pass that to the tabs.</p> <pre><code>class SampleApp(tk.Tk): def __init__(self, *args, **kwargs): ... self.app_da...
How to pass a data between different classes defined for tabs in my tkinter GUI?
python|class|tkinter
0
44
1
72,194,794
72,194,794
1
true
2022-05-11T02:08:22.100Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to pass a data between different classes defined for tabs in my tkinter GUI?<p>I have this code below, and I want to pass variable <code>n</code> in clas...
72,194,119
Changing table row colour based on values from map function ( React Js)<p>i am trying to figure out a way to change the table row colour based on the certain values inside the map function. I have been trying different solutions like UseRef hook, other stack overflow solutions etc, but was not successful.</p> <pre><cod...
<p>I think this is how you can get this working.</p> <pre><code>const data = [ { name: &quot;brij1&quot;, place: &quot;place1&quot;, LogTime: &quot;I ignored this for now&quot; }, { name: &quot;brij2&quot;, place: &quot;place2&quot;, LogTime: &quot;I ignored this for now&quot; }, ]; const DecoratedContainerData = ({ c...
Changing table row colour based on values from map function ( React Js)
javascript|reactjs|react-hooks|map-function
0
125
1
72,194,839
72,194,839
1
true
2022-05-11T00:10:57.780Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Changing table row colour based on values from map function ( React Js)<p>i am trying to figure out a way to change the table row colour based on the certain...
72,194,925
special characters like asterisks argv<p>Running my script like the following:</p> <pre><code>Node index.js POST * </code></pre> <p>In my script I do this:</p> <pre><code>process.argv.forEach((val, index) =&gt; { console.log(`${index}: ${val}`); }); </code></pre> <p>The output will be the following where * causes to ...
<p>If you're running this in <code>bash</code> or some similar shell, then the <a href="https://linuxhint.com/bash_globbing_tutorial/" rel="nofollow noreferrer">globbing</a> is happening on a shell level, before it ever gets to your program. You can't see whether a star was typed from inside the program, because <em>th...
special characters like asterisks argv
javascript|node.js|arguments
0
23
1
72,194,961
72,194,961
1
true
2022-05-11T03:03:30.950Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: special characters like asterisks argv<p>Running my script like the following:</p> <pre><code>Node index.js POST * </code></pre> <p>In my script I do this:</...
72,186,130
Asp.Net Core MVC - Image does not load/display while converting view into pdf<p>This is related to my last question. I am trying to convert a view into pdf. The view is getting converted into a pdf file as expected but the image inside view doesn't get loaded/displayed when the view is getting converted to pdf. If I ru...
<p>Your image src needs to use the address of the full accessible path for it to work properly.</p> <p>Like :</p> <pre><code>&lt;img id=&quot;mainImage&quot; style=&quot;width:200px;height:160px&quot; src=&quot;https://localhost:5001/Images/ProductImages/d0f8bbb9-effd-4f93-b5bc-b28fdfe4a233Capture.PNG&quot;&gt; </code>...
Asp.Net Core MVC - Image does not load/display while converting view into pdf
html|image|asp.net-core-mvc|asp.net-core-5.0
0
144
1
72,194,970
72,194,970
1
true
2022-05-10T12:14:03.677Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Asp.Net Core MVC - Image does not load/display while converting view into pdf<p>This is related to my last question. I am trying to convert a view into pdf. ...
72,194,439
Separate national and international phone numbers that are not formatted<p>i'm working on my first &quot;big&quot; project, and i basically need to deal with a lot of phone numbers, like, extracting them from a file (already done), formatting them to the same format (problem is here) and lastly store them in a database...
<p>If you don't know which numbers are international and which are local, you'll just have to try both:</p> <pre><code>def guess_phonenumber(clean, loc): # Try national pn = phonenumbers.parse(clean, loc) if not phonenumbers.is_valid_number(pn): # Not national; add + and try international pn...
Separate national and international phone numbers that are not formatted
python|python-phonenumber
0
157
1
72,194,996
72,194,996
1
true
2022-05-11T01:20:42.823Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Separate national and international phone numbers that are not formatted<p>i'm working on my first &quot;big&quot; project, and i basically need to deal with...
72,195,060
How to use range() with string as integer to get data of string in python<p>I have data of string like this:</p> <pre><code>my_data = [ &quot;0100052253719270&quot;, &quot;0100052253719271&quot;, &quot;0100052253719272&quot;, &quot;0100052253719273&quot;, &quot;0100052253719274&quot;, &quot;0100...
<p>You can try it: <code>my_filterd_data = [ele for ele in my_data if int(ele) in range(int(from_string), int(to_string))]</code></p>
How to use range() with string as integer to get data of string in python
python
0
39
2
72,195,090
72,195,090
1
true
2022-05-11T03:28:21.760Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to use range() with string as integer to get data of string in python<p>I have data of string like this:</p> <pre><code>my_data = [ &quot;01000522537...
72,188,287
I wonder why the TabBarView widget builds twice<p>I use the DefaultTabController widget and the TabBarView widget. When running for the first time, OneScreen screen is built only once. After the build, if you press restart, the build is done twice.</p> <p>There is a bigger problem here. Similar code is used in my proje...
<p>try learn flutter lifecycle <a href="https://medium.flutterdevs.com/app-lifecycle-in-flutter-c248d894b830" rel="nofollow noreferrer">https://medium.flutterdevs.com/app-lifecycle-in-flutter-c248d894b830</a> . build will be call after setstate or didUpdateWidget, build will be appear one or more depend your code</p>
I wonder why the TabBarView widget builds twice
flutter|dart
0
51
1
72,195,140
72,195,140
1
true
2022-05-10T14:34:04.720Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: I wonder why the TabBarView widget builds twice<p>I use the DefaultTabController widget and the TabBarView widget. When running for the first time, OneScreen...
72,195,080
create nested array with PHP<p>i have a problem here. so, i try to make nested array for my json using php and this is what im getting</p> <pre><code>[ { &quot;ID&quot;:&quot;3301&quot;, &quot;NAME&quot;:&quot;cust 01&quot;, &quot;ID2&quot;:&quot;33&quot; }, { &quot;ID&quot;:&quot;3301&quot;, ...
<p>Move the <code>ID2</code> value into the nested array in the <code>attribut</code> key before pushing onto the <code>$output</code> array.</p> <pre><code>while($data=mysqli_fetch_array($query,MYSQLI_ASSOC)) { $data['attribut'] = [['ID2' =&gt; $data['ID2']]; unset($data['ID2']); $output[]=$data; } </code>...
create nested array with PHP
php
0
29
2
72,195,144
72,195,144
1
true
2022-05-11T03:31:09.283Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: create nested array with PHP<p>i have a problem here. so, i try to make nested array for my json using php and this is what im getting</p> <pre><code>[ { ...
72,195,195
Can I simplify this code to avoid the type error for reading properties?<p>I am writing this code to scrape a webpage. I need to get specific information from the website and there is a lot of information needed to be scraped.</p> <p>The code that I write works but when do it repeatedly it encounters error on some of t...
<p>The quick fix would be to check if the destructured ElementHandle actually exists before trying to call <code>getProperty</code> on it, for example:</p> <pre><code>const [el4] = await page.$x('/html/body/div[1]/div[3]/div[2]/div[2]/div[1]/div[2]/div[1]/div[1]/p'); const salary = !el4 ? 'Not Found' : await (await el...
Can I simplify this code to avoid the type error for reading properties?
javascript|node.js|web-scraping|puppeteer
0
77
1
72,195,286
72,195,286
1
true
2022-05-11T03:49:58.503Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can I simplify this code to avoid the type error for reading properties?<p>I am writing this code to scrape a webpage. I need to get specific information fro...
72,195,200
Javascript - Getting all possible k-length strings from given list of characters using generator<p>I want to get all k-length strings from given list of characters. I already wrote recursive function and it works well. But my generator version doesn't work at all. How can I fix my second function? Many thanks.</p> <pre...
<p>Iterate each element of the input array no matter it's length, handling the <code>k==1</code> case inside the loop. Form the remainder array for each element and combine that element with the recursive call using that remainder...</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-...
Javascript - Getting all possible k-length strings from given list of characters using generator
javascript|ecmascript-6
0
52
1
72,195,503
72,195,503
1
true
2022-05-11T03:50:42.353Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Javascript - Getting all possible k-length strings from given list of characters using generator<p>I want to get all k-length strings from given list of char...
72,195,269
How to replace specific line only on 1st occurence by mentioning keyword<p>I have below pom.xml file. I want to replace the version of the project which is in line 7. I will be able to provide<code>&lt;version&gt;</code> tag alone but not complete version details. Expecting a code which finds the 1st <code>&lt;version&...
<p>I suggest that you read file &quot;pom.xml&quot;, line by line. If the line read is the line you want to change, then change it otherwise leave it as it is. Then write the line that you read to a temporary file. Once you have read all the lines in file &quot;pom.xml&quot;, delete it and rename the temporary file to ...
How to replace specific line only on 1st occurence by mentioning keyword
java
0
27
1
72,195,594
72,195,594
1
true
2022-05-11T04:01:59.517Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to replace specific line only on 1st occurence by mentioning keyword<p>I have below pom.xml file. I want to replace the version of the project which is i...
72,195,531
iframe embed moving towards the left on screen resize<p>So I have made a projects page in which the iframe embed keeps going to the left when screen resize but I want it to be in the <code>centre</code> instead of being on the left side:</p> <p><a href="https://i.stack.imgur.com/GRWs5.png" rel="nofollow noreferrer"><im...
<p>add <code>display: block; margin: 0 auto;</code> to <code>iframe</code> tag</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-css lang-css prettyprint-override"><code>.hr { height: 5px; width: calc((160vw)/2); ...
iframe embed moving towards the left on screen resize
html|css|fonts
0
37
1
72,195,630
72,195,630
1
true
2022-05-11T04:45:31.390Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: iframe embed moving towards the left on screen resize<p>So I have made a projects page in which the iframe embed keeps going to the left when screen resize b...
72,190,312
How can I make sure that every controller sees DboSource?<p>There were issues that some controllers are using <code>DboSource</code> methods and I added the</p> <pre><code>App::uses('DboSource', 'Model/DboSource'); </code></pre> <p>line to the class file of some base controllers from which other controllers are inherit...
<p>You can add this to your <code>app/Config/bootstrap.php</code> file and it will be loaded on every request.</p>
How can I make sure that every controller sees DboSource?
cakephp|dependency-injection|cakephp-2.x
0
26
1
72,195,690
72,195,690
1
true
2022-05-10T16:57:35.677Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I make sure that every controller sees DboSource?<p>There were issues that some controllers are using <code>DboSource</code> methods and I added the<...
72,194,922
Possible to pass multiple inline values to an aggregation function?<p>I can call an aggregation function directly on a scalar literal value, such as:</p> <pre><code>select SUM(2); ┌────────┐ │ sum(2) │ ╞════════╡ │ 2 │ └────────┘ Elapsed: 1 ms </code></pre> <p>Is there any way to pass multiple inline values into a...
<p>You can define a function with <code>variadic</code> to pass multiple parameters. In the background such an argument is an array.</p> <pre><code>create function my_sum(variadic p_numbers integer[]) returns bigint as $$ select sum(i) from unnest(p_numbers) as u(i); $$ language sql stable; </code></pre> <p>You c...
Possible to pass multiple inline values to an aggregation function?
sql|database|postgresql
0
28
1
72,195,706
72,195,706
1
true
2022-05-11T03:03:01.707Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Possible to pass multiple inline values to an aggregation function?<p>I can call an aggregation function directly on a scalar literal value, such as:</p> <pr...
72,195,553
Replace pathname and origin using Javascript<p>I have a function where I get some data via a rest-call and put it into a div with an id schnittstelle-01.</p> <pre><code>const request = new XMLHttpRequest(); request.open( 'GET', 'https://purl.ulb.tu-darmstadt.de/vp/r000000-2001?ed=pa000008', ); request.addEventL...
<p>you need <code>location.pathname</code></p> <pre><code>el.href = el.href.replace( location.origin + location.pathname, 'purl.ulb.tu-darmstadt.de/vp/', ); </code></pre>
Replace pathname and origin using Javascript
javascript
0
31
1
72,195,824
72,195,824
1
true
2022-05-11T04:48:45.133Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Replace pathname and origin using Javascript<p>I have a function where I get some data via a rest-call and put it into a div with an id schnittstelle-01.</p>...
72,195,428
is there anyway to make this cool chat bubble widget?<p>i'd try thinking how to make this chat bubble <code>widget</code> but can't find any way, i'd tried to check on this package <a href="https://pub.dev/packages/flutter_chat_bubble" rel="nofollow noreferrer">flutter_chat_bubble</a> but nothing similar to the design...
<p>Use this code:</p> <pre><code>Column( crossAxisAlignment: CrossAxisAlignment.end, children: [ CustomPaint( painter: Bubble(), child: Container( padding: const EdgeInsets.symmetric(vertical:8,horizontal:15 ), constraints: BoxC...
is there anyway to make this cool chat bubble widget?
flutter|dart
0
169
2
72,195,906
72,195,906
1
true
2022-05-11T04:27:40.833Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: is there anyway to make this cool chat bubble widget?<p>i'd try thinking how to make this chat bubble <code>widget</code> but can't find any way, i'd tried t...
72,195,748
PostgreSQL: Allow Linux user to login as given role without password<p>How to allow <code>foo</code> user <strong>only</strong> to login with <code>psql</code> or <strong>execute SQL queries</strong> locally as <strong>given role</strong> and <strong>without password</strong>?</p> <pre><code>psql -U my_role psql -U my_...
<p>Add a <code>pg_hba.conf</code> line like this at the beginning:</p> <pre class="lang-none prettyprint-override"><code>local all my_role trust </code></pre> <p>That will allow passwordless local connections of <code>my_role</code> to all databases.</p>
PostgreSQL: Allow Linux user to login as given role without password
postgresql
0
24
1
72,195,931
72,195,931
1
true
2022-05-11T05:15:15.703Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: PostgreSQL: Allow Linux user to login as given role without password<p>How to allow <code>foo</code> user <strong>only</strong> to login with <code>psql</cod...
72,183,799
Gitlab CI only variables that come from extends<p>I have the following setup (simplified version), which doesn't run the expected merge::my when I use tag that includes the string &quot;TEST&quot;. I can't figure out why is it happening - I know that only doesn't support variable expansion, but here the variable is jus...
<p>Based on GitLab issue <a href="https://gitlab.com/gitlab-org/gitlab/-/issues/35438" rel="nofollow noreferrer">35438</a>, I'd say that it is not currently possible to use a variable (as opposed to a literal) as the regular expression pattern.</p> <p>Within issue 35438, @furkanayhan explains in a comment titled &quot...
Gitlab CI only variables that come from extends
gitlab-ci
0
46
1
72,196,008
72,196,008
1
true
2022-05-10T09:25:24.487Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Gitlab CI only variables that come from extends<p>I have the following setup (simplified version), which doesn't run the expected merge::my when I use tag th...
72,195,881
What do you call the "@Body()" in the following function signature: "create(@Body() createCatDto: CreateCatDto) {}" in typescript/nestjs<p>I'm trying to learn NestJS, and I noticed the following function signatures on their <a href="https://docs.nestjs.com/pipes#schema-based-validation" rel="nofollow noreferrer">docume...
<p>These are called param decorators you can further read this for a better explanation <a href="https://docs.nestjs.com/custom-decorators#param-decorators" rel="nofollow noreferrer">https://docs.nestjs.com/custom-decorators#param-decorators</a></p> <p>Coming to your question @Body() is a param decorator which parses y...
What do you call the "@Body()" in the following function signature: "create(@Body() createCatDto: CreateCatDto) {}" in typescript/nestjs
typescript|nestjs
0
21
1
72,196,088
72,196,088
1
true
2022-05-11T05:33:42.710Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What do you call the "@Body()" in the following function signature: "create(@Body() createCatDto: CreateCatDto) {}" in typescript/nestjs<p>I'm trying to lear...
72,194,814
Using Rails 7 and Taildwincss to put a picture and a card next each other<p>I'm trying to implement the following design, using Rails 7 with Tailwindcss:</p> <p><a href="https://i.stack.imgur.com/UbLwp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UbLwp.png" alt="View Design" /></a></p> <p>I'm new ...
<p>Keep both the div containing both the image and card in flex and add <code>item-center</code> class to it.</p> <p>Refer to this pseudo code</p> <pre><code>&lt;div class=&quot;flex flex-row item-center&quot;&gt; &lt;div class=&quot;bg-white rounded-lg shadow&quot;&gt;Image&lt;/div&gt; &lt;div class=&quot;bg-w...
Using Rails 7 and Taildwincss to put a picture and a card next each other
ruby-on-rails|responsive-design|tailwind-css|wireframe
0
123
1
72,196,232
72,196,232
1
true
2022-05-11T02:41:57.097Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Using Rails 7 and Taildwincss to put a picture and a card next each other<p>I'm trying to implement the following design, using Rails 7 with Tailwindcss:</p>...
72,196,287
Iterate nested array of objects, find id and update object matching the id<p>I have below input as follows. Its an array of objects and each object has states which is also a array of objects. i want to append <code>details</code> inside the states object when the state id matches with the <code>id</code> mentioned bel...
<p><code>Array.forEach</code> always returns <code>undefined</code>, so <code>result</code> will always be <code>undefined</code>. If you look at <code>input</code> after your operation, it does contain your details as you specified.</p> <p>Alternatively, you could spread <code>input</code> into a new array called <cod...
Iterate nested array of objects, find id and update object matching the id
javascript|arrays|reactjs|loops|object
0
216
3
72,196,375
72,196,375
1
true
2022-05-11T06:23:26.507Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Iterate nested array of objects, find id and update object matching the id<p>I have below input as follows. Its an array of objects and each object has state...
72,196,191
Best way to deal with duplicate statuses using enums and models<p>This question is related to formatting, presentation and autocompletion in regard to statuses. I haven't found a way to use enums efficiently for more complex scenarios.</p> <p>I have multiple tables</p> <ul> <li>User</li> <li>Post</li> <li>Category</li>...
<p>I think you can use</p> <pre><code>class User extends Model { /** @var Status */ public static $status = Status::class; } </code></pre> <p>Or</p> <pre><code>use \App\Enums\User\Status as UserStatus </code></pre>
Best way to deal with duplicate statuses using enums and models
php|laravel|enums
0
38
1
72,196,388
72,196,388
1
true
2022-05-11T06:14:44.213Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Best way to deal with duplicate statuses using enums and models<p>This question is related to formatting, presentation and autocompletion in regard to status...
72,196,243
Sign-in out clearing the session data<p>I have this link to Logout. How can I logout clearing my session The current session needs to be cleared/abandoned when user clicks sign out. Then direct user to the log in page(a URL is given ex., login.com)</p> <pre><code>&lt;a class=&quot;btn btn-primary&quot; href=&quot;#&quo...
<p>You can try implementing Session.Abandon() Method.</p> <blockquote> <p>Session.Abandon();</p> </blockquote> <pre><code>public ActionResult LogOut() { FormsAuthentication.SignOut(); Session.Abandon(); return RedirectToAction(&quot;index&quot;, &quot;login&quot;); } </code></pre> <p>For Session Timeout, c...
Sign-in out clearing the session data
asp.net|asp.net-mvc|session|model-view-controller|session-state
0
114
1
72,196,478
72,196,478
1
true
2022-05-11T06:19:27.833Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Sign-in out clearing the session data<p>I have this link to Logout. How can I logout clearing my session The current session needs to be cleared/abandoned wh...
72,196,063
distube filters not applying<p>I'm trying to make a discord slash commands filter using distube but when I use the slash command it didn't apply the filter that I picked but it sent the embed when filter is applied</p> <p><strong>Node:</strong> v17.7.2</p> <p><strong>Discord:</strong> ^13.2.0</p> <p>can someone help me...
<p>From what I can find in the docs, it is recommended to use <a href="https://distube.js.org/#/docs/DisTube/stable/class/DisTube?scrollTo=setFilter" rel="nofollow noreferrer"><code>.setFilter()</code></a> instead of calling <code>client.distube.filters.&lt;filter&gt; = true</code>.</p> <p>I'd try changing your <code>r...
distube filters not applying
javascript|discord.js|distube
0
89
1
72,196,517
72,196,517
1
true
2022-05-11T05:58:59.897Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: distube filters not applying<p>I'm trying to make a discord slash commands filter using distube but when I use the slash command it didn't apply the filter t...
72,193,065
How to skip an Event if recently occurred not too long ago?<p>The not-working code:</p> <pre><code>Event = Something and SomethingElse and (ta.barssince(Event) &gt; 20) </code></pre> <p>Of course, it won't work because at first time, the <code>Event</code> boolean variable is not declared yet.</p> <p>Perhaps the questi...
<p>You can use a <code>var</code> counter. Reset it when your event takes place and increase it otherwise.</p> <pre><code>// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ // © vitruvius //@version=5 indicator(&quot;My script&quot;, overlay=true) n = input(2...
How to skip an Event if recently occurred not too long ago?
pine-script|pinescript-v5
0
78
1
72,196,541
72,196,541
1
true
2022-05-10T21:18:56.753Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to skip an Event if recently occurred not too long ago?<p>The not-working code:</p> <pre><code>Event = Something and SomethingElse and (ta.barssince(Even...
72,191,827
fast looping for user written functions<p>I have written two functions<br /> a) the first create simulated data and estimates a model b) the second iterates this process a number of times, and average statistics from multiple simulations.</p> <p>The third step I would like to do is to iterate this process across differ...
<p>This &quot;all <code>data.table</code>&quot; approach is about twice as fast, but still disappointing.</p> <p>The basic idea is to assemble all the datasets into one large <code>data.table</code> and then cycle through the models using <code>data.table</code> group by.</p> <pre><code>library(data.table) library(esti...
fast looping for user written functions
r|for-loop|parallel-processing
0
49
2
72,196,606
72,196,606
1
true
2022-05-10T19:08:32.830Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: fast looping for user written functions<p>I have written two functions<br /> a) the first create simulated data and estimates a model b) the second iterates ...
72,196,484
Python boolean variable not updating within a loop<p>I have two pieces of python code that I expect to give me the same result but that is not happening. I wrote the following routine for a fill type question on leetcode and got the wrong answer</p> <pre><code>def processIsland(self, grid: List[List[int]], proc: List[L...
<p>I am not entirely sure what that function is supposed to calculate, but note that <code>and</code> is lazy, i.e. the 'right' expression is only evaluated if the 'left' expression is not already false. In your case this means that</p> <pre><code>val = val and self.processIsland(grid, proc, ip, jp) </code></pre> <p>wi...
Python boolean variable not updating within a loop
python|recursion|scope|boolean
0
72
2
72,196,667
72,196,667
1
true
2022-05-11T06:41:42.763Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python boolean variable not updating within a loop<p>I have two pieces of python code that I expect to give me the same result but that is not happening. I w...
72,196,553
Put last month's status label in a new column next to current label<p>I’m attempting to write a script that compares labels between periods for a group of customers by creating a new column, “Last_month” that shows last period’s label. If it’s the first time a customer shows up in the dataset then it should either say ...
<p>like this?</p> <pre><code>library(dplyr) df %&gt;% arrange(CustomerID, Period) %&gt;% group_by(CustomerID) %&gt;% mutate(last_month = lag(Tag, 1)) </code></pre>
Put last month's status label in a new column next to current label
r|tidyverse|data-wrangling
0
21
1
72,196,672
72,196,672
1
true
2022-05-11T06:47:04.060Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Put last month's status label in a new column next to current label<p>I’m attempting to write a script that compares labels between periods for a group of cu...
72,192,134
What is the XStream imitate use case<p>The docs go over imitate use case, but I don't understand the example made. Where would you call a Parent function, is it like recursive? I'd like to see what the model function looks like, and what the child gets out of it.</p>
<p><code>imitate</code> is meant to create a cycle in the graph of streams connected by operators, that's the use case. It would often be seen when building a state stream.</p> <p>However, nowadays we have a solution in Cycle.js called <code>@cycle/state</code> which solves for that use case, and in Cycle.js there is n...
What is the XStream imitate use case
cyclejs|xstream-js
0
17
1
72,196,901
72,196,901
1
true
2022-05-10T19:43:38.480Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What is the XStream imitate use case<p>The docs go over imitate use case, but I don't understand the example made. Where would you call a Parent function, is...
72,196,741
How to test a linear regression model slope to the identity line slope in R<pre><code>x &lt;- c(504.4058, 468.5829, 390.4110, 568.7277, 431.8638, 442.0493, 440.5432, 582.7658, 501.7017, 433.0584, 469.9929, 298.3949, 542.2075, 546.3904, 460.8759) y &lt;- c(608.0258, 540.5613, 442.7069, 495.3577, 474.0115, 460.9367, 472....
<pre class="lang-r prettyprint-override"><code>library(ggplot2) x &lt;- c(504.4058, 468.5829, 390.4110, 568.7277, 431.8638, 442.0493, 440.5432, 582.7658, 501.7017, 433.0584, 469.9929, 298.3949, 542.2075, 546.3904, 460.8759) y &lt;- c(608.0258, 540.5613, 442.7069, 495.3577, 474.0115, 460.9367, 472.2706, 605.1223, 549.1...
How to test a linear regression model slope to the identity line slope in R
r|linear-regression|lm
0
88
1
72,196,971
72,196,971
1
true
2022-05-11T07:04:40.840Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to test a linear regression model slope to the identity line slope in R<pre><code>x &lt;- c(504.4058, 468.5829, 390.4110, 568.7277, 431.8638, 442.0493, 4...
72,196,491
force div in layout to stop growing (css)<p>I have my div divided into two rows. The lower one should keep the size of its content and the upper one fill the rest. Up to here, we are good.</p> <p>The upper one contains a flex layout (column) that should wrap. But instead of wrapping, it grows, making the whole thing g...
<pre><code>.upper { width: 100%; flex-grow: 1; border: 1px solid black; background: beige; display: flex; flex-flow: column; flex-wrap: wrap; overflow: auto;} </code></pre> <p>add this to your css</p>
force div in layout to stop growing (css)
html|css
0
45
1
72,196,992
72,196,992
1
true
2022-05-11T06:41:56.573Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: force div in layout to stop growing (css)<p>I have my div divided into two rows. The lower one should keep the size of its content and the upper one fill the...
72,196,941
Is there any function so that i can calculate the length of each users skill's at once and then find which user have the maximum skills?<p>Find the person who has many skills in the users' object.</p> <pre><code>const users = { Alex: { email: 'alex@alex.com', skills: ['HTML', 'CSS', 'JavaScript'], age: 20...
<p>you can do something like this</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override"><code>const userWithMaxSkills = users =&gt; Object.entries(users) .reduce((res, [username, data]) =&...
Is there any function so that i can calculate the length of each users skill's at once and then find which user have the maximum skills?
javascript|arrays|function|object|methods
0
256
2
72,197,095
72,197,095
1
true
2022-05-11T07:20:39.053Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is there any function so that i can calculate the length of each users skill's at once and then find which user have the maximum skills?<p>Find the person wh...
72,196,989
Swift - How can I force every method in a class to call specific function?<p>In other words, I'd like to find a way to avoid typing code used repeatedly in every class method like the following example.</p> <p><strong>Codes:</strong></p> <pre><code>class SampleClass { func common() { print(&quot;It's done&q...
<p>A possible way is to call <code>common</code> and pass a closure</p> <pre><code>class SampleClass { func common(action: @escaping () -&gt; Void) { action() print(&quot;It's done&quot;) } func first() { print(&quot;First function is executed&quot;) } func second() { print(&quot;Se...
Swift - How can I force every method in a class to call specific function?
ios|swift
0
68
1
72,197,101
72,197,101
1
true
2022-05-11T07:25:01.077Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Swift - How can I force every method in a class to call specific function?<p>In other words, I'd like to find a way to avoid typing code used repeatedly in e...
72,194,472
Move Range Interval partition data from one table to history table in other database<p>We have a primary table that is Range partitioned by date with a 1-month interval. It's also a list sub-partitioned with 4 distinct values. So essentially it is one month partition having 4 sub-partitions.</p> <p>Database: Oracle 1...
<p>You <em><strong>could</strong></em> use exchange to get the data rapidly <em><strong>out</strong></em> of your active table, but you would still then to send that table over the wire to the remote history database to load it in.</p> <p>In which case, using &quot;exchange&quot; probably is just adding more steps to t...
Move Range Interval partition data from one table to history table in other database
oracle|partitioning|oracle19c|data-partitioning
0
36
1
72,197,110
72,197,110
1
true
2022-05-11T01:30:10.397Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Move Range Interval partition data from one table to history table in other database<p>We have a primary table that is Range partitioned by date with a 1-mon...
72,196,900
pySerial read_until() reads only the first byte<p>So I'm receiving data from a serial port using pySerial. I've a very simple code that reads the first byte, check if it's the start byte ( <code>0x02</code> in my case) and then read until it finds the end byte ( <code>0x03</code> in my case).</p> <p>Config the serial c...
<p>It seems a bug never fixed by the <code>pySerial</code> module itself <a href="https://github.com/pyserial/pyserial/issues/181" rel="nofollow noreferrer">https://github.com/pyserial/pyserial/issues/181</a></p> <p>Using <code>timeout=None</code> in <code>serial.Serial()</code> resolved the issue</p>
pySerial read_until() reads only the first byte
python|serial-port|pyserial
0
678
1
72,197,221
72,197,221
1
true
2022-05-11T07:17:25.070Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: pySerial read_until() reads only the first byte<p>So I'm receiving data from a serial port using pySerial. I've a very simple code that reads the first byte,...
72,196,732
Unit Testing with Specification Pattern and Unit of Work is not returning data on setup<p>I have a generic Repository with the Unit of Work pattern setup to utilize the Specification Pattern which works great but now I am trying to Unit test it and it seems my setup isn't returning anything when specifying what to retu...
<p>In your mock object you are setting up the <code>Find</code> method with a specific instance of <code>GetStocksForCurrentDaySpecification</code>. During your test you are passing a different instance of <code>GetStocksForCurrentDaySpecification</code> and since those are not the same it won't use that setup.</p> <p>...
Unit Testing with Specification Pattern and Unit of Work is not returning data on setup
c#|.net|unit-testing|.net-core|xunit
0
239
1
72,197,251
72,197,251
1
true
2022-05-11T07:03:53.873Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Unit Testing with Specification Pattern and Unit of Work is not returning data on setup<p>I have a generic Repository with the Unit of Work pattern setup to ...
72,197,329
Getting Method error : no such DSL method 'success' found among steps<p>I am trying to write a declarative Jenkins Pipeline which needs to echo that the job is successful if all previous stages are working as expected. If some stage fail post build must echo failed. But when I use the below pipeline its not working and...
<p>The success block should be outside of always block. It should be like this</p> <pre><code>post { success { script { echo ' Sucessful !&quot; } } } </code></pre>
Getting Method error : no such DSL method 'success' found among steps
jenkins|jenkins-plugins|jenkins-groovy|jenkins-job-dsl
0
103
1
72,197,446
72,197,446
1
true
2022-05-11T07:52:18.230Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Getting Method error : no such DSL method 'success' found among steps<p>I am trying to write a declarative Jenkins Pipeline which needs to echo that the job ...
72,195,765
Attempts to use curl in conjunction with api give 404 error<p>I am attempting to query Confluence knowledge base pages using the API and failing.</p> <p>I have researched the api and have the following:</p> <p><strong>Browsing Content</strong></p> <pre><code>curl -u admin:admin http://localhost:8080/confluence/rest/api...
<p>You are almost there! You just need to pass <code>cql</code> as query parameter to the service as mentioned <a href="https://developer.atlassian.com/cloud/confluence/rest/api-group-search/#api-wiki-rest-api-search-get" rel="nofollow noreferrer">here in Atlassian documentation</a>:</p> <blockquote> <p>curl --request ...
Attempts to use curl in conjunction with api give 404 error
python|json|api|jira|confluence
0
55
1
72,197,522
72,197,522
1
true
2022-05-11T05:16:58.220Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Attempts to use curl in conjunction with api give 404 error<p>I am attempting to query Confluence knowledge base pages using the API and failing.</p> <p>I ha...
72,197,254
'HttpClientHandler' does not contain a definition for 'ServerCertificateValidationCallback' .Net Standard 2.0<p>I am currently in the process of migrating a huge solution from .Net Framework 4.7.2 to .Net Core 3.1. In the current Project (which now targets .Net Standard 2.0) we had the following code (already changed f...
<p>The name of the property is <a href="https://docs.microsoft.com/en-us/dotnet/api/system.net.http.httpclienthandler.servercertificatecustomvalidationcallback?view=net-6.0#system-net-http-httpclienthandler-servercertificatecustomvalidationcallback" rel="nofollow noreferrer"><code>ServerCertificateCustomValidationCallb...
'HttpClientHandler' does not contain a definition for 'ServerCertificateValidationCallback' .Net Standard 2.0
c#|visual-studio|.net-core|.net-standard
0
51
1
72,197,539
72,197,539
1
true
2022-05-11T07:46:01.353Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: 'HttpClientHandler' does not contain a definition for 'ServerCertificateValidationCallback' .Net Standard 2.0<p>I am currently in the process of migrating a ...
72,197,625
Why getting Invalid collection reference error?<p>I am updating a document in firebase when user enters a comment.The code for the same is:</p> <pre><code> const docRef=collection(db,&quot;posts&quot;,post.id); console.log(docRef); updateDoc(docRef,{ user:localStorage.getItem('Name'), ...
<p>You need a <a href="https://firebase.google.com/docs/reference/js/firestore_.documentreference" rel="nofollow noreferrer">DocumentReference</a> to update a single document that you can create using <code>doc()</code>. The <code>collection()</code> is used to create a <a href="https://firebase.google.com/docs/referen...
Why getting Invalid collection reference error?
javascript|firebase|google-cloud-firestore
0
40
2
72,197,658
72,197,658
1
true
2022-05-11T08:15:22.943Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why getting Invalid collection reference error?<p>I am updating a document in firebase when user enters a comment.The code for the same is:</p> <pre><code> c...
72,197,174
Do low-end embedded system have process isolation?<p>I am studying memory management. In particular, I am studying MMU and the mapping between the process logical space pages and the RAM frames. My question is: what about low-end embedded systems? If I'm correct, MMU can't be used in this systems due to their smaller m...
<p>For embedded systems, the kind of MMU you speak of is only present in high-end microcontrollers like PowerPC or Cortex A.</p> <p>Low-end to mid-range microcontrollers do often have some simpler form of MMU though. Not as advanced as used to create virtual memory sections, but a simpler kind which allows remapping of...
Do low-end embedded system have process isolation?
memory-management|process|embedded
0
29
1
72,197,731
72,197,731
1
true
2022-05-11T07:40:17.417Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Do low-end embedded system have process isolation?<p>I am studying memory management. In particular, I am studying MMU and the mapping between the process lo...
72,195,109
How to get multiple answers from radio buttons when clicking submit ASP.NET CORE MVC<p>This is a quiz with around 40 questions and each question with multiple answers. Everything looks fine until I try to catch the answers from the view to the controller because everything returns 0 or null, Please help!</p> <p>This is...
<p>In your Model Design, You need a property to receive the value of the selected answer(maybe you already have that property in your model,I don't understand spanish), So I create that property:</p> <pre><code>public class Evaluacion { public int ExamenId { get; set; } public int RegistroId { get; ...
How to get multiple answers from radio buttons when clicking submit ASP.NET CORE MVC
asp.net-core-mvc|radio-button
0
122
1
72,197,805
72,197,805
1
true
2022-05-11T03:35:53.287Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to get multiple answers from radio buttons when clicking submit ASP.NET CORE MVC<p>This is a quiz with around 40 questions and each question with multipl...
72,179,819
Iterative binary tree inorder traversal python<p>In <a href="https://leetcode.com/problems/binary-tree-inorder-traversal/discuss/960715/Python-iterative" rel="nofollow noreferrer">this</a> LeetCode Q/A an answer w/o any inline comments demonstrates how to accomplish <strong>iterative</strong> in-order binary tree trave...
<p>At the start of every iteration of the loop, <code>node</code> represents the root of a subtree that has not yet been visited (at all).</p> <p>By definition of &quot;in-order traversal&quot;, we should first traverse the left subtree of a node, before anything else. So that is why -- when we have the root of an unvi...
Iterative binary tree inorder traversal python
python|iteration|binary-tree
0
152
1
72,197,829
72,197,829
1
true
2022-05-10T01:36:23.257Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Iterative binary tree inorder traversal python<p>In <a href="https://leetcode.com/problems/binary-tree-inorder-traversal/discuss/960715/Python-iterative" rel...
72,197,712
ggplot2 geom_line colors by group but with different colorcodes<p>does anyone know how I can plot several line graphs in one graph with different color codes?</p> <pre><code>ggplot(df, aes(x=variable1)) + geom_line(aes(y=variable2,color=group1))+ geom_line(aes(y=variable3,color=group1)) </code></pre> <p>I would like to...
<p>You could use the <code>ggnewscale</code> package</p> <pre><code>library(ggnewscale) ggplot(df, aes(x = variable1)) + geom_line(aes(y = variable2, color = group1)) + scale_colour_manual(values = color_group) + new_scale_color() + geom_line(aes(y = variable3, color = group1)) + scale_colour_manual(values =...
ggplot2 geom_line colors by group but with different colorcodes
r|ggplot2|graph
0
48
1
72,197,914
72,197,914
1
true
2022-05-11T08:21:39.557Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: ggplot2 geom_line colors by group but with different colorcodes<p>does anyone know how I can plot several line graphs in one graph with different color codes...
72,194,972
How to achieve control over a firestore sub-collection depending on a field in a parent collection without using get()?<p>I have this code below that is working, but it causes extra reads in my code, I am getting the value that is stored inside the data collection (<code>premiumUntill</code>) in order to allow/block Cr...
<p>If you are reading data from other documents using <code>get()</code> then you'll be charged the reads. Another way to prevent reads from Firestore rules is to store <code>premiumUntill</code> in <a href="https://firebase.google.com/docs/auth/admin/custom-claims" rel="nofollow noreferrer">Custom Claims</a>. You'll r...
How to achieve control over a firestore sub-collection depending on a field in a parent collection without using get()?
firebase|google-cloud-firestore|firebase-security
0
36
2
72,197,916
72,197,916
1
true
2022-05-11T03:12:42.490Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to achieve control over a firestore sub-collection depending on a field in a parent collection without using get()?<p>I have this code below that is work...
72,184,543
Delete operation is slow and rebuilding index doesn't seems to solve the issue<p>I have a simple delete query :</p> <pre><code>Delete from sales where ImportLogId = @ImportLogid </code></pre> <p>ImportLog table has around 3 million records with all log details.</p> <p>I have non clustered index created on ImportLog tab...
<p>Right. So your problem is not the deletion of records, which is instantaneous. (84 rows). The problem is the scan on the WholesalerSale table afterwards.</p> <p>My guess would be, that ImportSale.Id is a foreign key in WholesalerSale, and that SqlServer simply validates that you haven't deleted a referenced key.</p>...
Delete operation is slow and rebuilding index doesn't seems to solve the issue
sql|sql-server|indexing
0
83
1
72,198,079
72,198,079
1
true
2022-05-10T10:20:04.770Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Delete operation is slow and rebuilding index doesn't seems to solve the issue<p>I have a simple delete query :</p> <pre><code>Delete from sales where Import...
72,196,979
ASP.NET Web API with ReactJS can't get page from query<p>I have a React app with ASP.NET Web API, I want to get page number from query string and make some logic but when I go to next page, the page variable in my controller is always 0 no matter that I have FromQuery attribute.</p> <p>This is my controller:</p> <pre><...
<p>Your request to the API doesn't actually have a <code>page</code> query parameter, thus, the value of the identically-named <code>page</code> argument of controller method will always have the default value ie. 0 in this case.</p>
ASP.NET Web API with ReactJS can't get page from query
reactjs|asp.net-web-api
0
29
1
72,198,120
72,198,120
1
true
2022-05-11T07:24:24.557Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: ASP.NET Web API with ReactJS can't get page from query<p>I have a React app with ASP.NET Web API, I want to get page number from query string and make some l...
72,197,115
svelte toast bootstrap fired only after second event<p>Event only fires sometimes, usually after second click of the same type.</p> <p>So toast wont trigger more probably if do something like 1x add new, 1x update, 1x remove, etc...</p> <p>But it will if same action several times like 5x add new, triggers after the se...
<p>The problem lies with the way you set the background color in your toast:</p> <pre class="lang-js prettyprint-override"><code>class=&quot;toast align-items-center text-dark bg-{opc.color}&quot; </code></pre> <p>Initially, when the component is first rendered (even though it is not <em>shown</em>), <code>opc.color</c...
svelte toast bootstrap fired only after second event
bootstrap-4|bind|svelte|toast
0
52
1
72,198,126
72,198,126
1
true
2022-05-11T07:35:53.413Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: svelte toast bootstrap fired only after second event<p>Event only fires sometimes, usually after second click of the same type.</p> <p>So toast wont trigger ...
72,198,036
MySql mariaDB CREATE FUNCTION DELIMITER doesnt work. has error near ''<p>im going insane. i dont know whats wrong with this code i see nothing wrong in it. but it kept reading thee same error each time i put the $$ after the &quot;END&quot;. please help guys... here is my code</p> <pre><code>DELIMITER $$ CREATE FUNCTIO...
<p>You might want to consider using a stored procedue instead of a function if you want to return a result set.</p> <p>You are missing <code>END IF;</code> as Ergest Basha suggested and you are trying to return a result set from a function which is not allowed.</p>
MySql mariaDB CREATE FUNCTION DELIMITER doesnt work. has error near ''
mariadb
0
112
1
72,198,189
72,198,189
1
true
2022-05-11T08:46:25.147Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: MySql mariaDB CREATE FUNCTION DELIMITER doesnt work. has error near ''<p>im going insane. i dont know whats wrong with this code i see nothing wrong in it. b...
72,197,783
Gatsby and GraphQL: query pdf file using <StaticQuery/><p>I am very new to graphQL.</p> <p>Inside <code>src</code> I have a <code>data</code> folder which contains a pdf named <code>my_cv.pdf</code></p> <p>Problem: I am unable to either load it in the browser or able to download it. I get an error <code>There's not a p...
<p>The problem is that you are aliasing <code>file</code> as <code>pdf</code>, hence the nesting should be:</p> <pre><code> &lt;Resume href=&quot;data.pdf.publicURL&quot; target=&quot;_blank&quot;&gt; Download Resume &lt;/Resume&gt; </code></pre> <p>If you use <code>StaticQuery</code> I think you may want to use ...
Gatsby and GraphQL: query pdf file using <StaticQuery/>
graphql|gatsby
0
50
1
72,198,232
72,198,232
1
true
2022-05-11T08:27:48.883Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Gatsby and GraphQL: query pdf file using <StaticQuery/><p>I am very new to graphQL.</p> <p>Inside <code>src</code> I have a <code>data</code> folder which co...
72,197,703
Python, Pyplot: Change appearance of axis without changing axis itself<p>I have an array (<code>grmf</code>) of 2000 values, corresponding to a measurement scanning 7990 - 8010 MHz. The x values are stored from 0 to 1999.</p> <pre><code>import numpy as np from matplotlib import pyplot as plt xaxis = np.arange(2000) gr...
<p>Hmm, I'm not really sure why xticks isn't working for you. If I understand what you want to do, you just need one more line, so it would look like this:</p> <pre><code>import numpy as np from matplotlib import pyplot as plt xaxis = np.arange(2000) grmf = 3 * xaxis #let's just use this as dummy data plt.plot(xaxi...
Python, Pyplot: Change appearance of axis without changing axis itself
python|python-3.x|matplotlib
0
31
1
72,198,283
72,198,283
1
true
2022-05-11T08:21:01.507Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python, Pyplot: Change appearance of axis without changing axis itself<p>I have an array (<code>grmf</code>) of 2000 values, corresponding to a measurement s...
72,197,208
NULL MAX(col) value even though DB has a valid record<p>So I am trying to extract the maximum invoiceNo for current year and this is how I implemented it with PDO:</p> <pre><code>$sql = 'SELECT MAX(invoiceNo) AS invoiceId FROM invoices WHERE invoiceDate BETWEEN :yearStart AND :yearEnd HAVING invoiceId IS NOT NULL'; ...
<pre><code>$sql = &quot;SELECT MAX(arbitInvoiceNo) AS invoiceId FROM invoices WHERE invoiceDate BETWEEN :dateStart AND :dateEnd HAVING invoiceId IS NOT NULL&quot;; if($stmt = $pdo1-&gt;prepare($sql)){ $dateStart = date(&quot;Y&quot;).&quot;-01-01&quot;; $stmt-&gt;bindParam(&quot;:dateSta...
NULL MAX(col) value even though DB has a valid record
php|sql|date|between|having
0
31
1
72,198,300
72,198,300
1
true
2022-05-11T07:43:00.547Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: NULL MAX(col) value even though DB has a valid record<p>So I am trying to extract the maximum invoiceNo for current year and this is how I implemented it wit...
72,198,182
How to return a filtered map in jsx?<p>I want to filter an array of objects and then map over them all and return the JSX but I can't get the syntax right.</p> <pre><code>... const filterFiles = (): ReactElement =&gt; { const filtered = cleanFiles?.filter(file =&gt; file.key === params.key); return( ...
<p>The issue with your second approach (which will return a single React element, as your types suggest) is that you are missing the <code>{}</code> around the code inside the fragment <code>&lt;&gt;&lt;/&gt;</code></p> <pre><code>const filterFiles = (): ReactElement =&gt; { const filtered = cleanFiles?.filter(file =...
How to return a filtered map in jsx?
reactjs
0
24
1
72,198,309
72,198,309
1
true
2022-05-11T08:57:06.880Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to return a filtered map in jsx?<p>I want to filter an array of objects and then map over them all and return the JSX but I can't get the syntax right.</...
72,171,591
Autodesk-XLSExtension, undefined viewer<p>Im trying to implement the <a href="https://github.com/Autodesk-Forge/forge-extensions/tree/master/public/extensions/XLSExtension" rel="nofollow noreferrer">XLS Extension</a>. In the ModelData class, i cannot get objects leaf nodes because the viewer is undefined.</p> <p>Here i...
<p>It looks like it missed two lines. Could you try the revised one below?</p> <pre class="lang-js prettyprint-override"><code> // Model data in format for charts class ModelData { constructor(viewer) { this._modelData = {}; this._viewer = viewer; } init(callback) { var _this = this...
Autodesk-XLSExtension, undefined viewer
autodesk-forge|autodesk-viewer
0
24
1
72,198,609
72,198,609
1
true
2022-05-09T11:54:58.197Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Autodesk-XLSExtension, undefined viewer<p>Im trying to implement the <a href="https://github.com/Autodesk-Forge/forge-extensions/tree/master/public/extension...
72,198,402
laravel image optimizer file does not exists<p>I am using <code>spatie/laravel-image-optimizer</code> package to optimize my images. I receive the error message: <code>storage/app/public/files/car/9/km_declaration/2022/uE5DMCYh6hCuQXrOZ4yOSLCtLEnNdsE9e9OriNVw.jpg does not exist</code></p> <p>Although the file is there,...
<p>In the storage folder, you need to set permissions 775 <strong>chmod -R 775 storage</strong></p>
laravel image optimizer file does not exists
php|laravel|production|file-not-found|image-optimization
0
213
1
72,198,616
72,198,616
1
true
2022-05-11T09:14:40.550Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: laravel image optimizer file does not exists<p>I am using <code>spatie/laravel-image-optimizer</code> package to optimize my images. I receive the error mess...
72,198,530
Can I list privileges that were granted DIRECTLY to a user in Oracle?<p>Seems like simple selects from <strong>session_privs</strong> and <strong>user_sys_privs</strong> give all current privileges, but I cannot differentiate which of them are inherited from a role and which were granted directly.</p> <p>Is there a way...
<p>If you query <code>dictionary</code>, here's some interesting result:</p> <pre><code>SQL&gt; select * from dictionary where lower(table_name) like '%user%privs%' order by table_name; TABLE_NAME COMMENTS ------------------------------ --------------------------------------------------------------...
Can I list privileges that were granted DIRECTLY to a user in Oracle?
sql|oracle|oracle12c
0
18
1
72,198,633
72,198,633
1
true
2022-05-11T09:24:07.117Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can I list privileges that were granted DIRECTLY to a user in Oracle?<p>Seems like simple selects from <strong>session_privs</strong> and <strong>user_sys_pr...
72,195,466
How do I automatically run a binary in the background using Emacs Lisp when in a particular major mode?<p>I would like to automatically run the <a href="https://github.com/nwolverson/purescript-language-server" rel="nofollow noreferrer">purescript language server</a> binary in the background when Emacs loads a <code>.p...
<pre class="lang-lisp prettyprint-override"><code>(defun my-program () (message &quot;Start to run my-program&quot;) ;; Replace with your binary. (shell-command &quot;pwd&quot;)) (add-hook 'purescript-mode-hook #'my-program) </code></pre>
How do I automatically run a binary in the background using Emacs Lisp when in a particular major mode?
emacs|purescript
0
47
1
72,198,640
72,198,640
1
true
2022-05-11T04:33:26.963Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I automatically run a binary in the background using Emacs Lisp when in a particular major mode?<p>I would like to automatically run the <a href="http...
72,197,908
Route/Redirect to another page in new tab using useNavigate<p>I am using ag-grid and it has an event <code>onSelectionChanged</code>, which make the row clickable. When I click on row below function is called.</p> <pre><code>const onSelectionChanged = useCallback(() =&gt; { const selectedRow = gridRef.current.api.ge...
<p><code>react-router</code> isn't supposed to help preserve state when opening things in a new tab. In fact, fundamentally, <code>react</code> isn't supposed to help do this.</p> <p>I'd approach this in two ways:</p> <ul> <li>If the data is simple enough, pass it as a query or path param using <code>windows.open(windo...
Route/Redirect to another page in new tab using useNavigate
reactjs|react-router|react-router-dom|ag-grid
0
1,336
1
72,198,687
72,198,687
1
true
2022-05-11T08:37:20.383Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Route/Redirect to another page in new tab using useNavigate<p>I am using ag-grid and it has an event <code>onSelectionChanged</code>, which make the row clic...
72,168,254
Open URL's in MS Edge and reuse the same tab<p>Today we have an application that has a button which opens IE11 with a tab with customer id as argument. For each button click it reuse the existing IE11 tab.</p> <p>We need to have the same behavior with MS Edge but I have not found any way to do this. Thinking of passing...
<p>We ended up with separate Edge profile and installed xTab extension with 1 tab limit and starting Edge with <code>start msedge --profile-directory=&quot;profile-name&quot; https://example.com/app?customer_id=123</code></p>
Open URL's in MS Edge and reuse the same tab
google-chrome|microsoft-edge|chromium|microsoft-edge-extension|microsoft-edge-chromium
0
264
2
72,198,749
72,198,749
1
true
2022-05-09T07:18:15.473Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Open URL's in MS Edge and reuse the same tab<p>Today we have an application that has a button which opens IE11 with a tab with customer id as argument. For e...
72,143,542
Is buyer associated with a 'Sell' entity or with 'Product' entity?<p>I'm making a domain model for my project and I'm not sure how to connect buyer with other entity. I can say that a 'buyer' entity 'buys' the 'product' entity. Also, I can say that 'buyer' entity makes a purchase towards 'sell' entity.</p>
<p>Typically you would model this such that the Buyer is associated with an &quot;Order&quot; or &quot;Purchase&quot; or &quot;Transaction&quot; entity, which is then associated with the product, rather than having the buyer be associated with the product directly.</p> <p>Using a relational-database analogy, you could ...
Is buyer associated with a 'Sell' entity or with 'Product' entity?
uml|software-design
0
26
1
72,198,768
72,198,768
1
true
2022-05-06T14:56:48.387Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is buyer associated with a 'Sell' entity or with 'Product' entity?<p>I'm making a domain model for my project and I'm not sure how to connect buyer with othe...
72,198,294
Hibernate, MySQL, relationship between batches, JDBC connections and JDBC statements<p>Currently working on an application which uses hibernate and MySQL. I saw the following output in my Logs which surprised me:</p> <pre><code>Hibernate: select user0_.id as id1_3_, user0_.email as email2_3_, user0_.name as name3_3_ fr...
<p>It sounds like you think batch == transaction, but that is not the meaning used in JDBC. In Java/JDBC, batch execution has a specific meaning, and I assume that Hibernate uses the same meaning: executing multiple update/delete/insert statements using <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.s...
Hibernate, MySQL, relationship between batches, JDBC connections and JDBC statements
java|mysql|sql|hibernate|jdbc
0
38
1
72,198,794
72,198,794
1
true
2022-05-11T09:05:30.640Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Hibernate, MySQL, relationship between batches, JDBC connections and JDBC statements<p>Currently working on an application which uses hibernate and MySQL. I ...
72,198,559
Convert JSON array with nested arrays (tree) to flat JSON array<p>I have this JSON array tree that can include any number of nested arrays:</p> <pre><code>const namesArrayTree = [ { &quot;name&quot;: &quot;Peter&quot; }, { &quot;name&quot;: &quot;folder1&quot;, &quot;isArray&quot;: t...
<pre><code>function getNamesList(item) { return item.isArray ? item.namesArray.map(getNamesList) : item.name } const names = namesArrayTree.map(getNamesList).flat(Infinity) console.log(names) </code></pre>
Convert JSON array with nested arrays (tree) to flat JSON array
javascript|arrays|json
0
123
2
72,198,819
72,198,819
1
true
2022-05-11T09:25:42.323Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Convert JSON array with nested arrays (tree) to flat JSON array<p>I have this JSON array tree that can include any number of nested arrays:</p> <pre><code>co...
72,198,544
How to extract data from an api using python and convert it into a pandas data frame<p>I want to load the data from an API into a pandas data frame. How may I do that? The following is my code snippet:</p> <pre><code>import requests import json response_API = requests.get('https://data.spiceai.io/eth/v0.1/gasfees?perio...
<p>Almost there, the json is clean you can directly input it to a dataframe :</p> <pre><code>response_API = requests.get('https://data.spiceai.io/eth/v0.1/gasfees?period=1d') data = response_API.json() df = pd.DataFrame(data) </code></pre>
How to extract data from an api using python and convert it into a pandas data frame
python|pandas|api
0
83
1
72,198,851
72,198,851
1
true
2022-05-11T09:24:47.077Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to extract data from an api using python and convert it into a pandas data frame<p>I want to load the data from an API into a pandas data frame. How may ...
72,198,225
how to get the size of csv file line by line?is thas possible using python<p>I am reading a csv file without pandas library,i need to find out the number of bytes of each row.So i can ad all the bytes and determine the file size and will do some restriction based on that.</p> <pre><code>file=&quot;Emptycsv.csv&quot; c...
<p>Something along the lines of this should work for getting the bytes per row/line:<br /> (The +1 is for the newline)</p> <pre class="lang-py prettyprint-override"><code>import os total_bytes = -1 with open(&quot;test.csv&quot;) as file_in: for line in file_in: bytes_on_this_line = len(line) + 1 ...
how to get the size of csv file line by line?is thas possible using python
python|csv|export-to-excel|filesize
0
265
1
72,198,965
72,198,965
1
true
2022-05-11T08:59:53.743Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to get the size of csv file line by line?is thas possible using python<p>I am reading a csv file without pandas library,i need to find out the number of ...