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
71,307,259
Databind chart with members from a field instance<p>I would like to put chart series in a List so that I can add new series dynamically. But I have not been able to figure out how to bind the data to the chart when it is structured like this. Maybe its not possible or there are better ways?</p> <pre><code> public class...
<p>I solved it by iterating over the data and populate the chart like this: <code>chart.Series[serie.name].Points.AddXY(data.x,data.y); </code></p> <p>Instead of databinding</p>
Databind chart with members from a field instance
c#|charts
0
20
1
71,363,453
71,363,453
0
true
2022-03-01T10:46:20.033Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Databind chart with members from a field instance<p>I would like to put chart series in a List so that I can add new series dynamically. But I have not been ...
71,239,727
Assigning TScrollBox event during runtime - incompatible types<p>Using RAD Studio 10.4.2:</p> <p>I create <code>TScrollBox</code> during runtime:</p> <pre><code>TScrollBox* sb = new TScrollBox(this); sb-&gt;Parent = this; sb-&gt;Align = alClient; sb-&gt;AlignWithMargins = true; sb-&gt;Margins-&gt;SetBounds(3,3,3,3); sb...
<p>Solved it myself immediately after posting so I am sharing the solution:</p> <p>I changed the function definition to:</p> <pre><code>void __fastcall TForm1::ScrollBox1MouseWheel(TObject *Sender, TShiftState Shift, int WheelDelta, const TPoint &amp;MousePos, bool &amp;Handled) // -&gt; added const here { // Some code...
Assigning TScrollBox event during runtime - incompatible types
panel|c++builder|tscrollbox|scrollbox
0
21
1
71,239,839
71,239,839
0
true
2022-02-23T15:26:17.160Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Assigning TScrollBox event during runtime - incompatible types<p>Using RAD Studio 10.4.2:</p> <p>I create <code>TScrollBox</code> during runtime:</p> <pre><c...
71,370,996
Export values form almost 2 twin tables with the following conditions<p>I want to make a project for myself and I don't know how to make to export values from almost 2 twin tables with the following condition if stock general quantity =&lt;5 then export id, name, quantity into urgent table my query is this one</p> <pre...
<p>use <strong>INSERT INTO Statement</strong> that enable you to Insert data into <strong>Specified Columns</strong></p> <pre><code>INSERT INTO `spital`.`stoc urgent` (`id produs`, `denumire`, `cantitate`) SELECT `id produs`, `denumire`, `cantitate` FROM `spital`.`s...
Export values form almost 2 twin tables with the following conditions
mysql|database|insert
0
27
1
71,371,200
71,371,200
0
true
2022-03-06T14:09:05.173Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Export values form almost 2 twin tables with the following conditions<p>I want to make a project for myself and I don't know how to make to export values fro...
71,156,765
mysql : can't have the max result<p>i've got a problem with my mysql request, i have this table :</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>col1</th> <th>id_sec</th> <th>_index</th> </tr> </thead> <tbody> <tr> <td>111</td> <td>20</td> <td>3</td> </tr> <tr> <td>111</td> <td>50</td> <td...
<pre class="lang-sql prettyprint-override"><code>SELECT col1, id_sec, MAX(_index) _index FROM table GROUP BY 1,2 ORDER BY 2 DESC; </code></pre> <p><a href="https://dbfiddle.uk/?rdbms=mysql_8.0&amp;fiddle=1e1155442ac7dcf3f54ba1fee5228078" rel="nofollow noreferrer">https://dbfiddle.uk/?rdbms=mysql_8.0&amp;fiddle=1e115544...
mysql : can't have the max result
mysql|group-by|max
0
23
1
71,156,979
71,156,979
0
true
2022-02-17T10:53:18.017Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: mysql : can't have the max result<p>i've got a problem with my mysql request, i have this table :</p> <div class="s-table-container"> <table class="s-table">...
71,270,810
I have an error in my SQL syntax when I convert the query from default floating-point to decimal point<p>Using PHP and MariaDB my knowledge is fairly good. My knowledge in running 100% MariaDB is stack overflow and Google and online courses. I googled how to fix this issue converting to decimal point for 2 hours. Found...
<pre class="lang-sql prettyprint-override"><code>UPDATE test SET avg_TA = (id1_TA + id2_TA + id3_TA) / 3 WHERE 2 IN (1_player, 2_player, 3_player); </code></pre> <p><a href="https://dbfiddle.uk/?rdbms=mysql_8.0&amp;fiddle=47baf4517bf96643d6c2e16f5243fc42" rel="nofollow noreferrer">https://dbfiddle.uk/?rdbms=mysql_8.0&a...
I have an error in my SQL syntax when I convert the query from default floating-point to decimal point
mariadb
0
43
1
71,270,965
71,270,965
0
true
2022-02-25T19:23:48.377Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: I have an error in my SQL syntax when I convert the query from default floating-point to decimal point<p>Using PHP and MariaDB my knowledge is fairly good. M...
71,353,634
Syntax error for mysql declaration variable<pre><code>DELIMITER $$ CREATE procedure clean_data() BEGIN DECLARE today = (SELECT DATE_FORMAT(NOW(), '%Y-%m'); DECLARE first_while_start INTEGER DEFAULT 9; DECLARE second_while_start INTEGER DEFAULT 0; DECLARE first_while_count INTEGER DEFAULT 14; DECL...
<p>DECLARE must be the most first statements in a block.</p> <p>Local variable cannot be declared and assigned at the same time.</p> <pre class="lang-sql prettyprint-override"><code>CREATE procedure clean_data() BEGIN DECLARE today VARCHAR(255); DECLARE first_while_start INTEGER DEFAULT 9; DECLARE second...
Syntax error for mysql declaration variable
mysql
0
32
1
71,353,847
71,353,847
0
true
2022-03-04T15:31:02.883Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Syntax error for mysql declaration variable<pre><code>DELIMITER $$ CREATE procedure clean_data() BEGIN DECLARE today = (SELECT DATE_FORMAT(NOW(), '%Y-%m...
71,268,146
How to use DatetimeIndex as an index in Pandas<p>I have a dataframe called region and the an array <code>y</code> is <code>DatetimeIndex</code> type like that:</p> <pre><code>print(y) DatetimeIndex(['2016-01-01 00:30:00', '2016-01-01 01:30:00', '2016-01-01 02:00:00', '2016-01-01 03:00:00']) </code></pre>...
<p>You can try with <code>.loc</code></p> <pre><code>region.loc[y] </code></pre>
How to use DatetimeIndex as an index in Pandas
pandas|dataframe|indexing|datetimeindex
0
31
1
71,268,177
71,268,177
0
true
2022-02-25T15:31:39.187Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to use DatetimeIndex as an index in Pandas<p>I have a dataframe called region and the an array <code>y</code> is <code>DatetimeIndex</code> type like tha...
71,159,281
How to display a numeric answer instead of a calculation?<p>I keep getting answers as a calculation instead of numeric answer, like the following:</p> <pre><code>(291*pi*((30*3^(1/2))/13 - 1)*((13*3^(1/2)*((30*3^(1/2))/13 - 2))/400 + 197/200))/13 </code></pre> <p>I would rather like to have a numerical answer, i am no ...
<p>Try simplifying the result:</p> <pre><code>syms m ; eqn=(d+m* d* ((sqrt(3))/2)&lt;f); M = solve(eqn,m); disp (M) r= (b/2)+d*((M-1)*sqrt(3)+2)/(4); L=simplify(2* pi* M* w* (r)) </code></pre> <p><strong>EDIT</strong></p> <p>Since L is a numeric value, the answer is:</p> <pre><code>L = vpa(2* pi* M* w* (r)) ...
How to display a numeric answer instead of a calculation?
matlab|equation
0
44
2
71,160,007
71,160,007
0
true
2022-02-17T13:43:28.533Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to display a numeric answer instead of a calculation?<p>I keep getting answers as a calculation instead of numeric answer, like the following:</p> <pre><...
71,411,753
Entity framework core migration: Change column from non-nullable to nullable then set values to null<p>I decided to change a column from non-nullable to a nullable one. No issue here. I changed the property to have &quot;?&quot; in the type (<code>DateTime</code> =&gt; <code>DateTime?</code>) and the migration generate...
<p>I fixed the issue pursuing in the direction of MigrationOperations. I overwrite the Generate method of <code>IMigrationsSqlGenerator</code>.</p> <p>For the sake of having a generalized solution, I created a new <em>Database</em> project that includes this new <code>MigrationsSqlGenerator</code> with the classes nee...
Entity framework core migration: Change column from non-nullable to nullable then set values to null
c#|sqlite|entity-framework-core
0
1,796
2
71,418,627
71,418,627
0
true
2022-03-09T15:22:03.240Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Entity framework core migration: Change column from non-nullable to nullable then set values to null<p>I decided to change a column from non-nullable to a nu...
71,111,813
How to get regexreplace to ignore a character based on what comes before it and replace it when those conditions are not met in Google sheets?<p>I have texts in which all of the apostrophes (‘) and quotation marks (“) are coming out incorrectly as question marks. e.g. <em>I?m writing to send my wishes and congratulate ...
<p>Try</p> <pre><code>=REGEXREPLACE(REGEXREPLACE(A2,&quot;\?([\w\.])&quot;,&quot;'$1&quot;),&quot;\?( [a-z])&quot;,&quot;'$1&quot;) </code></pre>
How to get regexreplace to ignore a character based on what comes before it and replace it when those conditions are not met in Google sheets?
google-sheets|formula
0
36
2
71,112,441
71,112,441
0
true
2022-02-14T12:19:31.130Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to get regexreplace to ignore a character based on what comes before it and replace it when those conditions are not met in Google sheets?<p>I have texts...
71,213,197
Error in my Google Sheets Importrange/Query code<p>Trying to import a few columns of code when it meets a certain criteria (it is for a member of staff called Jan) from my Master Checklist. The column I want exporting are columns A-F. My code keeps coming up with errors:</p> <pre><code>=QUERY(IMPORTRANGE('Master Checkl...
<p>If everything is in the same spreadsheet:</p> <pre><code>=QUERY('Master Checklist'!A3:G,&quot;select A,B,C,D,E,F where G matches 'Jan'&quot;) </code></pre> <p><a href="https://support.google.com/docs/answer/3093340" rel="nofollow noreferrer">importrange()</a> is dedicated to external spreadsheet and you have to ment...
Error in my Google Sheets Importrange/Query code
google-sheets
0
25
1
71,214,744
71,214,744
0
true
2022-02-21T21:24:15.180Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Error in my Google Sheets Importrange/Query code<p>Trying to import a few columns of code when it meets a certain criteria (it is for a member of staff calle...
71,233,937
Get Google Sheet by ID or Name, but not from active sheet?<p>Can i get this script to work from sheet id or sheet name</p> <p>This script works when i use the active spreadsheet but i want it to get it from the spreadsheet name or the sheet id. If i add .getSheetByName(&quot;Test&quot;) to line 2 it returns &quot;TypeE...
<p>Change twice <code>SpreadsheetApp.getActiveSpreadsheet()</code> to <code>SpreadsheetApp.getActiveSpreadsheet().getSheetByName('mySheetName')</code></p> <p>For instance</p> <pre><code>function CheckPrice() { var priceRange = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Test').getRange(&quot;A1&quot;).getV...
Get Google Sheet by ID or Name, but not from active sheet?
google-sheets
0
28
1
71,234,156
71,234,156
0
true
2022-02-23T08:57:03.947Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Get Google Sheet by ID or Name, but not from active sheet?<p>Can i get this script to work from sheet id or sheet name</p> <p>This script works when i use th...
71,154,418
OnEnabledChanged can't set Backcolor Disable for button<p>This is code sample</p> <pre><code> public partial class ColorButton: Button { protected override void OnEnabledChanged(EventArgs e) { if (this.Enabled) { this.BackColor = this.BackColorEnable;...
<p>Change code in here</p> <pre class="lang-cs prettyprint-override"><code>public void ColorSet() { if (BaseColor == Blue) { if(this.Enable) { this.BackColor = Color.Blue; } else { this.BackColor = Color.Gray; } } if (BaseColor == R...
OnEnabledChanged can't set Backcolor Disable for button
c#|vb.net|winforms
0
30
1
71,154,531
71,154,531
0
true
2022-02-17T08:07:18.540Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: OnEnabledChanged can't set Backcolor Disable for button<p>This is code sample</p> <pre><code> public partial class ColorButton: Button { protected overr...
71,214,351
Unable to Create New Schema when Previous does not exists<p>This is my Logic for inserting new data for an expense tracking App in Node JS.</p> <p>My Query is the function createNewData() never executes. If a previous UserData Schema on particular date exists then this code can update it with no Problem.</p> <p>BUT if ...
<p>Creating a separate variable</p> <pre><code>let xyz = User.findOne({..conditions}).exec(); </code></pre> <p>and then using <code>if</code> , <code>else</code> statement helped</p>
Unable to Create New Schema when Previous does not exists
node.js|mongoose|mongoose-schema
0
13
1
71,230,986
71,230,986
0
true
2022-02-21T23:51:14.950Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Unable to Create New Schema when Previous does not exists<p>This is my Logic for inserting new data for an expense tracking App in Node JS.</p> <p>My Query i...
71,177,283
Elasticsearch add values of similar keys across documents?<p>In Elasticsearch 6.8 (or 7) I have documents with differing keys and I want to add the values across across all. For example:</p> <pre><code>{&quot;ok&quot;:10, &quot;mn&quot;:12, &quot;ca&quot;:84}, {&quot;tx&quot;:34, &quot;mn&quot;:20, &quot;ca&quot;:100}...
<p>I'm assuming that each new line of what you've shared is a new document.</p> <p>And I don't think there is a way to sum for all possible fields via query. This may have to be handled at application layer where you pull all the respective fields and then formulate the query as mentioned below.</p> <p>Assuming the fie...
Elasticsearch add values of similar keys across documents?
elasticsearch
0
21
1
71,179,643
71,179,643
0
true
2022-02-18T17:02:45.960Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Elasticsearch add values of similar keys across documents?<p>In Elasticsearch 6.8 (or 7) I have documents with differing keys and I want to add the values ac...
71,308,949
Removing certain strings from a file. Jpeg All jpegs<p>I was wondering if you guy could help. I am using a Debian 9</p> <p>I need to rename all jpegs in a folder, all my jpegs are like this <code>image_E01760728_20220301122915852_TIMING.jpg</code> to this <code>20220301122915.jpg</code> (removing <code>image_E10176072...
<p>Use:</p> <pre><code>for f in *jpg; do mv &quot;$f&quot; &quot;$(echo &quot;$f&quot; |awk -F[=_] '{print $3}' |sed 's/.\{3\}$//')&quot;.jpg ; done </code></pre>
Removing certain strings from a file. Jpeg All jpegs
debian
0
27
1
71,314,914
71,314,914
0
true
2022-03-01T13:07:41.793Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Removing certain strings from a file. Jpeg All jpegs<p>I was wondering if you guy could help. I am using a Debian 9</p> <p>I need to rename all jpegs in a fo...
71,235,070
How to up value in new column, when occur 0?<p>I have this <code>df</code>:</p> <pre><code>data = {'Name': ['T', 'J', 'K', 'J', 'M', 'A', 'J', 'K','L', 'o', 'j' ], 'Match': [0,1,2,0,1,0,1,2,3,0,1]} Df = pd.DataFrame(data) </code></pre> <p>I want to apply column, which show season for each match. Season sholud be more...
<pre><code>df['Season'] = (df['Match']==0).cumsum() </code></pre> <p>Turn zeros to True (1) and the rest to False (0), and cumulatively sum them, it will increment only when seeing a True</p> <p><strong>UPDATE:</strong></p> <p>Now you changed to require consecutive zeros to be in the same season.</p> <pre><code>df = pd...
How to up value in new column, when occur 0?
python-3.x|pandas|dataframe|numpy
0
26
2
71,235,180
71,235,180
0
true
2022-02-23T10:17:01.400Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to up value in new column, when occur 0?<p>I have this <code>df</code>:</p> <pre><code>data = {'Name': ['T', 'J', 'K', 'J', 'M', 'A', 'J', 'K','L', 'o', ...
71,123,062
R rowise operations on dummy variables<p>I have a data set of ATM IDs that are coded with dummy variables representing openings and closures for each date. The goal is to generate new columns that tells us when the ATM first appeared in the data, the first time it closed after appearing in the data, and the last date i...
<pre class="lang-r prettyprint-override"><code>library(tidyverse) data &lt;- tribble( ~atm_id, ~nov_2019, ~feb_2020, ~may_2020, ~aug_2020, ~first_appeared, ~closed, ~always_open, ~last_appeared, &quot;xx1&quot;, 1, 1, 0, 0, &quot;nov_2019&quot;, &quot;may_2020&quot;, 0, &quot;feb_2020&quot;, &quot;xx2&quot;, 1, 1...
R rowise operations on dummy variables
r|dplyr|tidyverse
0
36
1
71,123,204
71,123,204
0
true
2022-02-15T08:17:18.847Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: R rowise operations on dummy variables<p>I have a data set of ATM IDs that are coded with dummy variables representing openings and closures for each date. T...
71,350,622
How replace all cases in columns with NA if there are more than x numbers OR more than x letters in the string?<p>I have data that looks a bit like this</p> <pre><code>col1 col2 1 &quot;1042AZ&quot; 2 &quot;9523 pa&quot; 3 &quot;dog&quot; 4 &quot;New York&quot; 5 &quot;20000 (usa)&quot; 6 ...
<p>Following your code, you can set to <code>NA</code> if <code>col3</code> does not have 4 characters:</p> <pre class="lang-r prettyprint-override"><code>df %&gt;% mutate(col2 = gsub('\\s+', '', toupper(col2)), col3 = str_extract(col2, &quot;^[0-9]{4,}&quot;), col4 = str_extract(col2, &quot;[A-Z|...
How replace all cases in columns with NA if there are more than x numbers OR more than x letters in the string?
r|string|na|data-cleaning|postal-code
0
42
1
71,350,761
71,350,761
0
true
2022-03-04T11:15:50.023Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How replace all cases in columns with NA if there are more than x numbers OR more than x letters in the string?<p>I have data that looks a bit like this</p> ...
71,422,197
Store unique combinations of variables as a vector in a data frame in R<p>I have the following problem.</p> <p>I have a large data.frame. In this data.frame there are 648 different combinations of 7 variables. The data.frame is 4 times that length giving 2592 rows. What I am trying to do is to create a vector in that d...
<p>You can <code>group_by</code> your desired columns and use <code>group_indices</code>:</p> <pre class="lang-r prettyprint-override"><code>library(tidyverse) data %&gt;% group_by(across(a:b)) %&gt;% mutate(distinct_combinations = group_indices()) # A tibble: 6 x 3 # Groups: a, b [3] a b distinct_co...
Store unique combinations of variables as a vector in a data frame in R
r|dataframe|combinations
0
32
3
71,422,290
71,422,290
0
true
2022-03-10T09:59:12.407Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Store unique combinations of variables as a vector in a data frame in R<p>I have the following problem.</p> <p>I have a large data.frame. In this data.frame ...
71,409,716
Python / Tkinter : Random number in function<p>I want to get a random number (in &quot;boucle&quot;) all the time i press the button, but when i do it, it gives me the same number</p> <pre><code>def boucledef(boucle=random.randint(0,10)): global copienom, listprob if boucle&gt;0: nom=selectRandom(listpr...
<p>Default parameter in python ... Once set, this arg has a memory space, so it wont need to call <code>random.randint(0,10)</code> the other times ...</p> <p>Here's a workaround :</p> <pre><code>def boucledef(boucle=None): global copienom, listprob if boucle == None : boucle = random.randint(0,10) ...
Python / Tkinter : Random number in function
python|function|tkinter
0
41
1
71,409,770
71,409,770
0
true
2022-03-09T12:55:43.350Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python / Tkinter : Random number in function<p>I want to get a random number (in &quot;boucle&quot;) all the time i press the button, but when i do it, it gi...
71,375,301
does lifting up state in react create a dependency on the parent<p>I'm reading through the <a href="https://reactjs.org/docs/lifting-state-up.html" rel="nofollow noreferrer">Lifting Up State</a> guide on the React docs.</p> <p>It seems to me that this refactor creates a dependency in the <code>TemperatureInput</code> c...
<blockquote> <p>It seems to me that this refactor creates a dependency in the TemperatureInput component on its parent, whatever it is, to provide data.</p> </blockquote> <p>It does. And the reason they did this for this case is because they want anything entered in one input to be mirrored in the other. <em>Some</em> ...
does lifting up state in react create a dependency on the parent
reactjs|data-binding
0
23
1
71,375,483
71,375,483
0
true
2022-03-07T00:29:30.927Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: does lifting up state in react create a dependency on the parent<p>I'm reading through the <a href="https://reactjs.org/docs/lifting-state-up.html" rel="nofo...
71,201,322
Function recursion advice<p>I am building an employee tracking app. I want my app to work so that after each one of the functions for the various list selections is complete, the app will re-prompt you with the options list again. There are a few methods I can think of to achieve this but I was hoping a more seasoned...
<p>I think the switch statement is overkill. If you create an object where the key is the option and the function is the value then it is a 1:1 lookup and hypothetically more performant.</p> <p>Additionally, drop the then statements because we write modern code here. Also congrats on the internship.</p> <pre class="lan...
Function recursion advice
javascript|node.js|es6-promise
0
33
1
71,201,762
71,201,762
0
true
2022-02-21T04:44:47.557Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Function recursion advice<p>I am building an employee tracking app. I want my app to work so that after each one of the functions for the various list selec...
71,298,972
Load from .json file, sort data according to value then save it to same .json file<p>The JSON file I have:</p> <pre class="lang-json prettyprint-override"><code>[{ &quot;key_a&quot;: &quot;value&quot;, &quot;key_b&quot;: [{ &quot;key_a&quot;: &quot;c&quot;, &quot;key_b&quot;: null }, { &...
<p>Python's builtin function <code>sorted</code> can do this. If <code>var</code> is your loaded json file (you probably want to pass it in to <code>sort_json_var</code>), then</p> <pre class="lang-py prettyprint-override"><code>sorted(var[0][&quot;key_b&quot;], key=lambda x:x[&quot;key_a&quot;]) </code></pre> <p>will ...
Load from .json file, sort data according to value then save it to same .json file
python|json|sorting
0
41
1
71,299,069
71,299,069
0
true
2022-02-28T17:44:31.897Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Load from .json file, sort data according to value then save it to same .json file<p>The JSON file I have:</p> <pre class="lang-json prettyprint-override"><c...
71,371,376
Defining the lines in a vertical histogram<p>I'm trying to create a function that returns a vertical histogram where the height of each column corresponds to an integer from a list. I have written some code that I think would work if I could find a way to define each line.</p> <p>If the goal is not clear I'm trying to ...
<blockquote> <p>My first idea would be to check for every column if the number in question is equal or greater than y, but I don't know how I would write this as code.</p> </blockquote> <p>Yes, that is the right approach. You can do that as follows:</p> <pre><code> row = ''.join(' ' if x &lt; y else '*' for x in val...
Defining the lines in a vertical histogram
python
0
45
2
71,371,410
71,371,410
0
true
2022-03-06T14:55:50.453Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Defining the lines in a vertical histogram<p>I'm trying to create a function that returns a vertical histogram where the height of each column corresponds to...
71,394,748
PHP How to evaluate a recursive json object contains true and false values<p>I'm working on a php script that evaluates an object into true or false. The object itself can be nested and contains many objects, for example:</p> <pre><code>{ &quot;nodeType&quot;: &quot;and&quot;, &quot;0&quot;: { &quot;nod...
<p>When the operator is &quot;not&quot;, then we could consider the other argument(s) as arguments of a NAND logical operator. So if all arguments are false then it will be evaluated as true, and false otherwise. If you will never pass more than one argument to a NOT operator, then this doesn't really make a difference...
PHP How to evaluate a recursive json object contains true and false values
php|json|recursion
0
42
1
71,395,056
71,395,056
0
true
2022-03-08T12:04:30.750Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: PHP How to evaluate a recursive json object contains true and false values<p>I'm working on a php script that evaluates an object into true or false. The obj...
71,248,709
How to get file name from the uploaded file using javascript?<p>i want to get the file name and show it in input element using javascript.</p> <p>i have a button upload clicking that would open the browser to choose file once chosen i should display the chosen file name in input element.</p> <p>below is my code,</p> <p...
<p><a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file" rel="nofollow noreferrer">File inputs</a> have a <code>files</code> property that can be interrogated to obtain the file name, MIME type, and size (in bytes).</p> <p>Each item in the <code>files</code> list is a <a href="https://developer...
How to get file name from the uploaded file using javascript?
javascript|html|reactjs
0
278
2
71,248,754
71,248,754
0
true
2022-02-24T07:52:20.740Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to get file name from the uploaded file using javascript?<p>i want to get the file name and show it in input element using javascript.</p> <p>i have a bu...
71,198,624
SDL2, how predict rect coordinates after rotation?<p>My goal - move sprite, left and right arrows keys must set directions of moving.I struggle with rotation geometry few days, and it beat me. My code below</p> <pre><code>void rotate_point(float cx, float cy, float angle, int *px,int *py) { *px = cos(angle) * (*px ...
<p>Note that in the second line you are using <strong>px</strong> that has been changed in the first line.</p> <p>Remember old value and use it for correct rotation like this:</p> <pre><code>void rotate_point(float cx, float cy, float angle, int *px,int *py) { float tmp = *px; *px = cos(angle) * (tmp - cx) - si...
SDL2, how predict rect coordinates after rotation?
geometry|rotation
0
20
1
71,201,573
71,201,573
0
true
2022-02-20T20:46:29.063Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: SDL2, how predict rect coordinates after rotation?<p>My goal - move sprite, left and right arrows keys must set directions of moving.I struggle with rotation...
71,382,109
Pass data from controller to View with redirect method<p>I have an ASP.Net web application in C# in which I want to show some visualizations graphs in my report.cshtml View.<br/> For the moment, I'm using the httpget function of my report.cshtml View to past the data to my View. But with this method, I can't filter the...
<p>May I suggest that you wrap your behaviour in interfaces?</p> <p>so that you have an Interface</p> <pre><code>public interface IErrorHandler { void provideErrorResponse(HttpResponse response); } </code></pre> <p>and</p> <pre><code>public interface ISuccessHandler { void provideSuccessfulResponse(HttpResponse r...
Pass data from controller to View with redirect method
c#|asp.net|http-post
0
263
1
71,382,294
71,382,294
0
true
2022-03-07T13:50:10.500Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Pass data from controller to View with redirect method<p>I have an ASP.Net web application in C# in which I want to show some visualizations graphs in my rep...
71,270,838
How to generate dates between two dates convert it to week nbr, add it to an existing dataframe and map it to user id<p>I was hoping if anyone could help me with this use-case:</p> <p>I want to generate dates between two dates and then tag each date with week number, then add both new generated dates and week number as...
<p>I believe this should give you what you are looking for:</p> <pre><code>(df.assign( date = [pd.date_range(i,j) for i,j in zip(df['start_dt'],df['end_dt'])]).explode('date') .assign(week_nbr = lambda x: x.groupby('user_id')['date'] .diff() .dt.days .cumsum() .floordiv(7) ...
How to generate dates between two dates convert it to week nbr, add it to an existing dataframe and map it to user id
python|pandas|datetime
0
38
1
71,271,014
71,271,014
0
true
2022-02-25T19:26:40.897Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to generate dates between two dates convert it to week nbr, add it to an existing dataframe and map it to user id<p>I was hoping if anyone could help me ...
71,101,384
Choose Sentences with x High Score and Save to the Same Row (Dataframe)<p>I have Dataframe ranked_sentences like this</p> <pre><code> 0 1 0 0.093305 Hello this is a 1 0.088413 Hello this is b 2 0.091036 Hello this is c 3 0.095541 Hello this is d 4 0.092201 Hello this is e 5 ...
<p>This below code will</p> <ol> <li>sort the dataframe on column 0 in descending order.</li> <li>Fetch top 3 rows.</li> <li>Convert the 3 values of column 1 to a list</li> <li>Assign the list to list d.</li> </ol> <pre><code>d = ranked_sentences.sort_values(0, ascending = False).head(3)[1].to_list() </code></pre>
Choose Sentences with x High Score and Save to the Same Row (Dataframe)
python|string|dataframe
0
28
1
71,101,562
71,101,562
0
true
2022-02-13T14:03:39.143Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Choose Sentences with x High Score and Save to the Same Row (Dataframe)<p>I have Dataframe ranked_sentences like this</p> <pre><code> 0 1 ...
71,406,872
Why there is no preflight Private Network Access request in chrome 99 and above?<p>According to this document: <a href="https://developer.chrome.com/blog/private-network-access-preflight/#preflight-requests" rel="nofollow noreferrer">https://developer.chrome.com/blog/private-network-access-preflight/#preflight-requests...
<p>I found information, that it has been rolled back for now.</p>
Why there is no preflight Private Network Access request in chrome 99 and above?
google-chrome|private-network-access
0
298
1
71,425,708
71,425,708
0
true
2022-03-09T09:13:59.607Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why there is no preflight Private Network Access request in chrome 99 and above?<p>According to this document: <a href="https://developer.chrome.com/blog/pri...
71,152,907
Integral basis nf.zk versus nfbasis in Pari GP<p>I have been using the database of <a href="https://lmfdb.org" rel="nofollow noreferrer">lmfdb.org</a> to know the integral basis of a number field. Now, I want to utilize Pari GP in multiplying algebraic integers. However, I have encountered a problem. Pari GP uses the i...
<ol> <li><p>When we take the trouble to initialize an <code>nf</code> structure with <code>nfinit</code>, we perform precomputations to speed up later work. Here, <code>nfinit</code> first computes the integer basis by calling <code>nfbasis</code>, which returns the (canonical) HNF basis, then LLL-reduces it with resp...
Integral basis nf.zk versus nfbasis in Pari GP
pari|pari-gp
0
26
1
71,374,933
71,374,933
0
true
2022-02-17T05:25:38.293Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Integral basis nf.zk versus nfbasis in Pari GP<p>I have been using the database of <a href="https://lmfdb.org" rel="nofollow noreferrer">lmfdb.org</a> to kno...
71,124,603
Can pytest receive regular python parameters or read params from configuration file?<p>I'm trying to use pytest to test certain AWS Lambdas.</p> <p>In order to perform certain things, I have to pass in some ID.</p> <p>I've done it in very hacky way, having this in conftest.py:</p> <pre><code>def pytest_addoption(parser...
<p><strong>Option 1:</strong> How about something like this in <code>conftest.py</code>:</p> <pre><code>def pytest_addoption(parser): parser.addoption(&quot;--myid&quot;, action=&quot;store&quot;, default=&quot;&quot;, help=&quot;Pass RunId To reuse it Later&quot;) parser.addoption(&quot;--dontstore&quot;, acti...
Can pytest receive regular python parameters or read params from configuration file?
python|pytest
0
30
1
71,125,458
71,125,458
0
true
2022-02-15T10:10:36.043Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can pytest receive regular python parameters or read params from configuration file?<p>I'm trying to use pytest to test certain AWS Lambdas.</p> <p>In order ...
71,260,391
Change public Transforms based on collision. Change line renderer points based on public transforms<p>I'm pretty new and I can't seem to get this to work. Players have a long pole and if they poke certain objects it starts a string-like connection to the next one they poke. These objects are tagged as &quot;PokableObje...
<ul> <li><p>First of all <strong>never</strong> compare <code>float</code> values using <code>==</code>! Due to floating point (im)precision this might fail even though logically you think it would match.</p> <p>E.g.</p> <pre><code> 0.2f * 5f / 10f == 1.0f </code></pre> <p>is <strong>not</strong> necessarily <code>true...
Change public Transforms based on collision. Change line renderer points based on public transforms
c#|unity3d|tags|transform|mesh-collider
0
35
2
71,262,704
71,262,704
0
true
2022-02-25T02:37:59.707Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Change public Transforms based on collision. Change line renderer points based on public transforms<p>I'm pretty new and I can't seem to get this to work. Pl...
71,198,373
Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client Api express ts<p>I created a filter system API typescript express node mongoose, and there is an error in my code (Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client), is there anyone who will be able to...
<p>From the error message, it seems that you are setting the headers after part of the body has been written (explained here: <a href="https://stackoverflow.com/questions/7042340/error-cant-set-headers-after-they-are-sent-to-the-client">Error: Can&#39;t set headers after they are sent to the client</a>).</p> <p>It woul...
Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client Api express ts
node.js|typescript|mongodb|express
0
266
1
71,198,457
71,198,457
0
true
2022-02-20T20:17:03.907Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client Api express ts<p>I created a filter system API typescript express node mo...
71,339,686
Dynamically Populating months as Month1, month2 etc instead of month name<p>I am creating a report for the number of enquiries received in the last 13 months which I get in a tabular format, I have managed to pivot the data and dynamically populate the months. However, I need the columns to be as Month1, Month2, Month3...
<p>So there is a great built in function call month(), which returns the month number (and in this scenario of the current date). To try it out run this in a query editor to demonstrate. Then all you need to do is to incorporate it into youre code</p> <pre><code>DROP TABLE if exists #Admission; create table #Admission...
Dynamically Populating months as Month1, month2 etc instead of month name
sql|sql-server|tsql|dynamic
0
41
1
71,339,745
71,339,745
0
true
2022-03-03T15:30:01.037Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Dynamically Populating months as Month1, month2 etc instead of month name<p>I am creating a report for the number of enquiries received in the last 13 months...
71,230,119
Modifying a For Loop in R to Work with Spreadsheet<p>I have a for loop that adds up every value in a spreadsheet along rows and prints the totals. I need to modify it to add up columns instead, find the average value among each column, and print the label for the column. Here's the for loop I have:</p> <pre><code>for(i...
<p>You can simply do</p> <pre><code>colSums(basalts[, -1]) </code></pre> <p>Same works with <code>colMeans</code> If you want the average.</p> <hr /> <p>Solution with for loop:</p> <pre><code>sum_all &lt;- numeric() for (i in 2:ncol(basalts)) { sum_all[i-1] &lt;- sum(basalts[, i]) } </code></pre>
Modifying a For Loop in R to Work with Spreadsheet
r
0
20
1
71,230,405
71,230,405
0
true
2022-02-23T00:51:42.967Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Modifying a For Loop in R to Work with Spreadsheet<p>I have a for loop that adds up every value in a spreadsheet along rows and prints the totals. I need to ...
71,329,408
Connect to objects using one call (Partner in Java)<p>I'm struggling with Java and need some help with 1-1 associations. Sorry if I'm wording something wrong, I don't know how to word it properly in English.</p> <p>I want to connect both partner1 and partner2 using one call. Before the call, partner1 and partner2 is no...
<p>You need to do the other association too, but don't use <code>person.setPartner(this)</code> because it would call it then the other and you'll go deep into recursion until a <code>StackOverflowError</code></p> <pre><code>public void setPartner(Partner person) { if (this == person) { throw new IllegalArg...
Connect to objects using one call (Partner in Java)
java
0
23
1
71,329,428
71,329,428
0
true
2022-03-02T21:33:02.487Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Connect to objects using one call (Partner in Java)<p>I'm struggling with Java and need some help with 1-1 associations. Sorry if I'm wording something wrong...
71,112,010
How to add a new JSON object in an existing JSON file using jq and variable arguments<p>I have a json here which looks like:</p> <pre class="lang-json prettyprint-override"><code>{ &quot;cluster&quot;: &quot;bvt-rtp-123&quot;, &quot;state&quot;: &quot;installed&quot;, &quot;timestamp&quot;: &quot;2022-02-14T10:23...
<p>Define them using <code>--arg</code>, then set them using <code>+=</code>. That way you can always add more subitems.</p> <pre><code>jq --arg parent_key aiops \ --arg child_key catalog_source \ --arg child_val abc.com/123 \ '.[$parent_key] += {($child_key): $child_val}' input.json </code></pre> <pre class="...
How to add a new JSON object in an existing JSON file using jq and variable arguments
json|bash|shell|jq|script
0
293
1
71,112,075
71,112,075
0
true
2022-02-14T12:35:07.887Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to add a new JSON object in an existing JSON file using jq and variable arguments<p>I have a json here which looks like:</p> <pre class="lang-json pretty...
71,248,425
Using JQ - Join 2 json files which do not have the same structure but with a common key<p>I have 2 files that I would like to join based a common key.</p> <p>The first file is an array with:</p> <pre><code>{&quot;_time&quot;: &quot;2022-02-20T23&quot;,&quot;csp_name&quot;: &quot;1&quot;,&quot;tool_bf_id&quot;: &quot;12...
<p>Using all parameters of <code>JOIN</code>, you'd do</p> <pre class="lang-sh prettyprint-override"><code>jq --slurpfile fst first.json --slurpfile snd second.json -nc ' JOIN(INDEX($snd[]; .dvc_ssr); $fst[]; .dvc_ssr; add) ' </code></pre> <pre class="lang-json prettyprint-override"><code>{&quot;_time&quot;:&quot;202...
Using JQ - Join 2 json files which do not have the same structure but with a common key
jq
0
42
1
71,249,114
71,249,114
0
true
2022-02-24T07:22:31.083Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Using JQ - Join 2 json files which do not have the same structure but with a common key<p>I have 2 files that I would like to join based a common key.</p> <p...
71,237,528
Python with JSON Create Table SQL<p>I have 2 list</p> <pre><code>c_name = ['departmentid', 'name', 'groupname', 'modifieddate'] d_type =['integer', 'character varying', 'character varying', 'timestamp without time zone'] </code></pre> <p>And I would like to create a SQL query for creating a tables</p> <pre><code>CREATE...
<p>If all you want to do is get the SQL command as text, you can do this with a combination of string concatenation (or formatting) and for loops.</p> <p>If you want to &quot;connect&quot; to a database and execute the queries, read up on &quot;database connectors&quot; for the relevant database (such as MySQL, SQLite,...
Python with JSON Create Table SQL
python|json
0
40
1
71,237,602
71,237,602
0
true
2022-02-23T13:08:04.937Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python with JSON Create Table SQL<p>I have 2 list</p> <pre><code>c_name = ['departmentid', 'name', 'groupname', 'modifieddate'] d_type =['integer', 'characte...
71,310,436
Call a new function after result of user creation in Sequelize<p>I have this code :</p> <pre><code>const saltRounds = 10; let charset = &quot;0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ&quot;; module.exports.addUser = async (req, res) =&gt; { try { let userData = req.body; let email = use...
<p>I don't know why are you fetching the details again if they're already available when you create user.</p> <pre><code>const newUser = await User.createUser(userData, res); // newUser has all the values you're trying to fetch </code></pre> <p>bcrypt hash retruns promise if call is not specified</p> <pre><code>module...
Call a new function after result of user creation in Sequelize
node.js|sequelize.js
0
34
1
71,310,917
71,310,917
0
true
2022-03-01T14:57:20.557Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Call a new function after result of user creation in Sequelize<p>I have this code :</p> <pre><code>const saltRounds = 10; let charset = &quot;0123456789abcd...
71,207,951
Testing: how to access "model_has_error_on_field"?<p>I was looking at Mastodon tests for inspiration, and I noticed this <code>model_has_error_on_field</code> method on their <a href="https://github.com/mastodon/mastodon/blob/8603a075049a9e903b05e2370cf4c5ebfda1e703/spec/models/user_spec.rb#L34" rel="nofollow noreferre...
<p>Found it, it's a custom <code>Rspec::Matchers</code> defined in <a href="https://github.com/mastodon/mastodon/blob/8603a075049a9e903b05e2370cf4c5ebfda1e703/spec/support/matchers/model/model_have_error_on_field.rb" rel="nofollow noreferrer">mastodon/spec/support/matchers/model/model_have_error_on_field.rb</a></p> <hr...
Testing: how to access "model_has_error_on_field"?
ruby-on-rails|validation|rspec
0
16
1
71,208,028
71,208,028
0
true
2022-02-21T14:25:05.530Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Testing: how to access "model_has_error_on_field"?<p>I was looking at Mastodon tests for inspiration, and I noticed this <code>model_has_error_on_field</code...
71,123,539
delete/clear AD attribute value if attribute contains value like val*<p>Good Day!</p> <p>I want to clear a specific values of AD attribute which is called aaccountroles the concept like this: if this attribute &quot;aaccountroles&quot; contains values that start with &quot;S4P any&quot; which means S4P*, it should remo...
<p>The <code>-Clear</code> parameter of <code>Set-ADUser</code> expects a <strong>string</strong> or <strong>string array</strong>, not a hashtable.</p> <p>You need to first find the user that has that attribute like 'S4P*' and if found clear that property:</p> <pre><code>Import-Csv -Path .\test.csv | ForEach-Object { ...
delete/clear AD attribute value if attribute contains value like val*
powershell|active-directory
0
1,048
1
71,124,184
71,124,184
0
true
2022-02-15T08:53:47.497Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: delete/clear AD attribute value if attribute contains value like val*<p>Good Day!</p> <p>I want to clear a specific values of AD attribute which is called aa...
71,295,003
How to find a column number in excel sheet with PowerShell<p>I have a working script that search rows in the specific column but I need to set the number of the column, So before I run the script I am writing =column() in a specific row in that column. I want to know how to get this number according to the columns name...
<p>You can get the names and belonging indices like this:</p> <pre><code>$colMax = $sheet.UsedRange.Columns.Count # create a hash with column header names and their indices $columns = [ordered]@{} for ($col = 1; $col -le $colMax; $col++) { $name = $sheet.Cells.Item(1, $col).Value() # assuming the first row has th...
How to find a column number in excel sheet with PowerShell
powershell
0
285
1
71,295,365
71,295,365
0
true
2022-02-28T12:24:12.723Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to find a column number in excel sheet with PowerShell<p>I have a working script that search rows in the specific column but I need to set the number of ...
71,227,442
MS Access Form Controls Will Only Move Together, but Not Grouped or Stacked<p>I've been handed an access database that my company had a contractor build out for them more than a decade ago and asked to bring it up-to-date. It's a relatively simple thing, generally within my limited MS Access skill, but I'm stumped by ...
<p>That is simply a control with an associated label. Each can be moved independently by click and hold on the 'small grey box' and drag to desired location. Resize by click and drag on any of the anchor boxes.</p> <p>The 'surrounded by a dashed box' would indicate a Layout Group. Layout can be removed by selecting con...
MS Access Form Controls Will Only Move Together, but Not Grouped or Stacked
ms-access
0
26
1
71,227,673
71,227,673
0
true
2022-02-22T19:48:27.810Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: MS Access Form Controls Will Only Move Together, but Not Grouped or Stacked<p>I've been handed an access database that my company had a contractor build out ...
71,153,887
Why does it return "module 'PIL.Image' has no attribute 'getdata'" when I try to get the rgb value from the image?<p>So I tried to run this code in order to get image data:</p> <pre><code>from PIL import Image pixel = list(Image.getdata()) print(pixel) </code></pre> <p>And it returns an error: <code>&quot;module 'PIL.I...
<p>You need to open an image before calling the <code>getdata</code> function:</p> <pre><code>from PIL import Image im = Image.open(&quot;example.gif&quot;) pixel = list(im.getdata()) print(pixel) </code></pre>
Why does it return "module 'PIL.Image' has no attribute 'getdata'" when I try to get the rgb value from the image?
python
0
41
2
71,153,973
71,153,973
0
true
2022-02-17T07:17:38.160Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why does it return "module 'PIL.Image' has no attribute 'getdata'" when I try to get the rgb value from the image?<p>So I tried to run this code in order to ...
71,128,238
Two Sum function not working with recurring elements in list<p>I'm trying to complete &quot;Two Sum&quot;, which goes as such:</p> <p>Write a function that takes an array of numbers (integers for the tests) and a target number. It should find two different items in the array that, when added together, give the target v...
<p>The list method <code>index()</code> always returns the first occurence of an item in a list, so <code>numbers.index(i) != numbers.index(t)</code> evaluates to <code>1 != 1</code> which is <code>False</code>.</p> <p>You should use the builtin <a href="https://docs.python.org/3.8/library/functions.html#enumerate" rel...
Two Sum function not working with recurring elements in list
python-3.x|list|numbers
0
274
3
71,128,826
71,128,826
0
true
2022-02-15T14:32:15.543Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Two Sum function not working with recurring elements in list<p>I'm trying to complete &quot;Two Sum&quot;, which goes as such:</p> <p>Write a function that t...
71,145,909
beautifulsoup find function returning none<p>I am trying to scrap some information using beautifulsoup. However, height keeps returning None. Could you please see what might be the problem?</p> <pre><code>import requests from bs4 import BeautifulSoup header = {&quot;User-Agent&quot;: 'Mozilla/5.0 (Macintosh; Intel Mac...
<h3>What happens?</h3> <p>Content is provided dynamically - Always take a look into your soup and check if data you like to find is present. Result could differ slightly to wide from inspected result via developer tools, cause <code>requests</code> do not render the website and makr adjustments like a browser would do....
beautifulsoup find function returning none
beautifulsoup
0
22
1
71,146,404
71,146,404
0
true
2022-02-16T16:48:02.410Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: beautifulsoup find function returning none<p>I am trying to scrap some information using beautifulsoup. However, height keeps returning None. Could you pleas...
71,241,534
"Notice: Trying to get property" for nested menu<div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>cID</th> <th>cPID</th> <th>cSlug</th> <th>cName</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>0</td> <td>hello</td> <td>H1</td> </tr> <tr> <td>2</td> <td>0</td> <td>world</td> <td>WORLD</td> </tr> ...
<p>If <code>$row</code> is an object, you cannot do <code>$menu[$row-&gt;cID]['submenus']</code>, because <code>$menu[$row-&gt;cID]</code> is an object, not an array.</p> <p>You should use <code>$menu[$row-&gt;cID]-&gt;submenus</code>.</p> <p>Also, <code>$row-&gt;cPID === 0</code> is not a good condition because if wil...
"Notice: Trying to get property" for nested menu
php|arrays|multidimensional-array|foreach|menu
0
20
1
71,241,737
71,241,737
0
true
2022-02-23T17:27:25.100Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: "Notice: Trying to get property" for nested menu<div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>cID</th> <th>cPID</th> <th>cSlug</th...
71,236,133
Why my pop up window in not appearing in python using kivy?<p>I'm still new to python and I'm trying to learn how to use kivy but when I was just trying it there's no pop-up window that comes out as it should or as I saw from the videos I follow, Please, help. Thank you.</p> <pre><code>import kivy from kivy.app import ...
<p>Have you tried this instead?</p> <pre><code>class MyApp(App): def build(self): return Label(text='Hello world') if __name__ == '__main__': MyApp().run() </code></pre> <p>More examples on the kivy documentation site: <a href="https://kivy.org/doc/stable/guide/basic.html" rel="nofollow noreferrer">https://ki...
Why my pop up window in not appearing in python using kivy?
python|python-3.x
0
19
1
71,236,208
71,236,208
0
true
2022-02-23T11:32:07.067Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why my pop up window in not appearing in python using kivy?<p>I'm still new to python and I'm trying to learn how to use kivy but when I was just trying it t...
71,351,113
problem to schedule pod in fargate with error "Pod not supported on Fargate: volumes not supported: dir-authentication not supported because:"<p>New to AWS EKS Fargate.</p> <p>I created a cluster on aws EKS fargate and then proceed to install a helm chart; and the pods are all in pending state, looking at the pod descr...
<p>Currently, Fargate <a href="https://github.com/aws/containers-roadmap/issues/1113" rel="nofollow noreferrer">does not support</a> PersistentVolume back by EBS. You can use <a href="https://aws.amazon.com/blogs/containers/running-stateful-workloads-with-amazon-eks-on-aws-fargate-using-amazon-efs/" rel="nofollow noref...
problem to schedule pod in fargate with error "Pod not supported on Fargate: volumes not supported: dir-authentication not supported because:"
amazon-eks|aws-fargate|eksctl
0
526
1
71,352,635
71,352,635
0
true
2022-03-04T12:01:37.050Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: problem to schedule pod in fargate with error "Pod not supported on Fargate: volumes not supported: dir-authentication not supported because:"<p>New to AWS E...
71,110,452
i want to put restrictions on my time pickers<p>I'm making time pickers using textfields. for example if current time is 8:00 i want the <strong>start time</strong> to be from 8:00 to 8:30 ONLY include every minute like 8:01 8:02 etc. And not allowing user to choose time from past like 7:00. for the <strong>end time</s...
<p>You need to set the range for each date picker so here is a way to calculate the two ranges</p> <pre><code>let calendar = Calendar.current //First range let startTime = Date() let startRangeEnd = calendar.date(byAdding: DateComponents(minute: 30), to: startTime)! let startRange = startTime...startRangeEnd //Second r...
i want to put restrictions on my time pickers
ios|swift
0
38
1
71,111,256
71,111,256
0
true
2022-02-14T10:35:19.310Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: i want to put restrictions on my time pickers<p>I'm making time pickers using textfields. for example if current time is 8:00 i want the <strong>start time</...
71,340,293
DeserializationError - failed to fill whole buffer<p>I'm writing a simple rust app using the Rocket web framework, Postgres database, and Diesel to manage database migrations. The code compiles OK, and other parts of the application run properly, but for some reason, my <code>Expense</code> endpoints don't seem to be w...
<p>In the database migration, you are not specifying a precision for the <code>amount</code> column(<code>DECIMAL</code>), which Diesel is expecting.</p> <p>Try adding a precision to the <code>amount</code> column as per below, and reapplying the migration.</p> <pre><code>CREATE TABLE expenses ( id SERIAL PRIMARY KEY...
DeserializationError - failed to fill whole buffer
rust|rust-diesel|rust-rocket
0
297
1
71,340,294
71,340,294
0
true
2022-03-03T16:12:41.377Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: DeserializationError - failed to fill whole buffer<p>I'm writing a simple rust app using the Rocket web framework, Postgres database, and Diesel to manage da...
71,139,713
Auditing EntityChange conditionally based on instance value<p>Is there a way to disable auditing conditionally based on instance value?</p> <p>I have a table of entities with a status column (either 0 for 'published' or 1 for 'still in editing'). Now I'd like to monitor the property changes by using Volo.Abp.Auditing, ...
<p>You can subclass <code>EntityHistoryHelper</code> and override <code>ShouldSaveEntityHistory</code>:</p> <pre class="lang-cs prettyprint-override"><code>[Dependency(ServiceLifetime.Transient, ReplaceServices = true)] public class MyEntityHistoryHelper : EntityHistoryHelper { public MyEntityHistoryHelper( ...
Auditing EntityChange conditionally based on instance value
c#|abp
0
44
1
71,145,973
71,145,973
0
true
2022-02-16T10:03:30.040Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Auditing EntityChange conditionally based on instance value<p>Is there a way to disable auditing conditionally based on instance value?</p> <p>I have a table...
71,279,206
How not to delete the whole document in mongoose (express.js), but just only a string in an array<p>this is my first time on this platform and my english is bad so sorry if I don't understand all the intricacies of my problem.</p> <p>I have question about: why does findOneAndDelete() in mongoose delete all document ins...
<p>I found out my issue.</p> <p><code>$pull</code> works with something else like <code>$in</code></p> <p>so:</p> <pre><code>const final = await AllUrlDb.updateOne(isDetleteURL,{ $pull: { name:{ ...
How not to delete the whole document in mongoose (express.js), but just only a string in an array
javascript|mongodb|express|mongoose|server
0
33
1
71,279,654
71,279,654
0
true
2022-02-26T18:16:37.397Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How not to delete the whole document in mongoose (express.js), but just only a string in an array<p>this is my first time on this platform and my english is ...
71,184,148
Open PuTTY from a webpage to run a specific command<p>How can I open a PuTTY session and run a specific command on the click on a HTML button?</p> <p>I tried stuffs like creating a script and running it manually but could not figure out a way to implement it on the click of a button from the webpage. The command will b...
<p>A webpage cannot do random stuff with software installed on local machine. That would be a security nightmare.</p> <p>If you can register a protocol handler on the local machine, that can do, what you need, using information stored in a URL, then it's doable. For a first step, see <a href="https://stackoverflow.com/...
Open PuTTY from a webpage to run a specific command
html|forms|putty
0
297
1
71,184,410
71,184,410
0
true
2022-02-19T10:36:33.827Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Open PuTTY from a webpage to run a specific command<p>How can I open a PuTTY session and run a specific command on the click on a HTML button?</p> <p>I tried...
71,197,987
Why is this function not reading one of my parameters?<p>I have this function in JS that should return 'not sold'/'sold to {name}'/'unknown ticket id' depending on the value/existence of the &quot;ticketId&quot; key in the &quot;tickets&quot; object, but it just returns 'unknown ticket id' for any 'ticketId' value rega...
<p><code>&quot;ticketId&quot;</code> is a string, not the variable as you intended.</p> <p>You probably meant <code>tickets[ticketId]</code>:</p> <pre><code>export function ticketStatus(tickets, ticketId) { if (tickets[ticketId] === null) { return &quot;not sold&quot;; } else if (tickets[ticketId] === undefined...
Why is this function not reading one of my parameters?
javascript|object
0
34
1
71,198,010
71,198,010
0
true
2022-02-20T19:28:16.070Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why is this function not reading one of my parameters?<p>I have this function in JS that should return 'not sold'/'sold to {name}'/'unknown ticket id' depend...
71,252,630
Is there any way to make sure no duplicate items get added in firestore, I'm using Flutter and Firebase and I'm pretty new to this<pre><code> Future addCart() async{ final FirebaseAuth _auth = FirebaseAuth.instance; var currentUser = _auth.currentUser; CollectionReference _collectionRef = FirebaseFires...
<blockquote> <p>I'm using collectionReference and it does not have any .contain method to check if there are items of the same type already existing</p> </blockquote> <p>As you've already seen, there is no method present that can help you add a new document only if it doesn't already exists. So you have to check that y...
Is there any way to make sure no duplicate items get added in firestore, I'm using Flutter and Firebase and I'm pretty new to this
firebase|flutter|dart|google-cloud-platform|google-cloud-firestore
0
38
1
71,253,477
71,253,477
0
true
2022-02-24T13:18:47.830Z
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 make sure no duplicate items get added in firestore, I'm using Flutter and Firebase and I'm pretty new to this<pre><code> Future addCar...
71,314,327
How do I number my table with each number colspanned to the first cell of each row?<p>I have a leaderboard and everything in my table body is pushed one to the right. I am trying to colspan the first number in each row with the player name. Since the number gets inserted into the table from my CSS file is there any way...
<p><strong>UPDATED</strong> based on clarifications on comments</p> <p>You need to tell the header column that it will occupy more than one column. In this case, it will be the width of 2 columns. Like this:</p> <pre><code>&lt;th colspan=&quot;2&quot;&gt;Player&lt;/th&gt; </code></pre> <p><strong>Update 2</strong></p...
How do I number my table with each number colspanned to the first cell of each row?
html|css
0
33
1
71,314,373
71,314,373
0
true
2022-03-01T20:33:53.087Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I number my table with each number colspanned to the first cell of each row?<p>I have a leaderboard and everything in my table body is pushed one to t...
71,241,611
Printing log analytics dashboards comes up as a vertical half page. How do I print the full dashboard?<p>I have a log analytics dashboard that I am trying to print to pdf of a dashboard I have set up in Log analytics but the print preview is coming up as vertical half page. The left half comes up in the pdf but the rig...
<p>I have found a workaround for the problem and possibly the cause of the problem. On inspecting the CSS loaded on the page, I found this in the print media queries loaded on the page</p> <pre><code>.fxs-printmaxwidth{max-width:750px} </code></pre> <p>and that about was the width at which the page was being cutoff ver...
Printing log analytics dashboards comes up as a vertical half page. How do I print the full dashboard?
azure|azure-log-analytics|azure-dashboard
0
43
1
71,243,850
71,243,850
0
true
2022-02-23T17:32:16.567Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Printing log analytics dashboards comes up as a vertical half page. How do I print the full dashboard?<p>I have a log analytics dashboard that I am trying to...
71,191,066
Jetpack Compose, fetch and add more items to LazyColumn using StateFlow<p>I'm have a <code>LazyColumn</code> that renders a list of items. However, I now want to fetch more items to add to my lazy list. I don't want to re-render items that have already been rendered in the <code>LazyColumn</code>, I just want to add t...
<p>I was able to solve this by adding the new posts to the old posts before emitting it. See comments below for the relevant lines.</p> <pre class="lang-kotlin prettyprint-override"><code>private val _content = MutableStateFlow&lt;Content&gt;(Content()) private val _uiState: StateFlow&lt;UiState&gt; = repository.ge...
Jetpack Compose, fetch and add more items to LazyColumn using StateFlow
android|android-jetpack-compose|android-viewmodel|kotlin-stateflow
0
1,542
1
71,191,371
71,191,371
0
true
2022-02-20T03:05:59.470Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Jetpack Compose, fetch and add more items to LazyColumn using StateFlow<p>I'm have a <code>LazyColumn</code> that renders a list of items. However, I now wan...
71,125,312
counting rows by sampling in a pandas dataframe<p>I have a pandas dataframe of over 1000 lines, where I want to read values from 10 rows at a time. eg - I want to calculate the number of times Logic is <em><strong>1</strong></em> for the first 10 rows, then for the next 10 rows and so on.</p> <div class="s-table-contai...
<p>If you just need an array, use the underlying numpy array:</p> <pre><code>df['Logic'].to_numpy().reshape(-1,10).sum(1) </code></pre> <p>output:</p> <pre><code>array([8, 3, 6, 6, 7, 6, 3, 5, 7, 5, 4, 3, 9, 3, 7, 5, 4, 4, 3, 3, 4, 4, 5, 5, 5, 7, 6, 5, 5, 5, 7, 8, 6, 7, 4, 5, 4, 6, 6, 7, 6, 7, 2, 6, 6, 3,...
counting rows by sampling in a pandas dataframe
python|pandas|dataframe
0
22
1
71,125,348
71,125,348
0
true
2022-02-15T11:02:41.053Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: counting rows by sampling in a pandas dataframe<p>I have a pandas dataframe of over 1000 lines, where I want to read values from 10 rows at a time. eg - I wa...
71,316,659
For Lopop Python3<p>I am trying to obtain the asset and its value from the result without the curly braces, I have tried to do it through various ways and I have not succeeded, could someone help me please?</p> <p>The result I want to get is ASSET: bitcoin 43935</p> <pre><code>from pycoingecko import CoinGeckoAPI impor...
<p>Since you have a nested dictionary, I think something like this will get the result you are asking for:</p> <pre><code>for key,val in obj.items(): for k,v in val.items(): print(f'ASSET: {key} {v}') </code></pre> <p>Output:</p> <pre><code>ASSET: bitcoin 43935 ASSET: ethereum 2923.98 ASSET: tet...
For Lopop Python3
python-3.x
0
30
1
71,317,048
71,317,048
0
true
2022-03-02T02:06:31.493Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: For Lopop Python3<p>I am trying to obtain the asset and its value from the result without the curly braces, I have tried to do it through various ways and I ...
71,172,618
Calculate hourly turnout with pandas and Matplotlib<p>I am trying to find the number of times a certain value &quot;PAY&quot; appears in a hourly range column.</p> <p>I have made the dataframe with pandas:</p> <pre><code>df = pd.read_json('test.json') print(df.head(3)) print(df.dtypes) </code></pre> <pre><code> Transa...
<p>Considering the following dataframe:</p> <pre><code> TransactionCode Date Time 1 PAY 2021-12-09 10:23:29.242000 2 PAY 2021-12-09 10:23:02.978000 3 PAY 2021-12-09 10:22:48.659000 4 ERR 2021-12-09 11:32:48.659000 5 PAY 2021-...
Calculate hourly turnout with pandas and Matplotlib
python|pandas|dataframe|matplotlib|plot
0
30
2
71,172,978
71,172,978
0
true
2022-02-18T11:18:57.547Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Calculate hourly turnout with pandas and Matplotlib<p>I am trying to find the number of times a certain value &quot;PAY&quot; appears in a hourly range colum...
71,347,940
Deserialize Uint8Array memssage for protobuf with deserializeBinary function<p>Attempting to read results of a protobuf message sent from ESP32 chip via BLE and unable to deserialize the incoming message. Using protobuf for javascript in an Ionic app for Android devices. Here's my code:</p> <pre><code>import * as goo...
<p>Figured out why this wasn't working. Quite a few errors in my deserializeToBinary function. This works:</p> <pre><code>deserializeToBinary(message: any){ dataViewToNumbers(message) //dataViewToNumbers can be imported from @capacitor-community/bluetooth-le console.log(message); //this prints protobuf response e...
Deserialize Uint8Array memssage for protobuf with deserializeBinary function
javascript|typescript|ionic-framework|protocol-buffers
0
277
1
71,385,410
71,385,410
0
true
2022-03-04T07:32:15.823Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Deserialize Uint8Array memssage for protobuf with deserializeBinary function<p>Attempting to read results of a protobuf message sent from ESP32 chip via BLE ...
71,182,902
Java cannot find '/platform-tools/adb' (Building app with react-native)<p>I run <code>npx react-native run-android</code> and I get this</p> <p>This seems to be the problem, It's looking for platform tools in <code>~/</code> and not in <code>~/Android/Sdk</code></p> <blockquote> <p>java.io.IOException: Cannot run progr...
<p>Check where your $ANDROID_HOME variable is pointing to.</p> <p><code>echo $ANDROID_HOME</code></p> <p>If must be equal to the path of <code>Android/Sdk</code>, usually at <code>~/Android/Sdk</code></p> <p>A solution, if you know where the variable <code>ANDROID_HOME</code> is (maybe <code>~/.bashrc</code>, <code>~/....
Java cannot find '/platform-tools/adb' (Building app with react-native)
java|android|flutter|react-native|adb
0
290
1
71,182,903
71,182,903
0
true
2022-02-19T07:02:10.243Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Java cannot find '/platform-tools/adb' (Building app with react-native)<p>I run <code>npx react-native run-android</code> and I get this</p> <p>This seems to...
71,328,826
nested dropdown menu<p>I am trying to make a nested menu in my nav header. Under Reports there should be two menu items Global Shop and Ndustrios. Then if I hover over either of them there should be more items to show. Currently what happens under Reports is all of the options below it show up when hovered. so it reads...
<p>You will need to do some restructuring to your HTML and use another list inside your li to contain more links. You will still be left with a pretty serious issue though. If you no longer hover the submenu item and the list gets shorter and then you are no longer hovering anything. For example: hover over reports t...
nested dropdown menu
html|css|drop-down-menu
0
1,063
2
71,329,870
71,329,870
0
true
2022-03-02T20:35:00.260Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: nested dropdown menu<p>I am trying to make a nested menu in my nav header. Under Reports there should be two menu items Global Shop and Ndustrios. Then if I ...
71,214,349
Mongo/Mongoose JS — Update document to latest state?<p>Is there a way to store a document then get an updated value of it at a later date without needing to query and populate again?</p> <pre><code>const someDocument = await SomeModel.findOne({...}).populate(...); // store a reference to it for use const props = { ...
<p>As describe <a href="https://mongoosejs.com/docs/guide.html#methods" rel="nofollow noreferrer">here</a>, You can define your own custom document instance methods by add functions on the schema level.</p> <p>example taken from mongoose doc:</p> <pre><code> // define a schema const animalSchema = new Schema({ name: S...
Mongo/Mongoose JS — Update document to latest state?
javascript|mongoose
0
26
1
71,221,978
71,221,978
0
true
2022-02-21T23:51:06.567Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Mongo/Mongoose JS — Update document to latest state?<p>Is there a way to store a document then get an updated value of it at a later date without needing to ...
71,194,554
Divide list into sublists with specific sizes<p>I need to divide list in that way: first and last sublists contain 1 element, second and second last contain 2 elements and so on.. I wrote a simplier version of that predicate: I just put 1 element in first sublists, 2 in second and so on. How to write predicate that I n...
<pre><code>segment_list(Lst, LstSegments) :- length(Lst, LenLst), segment_list_(Lst, LenLst, 1, LstSegments). segment_list_(Lst, LenLst, LenSegment, LstSegments) :- % Using compare, to prevent unwanted choicepoint compare(Comp, LenLst, 0), segment_list_comp_(Comp, Lst, LenLst, LenSegment, LstSegmen...
Divide list into sublists with specific sizes
prolog
0
45
1
71,195,973
71,195,973
0
true
2022-02-20T12:48:35.217Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Divide list into sublists with specific sizes<p>I need to divide list in that way: first and last sublists contain 1 element, second and second last contain ...
71,300,270
How to change Matplotlib barchart image size<p>Im having some issues with my Matplotlib barchart, my barchart's size is zoomed in for some reason and im not sure why. This is what it currently looks like <a href="https://i.stack.imgur.com/N0jrr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/N0jrr.pn...
<p>Use this</p> <pre><code>import matplotlib.pyplot as plt from matplotlib.pyplot import figure import random #figure(figsize=(2,10), dpi=80) fig = plt.figure(figsize=(9, 11)) # you can edit this line accordingly Bar_Year = ['Year 1', 'Year 2', 'Year 3', 'Year 4', 'Year 5','Year 10','Year 20','Year 30'] Bar_Rent = [...
How to change Matplotlib barchart image size
python
0
20
1
71,300,322
71,300,322
0
true
2022-02-28T19:41:49.600Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to change Matplotlib barchart image size<p>Im having some issues with my Matplotlib barchart, my barchart's size is zoomed in for some reason and im not ...
71,268,744
Ambigious name - worksheet change - double<p>I'm attempting to add a second code to a single worksheet and keep getting the &quot;Ambiguous name detected&quot; error. Realise that I need to combine the two codes but having trouble doing so. here are the two codes, one below the other (I had to make the second sub becau...
<p>If you need to take multiple actions on a change, then you can structure your code like this:</p> <pre class="lang-vb prettyprint-override"><code>Private Sub Worksheet_Change(ByVal Target As Range) ProcessOne Target ProcessTwo Target End Sub Sub ProcessOne(Target As Range) 'do something with Target End ...
Ambigious name - worksheet change - double
excel|vba|worksheet
0
27
1
71,268,868
71,268,868
0
true
2022-02-25T16:20:42.377Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Ambigious name - worksheet change - double<p>I'm attempting to add a second code to a single worksheet and keep getting the &quot;Ambiguous name detected&quo...
71,136,053
Django: Initialize a container model with child models when a new container is created - e.g. Todo list with default tasks<p>I'm trying to create a todo list as part of an application that is used to prompt a user what they must complete before the application is assessed. To achieve this I have created a TaskList mode...
<p>You can either load the initial data <a href="https://docs.djangoproject.com/en/dev/topics/migrations/#data-migrations" rel="nofollow noreferrer">along with migrations</a> or provide <a href="https://docs.djangoproject.com/en/dev/ref/django-admin/#loaddata" rel="nofollow noreferrer">separate fixtures</a> with <code>...
Django: Initialize a container model with child models when a new container is created - e.g. Todo list with default tasks
python|django|django-models
0
41
1
71,136,521
71,136,521
0
true
2022-02-16T03:29:22.717Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Django: Initialize a container model with child models when a new container is created - e.g. Todo list with default tasks<p>I'm trying to create a todo list...
71,142,289
django find in field type json with value type int or str<p>I have a field type Json in a model, but I can't be sure if it's an integer or a string, the long version that works is:</p> <pre><code>cars = Car.objects.filter( user_id=self.user_id, car_type=self.car_type, facture__facture_id=1, ) if len(cars) == 0...
<p>Use <a href="https://docs.djangoproject.com/en/2.2/ref/models/querysets/#q-objects" rel="nofollow noreferrer">Q objects</a> for &quot;OR&quot; logic ( with <code>|</code> operator) (<a href="https://docs.djangoproject.com/en/2.2/topics/db/queries/#complex-lookups-with-q" rel="nofollow noreferrer">also here</a>)</p>...
django find in field type json with value type int or str
django|django-models
0
38
1
71,142,503
71,142,503
0
true
2022-02-16T12:57:00.873Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: django find in field type json with value type int or str<p>I have a field type Json in a model, but I can't be sure if it's an integer or a string, the long...
71,304,002
How to replace incomplete rows from complete rows per group in pandas<p>Trying to clean a dataset and I suspect I'm dealing with incomplete rows with the right information elsewhere in the data frame. For example, something like</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>ride_id</th> <...
<p><a href="https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.groupby.html" rel="nofollow noreferrer">Group by</a> the latitude and longitude, then <a href="https://pandas.pydata.org/docs/reference/api/pandas.core.groupby.DataFrameGroupBy.ffill.html" rel="nofollow noreferrer">forward-fill</a> and <a href="h...
How to replace incomplete rows from complete rows per group in pandas
python|pandas|dataframe|data-cleaning
0
40
1
71,304,096
71,304,096
0
true
2022-03-01T05:11:44.790Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to replace incomplete rows from complete rows per group in pandas<p>Trying to clean a dataset and I suspect I'm dealing with incomplete rows with the rig...
71,302,330
Run multiple files consecutively via SLURM with individual timeout<p>I have a python script I run on HPC that takes a list of files in a text file and starts multiple SBATCH runs:</p> <pre><code>./launch_job.sh 0_folder_file_list.txt </code></pre> <p>launch_job.sh goes through 0_folder_file_list.txt and starts an SBATC...
<p>You can use <code>--wait</code> flag with <code>sbatch</code>.</p> <blockquote> <p>-W, --wait Do not exit until the submitted job terminates. The exit code of the sbatch command will be the same as the exit code of the submitted job. If the job terminated due to a signal rather than a normal exit, the exit code will...
Run multiple files consecutively via SLURM with individual timeout
python|slurm|hpc|sbatch
0
285
1
71,306,372
71,306,372
0
true
2022-02-28T23:54:19.430Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Run multiple files consecutively via SLURM with individual timeout<p>I have a python script I run on HPC that takes a list of files in a text file and starts...
71,339,452
AES_DECRYPT with MySQL JOIN Query<p>I have a JOIN query that works perfectly fine without using MySQL encryption. But when I try to decrypt the rows, the query fails.</p> <blockquote> <p>Select members.name, member_notes.sin, member_notes.note, member_notes.admin_note, member_notes.username, member_notes.time_stamp fro...
<p>Figured it out.</p> <pre><code>Select members.name, member_notes.sin, member_notes.note, member_notes.admin_note, member_notes.username, member_notes.time_stamp, CAST(AES_DECRYPT(members.name, '$key') as CHAR) as name from member_notes JOIN members on member_notes.sin = members.sin </code></pre>
AES_DECRYPT with MySQL JOIN Query
php|mysql
0
21
1
71,339,606
71,339,606
0
true
2022-03-03T15:13:12.393Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: AES_DECRYPT with MySQL JOIN Query<p>I have a JOIN query that works perfectly fine without using MySQL encryption. But when I try to decrypt the rows, the que...
71,228,418
How to get store API response of type array in typescript interface?<p>The api returns a response like this:</p> <pre><code>[ { &quot;id&quot;: &quot;string&quot;, &quot;code&quot;: &quot;string&quot;, &quot;name&quot;: &quot;string&quot;, } ] </code></pre> <p>So for example it will be</p> <pre><code>[ ...
<p>You can create a <code>type</code> that is an array of the other type:</p> <pre><code>export type getPromotionsResponse = promotionCodes[]; </code></pre> <p>If you <em>have to</em> create an <code>interface</code> and not a <code>type</code>, you'll need to do it like this:</p> <pre><code>export interface getPromoti...
How to get store API response of type array in typescript interface?
javascript|typescript|interface|get
0
519
2
71,228,519
71,228,519
0
true
2022-02-22T21:18:03.627Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to get store API response of type array in typescript interface?<p>The api returns a response like this:</p> <pre><code>[ { &quot;id&quot;: &quot;s...
71,162,663
how to define fiels in .new_activity with broghtway2 that have spaces in their name<p>When creating a new activity like so:</p> <pre><code>banana = database.new_activity(code='thisisthecodeforthebananamarket', name='banana form havanna', ...
<p>I think if you pass them as a dictionary it does indeed work. I've tried and it does not throw an error.</p> <pre><code>na = db.new_activity(code='thisisthecodeforthebananamarket', name='banana form havanna', unit='kilogram', type='process', location='CU', ...
how to define fiels in .new_activity with broghtway2 that have spaces in their name
python|brightway
0
26
1
71,170,046
71,170,046
0
true
2022-02-17T17:20:52.710Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to define fiels in .new_activity with broghtway2 that have spaces in their name<p>When creating a new activity like so:</p> <pre><code>banana = database....
71,152,197
How can I Copy the date value from Column C to Column F for each row that matches criteria?<p>Trying to create a Google App Script for Sheets that will do the following:</p> <p><strong>Copy</strong> Date found in column <strong>C</strong> to column <strong>F</strong> <br /> <strong>IF</strong>: Date in column <strong>C...
<p>Try this.</p> <pre><code>function ReceivedDate() { var ss = SpreadsheetApp.getActive(); var sh = ss.getSheetByName('sheet1'); var vs = sh.getRange(6, 1, 500, 6).getValues() //getRange(row, column, numRows, numColumns) but this needs to be whole sheet from row 6 down var cutoffDate = new Date(sh.getRange(...
How can I Copy the date value from Column C to Column F for each row that matches criteria?
google-apps-script|google-sheets
0
33
2
71,152,321
71,152,321
0
true
2022-02-17T03:35:03.343Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I Copy the date value from Column C to Column F for each row that matches criteria?<p>Trying to create a Google App Script for Sheets that will do th...
71,148,438
How I can solve a sqflite conflicting with sdk in android studio?<p>I have a problem when add sqflite to my project(flutter) to dependencies in SDK 31.0.0 and the console make like this when make run :</p> <pre><code>FAILURE: Build failed with an exception. * What went wrong: Could not determine the dependencies of ta...
<p>You can following the steps in the picture to install the missing version:</p> <blockquote> <p>Tools - SDK Manager - SDK Tools - Show Package Details</p> </blockquote> <p>Select the version you need, and click apply button to install it:</p> <p><img src="https://i.stack.imgur.com/mntKu.png" alt="enter image descript...
How I can solve a sqflite conflicting with sdk in android studio?
flutter|sdk|sqflite|dart-null-safety|pubspec
0
34
1
71,165,255
71,165,255
0
true
2022-02-16T19:51:53.113Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How I can solve a sqflite conflicting with sdk in android studio?<p>I have a problem when add sqflite to my project(flutter) to dependencies in SDK 31.0.0 an...
71,266,742
Error while executing if else condition in Powershell<p>I am trying to execute the if &amp; else code but unable to pass through the condition</p> <pre><code>{ if(($ENV_TYPE = 'Dev') &amp;&amp; ($REGION_CODE = 'eus2')) { } else { } } </code></pre> <p>Both the <code>env_type</code> and <code>r...
<pre><code>if ($ENV_TYPE -eq 'Dev' -And $REGION_CODE -eq 'eus2'){ } </code></pre>
Error while executing if else condition in Powershell
if-statement|conditional-statements
0
41
1
71,266,928
71,266,928
0
true
2022-02-25T13:41:35.717Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Error while executing if else condition in Powershell<p>I am trying to execute the if &amp; else code but unable to pass through the condition</p> <pre><code...
71,224,856
Joining Query with codeigniter Model<p><strong>Please help me how can I get only response where activities.activity_id = response.activity_id? here is my CI_model</strong></p> <pre><code>public function get_response(){ $this-&gt;db-&gt;select('*'); $this-&gt;db-&gt;from('response'); $id = $this-&gt;se...
<p>Try with this:</p> <pre><code>$id = $this-&gt;session-&gt;userdata('id'); $this-&gt;db-&gt;select('a.*, b.*, c.*'); $this-&gt;db-&gt;join('activities b', 'a.activity_id = b.activity_id'); $this-&gt;db-&gt;join('users c', 'c.id = a.user_id'); $this-&gt;db-&gt;where_in('a.user_id', $id); $result = $this-&gt;db-&gt;g...
Joining Query with codeigniter Model
php|mysql|sql|arrays|codeigniter
0
39
1
71,227,797
71,227,797
0
true
2022-02-22T16:27:45Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Joining Query with codeigniter Model<p><strong>Please help me how can I get only response where activities.activity_id = response.activity_id? here is my CI...
71,234,234
Variable Order of values in LHS, OR/AND operators<p>I'm trying to define a rule by this form:</p> <pre><code> ;Plantilla Ficha de paciente (deftemplate FichaPaciente (multifield Nombre) (field Casado) (field Direccion)) ;Plantilla DatosExploración (deftemplate DatosExploracion (multifield Nombre) (...
<p>Here's one way you can do it:</p> <pre><code>(defrule DiagnosticoEccema (DatosExploracion (Nombre $?Nombre) (Sintomas $?Sintomas&amp;:(and (member$ picor ?Sintomas) (member$ vesiculas ?Sintomas)))) (FichaPaciente (Nombre $?Nombre)) =&gt; (printout t &quo...
Variable Order of values in LHS, OR/AND operators
clips
0
42
2
71,241,893
71,241,893
0
true
2022-02-23T09:19:01.637Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Variable Order of values in LHS, OR/AND operators<p>I'm trying to define a rule by this form:</p> <pre><code> ;Plantilla Ficha de paciente (deftemplate Ficha...
71,306,234
Odoo - Change color on Forecast Widget<p>I'm trying to change color of Forecasted Widget in Sales Order view. I figured it is defined in this location odoo/addons/sale_stock/static/src/xml/sale_stock.xml this part of code:</p> <pre><code>&lt;div t-name=&quot;sale_stock.qtyAtDate&quot;&gt; &lt;div t-att-class=&quot;...
<p>For v14 - this is working solution - just put this in your XML file. For v15 use solution @Kenly provided.</p> <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt; &lt;templates id=&quot;template&quot; xml:space=&quot;preserve&quot;&gt; &lt;t t-inherit=&quot;sale_stock.qtyAtDate&quot; t-op...
Odoo - Change color on Forecast Widget
widget|forecast|odoo-14
0
268
2
71,381,241
71,381,241
0
true
2022-03-01T09:25:18.937Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Odoo - Change color on Forecast Widget<p>I'm trying to change color of Forecasted Widget in Sales Order view. I figured it is defined in this location odoo/a...
71,225,030
How to change a list of synsets to list elements?<p>I have tried out the following snippet of code for my project:</p> <pre><code>import pandas as pd import nltk from nltk.corpus import wordnet as wn nltk.download('wordnet') df=[] hypo = wn.synset('science.n.01').hyponyms() hyper = wn.synset('science.n.01').hypernyms(...
<p>To access the name of these items, just do function.name(). You could use line comprehension update these items as follows:</p> <pre><code>df_agri_clean['Items'] = [df_agri_clean['Items'][i].name() for i in range(len(df_agri_clean))] df_agri_clean </code></pre> <p>The output will be as you expected</p> <pre><code> ...
How to change a list of synsets to list elements?
python|dataframe|nltk|wordnet
0
28
1
71,225,495
71,225,495
0
true
2022-02-22T16:38:06.257Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to change a list of synsets to list elements?<p>I have tried out the following snippet of code for my project:</p> <pre><code>import pandas as pd import ...
71,145,587
Web Deploy experienced a connection problem with the server and had to terminate the connection - Azure App Service<p>While trying to deploy a .NET 5 web app to Azure App Service from Visual Studio, I'm hit with this unhelpful error window message:</p> <blockquote> <p>Publish has encountered an error. Build failed. Che...
<p>After a lot of trials and errors with the Publish steps, I finally figured this out.</p> <p>This is what the final step needed to look like:</p> <img src="https://i.stack.imgur.com/4AOH1.png/400" width="700" /> <p>Essentially, checking the 'Run from package file' checkbox fixed the issue for me.</p> <p>Finally, the ...
Web Deploy experienced a connection problem with the server and had to terminate the connection - Azure App Service
azure|azure-web-app-service|.net-5|webdeploy
0
280
1
71,145,588
71,145,588
0
true
2022-02-16T16:26:35.493Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Web Deploy experienced a connection problem with the server and had to terminate the connection - Azure App Service<p>While trying to deploy a .NET 5 web app...
71,232,311
How to get all df data inside apply function of pandas<pre><code>import pandas as pd test_df =pd.DataFrame({&quot;col1&quot;:[1,12,3,4], &quot;col2&quot;:[3,14,5,6], &quot;col3&quot;:[4,5,6,7]}) print(test_df) col1 col2 col3 0 1 3 4 1 12 14 5 2 3 5 6 3 ...
<pre><code>def highlight(row): ret = [ i for i in row.values] # set columns by condition if row['col2'] == 5: ret[row.index.get_loc('col2')] =&quot;AA&quot; if row['col3'] == 5: ...
How to get all df data inside apply function of pandas
python|pandas|data-science
0
42
2
71,245,485
71,245,485
0
true
2022-02-23T06:36:33.747Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to get all df data inside apply function of pandas<pre><code>import pandas as pd test_df =pd.DataFrame({&quot;col1&quot;:[1,12,3,4], &quot;co...
71,422,568
mongodb getting an array inside a nested array<p>I'm still new to mongodb, I have this basic enrollment system data:</p> <pre><code>{ &quot;_id&quot; : ObjectId(&quot;62277d92a561e550d5ec73ca&quot;), &quot;sid&quot; : 1, &quot;sname&quot; : &quot;sad&quot;, &quot;semail&quot; : &quot;dsa&quot;, &quot;scourse&quot; : &q...
<p>Maybe you need something like this:</p> <pre><code>db.collection.aggregate([ { &quot;$match&quot;: { &quot;sid&quot;: 2, &quot;enrolled.subjid&quot;: 1 } }, { &quot;$addFields&quot;: { &quot;enrolled&quot;: { &quot;$filter&quot;: { &quot;input&quot;: &quot;$enrolled&quot;, &quot;as&quot;: &q...
mongodb getting an array inside a nested array
mongodb|multidimensional-array|aggregation
0
21
1
71,423,879
71,423,879
0
true
2022-03-10T10:27:08.940Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: mongodb getting an array inside a nested array<p>I'm still new to mongodb, I have this basic enrollment system data:</p> <pre><code>{ &quot;_id&quot; : Objec...
71,207,996
Pandas copy and pasting<p>I'm new to Panda and have neen trying to do the following, using all sorts of commands and basically getting nowhere fast. I have a csv file that has 10 columns, the first 4 columns are descriptive columns and the other 6 hold numerical values. What I need to do is create a file that has the 4...
<p>You want to <a href="https://pandas.pydata.org/docs/reference/api/pandas.melt.html#pandas-melt" rel="nofollow noreferrer"><code>pandas.melt</code></a> your dataframe:</p> <pre><code>&gt;&gt; df = pd.melt(df, id_vars=[&quot;Year&quot;, &quot;Type&quot;, &quot;Account&quot;, &quot;Group&quot;], value_vars=[&quot;gross...
Pandas copy and pasting
pandas|dataframe
0
18
1
71,208,056
71,208,056
0
true
2022-02-21T14:28:01.080Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Pandas copy and pasting<p>I'm new to Panda and have neen trying to do the following, using all sorts of commands and basically getting nowhere fast. I have a...
71,424,438
how to update record and same record create in other table in django form<p>i have 2 model one is Tempdriver and other one is Hiring, i am register new customer in Tempdriver table, i need when i edit tempdriver record and status is (accept) and when i save this record then need to same record create on hiring table w...
<p>First, let me to ask, why you use <code>BaseModel</code> instead of `models.Model' ?(just for my information, i just wanted to ask in a comment, but i'm not permmited)</p> <p>If i understand your question correctly, your function <code>edit_temp_driver</code> would be something like this:</p> <pre><code>def create_h...
how to update record and same record create in other table in django form
python|django|django-forms
0
22
1
71,424,661
71,424,661
0
true
2022-03-10T12:51:05.173Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to update record and same record create in other table in django form<p>i have 2 model one is Tempdriver and other one is Hiring, i am register new cust...
71,361,214
git add different group of files?<p>In my situation, I have a webapp (django) project that has a bunch of staged files I'd not like to discard or commit, but at the same time, I have a file (a sqlite file) that I want to add and commit. At this moment since I have no idea how to do this, I'm taking a way to manually co...
<p>Specify the file that you want to commit:</p> <pre class="lang-sh prettyprint-override"><code>git commit -m 'commit the file' -- /path/to/file </code></pre> <p>This will commit the specified file but other staged files will not be committed.</p>
git add different group of files?
git
0
39
2
71,361,270
71,361,270
0
true
2022-03-05T10:01:56.153Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: git add different group of files?<p>In my situation, I have a webapp (django) project that has a bunch of staged files I'd not like to discard or commit, but...
71,115,425
Why getting eror (Cannot read properties of undefined (reading 'map'))<p>I'm importing a datalist (array of objects) from a file. I think i am right to import it into the App.js file and then working with props. I would like to map through it in my Card.js components which will then be imported to the Overviewpage.js f...
<p>Several things are wrong. You forgot to pass the details props in your Overview component. It should be</p> <pre><code>import React from 'react'; import Card from &quot;../components/Card&quot;; function Overview({details}) { return ( &lt;div&gt; &lt;Card details={details} /&gt; &lt...
Why getting eror (Cannot read properties of undefined (reading 'map'))
reactjs
0
40
1
71,115,627
71,115,627
0
true
2022-02-14T16:54:19.027Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why getting eror (Cannot read properties of undefined (reading 'map'))<p>I'm importing a datalist (array of objects) from a file. I think i am right to impor...
71,204,296
i didn't recieve confirmation email in my gmail account But in the server i can see confirmation link<p>Here is the log of my server. I didn't receive any confirmation message in my gmail but in the server i found confirmation link</p> <pre><code> Started POST &quot;/users/sign_in&quot; for ::1 at 2022-02-21 14:49:0...
<p>I dont see that actual email has been sent from your application. Did you setup devise confirmable model correctly? Also make sure that your mailer configuried properly. In order to recieve confirmation emails you need to set up :confirmable model to your user model. Here is the instructions on how to set up :confir...
i didn't recieve confirmation email in my gmail account But in the server i can see confirmation link
ruby|ruby-on-rails-5|devise-confirmable
0
36
1
71,211,485
71,211,485
0
true
2022-02-21T09:59:14.193Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: i didn't recieve confirmation email in my gmail account But in the server i can see confirmation link<p>Here is the log of my server. I didn't receive any co...
71,194,132
Multiple sliders with JQuery with arrays<p>I am trying to build a slider that changes images depending on the region one clicks on a map. I want to use arrays to store images in the js file, not to list them in the HTML. However, the console reports &quot;imageArray[imageIndex]:1 GET http://localhost:8000/imageArray[i...
<p>Since, the paths of your images are stored in the array <code>imageArray</code>, you should just assign it directly to the <code>attr()</code>. Don't enclose it with quote or doublequotes.</p> <p>Besides that, JavaScript array length should be <code>array.length</code>, but it was typo in your code that you wrote it...
Multiple sliders with JQuery with arrays
javascript|jquery|arrays|slider
0
35
1
71,194,272
71,194,272
0
true
2022-02-20T11:50:57.040Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Multiple sliders with JQuery with arrays<p>I am trying to build a slider that changes images depending on the region one clicks on a map. I want to use array...
71,325,646
JTextPane is not adding a new line when reading text from HTML file<p>I am attempting to read text from an HTML file based on the id of the element and display it in a JTextPane. However, when I read in the text and display it, it is not going to a new line. Here is an example of the HTML being read in:</p> <pre><code>...
<p>I figured out what to do to solve the problem. Instead of putting the text in a &lt;p&gt; tag, I put it in a &lt;div&gt; tag in the HTML document and set the display to block and it is working like I want it to. I also appended a &lt;br&gt; tag to the end of the text to be added to the JEditorPane.</p> <p>For exampl...
JTextPane is not adding a new line when reading text from HTML file
java|html|jtextpane
0
33
2
71,327,271
71,327,271
0
true
2022-03-02T15:58:38.997Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: JTextPane is not adding a new line when reading text from HTML file<p>I am attempting to read text from an HTML file based on the id of the element and displ...
71,393,514
What is the proper http response code for bad parameters<p>new user here.</p> <p>I have a REST service which cannot work unless the parameters in the request are valid. I've looked over the list of possible HTTP response codes, and none of them seems quite right. 500 doesn't seem right, because it's actually an expecte...
<blockquote> <p>Is there a convention which HTTP response code to send to signify that the request is not valid for reasons of its content?</p> </blockquote> <p><a href="https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-semantics#section-15.5.21" rel="nofollow noreferrer">422 Unprocessable Content</a></p> <pre><...
What is the proper http response code for bad parameters
rest|http|response|http-response-codes
0
43
1
71,394,038
71,394,038
0
true
2022-03-08T10:33:02.357Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What is the proper http response code for bad parameters<p>new user here.</p> <p>I have a REST service which cannot work unless the parameters in the request...
71,357,502
Check day of week with php<p>I am trying to program a script that submits a form only on specific days of the week.</p> <p>I have this code already.</p> <pre><code>date('w'); // gets day of week as number(0=sunday,1=monday...,6=sat) // *note*: returns 0 through 6 but as string so to check if monday do this: if(dat...
<p>I think you have the best approach for this task. In case you want the name of the day, you can use the same fuction but a different param:</p> <pre><code>$day_name = date('l'); //$day_name = Monday. If lowercase is required, use strtolower(). </code></pre>
Check day of week with php
php
0
29
1
71,357,581
71,357,581
0
true
2022-03-04T21:42:02.973Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Check day of week with php<p>I am trying to program a script that submits a form only on specific days of the week.</p> <p>I have this code already.</p> <pre...
71,113,734
Provider at root dependent on firebase fetches value before Firebase.initializeApp() completes<p>So, I'm building an app with MultiProviders that are on the root of the application above MaterialApp() (So that the value is available in all of the sub-widgets and subsequent pages that I navigate to also).</p> <p>For my ...
<p>I typically call <code>initializeApp</code> in my main method:</p> <pre><code>void main() async { WidgetsFlutterBinding.ensureInitialized(); await Firebase.initializeApp(); runApp(const MyApp()); } </code></pre> <p>While the <code>initializeApp</code> call is asynchronous, it is really just a call to the under...
Provider at root dependent on firebase fetches value before Firebase.initializeApp() completes
firebase|flutter|dart|flutter-dependencies|flutter-provider
0
34
1
71,113,926
71,113,926
0
true
2022-02-14T14:48:05.320Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Provider at root dependent on firebase fetches value before Firebase.initializeApp() completes<p>So, I'm building an app with MultiProviders that are on the ...