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,829,949
Filter across all columns after a specific string<p>I am aiming to filter my data if I can find the string <code>Code</code> in any of the columns. It should filter at the first occurrence of this word.</p> <p>I am working with a list and the columns containing <code>Code</code> change by their arrangement. So I need a...
<p>The following attempt seems to get what I am after:</p> <pre><code>data %&gt;% filter(row_number() &gt;= which(keep(.,~any(which(.=='Code'))) == 'Code')) </code></pre> <p>however, I am sure there are cleaner attempts than this!</p> <p>What I have done:</p> <ol> <li>filter for row numbers greater than or equal to the...
Filter across all columns after a specific string
r
0
57
3
72,830,144
72,830,144
1
true
2022-07-01T13:21:59.007Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Filter across all columns after a specific string<p>I am aiming to filter my data if I can find the string <code>Code</code> in any of the columns. It should...
72,813,853
Get the actual structure size before alignment<p>So it turns out that both <code>dt struct</code> and <code>?? sizeof struct</code> return the total size the struct occupies in memory after alignment.</p> <p>Is there a way to get the actual size of the struct before alignment?</p> <p>I need this functionality for a fun...
<p>No -- there isn't a way to return the structure size &quot;before alignment&quot;. That's not really meaningful in any case. The compiler is always using the aligned size. The symbols have the aligned size. That's the size of the type.</p> <p>If you are looking for things like the &quot;size of an internal field...
Get the actual structure size before alignment
windbg
0
57
2
72,830,242
72,830,242
1
true
2022-06-30T10:01:24.840Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Get the actual structure size before alignment<p>So it turns out that both <code>dt struct</code> and <code>?? sizeof struct</code> return the total size the...
72,827,178
Difference between messaging and transaction in DDD?<p>So in DDD there are <code>transactions</code> (presumably <code>business transaction</code>) which should happen on a single aggregation root, and <code>messaging</code> or <code>events</code> which happens between domains / aggregates as uni-directional notificati...
<p>The basic building bloc of DDD is a <em>bounded context</em>. Bounded contexts regroup highly coupled domain objects that can be updated together <em>atomically</em>, in a single <code>transaction</code>. Transactions handle intra-context updates.</p> <p>Loosely coupled objects that are updated separately are spread...
Difference between messaging and transaction in DDD?
design-patterns|domain-driven-design|modeling
0
57
1
72,838,668
72,838,668
1
true
2022-07-01T09:27:55.903Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Difference between messaging and transaction in DDD?<p>So in DDD there are <code>transactions</code> (presumably <code>business transaction</code>) which sho...
72,839,760
Combine array of indices with array of values<p>I have an array in the following form where the first two columns are supposed to be indices of a 2-dimensional array and the following columns are arbitrary values.</p> <pre><code>data = np.array([[ 0. , 1. , 48. , 4. ], [ 1. , 2. , 44. , 4.4], ...
<p>find <code>row</code>, <code>column</code>, <code>depth</code> base your data array, then fill like below:</p> <pre><code>import numpy as np data = np.array([[ 0. , 0. , 42. , 2. ], [ 0. , 1. , 48. , 4. ], [ 0. , 2. , 55. , 2.2], [ 1. , 0. , 22. , 1. ], ...
Combine array of indices with array of values
python|numpy
1
57
2
72,839,911
72,839,911
1
true
2022-07-02T14:19:01.300Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Combine array of indices with array of values<p>I have an array in the following form where the first two columns are supposed to be indices of a 2-dimension...
72,840,872
Security rules : FirebaseError: Missing or insufficient permissions<p>I'm attempting to allow each user read and write their own data using firestore, but I'm getting an insufficient permissions error. I'm not sure why.</p> <p>I have these rules in place for my firestore. I'm just trying to compare the user's UID (stor...
<p>You're performing a collection group query, which needs a rules of this type:</p> <pre><code>match /{path=**}/order_history/{id} { allow read: ... } </code></pre> <p>That's because a collection group indexes documents at any path in the database, so you also need permission to read that data from any path.</p> <p>...
Security rules : FirebaseError: Missing or insufficient permissions
reactjs|firebase|google-cloud-firestore|firebase-security
2
57
1
72,840,905
72,840,905
1
true
2022-07-02T16:55:16.120Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Security rules : FirebaseError: Missing or insufficient permissions<p>I'm attempting to allow each user read and write their own data using firestore, but I'...
72,840,544
Type 'CSSStyleDeclaration' does not satisfy the constraint 'string | number | symbol'<p>I created a function for styling the DOM <code>element</code> at once</p> <pre class="lang-js prettyprint-override"><code>function css(element: HTMLElement, designs: Record&lt;CSSStyleDeclaration, string&gt;): void { for (let de...
<p>I think this is what you need:</p> <pre><code>function css(element: HTMLElement, designs: Partial&lt;CSSStyleDeclaration&gt;): void { for (let design in designs) { element.style[design] = designs[design]! } } </code></pre> <p><code>CSSStyleDeclaration</code> actually already contains all the properti...
Type 'CSSStyleDeclaration' does not satisfy the constraint 'string | number | symbol'
typescript
0
57
1
72,841,245
72,841,245
1
true
2022-07-02T16:06:11.860Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Type 'CSSStyleDeclaration' does not satisfy the constraint 'string | number | symbol'<p>I created a function for styling the DOM <code>element</code> at once...
72,841,850
Excel VBA Variable Declaration Ambersand<p>In a great VBA code example @<a href="https://medium.com/@daniel.ferry/excel-vba-get-unique-values-easily-592162f52c6e" rel="nofollow noreferrer">https://medium.com/@daniel.ferry/excel-vba-get-unique-values-easily-592162f52c6e</a> there is followng Variable declaration:</p> <p...
<p>This means <code>Long</code> type. From <a href="https://docs.microsoft.com/en-us/office/vba/language/concepts/getting-started/declaring-variables" rel="nofollow noreferrer">VBA reference</a>:</p> <p><code>The shorthand for the types is: % -integer; &amp; -long; @ -currency; # -double; ! -single; $ -string</code></p...
Excel VBA Variable Declaration Ambersand
excel|vba|variables|declaration
0
57
1
72,841,962
72,841,962
1
true
2022-07-02T19:16:07.720Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Excel VBA Variable Declaration Ambersand<p>In a great VBA code example @<a href="https://medium.com/@daniel.ferry/excel-vba-get-unique-values-easily-592162f5...
72,823,546
P5.js curveVertex function is closing at a point<p>I've created a noise function that pairs with a circle function to create a random noise circle thing that looks pretty cool. My problem is the <code>curveVertex</code> function in P5.js works correctly except for the connection of the first and last vertex. My code is...
<p>Unfortunately I won't have time to dive deep and debug the actual issue with curveVertex (or it's math) at the time, but it seems there's something interesting with <code>curveVertex()</code> in particular.</p> <p>@Ouoborus point makes sense and the function &quot;should&quot; behave that way (and it was with <code>...
P5.js curveVertex function is closing at a point
javascript|geometry|p5.js|perlin-noise
2
57
1
72,843,312
72,843,312
1
true
2022-07-01T01:26:47.520Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: P5.js curveVertex function is closing at a point<p>I've created a noise function that pairs with a circle function to create a random noise circle thing that...
72,847,647
Angular Array display on html<p>i created a array that stores arrays with 3 indexes into it. a example looks like</p> <pre><code>(3) [Array(3), Array(3), Array(3)] 0: (3) [199.4, 10.5, 19] 1: (3) [47.2, 2.1, 23] 2: (3) [133.6, 5.3, 25] </code></pre> <p>in my html i want to display it follwing way</p> <pre><code>size: 1...
<p>if you want to access nested arrays, you need to do something like this:</p> <pre><code>&lt;div *ngFor=&quot;let calculation of arr_name&quot;&gt; &lt;div *ngFor=&quot;let inner of calculation; let i = index&quot;&gt; Size {{ i }}: {{ inner }} &lt;/div&gt; &lt;/div&gt; </code></pre> <p>also recommend...
Angular Array display on html
angular|typescript
0
57
1
72,847,738
72,847,738
1
true
2022-07-03T15:16:31.683Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Angular Array display on html<p>i created a array that stores arrays with 3 indexes into it. a example looks like</p> <pre><code>(3) [Array(3), Array(3), Arr...
72,853,028
How can i do this in c arrays?<p>3 arrays of size 3x3 with integer data will be defined. The first two arrays will be filled with random numbers, while the elements of the 3rd array will be the sum of the elements of these two arrays (eg result[i][j] = first[i][j] + second[i][j] ). All the latest sequences will be prin...
<p>Here's a revised code (haven't run it) Added some comments for the few changes i made.</p> <pre><code>int main () { int a [3][3]; int b [3][3]; int c [3][3]; //removed initialization srand(time(NULL)); printf (&quot;\nElements of array are:\n&quot;); for (int i = 0; i &lt; 3; i++) { ...
How can i do this in c arrays?
arrays|c
-2
57
1
72,853,202
72,853,202
1
true
2022-07-04T07:19:50.243Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can i do this in c arrays?<p>3 arrays of size 3x3 with integer data will be defined. The first two arrays will be filled with random numbers, while the e...
72,856,138
Increase raster label size for axis, legend and title using terra<p>How can I increase the size of labels of legend break, axis and plot title using terra package. The plot created below has such small labels that I can't read them at all.</p> <pre><code>r1 &lt;- rast(ncol=10, nrow=10, xmin=-150, xmax=-80, ymin=20, yma...
<p>Like this:</p> <pre class="lang-r prettyprint-override"><code>terra::plot(rr, type = &quot;continuous&quot;, range = c(0,1), nr = 3, main = list(&quot;r1&quot;,&quot;r2&quot;,&quot;r3&quot;), plg=list( # parameters for drawing legend title =...
Increase raster label size for axis, legend and title using terra
r|raster|terra
0
57
1
72,856,484
72,856,484
1
true
2022-07-04T11:42:01.680Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Increase raster label size for axis, legend and title using terra<p>How can I increase the size of labels of legend break, axis and plot title using terra pa...
72,855,521
Parallelize dummy data generation in pandas<p>I would like to generate a dummy dataset composed of a fake first name and a last name for 40 milion records using multiple processor n cores.</p> <p>Below is a single task loop that generates a first name and a last name and appends them to a list:</p> <pre class="lang-py ...
<p>Maybe you can use <code>providers</code> directly:</p> <pre><code>import pandas as pd import numpy as np from faker.providers.person.en_US import Provider as us from faker.providers.person.en_GB import Provider as gb first_names = list(set(us.first_names).union(gb.first_names)) last_names = list(set(us.last_names)....
Parallelize dummy data generation in pandas
python|pandas|python-multiprocessing|python-multithreading|faker
1
57
2
72,857,266
72,857,266
1
true
2022-07-04T10:46:46.583Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Parallelize dummy data generation in pandas<p>I would like to generate a dummy dataset composed of a fake first name and a last name for 40 milion records us...
72,861,663
Clicking a child component affects parent in an unexpected way<p>I have two components, Container and Item.</p> <ul> <li>Container contains Item.</li> <li>Item contains a button and a div.</li> </ul> <p>These components have the following behaviors:</p> <ul> <li><strong>Container</strong>: When I click <strong>outside<...
<p>Both the listeners are being attached to the bubbling phase, so the inner ones trigger first.</p> <p>When the item is shown, and when it's clicked, this runs:</p> <pre><code>&lt;div className='item-content' onClick={() =&gt; setDisplayItem(false)} &gt;item content&lt;/div&gt; </code></pre> <p>As a result, before...
Clicking a child component affects parent in an unexpected way
javascript|reactjs|events|event-bubbling|event-capturing
2
57
1
72,861,818
72,861,818
1
true
2022-07-04T20:17:47.543Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Clicking a child component affects parent in an unexpected way<p>I have two components, Container and Item.</p> <ul> <li>Container contains Item.</li> <li>It...
72,859,983
MySQL bi-weekly rotating workers shifts<p>I need to create a view or SP to generate a table with workers' shifts in MySQL.</p> <p>We have 2 shifts that rotate every week. A worker that has worked this week in a morning shift (06h-14h), next week he will work in a afternoon shift (14h-22h). If I set a fixed day to get a...
<p>You can use a recursive <code>cte</code> to build the schedule: the <code>cte</code>'s termination condition can be when the number of weeks the schedule should be is reached, and you can keep a counter along with the original shift assignments and use modulo to reassign shifts in alterating form when a new week is ...
MySQL bi-weekly rotating workers shifts
mysql|sql
1
57
1
72,862,412
72,862,412
1
true
2022-07-04T16:58:40.487Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: MySQL bi-weekly rotating workers shifts<p>I need to create a view or SP to generate a table with workers' shifts in MySQL.</p> <p>We have 2 shifts that rotat...
72,864,116
How to write text in Listview<p>This is my code to write text with a image in list view.</p> <pre><code> var imageList = new ImageList(); Image image = Image.FromFile(&quot;ABC.png&quot;); imageList.Images.Add(&quot;ABC&quot;, image); listView1.LargeImageList = imageList; ...
<p>Thanks to @Klaus Gütter I was able to solve this.</p> <p>I changed the view from LargeIcons to SmallIcons.</p> <p>Also did change this line in the code.</p> <pre><code> listView1.SmallImageList = imageList; </code></pre>
How to write text in Listview
c#|winforms|listview
1
57
1
72,864,366
72,864,366
1
true
2022-07-05T04:46:06.747Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to write text in Listview<p>This is my code to write text with a image in list view.</p> <pre><code> var imageList = new ImageList(); ...
72,861,391
RDD Pipe operation converts each Row to a string. How to convert back to row<p>I am using PySpark to pipe an RDD out to an external process (stdin/stdout).</p> <pre><code>piped_rdd = rdd.pipe(exe_path) </code></pre> <p>When I examine the returned PipeLineRDD all rows have been converted to strings</p> <pre><code>[&quot...
<p>We could use <code>eval()</code>. I tested the following which seems to work on the sample data.</p> <pre><code>val_ls = [ &quot;Row(ID='x123223=', FirstName='L', LastName='S')&quot;, &quot;Row(ID='x123224=', FirstName='K', LastName='P')&quot; ] def evalRow(theRowString): &quot;&quot;&quot; imports...
RDD Pipe operation converts each Row to a string. How to convert back to row
apache-spark|pyspark|rdd
1
57
1
72,864,673
72,864,673
1
true
2022-07-04T19:45:57.240Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: RDD Pipe operation converts each Row to a string. How to convert back to row<p>I am using PySpark to pipe an RDD out to an external process (stdin/stdout).</...
72,864,331
Text of a cell is highlighted after starting editing<p>I load the contents of a database (mdb) into a <code>DataTable</code> object and display them in a <code>DataGrid</code> so that I can edit them. As soon as I start editing a cell (pressing <kbd>F2</kbd>), the entire text is selected.</p> <p><a href="https://i.stac...
<p>you can use the <code>PreparingCellForEdit</code> event for the <code>DataGrid</code>:</p> <p>XAML</p> <pre><code>&lt;DataGrid ... PreparingCellForEdit=&quot;DataGrid_PreparingCellForEdit&quot;&gt; </code></pre> <p>C# (It will place the cursor at the end of the current cell text)</p> <pre><code>private void DataGrid...
Text of a cell is highlighted after starting editing
c#|wpf|xaml|datagrid|edit
0
57
2
72,864,965
72,864,965
1
true
2022-07-05T05:20:13.680Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Text of a cell is highlighted after starting editing<p>I load the contents of a database (mdb) into a <code>DataTable</code> object and display them in a <co...
72,866,035
How to split a dataframe with multiple curve data points<p>I have a corporate bond dataframe that has multiple types of bonds with two columns on their yields and years-to-maturity values. When I plot their yields against the years to maturity, I can clearly see at least three, possibly four yield curves. I would like ...
<p>I did some exploring of your data and this is what I came up with.</p> <p>First, I noticed you had a lot of different <code>ID</code>s and <code>issuer</code>s. I used pandas' <code>groupby</code> function to separate your dataframe into groups based on these two columns. I didn't get anything very interesting with ...
How to split a dataframe with multiple curve data points
python|pandas|curve-fitting
0
57
1
72,868,673
72,868,673
1
true
2022-07-05T08:09:53.157Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to split a dataframe with multiple curve data points<p>I have a corporate bond dataframe that has multiple types of bonds with two columns on their yield...
72,871,983
Angular: how to define two possible values for a string variable<p>Is it possible to define a variable with the type string and then define which possible values that string can have?</p> <pre><code>colorScheme?: string = 'positive|negative'; //must be a string and must hav...
<p>Yes, it's called a <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types" rel="nofollow noreferrer">union type</a> !</p> <pre><code>type ColorScheme = 'positive' | 'negative'; const scheme1: ColorScheme = 'negative'; // ok const scheme2: ColorScheme = 'positive'; // ok const schem...
Angular: how to define two possible values for a string variable
typescript-typings
0
57
1
72,872,035
72,872,035
1
true
2022-07-05T15:28:40.063Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Angular: how to define two possible values for a string variable<p>Is it possible to define a variable with the type string and then define which possible va...
72,872,514
Why is my fetch request returning "...doesn't work without JavaScript enabled..."?<p>I have a sample project at <a href="https://github.com/ericg-vue-questions/leaflet-test/tree/fetch-method" rel="nofollow noreferrer">https://github.com/ericg-vue-questions/leaflet-test/tree/fetch-method</a> (fetch-method branch)</p> <p...
<p>In order for <code>fetch( &quot;./TheCloud.svg&quot; )</code> to work, it should be static file, which is located in <code>/public</code> folder in Vue CLI projects. Also relative URL paths may give problems, while absolute paths like <code>fetch( &quot;/TheCloud.svg&quot; )</code> are unambiguous.</p> <p>Otherwise ...
Why is my fetch request returning "...doesn't work without JavaScript enabled..."?
javascript|vue.js|vuejs2|fetch-api
0
57
1
72,873,429
72,873,429
1
true
2022-07-05T16:07:42.980Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why is my fetch request returning "...doesn't work without JavaScript enabled..."?<p>I have a sample project at <a href="https://github.com/ericg-vue-questio...
72,858,616
How do I multiply values within id and display answer?<p>How do multiply each value in the div with class=&quot;crtTotal&quot; and have a div output that displays the answer: for example 1.75 x 3.65 x 2.10 = 13.41</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html lang=&quot;en&quot;&gt; &lt;head&gt; &lt;meta charset=&q...
<p>The issue is because you initialise <code>sum</code> to zero. Therefore every number you multiply by <code>sum</code> is still zero. To fix this you could create an array of all values then use <code>reduce()</code> to multiply them all together.</p> <p>To display the output to 2DP you can use <code>toFixed(2)</code...
How do I multiply values within id and display answer?
html|jquery
1
57
1
72,873,866
72,873,866
1
true
2022-07-04T14:53:25.243Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I multiply values within id and display answer?<p>How do multiply each value in the div with class=&quot;crtTotal&quot; and have a div output that dis...
72,872,688
how to setup properly environment for testing using React, Redux and typescript?<p>I have a problem while setting up the environment for testing a React app that uses Redux and Typescript</p> <p>Here is my test:</p> <pre><code>import React from 'react'; import { render, screen } from '@testing-library/react' import Log...
<p>The <code>initialState</code> in your test has no nested <code>auth</code> state that your component seems to be expecting. Adapt the initialState in your test to reflect what the app uses. Better yet, use the same initialState your app is using.</p>
how to setup properly environment for testing using React, Redux and typescript?
reactjs|typescript|testing|redux|jestjs
0
57
1
72,874,099
72,874,099
1
true
2022-07-05T16:23:17.207Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to setup properly environment for testing using React, Redux and typescript?<p>I have a problem while setting up the environment for testing a React app ...
72,823,568
Architecture, Logging user activity on rest backend server for handle custom user UI<p>I want to make logging module user activity on the rest backend server. Our web service's UI transform with user activity histories.</p> <p>Example, There is Users and Projects.(User - Project(M:N))</p> <p>User's projects list be sor...
<p>Is it fast enough? With indexes? Then keep what you have. Don't optimize if you don't need to.</p> <p>If you find that this approach is unacceptably slow, you could denormalize the data and create a table like:</p> <pre><code>user_id project_id last_access_time </code></pre> <p>You probably already have a table with...
Architecture, Logging user activity on rest backend server for handle custom user UI
database|rest
0
57
1
72,875,695
72,875,695
1
true
2022-07-01T01:32:44.790Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Architecture, Logging user activity on rest backend server for handle custom user UI<p>I want to make logging module user activity on the rest backend server...
72,880,793
Changing registration form in shopware 6 - initialCountryId / disable names for companies<p>I want to change the registration form a little bit. For example I want &quot;Germany&quot; to be preselected in the form. I took a look at the code and there is a field for it</p> <pre><code>{% block component_address_form_coun...
<p>You can define your default country on sales-channel level. It is then also preselected in the checkout and registration form. So I don't think your change is necessary.</p> <p>Regarding the surname and lastname, it's not possible to deactivate it by default, you need to provide them during registration. So there ar...
Changing registration form in shopware 6 - initialCountryId / disable names for companies
registration|shopware6
1
57
1
72,882,180
72,882,180
1
true
2022-07-06T09:12:51.310Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Changing registration form in shopware 6 - initialCountryId / disable names for companies<p>I want to change the registration form a little bit. For example ...
72,887,574
Angular Adding data to and object add runtime not inserting data<p>I am trying to add data to an object with a button click but nothing is happening.</p> <p>Here is the code:</p> <p>HTML:</p> <pre><code>{{ data | json }} &lt;button (click)=&quot;add()&quot;&gt;Add Data&lt;/button&gt; </code></pre> <p>TS:</p> <pre><cod...
<p>In your 'add' method you need to assign the new data</p> <pre><code>add(){ this.newData = [ { description: 'Tom' }, { description: 'Paul' }, { description: 'Frank' } ]; //add the `newData` to the 3 element of the `data` array this.data[3].data = this.newData; } </code></pre>
Angular Adding data to and object add runtime not inserting data
angular|typescript|angular14
0
57
3
72,888,114
72,888,114
1
true
2022-07-06T17:17:33.927Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Angular Adding data to and object add runtime not inserting data<p>I am trying to add data to an object with a button click but nothing is happening.</p> <p>...
72,890,348
Selenium XPATH looking for a keyword inside of a Href that is inside of a class<p>I am struggling to click the first href that matches a keyword. There is at least 2 hrefs that match a keyword im using so selenium fails at clicking the element. I have tried to nominate the class and look inside that class for the Href ...
<p>With minimal modifications, you could use</p> <pre><code>element = driver.find_element(By.XPATH, &quot;//*[@class='productitem--title' and contains(a/@href, 'glenwyvis')]&quot;) </code></pre> <p>This returns the <code>&lt;h2&gt;</code> element with the desired properties.</p>
Selenium XPATH looking for a keyword inside of a Href that is inside of a class
python|html|selenium|xpath|href
0
57
2
72,890,539
72,890,539
1
true
2022-07-06T22:05:21.900Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Selenium XPATH looking for a keyword inside of a Href that is inside of a class<p>I am struggling to click the first href that matches a keyword. There is at...
72,893,689
How to make bulk_updates in Django using Queryset<p>Here I am trying to do bulk updates in Django:</p> <blockquote> <p>Problem: In a model, there is a column name position whose value changes according to the drag and drop of the record position. so I am creating the Queryset for that, but not getting the required resu...
<pre><code>from django.db.models import Case, When, F from_position = 1 to_position = 4 # First update the row we are moving to have a position of -1 Orderable.objects.filter(position=from_position).update(position=-1) # Then update all objects in between the from/to positions either up or down # depending of if the...
How to make bulk_updates in Django using Queryset
python|django|api|sqlite|django-rest-framework
0
57
2
72,894,011
72,894,011
1
true
2022-07-07T07:15:56.463Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to make bulk_updates in Django using Queryset<p>Here I am trying to do bulk updates in Django:</p> <blockquote> <p>Problem: In a model, there is a column...
72,894,396
Google Apps Script not sending email<p>We are trying to get e-mail notifications in cases there would be some dramatic changes in our revenue data. Could anyone please indicate possible errors why it wouldn't send e-mail?</p> <pre><code>function sendEmail() { const ss = SpreadsheetApp.getActive(); const sh = ss.get...
<p>Try changing <code>if (overdueValue === &quot;TRUE&quot;)</code> to <code>if (overdueValue === true)</code></p> <p><strong>Updated Code:</strong></p> <pre><code>function sendEmail() { const ss = SpreadsheetApp.getActive(); const sh = ss.getSheetByName(&quot;Sheet1&quot;); const data = sh.getRange(&quot;B2:L80...
Google Apps Script not sending email
google-apps-script|google-sheets|google-analytics|google-analytics-4|google-ad-manager
0
57
1
72,895,464
72,895,464
1
true
2022-07-07T08:12:54.610Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Google Apps Script not sending email<p>We are trying to get e-mail notifications in cases there would be some dramatic changes in our revenue data. Could any...
72,896,672
Arduino: Why same library is included multiple times<p>I couldn't rationalize the reason that why (dependency) library is required when this very library has already been included in the required library itself. For example:</p> <p>If I want to use SD.h, in the example code, SPI.h is required:</p> <pre><code> #includ...
<p>Arduino doesn't have makefiles so <a href="https://arduino.github.io/arduino-cli/0.24/sketch-build-process/" rel="nofollow noreferrer">the Arduino builder</a> scans for #include directives to add the required libraries.</p> <p>Old version of the build system required to list all libraries in the main ino file. That ...
Arduino: Why same library is included multiple times
c++|c|arduino
0
57
1
72,897,768
72,897,768
1
true
2022-07-07T11:02:13.920Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Arduino: Why same library is included multiple times<p>I couldn't rationalize the reason that why (dependency) library is required when this very library has...
72,899,621
How to check if a button contains an emoji with the customID - Discord JS<p>Can someone help me to find a solution to my problem? I want to check if a <code>Button</code> contains an emoji with the <code>customId</code>.</p> <p>For example, Button x has <code>customId</code> 1 &amp; <code>emoji</code> . I want to check...
<p>When you receive the <code>interaction</code>, the button is found inside the <code>interaction.message</code>.</p> <p>You had to create a <code>MessageActionRow</code> sent in an array. This <a href="https://discord.js.org/#/docs/main/stable/typedef/MessageActionRowComponent" rel="nofollow noreferrer"><code>Message...
How to check if a button contains an emoji with the customID - Discord JS
javascript|node.js|discord|discord.js
1
57
1
72,900,258
72,900,258
1
true
2022-07-07T14:29:08.040Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to check if a button contains an emoji with the customID - Discord JS<p>Can someone help me to find a solution to my problem? I want to check if a <code>...
72,900,276
H2o.explain confusion matrix<p>I am trying to understand how the confusion matrix in h2o.explain is generated. If I use the following code: h2o.explain(model@leader, test_set, include_explanations=&quot;confusion_matrix&quot;), is the generated confusion matrix evaluating the model accuracy on the test set? How would t...
<p>Yes, the <code>h2o.explain</code> uses the provided <code>test_set</code>. The confusion matrix itself in your case is generated by <code>h2o.confusionMatrix(object = model@leader, newdata = test_set)</code>.</p> <p><a href="https://en.wikipedia.org/wiki/Confusion_matrix" rel="nofollow noreferrer">Confusion matrix</...
H2o.explain confusion matrix
r|h2o|confusion-matrix|automl
1
57
1
72,900,660
72,900,660
1
true
2022-07-07T15:10:38.780Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: H2o.explain confusion matrix<p>I am trying to understand how the confusion matrix in h2o.explain is generated. If I use the following code: h2o.explain(model...
72,900,547
VBA How to format to 2 decimal places only if decimals required<p>I'm writing a macro to format a data file. I have some columns where data will either be a whole number or a long decimal (e.g. 0.6666667). I want to format the decimals to 2 dp, but I don't want the whole numbers to show .00 decimals. How can I do this?...
<p>I would use a sub like this - before applying the numberformat it checks for errors or text - and quits. By that you are sure that only numbers are handled.</p> <pre class="lang-vb prettyprint-override"><code>Sub reformatNumber(c As Range) If IsError(c.value) Then Exit Sub If Not IsNumeric(c.Value2) Then Exit Sub ...
VBA How to format to 2 decimal places only if decimals required
excel|vba
0
57
2
72,900,937
72,900,937
1
true
2022-07-07T15:29:53.957Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: VBA How to format to 2 decimal places only if decimals required<p>I'm writing a macro to format a data file. I have some columns where data will either be a ...
72,900,917
Why is "kill" is not exiting a thread immediately?<p>I am trying to write a simple script that spawns a thread that performs a task that may timeout. (For the sake of writing a simple example for StackOverflow I replaced the actual process with a <code>sleep</code> command).</p> <p>This program spawns a thread and then...
<p>Signals can only be sent to processes. As such, <code>$thread-&gt;kill('STOP')</code> can't possibly be sending an actual signal. As such, nothing interrupts <code>sleep</code>.</p> <p>Between each statement, Perl checks if a &quot;signal&quot; came in. If it has, it handles it. So the &quot;signal&quot; is only han...
Why is "kill" is not exiting a thread immediately?
windows|multithreading|perl|timeout|signals
1
57
2
72,902,664
72,902,664
1
true
2022-07-07T15:58:17.820Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why is "kill" is not exiting a thread immediately?<p>I am trying to write a simple script that spawns a thread that performs a task that may timeout. (For th...
72,903,946
"AttributeError: 'ForkAwareLocal' object has no attribute 'connection'" even with Process.join()<p>I'm writing a script for comparing many DNA genomes with each other, and I'm trying to use multiprocessing to have it run faster. All the processes are appending to a common list, <code>genome_score_avgs</code>.</p> <p>Th...
<p>The error is happening because you are using the managed list after you have closed the manager. Once that happens, the process that the manager spawns is closed as well, and therefore your managed list will no longer work. You need to use the list inside the <code>with</code> block like below:</p> <pre><code>if __n...
"AttributeError: 'ForkAwareLocal' object has no attribute 'connection'" even with Process.join()
python|python-3.x|multithreading|multiprocessing
1
57
1
72,904,274
72,904,274
1
true
2022-07-07T20:37:38.540Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: "AttributeError: 'ForkAwareLocal' object has no attribute 'connection'" even with Process.join()<p>I'm writing a script for comparing many DNA genomes with e...
72,893,964
Failed to pull image with "x509: certificate signed by unknown authority" error<p>I am using k3s kubernetes, and Harbor as a private container registry. I use a self-sign cert in Harbor. And I have a sample image in Harbor, which I want to create a sample pod in Kubernetes using this private Harbor image.</p> <p>I crea...
<p>The CA’s certificate needs to be trusted first.</p> <p>Put the CA into the host system’s trusted CA's chain. Run the following command.</p> <pre><code>sudo mkdir -p /usr/local/share/ca-certificates/myregistry sudo cp registry/myca.pem /usr/local/share/ca-certificates/myregistry/myca.crt sudo update-ca-certificates <...
Failed to pull image with "x509: certificate signed by unknown authority" error
kubernetes|k3s|harbor
0
57
1
72,907,875
72,907,875
1
true
2022-07-07T07:38:41.543Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Failed to pull image with "x509: certificate signed by unknown authority" error<p>I am using k3s kubernetes, and Harbor as a private container registry. I us...
72,910,229
QueryArtworkWidget Image blinking in flutter<p>I am building a music player in which I'm using on_audio_query package to get details of songs and QueryArtworkWidget and realtimeplayinginfos to display the image corresponding to the song. But while Iam playing the song, the image is blinking. Does anyone knows how to fi...
<p>Try to add a key</p> <p><code>keepOldArtWork = true;</code></p>
QueryArtworkWidget Image blinking in flutter
flutter|flutter-packages|flutter-image
1
57
2
72,910,349
72,910,349
1
true
2022-07-08T10:41:34.103Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: QueryArtworkWidget Image blinking in flutter<p>I am building a music player in which I'm using on_audio_query package to get details of songs and QueryArtwor...
72,891,621
What do Oracle redo log records look like?<p>What do Oracle redo log records look like? I've tried searching everywhere I can think of, and have been unable to find any examples.</p> <p>Are they text logs that are human readable? (And straightforward to parse?) Or are they complicated and require specialized tools to p...
<p>May we assume you did google &quot;Oracle redolog internals&quot; or similar did you? There is a treasure trove of information out there.</p> <p>In particular Julian Dyke's (now retired) material are always great: <a href="http://www.juliandyke.com/Presentations/Presentations.php" rel="nofollow noreferrer">http://ww...
What do Oracle redo log records look like?
oracle|logging|cdc
0
57
1
72,913,547
72,913,547
1
true
2022-07-07T02:19:05.307Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What do Oracle redo log records look like?<p>What do Oracle redo log records look like? I've tried searching everywhere I can think of, and have been unable ...
72,921,322
How and when to use the generic type parameter in impl block in Rust?<p>I am confused about the generic parameter for the <code>impl</code> keyword in Rust.</p> <p>To explain what I am confused about, I am currently going through the rustling exercises. I am doing the generics part. The second question which can be see...
<p>You could think of it the same way a function takes parameters, and can feed back these parameters in a function call, and it will probably make sense.</p> <p>A generic type <code>Wrapper&lt;T&gt;</code> is &quot;like&quot; a function that takes a type <code>T</code>, and produces an actual, concrete type <code>Wrap...
How and when to use the generic type parameter in impl block in Rust?
generics|rust
1
57
1
72,921,616
72,921,616
1
true
2022-07-09T12:22:48.997Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How and when to use the generic type parameter in impl block in Rust?<p>I am confused about the generic parameter for the <code>impl</code> keyword in Rust.<...
72,910,252
Get outer boundary path or coordinates of an overlapping svg/vector path<p>Suppose we have an array of points that can be used to draw an SVG/vector path.</p> <pre><code>const points = [[1,1], [3,4], .....]; </code></pre> <p><a href="https://i.stack.imgur.com/UzQDG.png" rel="nofollow noreferrer"><img src="https://i.sta...
<p><a href="http://paperjs.org/examples/boolean-operations" rel="nofollow noreferrer">Paper.js Boolean operations</a> might be helpful.</p> <p>The <code>unite()</code> method can merge single or multiple shapes to remove any overlap:</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-...
Get outer boundary path or coordinates of an overlapping svg/vector path
algorithm|svg|vector|html5-canvas|vector-graphics
0
57
1
72,922,572
72,922,572
1
true
2022-07-08T10:43:31.120Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Get outer boundary path or coordinates of an overlapping svg/vector path<p>Suppose we have an array of points that can be used to draw an SVG/vector path.</p...
72,923,224
Adding text as asterix with matplotlib<p>Below you can see my data and facet plot in matplotlib.</p> <pre><code>import pandas as pd import numpy as np pd.set_option('max_columns', None) import matplotlib.pyplot as plt data = { 'type_sale': ['g_1','g_2','g_3','g_4','g_5','g_6','g_7','g_8','g_9','g_10'], ...
<p>Here's how I implemented it, based on <a href="https://stackoverflow.com/questions/2027592/draw-a-border-around-subplots-in-matplotlib">this</a> answer.</p> <pre class="lang-py prettyprint-override"><code>import pandas as pd import numpy as np pd.set_option('max_columns', None) import matplotlib.pyplot as plt import...
Adding text as asterix with matplotlib
python|matplotlib
3
57
1
72,923,324
72,923,324
1
true
2022-07-09T16:58:07.520Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Adding text as asterix with matplotlib<p>Below you can see my data and facet plot in matplotlib.</p> <pre><code>import pandas as pd import numpy as np pd.set...
72,921,870
Angular NgRX return value from map is not observable?<p>I am trying to understand, why my http Call from AuthService, which returns an <code>Observable&lt;CurrentUserInterface&gt;</code> does not return an observable from inside my NgrX <code>register$</code> effect function inside the map function:</p> <pre><code>@Inj...
<p><code>map</code> is an operator takes a value and returns a value.</p> <p>If you want to return another Observable, you need to use higher-order observables, <code>mergeMap</code>, <code>switchMap</code>, <code>exhaustMap</code>, <code>concatMap</code>.</p> <p>For more info see <a href="https://rxjs.dev/guide/higher...
Angular NgRX return value from map is not observable?
angular|observable|return-value|ngrx|ngrx-effects
0
57
1
72,923,559
72,923,559
1
true
2022-07-09T13:45:08.183Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Angular NgRX return value from map is not observable?<p>I am trying to understand, why my http Call from AuthService, which returns an <code>Observable&lt;Cu...
72,923,918
How to extract data from json?<p>With following code I extract this output but how to extract the all ['_id'] from the output?</p> <pre class="lang-py prettyprint-override"><code>def geneinfo(gene): url = 'http://mygene.info/v3/query?q='+gene r = requests.get(url) return r.json()['hits'] geneinfo('cdk2') <...
<p>If <code>data</code> is your output from the question you can do:</p> <pre class="lang-py prettyprint-override"><code>out = [d[&quot;_id&quot;] for d in data] print(out) </code></pre> <p>Prints:</p> <pre class="lang-py prettyprint-override"><code>[ &quot;1017&quot;, &quot;12566&quot;, &quot;362817&quot;,...
How to extract data from json?
python|json|python-requests
-3
57
1
72,924,016
72,924,016
1
true
2022-07-09T18:58:35.093Z
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 json?<p>With following code I extract this output but how to extract the all ['_id'] from the output?</p> <pre class="lang-py pretty...
72,925,737
SQL query comparing values from two columns, evaluating it and making the sum of evaluated values<p>There are four columns in the table:</p> <pre><code>COL_LEFT, COL_RIGHT, PRICE_LEFT, PRICE_RIGHT </code></pre> <p>I need to write a SQL query that will compare values in columns <code>PRICE_LEFT</code> and <code>PRICE_RI...
<p>Try the following:</p> <pre><code>With CTE As ( Select COL_LEFT As Col, Case When PRICE_LEFT&gt; PRICE_RIGHT Then 1 Else 0 End as Result from SUMS_BY_VALUE Union ALL Select COL_RIGHT As Col, Case When PRICE_LEFT&lt;PRICE_RIGHT Then 1 Else 0 End as Result from SUMS_BY_VALUE ) Select Col,...
SQL query comparing values from two columns, evaluating it and making the sum of evaluated values
sql|sql-server|sum
0
57
1
72,926,011
72,926,011
1
true
2022-07-10T02:11:42.637Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: SQL query comparing values from two columns, evaluating it and making the sum of evaluated values<p>There are four columns in the table:</p> <pre><code>COL_L...
72,925,967
How to find duplicate characters in a string and concat them to a new string<ul> <li><p>I take in a string <code>aabullc</code></p> </li> <li><p>returingStrin should be assigned <code>aall</code> after the loop since <code>a</code> and <code>l</code> are duplicates</p> </li> <li><p>strings with more then 1 dupe like ex...
<p><code>char</code> is a reserved keyword in JAVA. So it cannot be used as a variable name.</p>
How to find duplicate characters in a string and concat them to a new string
java|concatenation|nested-loops
-1
57
2
72,926,090
72,926,090
1
true
2022-07-10T03:31:02.217Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to find duplicate characters in a string and concat them to a new string<ul> <li><p>I take in a string <code>aabullc</code></p> </li> <li><p>returingStri...
72,925,063
Google Sheets multiply values in cell by both integer in same cell and number of TRUE in same row<p>I have the following formula:</p> <pre><code>=ARRAYFORMULA(QUERY(IFERROR(FLATTEN(SPLIT(FLATTEN(REPT(REGEXEXTRACT(SPLIT(A1:A4, &quot; &quot;), &quot;(?:\d+x)?(.+)&quot;)&amp;&quot;×&quot;, IFERROR(REGEXEXTRACT(SPLIT(A1:...
<p>try:</p> <pre><code>=ARRAYFORMULA(QUERY(&quot;&quot;&amp;IFERROR(FLATTEN(SPLIT(FLATTEN( IF((A1:C15=TRUE)*NOT(REGEXMATCH(D1:D15, &quot;\d+x&quot;)), D1:D15, IF(REGEXMATCH(D1:D15, &quot;\d+x&quot;), REPT(REGEXEXTRACT(SPLIT(D1:D15, &quot; &quot;), &quot;\d+x(.*)&quot;)&amp;&quot;×&quot;, REGEXEXTRACT(SPLIT(D1:D15,...
Google Sheets multiply values in cell by both integer in same cell and number of TRUE in same row
google-sheets|count|sum|google-sheets-formula|flatten
4
57
1
72,941,787
72,941,787
1
true
2022-07-09T22:42:47.260Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Google Sheets multiply values in cell by both integer in same cell and number of TRUE in same row<p>I have the following formula:</p> <pre><code>=ARRAYFORMUL...
72,929,378
Display healthService data such as step in AmbientMode (Android wear)<p>I want to display health-service data such as step, pace, etc in AmbientMode.</p> <p>But HealthServices(using ExerciseClient <a href="https://developer.android.com/training/wearables/health-services/active" rel="nofollow noreferrer">https://develop...
<p>Please add the relevant code that shows how you are setting up the connection to HealthServices. It will make it easier for people to help you. In the meantime, here are some suggestions for you to look into:</p> <ol> <li><p>ExerciseClient will only send you data when you have an active workout with a <a href="https...
Display healthService data such as step in AmbientMode (Android wear)
android|kotlin|wear-os|watch
0
57
1
72,945,029
72,945,029
1
true
2022-07-10T14:48:48.393Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Display healthService data such as step in AmbientMode (Android wear)<p>I want to display health-service data such as step, pace, etc in AmbientMode.</p> <p>...
72,946,044
why doesn't this code set the @State variable in a struct in swiftui<p>I've got the following code, which seems very simple.</p> <pre><code>import SwiftUI struct Tester : View { @State var blah : String = &quot;blah&quot; func setBlah(_ val : String) { blah = val } var body: some View { ...
<p><code>@State</code> in SwiftUI doesn't work like simple mutating functions on a struct -- it's more like a separate layer of state that gets stored alongside the view hierarchy.</p> <p>Let's look at what this would have to look like if it were not SwiftUI/<code>@State</code>:</p> <pre><code>struct Tester { var b...
why doesn't this code set the @State variable in a struct in swiftui
swift|swiftui
1
57
1
72,946,113
72,946,113
1
true
2022-07-12T01:04:32.633Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: why doesn't this code set the @State variable in a struct in swiftui<p>I've got the following code, which seems very simple.</p> <pre><code>import SwiftUI s...
72,947,618
Select rows with non matching column<p>I am trying to retrieve rows with same Volume value or with only 1 Volume, but could not come up with a SQL logic.</p> <p>Data:</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>ID</th> <th>Volume</th> </tr> </thead> <tbody> <tr> <td>A</td> <td>100</td> ...
<p>This one is achievable using a <code>subquery</code>.</p> <pre><code>select * from test where col1 in ( select t.col1 from( select col1, col2, dense_rank() over (partition by col1 order by col2) as dr from test) t group by t.col1 having sum(case when t.dr = 1 then 0 else t.dr end) = 0) </cod...
Select rows with non matching column
mysql|sql
0
57
3
72,947,777
72,947,777
1
true
2022-07-12T05:55:08.133Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Select rows with non matching column<p>I am trying to retrieve rows with same Volume value or with only 1 Volume, but could not come up with a SQL logic.</p>...
72,935,398
How to remove '\r\n\r\n' character from a list containing various strings while web scraping using BeautifulSoup in python?<p>I am trying to scrape data from the web and while doing so there are unusual characters appearing in my data (i.e '\r\n\r\n'). Goal is to get a dataframe containing the site data.</p> <p><strong...
<p>Also mentioned by @SergeyK I would recommend to use <code>pandas</code> it is common praxis and will work in most cases (bs4 under the hood) and you get your result in one line</p> <pre><code>pd.read_html(url)[1] print(df) </code></pre> <p>If you like to go your way, select more specific and <code>strip()</code> the...
How to remove '\r\n\r\n' character from a list containing various strings while web scraping using BeautifulSoup in python?
python|web-scraping|beautifulsoup|html-lists|jupyter-lab
-1
57
1
72,947,915
72,947,915
1
true
2022-07-11T08:01:32.860Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to remove '\r\n\r\n' character from a list containing various strings while web scraping using BeautifulSoup in python?<p>I am trying to scrape data from...
72,949,223
How to flatten out nested array of strings in json column?<p>I have the following table:</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>id</th> <th>contents</th> </tr> </thead> <tbody> <tr> <td>123</td> <td>{ blocks: [{ text: &quot;abc&quot; }, { text: &quot;123&quot; }] }</td> </tr> <tr> ...
<p>If a JSON array of all the values is also acceptable, you can use a JSON path query:</p> <pre><code>select id, contents, jsonb_path_query_array(contents, '$.blocks[*].text') from post; </code></pre> <p>As there is no simply cast from a JSON array to a native Postgres array, and you do need that as a C...
How to flatten out nested array of strings in json column?
sql|postgresql
0
57
1
72,950,708
72,950,708
1
true
2022-07-12T08:27:20.707Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to flatten out nested array of strings in json column?<p>I have the following table:</p> <div class="s-table-container"> <table class="s-table"> <thead> ...
72,950,208
Packaging a python script from another repository into flask<p>I was tasked with creating 2 repositories.. one has a simple python script</p> <p>the other is a flask application which should use the first script and return the results in a json</p> <p>so both projects look something like this</p> <h1>main.py</h1> <pre>...
<p>One way to achieve this is by creating a python package for main.py, and import that into your flask app.</p> <p><a href="https://packaging.python.org/en/latest/tutorials/packaging-projects/" rel="nofollow noreferrer">Official doc on creating python packages.</a></p> <p><a href="https://changhsinlee.com/python-packa...
Packaging a python script from another repository into flask
python
1
57
1
72,950,807
72,950,807
1
true
2022-07-12T09:41:56.647Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Packaging a python script from another repository into flask<p>I was tasked with creating 2 repositories.. one has a simple python script</p> <p>the other is...
72,951,574
Get the sum of each column, with recursive values in each cell<p>Given a parameter <code>p</code>, be any float or integer.</p> <p>For example, let <code>p=4</code></p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>time</th> <th>1</th> <th>2</th> <th>3</th> <th>4</th> <th>5</th> </tr> </thead...
<p>Assuming your number of rows is not too large, you can achieve this with numpy broadcasting:</p> <p>First create a 2D array of factors:</p> <pre><code>a = np.arange(len(df)) factors = (a[:,None]-a) factors = np.where(factors&lt;0, np.nan, factors) # array([[ 0., nan, nan, nan, nan], # [ 1., 0., nan, nan, nan...
Get the sum of each column, with recursive values in each cell
python|python-3.x|pandas|dataframe|numpy
-1
57
1
72,951,847
72,951,847
1
true
2022-07-12T11:28:03.980Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Get the sum of each column, with recursive values in each cell<p>Given a parameter <code>p</code>, be any float or integer.</p> <p>For example, let <code>p=4...
72,946,787
How to delete content in a specific page range under certain heading level/style?<p>Suppose I have three levels/styles of headings in a document,</p> <p><a href="https://i.stack.imgur.com/Dp25p.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Dp25p.png" alt="enter image description here" /></a></p> <p...
<p>Try:</p> <pre><code>Sub DelHd3Content() Application.ScreenUpdating = False Dim RngFnd As Range, Rng As Range, t As Long, i As Long Const StrHd1 As String = &quot;General Electrical Engineering&quot; Const StrHd2 As String = &quot;Systems and Artificial Intelligence&quot; With ActiveDocument.Range With .Find .C...
How to delete content in a specific page range under certain heading level/style?
vba|ms-word
0
57
2
72,958,299
72,958,299
1
true
2022-07-12T03:41:37.877Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to delete content in a specific page range under certain heading level/style?<p>Suppose I have three levels/styles of headings in a document,</p> <p><a h...
72,953,792
Minimize squared error for fixed parameter regression<p>I'm currently comparing several traditional methods for selecting an exponential trend in a series of points. Trends are often selected in my industry without concern for measures of fit, and this means that a common method is to simply measure yr/yr change and av...
<p>One way of fixing a parameter when using <code>curve_fit</code> is to pass a lambda function that hardcodes the parameters you want to fix. Here's how I did it:</p> <pre class="lang-py prettyprint-override"><code># ... all your preamble, but importing matplotlib new_b = trend_yryr + 1 popt2, pcov2 = curve_fit(lambda...
Minimize squared error for fixed parameter regression
python|scipy|curve-fitting|least-squares|trend
0
57
1
72,959,393
72,959,393
1
true
2022-07-12T14:14:15.977Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Minimize squared error for fixed parameter regression<p>I'm currently comparing several traditional methods for selecting an exponential trend in a series of...
72,960,795
How to align title and button on the same line?<p>I have a title and a button. The title should be left-aligned and the button should be right-aligned. But I have a problem that the button goes up.</p> <p>How to align title and button on the same line?</p> <p><div class="snippet" data-lang="js" data-hide="false" data-c...
<pre><code>Add this CSS on page-header class: .page-header { ...; display: flex; justify-content: space-between; align-items: center; } </code></pre>
How to align title and button on the same line?
css|angular-material|angular-flex-layout
0
57
2
72,960,831
72,960,831
1
true
2022-07-13T04:01:04.163Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to align title and button on the same line?<p>I have a title and a button. The title should be left-aligned and the button should be right-aligned. But I...
72,962,109
TypeError: Cannot destructure property 'user' of 'Object(...)(...)' as it is undefined<p>I'm relatively new to react. I'm trying to use the jwt login methods from a template I downloaded. It's throwing this error and I'm clueless any help would be appreciated.</p> <p><strong>AuthHooks.js</strong></p> <pre><code>// ForJ...
<p>You need at least to initialize the <code>JWTAuthContext</code> context with an empty object.</p> <pre><code>const JWTAuthContext = createContext({}); </code></pre>
TypeError: Cannot destructure property 'user' of 'Object(...)(...)' as it is undefined
javascript|reactjs
0
57
1
72,962,211
72,962,211
1
true
2022-07-13T07:00:26.420Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: TypeError: Cannot destructure property 'user' of 'Object(...)(...)' as it is undefined<p>I'm relatively new to react. I'm trying to use the jwt login methods...
72,965,331
Async "not expected" result<p>I'm trying to understand how <code>async</code> works. All the examples I've seen use <code>asyncio.sleep</code>, but I would like to get an example without that. Below I have provided a simple example to demonstrate my confusion regarding how async/await works.</p> <pre><code>import async...
<p>Asynchronous functions allow you to run concurrent tasks, i.e. coroutines, that yield control back to the caller at certain points. Concurrent execution is by no means parallelization. For the latter you'll want to use threads or processes. Since <code>_simple_count()</code> only performs one lengthy task without ev...
Async "not expected" result
python|asynchronous|async-await
0
57
1
72,965,870
72,965,870
1
true
2022-07-13T11:14:00.733Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Async "not expected" result<p>I'm trying to understand how <code>async</code> works. All the examples I've seen use <code>asyncio.sleep</code>, but I would l...
72,967,209
Google Drive - Shared Drive Permissions<p>I was using an App Script Project to automate the creation of some accounts and profiles inside of our organization. I had been using this same method for adding the &quot;Viewer&quot; permission for the user I would like on the designated shared drive.</p> <pre><code>DriveApp....
<p>It looks like the problem is the type of access level you have in the shared drive.</p> <p>The <code>Content manager</code> access level is not enough to perform this type of action as I was able to reproduce the exact same error message from the screenshot provided:</p> <p><a href="https://i.stack.imgur.com/8YdGq.p...
Google Drive - Shared Drive Permissions
javascript|google-apps-script
0
57
1
72,971,127
72,971,127
1
true
2022-07-13T13:32:47.987Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Google Drive - Shared Drive Permissions<p>I was using an App Script Project to automate the creation of some accounts and profiles inside of our organization...
72,880,136
lifelines.CoxPHFitter - how are the p-values calculated?<p>I assume that lifelines.CoxPHFitter is using a Likelihood-ratio test (or is it using Wald?) to calculate p-values when testing for significance. But I have to be sure: is there an official source where I can find what test are used? (I was not successful search...
<p>The <code>CoxPHFitter</code> computes p-values using the chi-squared test. The reference is in &quot;Survival Analysis by John P. Klein and Melvin L. Moeschberger, Second Edition&quot;, page 256</p>
lifelines.CoxPHFitter - how are the p-values calculated?
python|statistics|survival-analysis|cox-regression|lifelines
0
57
1
72,972,340
72,972,340
1
true
2022-07-06T08:23:57.763Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: lifelines.CoxPHFitter - how are the p-values calculated?<p>I assume that lifelines.CoxPHFitter is using a Likelihood-ratio test (or is it using Wald?) to cal...
72,965,262
How to fetch stock exchange data with Python<p>I am writing a small program to fetch stock exchange data using Python. The sample code below makes a request to a URL and it should return the appropriate data. Here is the resource that I am using: <a href="https://python.plainenglish.io/4-python-libraries-to-help-you-ma...
<p>It is most common practice to scrape tables with <code>pandas.read_html()</code> to get its texts, so I would also recommend it.</p> <p>But to answer your question and follow your approach, select <code>&lt;div&gt;</code> and <code>&lt;table&gt;</code> more specific:</p> <pre><code>soup.select('#ctl00_cph1_divSymbol...
How to fetch stock exchange data with Python
python|selenium|web-scraping
0
57
1
72,972,939
72,972,939
1
true
2022-07-13T11:08:08.043Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to fetch stock exchange data with Python<p>I am writing a small program to fetch stock exchange data using Python. The sample code below makes a request ...
72,973,420
How to show total in datatables?<p>I have a small problem. I am creating a table with datatable and bootstrap 4 and the truth is that it works great, but I have the following problem: I am trying to put a totalizer so that the total of one (or several) columns appears at the end. The code works fine (Because it calcula...
<p>I think you would be better off using <a href="https://datatables.net/extensions/fixedheader/examples/options/columnFiltering.html" rel="nofollow noreferrer">this example</a> as your starting point, because it places filters in the heading correctly.</p> <p>The linked example creates a second header row so that the ...
How to show total in datatables?
javascript|bootstrap-4|datatable
2
57
1
72,973,834
72,973,834
1
true
2022-07-13T22:45:47.373Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to show total in datatables?<p>I have a small problem. I am creating a table with datatable and bootstrap 4 and the truth is that it works great, but I h...
72,992,120
how to do dict comprehension for multiple for and if loops in python?<p>i have a code like below:</p> <pre><code>out={} for each_val in values[&quot;data&quot;]['values']: if each_val['value'].strip() != '': if 'frequency' in each_val: out[each_val['value']] = each_val['frequency'] else: ...
<p>You should put the filter as an <code>if</code> clause in the comprehension. Also, use the <code>dict.get</code> method to default the value to <code>None</code> when a key is not found in the dict:</p> <pre><code>out = { each_val['value']: each_val.get('frequency') for each_val in values[&quot;data&quot;]['...
how to do dict comprehension for multiple for and if loops in python?
python-3.x|dictionary|dictionary-comprehension
1
57
2
72,992,258
72,992,258
1
true
2022-07-15T09:47:37.620Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to do dict comprehension for multiple for and if loops in python?<p>i have a code like below:</p> <pre><code>out={} for each_val in values[&quot;data&quo...
72,992,657
c# extension method for a generic class with interface as type constraint<p>Is it possible in c# - and if so how - to extend a generic class but only if the generic type parameter implements a special interface?</p> <p>For example something like this:</p> <pre><code>public static void SomeMethod( this SomeClass&lt;...
<p>Yes, this can be done by making the method generic and adding a generic type constraint to the method, as follows:</p> <pre class="lang-cs prettyprint-override"><code>public static void SomeMethod&lt;T&gt;( this SomeClass&lt;T&gt; obj, ISomeInterface objParam) where T : ISomeInterface // &lt;-- generic type ...
c# extension method for a generic class with interface as type constraint
c#|generics|interface|extension-methods
0
57
1
72,992,782
72,992,782
1
true
2022-07-15T10:33:18.627Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: c# extension method for a generic class with interface as type constraint<p>Is it possible in c# - and if so how - to extend a generic class but only if the ...
72,996,300
How to accumulate all values inside a 2D array that share the same field?<p>I have a 2D array that contains values like this:</p> <pre><code>var array = [[&quot;10/10/2020&quot;,&quot;1000&quot;],[&quot;10/10/2020&quot;,&quot;300&quot;],[&quot;07/10/2020&quot;,&quot;100&quot;],[&quot;07/10/2020&quot;,&quot;100&quot;],[...
<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 array = [["10/10/2020","1000"],["10/10/2020","300"],["07/10/2020","100"],["07/10/2020","100"],["03/10/2020","100"],["10/10/2020"...
How to accumulate all values inside a 2D array that share the same field?
javascript|reactjs
-2
57
4
72,996,565
72,996,565
1
true
2022-07-15T15:27:16.643Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to accumulate all values inside a 2D array that share the same field?<p>I have a 2D array that contains values like this:</p> <pre><code>var array = [[&q...
72,994,541
Wrapping a react Route in a conditional statement<p>I am working with react router. Initially I had two different components being rendered under the same route one with a parameter and one without(this is how the routes were differentiated). Now I am trying to add optional parameters to the first route while not editi...
<p>In most scenarios you don't want to be rendering 2 different components under the same route. To pass optional data to component you would normally use the search params.</p> <p>This means you should no longer pass an optional path for the <code>EncounterMonitor</code>, but move this to the search params. An example...
Wrapping a react Route in a conditional statement
javascript|reactjs|react-router|react-router-dom
0
57
2
72,996,616
72,996,616
1
true
2022-07-15T13:11:17.190Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Wrapping a react Route in a conditional statement<p>I am working with react router. Initially I had two different components being rendered under the same ro...
72,991,738
find prime numbers between two numbers<p>I want to find prime numbers between two numbers that we get from the inputs, but I get this error:</p> <blockquote> <p>num cannot be resolved to a variable</p> </blockquote> <p>I read the code many times but couldn't find the problem!<br /> Can you help me?</p> <pre><code>publi...
<p>Java ain't python: Indentation (or any from of whitespace) does not convey any code meaning.</p> <p>The problem is the <em>scope</em> of <code>num</code> which is harder to see because your indentation is incorrect.</p> <p>This code:</p> <pre class="lang-java prettyprint-override"><code>for (int num=number1; num&lt;...
find prime numbers between two numbers
java|numbers|find
0
57
1
73,000,645
73,000,645
1
true
2022-07-15T09:17:28.647Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: find prime numbers between two numbers<p>I want to find prime numbers between two numbers that we get from the inputs, but I get this error:</p> <blockquote>...
73,001,065
Using Python Metaclasses to Limit the Number of Attributes<p>I trying to define a Python metaclass to limit the number of attributes that a class may contain, starting at creation time. I am constrained to use Python 3.7 due to system limitations</p> <p>I managed to do it without a metaclass:</p> <pre class="lang-py pr...
<p>If you really want to do it using metaclasses, you can, but I would recommend against it, because a class decorator suffices, and you can chain class decorators in future, whereas you cannot do so with metaclasses. Using a class decorator also frees up the possibility of using a metaclass in future.</p> <p>With that...
Using Python Metaclasses to Limit the Number of Attributes
python|metaclass
0
57
3
73,001,465
73,001,465
1
true
2022-07-16T02:03:31.047Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Using Python Metaclasses to Limit the Number of Attributes<p>I trying to define a Python metaclass to limit the number of attributes that a class may contain...
72,994,793
how to display list of orders from my database in vue js<p>i've successfully updated my orders after payment please how can i display it in my vue front end</p> <p>this is my html template which shows the list of orders made</p> <pre><code>&lt;template&gt; &lt;div&gt; &lt;div v-for=&quot;order in orders&quo...
<p>this.orders = res.data.products was what solved my problem</p>
how to display list of orders from my database in vue js
javascript|json|vue.js
1
57
2
73,002,995
73,002,995
1
true
2022-07-15T13:29:42.033Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to display list of orders from my database in vue js<p>i've successfully updated my orders after payment please how can i display it in my vue front end<...
73,006,188
Optimisation of spherical to cartesian notation Python<p>I am preprocessing data with a relatively small dataset (4000 instances) but the code I have written takes 9 seconds per instance on my laptop resulting in a 10-hour run time. The code is here below and if anyone could help optimize it so I can use a larger datas...
<p>Assuming I understood what you wanted (see my comment), here is some piece of code that I believe does the job. I wrote comments in the code, I hope it is enough.</p> <p>I invite you to read the documentation of the numpy functions &quot;unique&quot;, &quot;digitize&quot; and &quot;nonzero&quot;.</p> <pre><code>impo...
Optimisation of spherical to cartesian notation Python
python|numpy|performance|optimization
2
57
1
73,007,053
73,007,053
1
true
2022-07-16T17:07:15.027Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Optimisation of spherical to cartesian notation Python<p>I am preprocessing data with a relatively small dataset (4000 instances) but the code I have written...
73,010,058
How can I make a Discord bot listen to my DMs instead of simple channel messages?<p>I'm messing around creating a simple quiz bot. So far it is working well in channels, but <strong>I would like to modify it into a DM-only quiz bot.</strong></p> <p>I listen to commands from Discord users like this:</p> <pre><code>clien...
<p>You'll need to enable the required intents and partials to be able to listen to direct messages. As you've already added <code>DIRECT_MESSAGES</code>, you must have missed the <a href="https://discord.js.org/#/docs/main/stable/typedef/PartialType" rel="nofollow noreferrer"><code>CHANNEL</code> partial</a>. It's requ...
How can I make a Discord bot listen to my DMs instead of simple channel messages?
javascript|discord|discord.js
1
57
1
73,010,287
73,010,287
1
true
2022-07-17T07:49:52.100Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I make a Discord bot listen to my DMs instead of simple channel messages?<p>I'm messing around creating a simple quiz bot. So far it is working well ...
73,014,523
how to draw image pixel by piexel in swing<p>I recently created a program to explore Mandelbrot's fractal and after calculated the image I drew it but in a weird way. How can I paint it in clean way? The only way I found is to override the paint method and fill rectangle of 1 pixel (I know the function to get the color...
<p>You can create a <code>BufferedImage</code>, edit it, and than add it to you frame inside a <code>JLable</code>, like this:</p> <pre><code>JLabel lable = new JLabel(new ImageIcon(yourBufferedImage)); frame.addLabel(); </code></pre> <p>This will prevent you from re-calculating your image every time you repaint it. To...
how to draw image pixel by piexel in swing
java|swing|fractals
1
57
1
73,014,963
73,014,963
1
true
2022-07-17T18:54:10.853Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to draw image pixel by piexel in swing<p>I recently created a program to explore Mandelbrot's fractal and after calculated the image I drew it but in a w...
73,015,333
string slicing in python (meaning of [0:-1])<p>I have been referring to a few sources of information on slicing strings (<a href="https://www.geeksforgeeks.org/string-slicing-in-python/" rel="nofollow noreferrer">here</a>, for example).</p> <p>I wanted to understand the behavior of slicing so I tried the following scri...
<p>The negative numbers effectively count from the right. So:-</p> <pre><code>s[0:-1] </code></pre> <p>-:means &quot;every element except the last one in s&quot;</p> <p>Hence:-</p> <pre><code>s[0:-5] </code></pre> <p>-:means &quot;every element except the last five in s&quot;</p> <p>Since there are not five elements i...
string slicing in python (meaning of [0:-1])
python|string|syntax|slice
-3
57
1
73,015,364
73,015,364
1
true
2022-07-17T21:01:57.107Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: string slicing in python (meaning of [0:-1])<p>I have been referring to a few sources of information on slicing strings (<a href="https://www.geeksforgeeks.o...
73,018,137
is there a difference between these two snippets of code and if yes what is it?<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>function addBinary(a,b) { let sum= a+b if (sum&l...
<p>The <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Unsigned_right_shift" rel="nofollow noreferrer">&gt;&gt;&gt;</a> operator always interprets the given number as an <em>unsigned</em> 32 bit number. When the second operand is 0, nothing changes to that and the result is unsigned...
is there a difference between these two snippets of code and if yes what is it?
javascript
0
57
1
73,018,331
73,018,331
1
true
2022-07-18T06:34:12.077Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: is there a difference between these two snippets of code and if yes what is it?<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" d...
73,021,670
Is there any way to increase the performance of my python code without using threads/processes?<p>I am trying to do the Euler Problems, and I am stuck on the Largest Prime Factor. I know how to work it out, but I am going about it in a brute-force manner. The files below are the two files in my project; prime.py with t...
<p>Also, for starters, you dont need to check all numbers up to &quot;number+1&quot;. It is sufficient to test all numbers up to int(sqrt(number))+1. If you find a prime number, you divide your original number by that and repeat (recursively). At the end of this recursion, you will be left with some number which is it...
Is there any way to increase the performance of my python code without using threads/processes?
python|python-3.x|performance|optimization|processing-efficiency
1
57
3
73,022,508
73,022,508
1
true
2022-07-18T11:33:38.990Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is there any way to increase the performance of my python code without using threads/processes?<p>I am trying to do the Euler Problems, and I am stuck on the...
72,966,506
Logstash giving _rubyexception while adding a field and altering its value<p><strong>Logstash version 6.5.4</strong></p> <p>I want to create <strong>jobExecutionTime</strong> field when status is <strong>COMPLETE</strong> and set its value as <em>current_timestamp-created_timestamp</em>.</p> <p>These are few lines from...
<p>Your [created_timestamp] and [current_timestamp] fields are strings. You cannot do math on a string, you need to convert it an object type that you can do math on. In this case you should use date filters to convert them to LogStash::Timestamp objects</p> <p>If you add</p> <pre><code> date { match =&gt; [ &quot;c...
Logstash giving _rubyexception while adding a field and altering its value
ruby|elasticsearch|logstash|filebeat
0
57
1
73,025,403
73,025,403
1
true
2022-07-13T12:41:36.523Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Logstash giving _rubyexception while adding a field and altering its value<p><strong>Logstash version 6.5.4</strong></p> <p>I want to create <strong>jobExecu...
73,030,000
How to make a 50% fade in and a 100% fade out?<p>How to make a sprite start to fade in and 1 second later when the opacity is 50% then its turning instantly to 100% and then 0.2 seconds later its within 0.5 seconds the opacity going to 100% to 0% and its repeat itself every 1 second?</p> <p>I think this is a really har...
<p>I'm not sure if it's the best solution but I have some idea how to realize it. So we have <code>Time.deltaTime</code> valuable. It's the interval in seconds from the last frame to the current onetime to draw (Unity Documentation). So we can use it to count seconds. The other way to count secounds are Coroutines but ...
How to make a 50% fade in and a 100% fade out?
c#|unity3d
1
57
2
73,031,203
73,031,203
1
true
2022-07-19T00:51:25.343Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to make a 50% fade in and a 100% fade out?<p>How to make a sprite start to fade in and 1 second later when the opacity is 50% then its turning instantly ...
73,025,646
Get missing Ids from a list of ids<p>I'm trying to retrieve a list of missing Ids in database from another list of Ids in Entity Framework Core.</p> <p>Is there a way to get this call in one line?</p> <pre class="lang-cs prettyprint-override"><code>public static async Task&lt;IEnumerable&lt;TKey&gt;&gt; GetMissingIds&l...
<p>EF Core supports only <code>Contains</code> with local collections (with small exceptions), so there is no effective way to retrieve Ids which are not present in database via LINQ Query.</p> <p>Anyway there is third-party extensions which can do that <a href="https://github.com/linq2db/linq2db.EntityFrameworkCore" r...
Get missing Ids from a list of ids
entity-framework-core
1
57
1
73,039,340
73,039,340
1
true
2022-07-18T16:29:24.600Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Get missing Ids from a list of ids<p>I'm trying to retrieve a list of missing Ids in database from another list of Ids in Entity Framework Core.</p> <p>Is th...
72,853,223
Configuration of OpenId Connect token expiration in CAS<p>I'm looking for properties to set expiration time of OpenId Connect token. Default is 8 hours, but I want to change it. How can I do that?</p> <p>I'm using CAS 6.5.4</p>
<p>Token expiration policy is the same as your SSO session policy in CAS 6.5.x. To change the default to use 2 hours would be, i.e., <code>cas.ticket.tgt.primary.max-time-to-live-in-seconds=7200</code>. This will make the ID token last for 2 hours, and your SSO session would also last for 2 hours.</p>
Configuration of OpenId Connect token expiration in CAS
openid-connect|cas
0
57
1
73,088,230
73,088,230
1
true
2022-07-04T07:36:31.153Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Configuration of OpenId Connect token expiration in CAS<p>I'm looking for properties to set expiration time of OpenId Connect token. Default is 8 hours, but ...
72,903,404
Moving output files from Azure Batch to Data Lake<p>I'm following this tutorial (<a href="https://docs.microsoft.com/en-us/azure/batch/quick-run-python" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/azure/batch/quick-run-python</a>) to run a series of python scripts in Azure Batch. These tasks generate a f...
<p>Use <a href="https://docs.microsoft.com/azure/batch/managed-identity-pools" rel="nofollow noreferrer">Batch pool managed identities</a> where the identity has access to your ADLS. Use the identity in the task to perform the output/upload action.</p>
Moving output files from Azure Batch to Data Lake
python|azure|azure-devops|azure-storage|azure-batch
0
57
1
73,156,976
73,156,976
1
true
2022-07-07T19:42:12.713Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Moving output files from Azure Batch to Data Lake<p>I'm following this tutorial (<a href="https://docs.microsoft.com/en-us/azure/batch/quick-run-python" rel=...
73,018,815
Return the value of if statement in case when it's not null<p>How to return the value of my expression when it's true</p> <pre><code>SELECT if(((SELECT SUM(kcal) from jadlospis WHERE data =&quot;2022-07-18&quot; and uzytkownik_id=1 GROUP BY DAY(data)) as expr) IS NULL,expr,'0') </code></pre> <pre><code>#1064 - Some...
<p>You cannot use an alias in the <code>IF()</code> function. Repeat the full expression instead. Besides , redundant parenthesis can be removed. Try this:</p> <pre><code>SELECT if( (SELECT SUM(kcal) from jadlospis WHERE data =&quot;2022-07-18&quot; and uzytkownik_id=1 GROUP BY DAY(data) ) IS NU...
Return the value of if statement in case when it's not null
mysql|sql|if-statement
0
57
2
73,019,406
73,019,406
1
true
2022-07-18T07:42:47.487Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Return the value of if statement in case when it's not null<p>How to return the value of my expression when it's true</p> <pre><code>SELECT if(((SELECT SUM(k...
72,848,126
How to create a CSS border for this CV?<p>I created a cv using HTML and CSS. But I tried to apply a CSS border around it but it didn't work.</p> <p>The cv here is displayed in the center of the web page. <strong>The HTML and CSS codes of the CV are shown below.</strong> When adding the Border, if you want, change the H...
<p>You can add it to the body, just make sure you set the width and height values (I just used <code>fit-content</code>). You can then adjust your spacing on your left column so it's not touching the border.</p> <p>Also, IDs should be unique, so I change those to classes.</p> <p>I'd also recommend looking into flexboxe...
How to create a CSS border for this CV?
html|css
1
57
2
72,848,260
72,848,260
1
true
2022-07-03T16:19:31.453Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to create a CSS border for this CV?<p>I created a cv using HTML and CSS. But I tried to apply a CSS border around it but it didn't work.</p> <p>The cv he...
72,820,679
Reading deserialized json file<p>I was working on a section of this code that is grabbing api data. In it I'm taking the json file and reading to a string into json.net to deserialize and put parts of the data into an object class. The way the json reads is a list of Result objects. I have gotten the count from the roo...
<p>In Newtonsoft, model binding will take place under 2 circumstances</p> <ol> <li>the member name matches the json key <em>exactly</em> as it is written</li> <li>the member name is different, but is annotated with <code>[JsonProperty(&quot;jsonKeyNameHere&quot;)]</code> to specify the exact json field it must bind to<...
Reading deserialized json file
c#|json|object|deserialization
3
57
1
72,820,907
72,820,907
1
true
2022-06-30T18:47:25.733Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Reading deserialized json file<p>I was working on a section of this code that is grabbing api data. In it I'm taking the json file and reading to a string in...
72,840,432
Animate vertex positions with webgl2 transform feedback using two programs<p>I try to follow example from <a href="https://webgl2fundamentals.org/webgl/lessons/resources/webgl-state-diagram.html?exampleId=transform-feedback" rel="nofollow noreferrer">webgl2fundamentals</a> regarding transform feedback.</p> <p>My goal i...
<p>Actually you only have 1 buffer. You cannot read and write the same buffer. This is undefined behavior. Read the points from the 1st buffer and write the transformed points to the 2nd buffer. Draw the points from the 2nd buffer.</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-b...
Animate vertex positions with webgl2 transform feedback using two programs
javascript|webgl|webgl2|transform-feedback
1
57
2
72,840,796
72,840,796
1
true
2022-07-02T15:51:05.170Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Animate vertex positions with webgl2 transform feedback using two programs<p>I try to follow example from <a href="https://webgl2fundamentals.org/webgl/lesso...
72,870,216
What is the best convention to store colors and icons in my Flutter app?<p>What is the best way to store colors in the flutter application? currently, it looks like this: (is that a good way?)</p> <p>I would like to know the best way</p> <p>Example of colors:</p> <pre class="lang-dart prettyprint-override"><code>import...
<p>You can have a separate file named <code>constants.dart</code> to store all your constants. You should also name each constant with a preface with the letter <code>K</code>, so it's easier to find when using your IDE's auto-suggestions - you just need to type in the letter <kbd>K</kbd>.</p> <p>for example, in your <...
What is the best convention to store colors and icons in my Flutter app?
flutter|dart|flutter-layout|flutter-dependencies|flutter-animation
-2
57
2
72,870,297
72,870,297
1
true
2022-07-05T13:23:18.857Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What is the best convention to store colors and icons in my Flutter app?<p>What is the best way to store colors in the flutter application? currently, it loo...
72,864,118
Rename files recursively Linux<p>In Linux, I have a folder with files of the following names:</p> <pre><code>Abaraham test.txt Jacoobs_resulr.txt Brabraim's test.txt .... Jamine.txt ' </code></pre> <p>May I know how could I rename the files recursively to file1.txt ... file20.txt?</p>
<p>This will do:</p> <pre><code>cnt=0; for f in *; do [[ -f &quot;$f&quot; ]] &amp;&amp; mv &quot;$f&quot; &quot;file$f$cnt.txt&quot; &amp;&amp; cnt=$[cnt + 1]; done </code></pre>
Rename files recursively Linux
linux
-1
57
1
72,866,237
72,866,237
1
true
2022-07-05T04:46:22.650Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Rename files recursively Linux<p>In Linux, I have a folder with files of the following names:</p> <pre><code>Abaraham test.txt Jacoobs_resulr.txt Brabraim's...
72,808,299
How can I implement iterate in linear hierarchy?<p>I have this class ( interface):</p> <pre><code>public interface IParentChiled { IParentChiled Parent { get; } string Name { get; } } </code></pre> <p>and there is method that should <strong>returns child's name prefixed with all its parents' names separated by ...
<p>To get a string like</p> <pre><code>Root/Parent/Child </code></pre> <p>you can</p> <ol> <li>Enumerate items (you can easily do it in <code>Child, Parent, Root</code> order).</li> <li><code>Reverse</code> the enumeration.</li> <li><code>Join</code> the items into the final string.</li> </ol> <p>Possible implementatio...
How can I implement iterate in linear hierarchy?
c#|linked-list
0
57
2
72,808,363
72,808,363
1
true
2022-06-29T21:58:20.070Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I implement iterate in linear hierarchy?<p>I have this class ( interface):</p> <pre><code>public interface IParentChiled { IParentChiled Parent {...
72,942,232
Pythonic way to create a dictionary of lists (dict comprehension)<p>I have the following list:</p> <pre><code>files = ['AAA_1', 'BBB_2', 'CCC_1', 'AAA_2', 'BBB_4'] </code></pre> <p>And I have the following dict:</p> <pre><code>dict = { 'AAA' : [], 'BBB': [], 'CCC' : [] } </code></pre> <p>My expected outp...
<p>I would not recommend using a dictionary comprehension, as a simple for-loop structure is much more readable. But if you must have one, here you go:</p> <pre><code>sorted_files = {f[:-2] : [file for file in files if file.startswith(f[:-2])] for f in files} </code></pre> <p>Also, I do not recommend using Python keywo...
Pythonic way to create a dictionary of lists (dict comprehension)
python|dictionary|dictionary-comprehension
0
57
4
72,942,433
72,942,433
1
true
2022-07-11T17:10:16.347Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Pythonic way to create a dictionary of lists (dict comprehension)<p>I have the following list:</p> <pre><code>files = ['AAA_1', 'BBB_2', 'CCC_1', 'AAA_2', 'B...
72,930,979
Not able to apply my filters only for those 2 dropdowns why?<p>I have 3 dropdowns with differents options. 1 is working <code>taste</code> except for those 2: <code>comments</code> and <code>types</code>.when you select one or several options then my table is filtered. For example, if I choose option <code>Good</code> ...
<p>The filter function for <code>types</code> should be</p> <pre><code>const isSelTypes = allTypes || optionTypes.reduce((acc, cur) =&gt; { if (menus.types[cur]) acc = true; return acc; }, false); </code></pre> <p>So your <code>filters</code> will be</p> <pre><code>const filters = matchData.filter((menus) =&gt;...
Not able to apply my filters only for those 2 dropdowns why?
javascript|html|reactjs
0
57
1
72,933,168
72,933,168
1
true
2022-07-10T18:38:17.010Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Not able to apply my filters only for those 2 dropdowns why?<p>I have 3 dropdowns with differents options. 1 is working <code>taste</code> except for those 2...
72,998,949
why in firestore i read operations and usage statistics show double?<p>this is starting with the implementation and use of Google's cloud firestore in an ionic project,</p> <blockquote> <p>Ionic:</p> <p>Ionic CLI : 6.19.0 (C:\Users\Windows 10\AppData\Roaming\npm\node_modules@ionic\cli) Ionic Fram...
<p>This is because of the method: valueChanges()</p> <p>It might change twice and your subscription is doing what it should. You're just not handling that case. Try either to denounce it or filter it if there was no change.</p> <pre><code>this.items = this.firestore.collection('items').valueChanges() .pipe( debou...
why in firestore i read operations and usage statistics show double?
angular|firebase|ionic-framework|google-cloud-firestore|firebase-console
1
57
1
72,999,426
72,999,426
1
true
2022-07-15T19:44:58.260Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: why in firestore i read operations and usage statistics show double?<p>this is starting with the implementation and use of Google's cloud firestore in an ion...
72,775,736
String formatting. Swift / iOS<p>I ran into such a problem: from the server I receive such a figure in the string format &quot;20760.326586753041&quot; (example), but I want to change it so that the user's screen has such a figure 20,761.93. How can I format it?</p> <p>Tried to do like this:</p> <pre><code> func se...
<p>You should use a <code>NumberFormatter</code></p> <pre><code>import Foundation let coinFormatter : NumberFormatter = { let formatter = NumberFormatter() formatter.maximumFractionDigits = 2 formatter.numberStyle = .decimal formatter.locale = Locale(identifier: &quot;en-US&quot;) return formatter ...
String formatting. Swift / iOS
ios|swift
-2
57
1
72,775,963
72,775,963
1
true
2022-06-27T16:53:47.947Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: String formatting. Swift / iOS<p>I ran into such a problem: from the server I receive such a figure in the string format &quot;20760.326586753041&quot; (exam...
73,009,508
How to calculate integral inside an integral in R?<p>I need to evaluate an integral in the following form:</p> <p>\int_a^b f(x) \int_0^x g(t)(x-t)dtdx</p> <p>Can you please suggest a way? I assume that this integral can't be done in the standard approach suggested in the following answer:</p> <p><a href="https://stacko...
<p>The domain of integration is a simplex (triangle) with vertices (a,a), (a,b) and (b,b). Use the <strong>SimplicialCubature</strong> package:</p> <pre class="lang-r prettyprint-override"><code>library(SimplicialCubature) alpha &lt;- 3 beta &lt;- 4 g &lt;- function(t){ ((beta/t)^(1/2) + (beta/t)^(3/2)) * exp(-(t/be...
How to calculate integral inside an integral in R?
r|integral|integrate
0
57
1
73,010,148
73,010,148
1
true
2022-07-17T05:44:40.577Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to calculate integral inside an integral in R?<p>I need to evaluate an integral in the following form:</p> <p>\int_a^b f(x) \int_0^x g(t)(x-t)dtdx</p> <p...
72,864,733
How to reverse a txt file in python 3.8?<pre><code>data = data2 = data3 = &quot;&quot; with open('pushkin.txt', encoding='utf-8', mode='r') as fp: data = fp.read() with open('romeo.txt', encoding='utf-8', mode='r') as fp: data2 = fp.read() with open('byron.txt', encoding='utf-8', mode='r') as fp: data3 = ...
<p>You can use <code>reverse()</code> to reverse the order of elements in a list after saving all the contents as <code>list</code> type to <code>data</code> variable, not the specific string, as follows:</p> <pre class="lang-py prettyprint-override"><code>data = [] with open('1.txt', encoding='utf-8', mode='r') as fp...
How to reverse a txt file in python 3.8?
python|file|txt
-4
57
1
72,864,818
72,864,818
1
true
2022-07-05T06:15:53.953Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to reverse a txt file in python 3.8?<pre><code>data = data2 = data3 = &quot;&quot; with open('pushkin.txt', encoding='utf-8', mode='r') as fp: data ...
72,833,733
R Shiny DT navigate to the table's last page via an action button<p>I have a Shiny app that allows the user to enter their project details to the database. This is achieved by the <code>Add Project Details Button</code> that adds an empty row to the table. Now the next step is:</p> <ul> <li>When the add button is click...
<p>You can make the client listen to custom messages and execute Javascript functions you've prepared in the UI part (see section <em>from R to Javascript</em> <a href="https://shiny.rstudio.com/articles/communicating-with-js.html" rel="nofollow noreferrer">here</a>).</p> <p>This might look like:</p> <pre><code>ui &lt;...
R Shiny DT navigate to the table's last page via an action button
r|shiny
0
57
1
72,838,064
72,838,064
1
true
2022-07-01T19:13:39.700Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: R Shiny DT navigate to the table's last page via an action button<p>I have a Shiny app that allows the user to enter their project details to the database. T...
73,016,580
NextJs getStaticProps vs direct import local image asset<p>Say if I have a static image asset that I want to use as the hero image for the home page. What would be the correct way of importing it? Does it make a difference between a direct import:</p> <pre><code>import hero from &quot;/public/assets/hero.jpg&quot; exp...
<p>Testing this, I see no difference. In both cases the URL of the image is what is being passed around, and the browser will request the image by URL the exact same way.</p> <p>I used a small-ish image (2K) to test which could have been theoretically base-64 encoded to be inlined in the source in the second case, but ...
NextJs getStaticProps vs direct import local image asset
reactjs|next.js
0
57
1
73,017,002
73,017,002
1
true
2022-07-18T01:46:49.957Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: NextJs getStaticProps vs direct import local image asset<p>Say if I have a static image asset that I want to use as the hero image for the home page. What wo...
72,937,113
how to aggregate data by month overlapping postgresql<p>I have SCD table type 2 that I join with various other tables and I am looking to aggregate sum total from any entity that was active (by active I mean the ones that don't yet have an end_date) during an individual month.</p> <p>currently, I have a query similar t...
<p>Seems your logic is: if any day of begin_ - _end interval falls into month, count it in. This was the hardest part to guess from the desired results.</p> <p>So I guess you need this:</p> <pre><code>with dim as ( select m::date as month_start ,(date_trunc('month', m) + interval '1 month - 1 day')::date as month...
how to aggregate data by month overlapping postgresql
sql|postgresql|aggregate-functions|scd2
0
57
2
72,941,520
72,941,520
1
true
2022-07-11T10:27:24.547Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to aggregate data by month overlapping postgresql<p>I have SCD table type 2 that I join with various other tables and I am looking to aggregate sum total...
72,842,004
MySQL selct multiple column from multiple tables with no link<p>Table1</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>id</th> <th>hour</th> <th>date</th> <th>tableValue1</th> <th>tableValue2</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>3</td> <td>2020-05-29</td> <td>123</td> <td>145</td...
<p>There are a couple of issues in your code:</p> <ul> <li>your <code>WHERE</code> clause should be found after the <code>FROM</code> clause in your subqueries</li> <li>you want different columns, but you associate only one column for each of your table: if you want three columns, each of your subqueries should return ...
MySQL selct multiple column from multiple tables with no link
mysql|sql
1
57
2
72,842,175
72,842,175
1
true
2022-07-02T19:44:45.083Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: MySQL selct multiple column from multiple tables with no link<p>Table1</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>id</th> <...
73,016,049
Column elements are not scrollable in flutter<p>I also tried to wrap the second <code>column</code> in <code>SingleChildScrollView</code> but that didn't work either. Please tell me a solution. The screen is not scrolling. When I delete the upper element only then another comes. Here is my code.</p> <pre class="lang-da...
<p>The issue is that <code>ListView</code> also has a scroll and the single child ScrollView also has a scroll. Removing either one should let you scroll through the content. You can either add a <code>NeverScrollableScrollPhysics</code> to the <code>Listview</code> or remove <code>SingleChildScrollView</code> since th...
Column elements are not scrollable in flutter
android|flutter|dart|scroll
0
57
3
73,016,459
73,016,459
1
true
2022-07-17T23:29:46.197Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Column elements are not scrollable in flutter<p>I also tried to wrap the second <code>column</code> in <code>SingleChildScrollView</code> but that didn't wor...
72,789,634
Replacing each occurrence of pattern in a dataframe<p>I am having a <code>&quot;car_sales&quot;</code> <code>pandas dataframe</code> which looks as below:</p> <pre><code> Make Colour Odometer (KM) Doors Price 0 Toyota White 150043 4 $4,000 1 Honda Red 87899 4 $5,000 2 ...
<p>here is one way to do it, replace all non digits to null using regex</p> <pre><code>df['Price'] = df['Price'].str.replace(r'\D', &quot;&quot;, regex=True) </code></pre> <pre><code> Make Colour Odometer (KM) Doors Price 0 0 Toyota White 150043 4 4000 1 1 Honda Red ...
Replacing each occurrence of pattern in a dataframe
python|pandas|dataframe|jupyter-notebook|pandas-groupby
1
57
4
72,789,766
72,789,766
1
true
2022-06-28T15:52:38.197Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Replacing each occurrence of pattern in a dataframe<p>I am having a <code>&quot;car_sales&quot;</code> <code>pandas dataframe</code> which looks as below:</p...
72,976,023
Yii2 Mssql Unknown PDO::PARAM_* constant given<p>I am working on <code>Yii2</code>. I have added an <code>MSSQL Database</code>. For preventing from SQL injections please see my below is my query</p> <pre><code>$area_ids = []; $s = AllowArea::find()-&gt;where(['user_id' =&gt; Yii::$app-&gt;user-&gt;id])-&gt;all(); ...
<p>You can just let <a href="https://www.yiiframework.com/doc/guide/2.0/en/db-query-builder" rel="nofollow noreferrer">query builder</a> take care of it for you.</p> <pre class="lang-php prettyprint-override"><code>$ref = (new \yii\db\Query()) -&gt;select([ 'CustomerCode', 'CustomerNameFull', ...
Yii2 Mssql Unknown PDO::PARAM_* constant given
php|sql|pdo|yii2|yii2-advanced-app
0
57
2
72,991,714
72,991,714
1
true
2022-07-14T06:19:12.530Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Yii2 Mssql Unknown PDO::PARAM_* constant given<p>I am working on <code>Yii2</code>. I have added an <code>MSSQL Database</code>. For preventing from SQL inje...
72,815,599
How this code is passing null safety in dart?<p>I am little confused while writing a simple class as below:</p> <pre><code>class NewsSource { final String url; final String name; final String imageUrl; NewsSource({required this.url, required this.name, required this.imageUrl}); factory NewsSource.fromFireStor...
<p>It's because of <code>dynamic</code>. Variables of type <code>dynamic</code> are basically not null-safe and still need to be handled accordingly.</p> <p>My guess is that if we assume the map is not null then <code>data?['url']</code> would return a variable of type <code>dynamic</code> for which <code>null</code> i...
How this code is passing null safety in dart?
flutter|dart|dart-null-safety
1
57
2
72,815,712
72,815,712
1
true
2022-06-30T12:11:22.947Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How this code is passing null safety in dart?<p>I am little confused while writing a simple class as below:</p> <pre><code>class NewsSource { final String ...