question_id
int64
37.6M
73.2M
input_text
stringlengths
88
52.4k
output_text
stringlengths
37
35.6k
title
stringlengths
15
150
tags
stringlengths
1
107
q_score
int64
-19
397
view_count
int64
3
879k
answer_count
int64
1
21
accepted_answer_id
int64
37.6M
73.8M
answer_id
int64
37.6M
73.8M
a_score
int64
-5
1.29k
is_accepted
bool
1 class
creation_date
stringlengths
20
24
input_text_instruct
stringlengths
251
52.6k
72,146,725
What does duration [] mean when used in Prometheus UI Graph<p>In Prometheus when the below query would mean fetching all samples observed during 5m period and then perform the rate calculation with those samples and the the duration.</p> <pre><code>rate(prometheus_http_request_duration_seconds_sum{handler=&quot;/-/relo...
<p>In the &quot;Graph&quot; tab, Prometheus calculates the 5m rate in a moving window during the 1h interval. It starts calculating the rate for the first 5m (between 1h ago and 1h-5m ago), then it continues calculating the rate moving this 5m window for each timestamp, until the end (between 5m ago and now). It plots ...
What does duration [] mean when used in Prometheus UI Graph
prometheus|promql|thanos
0
149
1
72,147,656
72,147,656
1
true
2022-05-06T19:52:22.343Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What does duration [] mean when used in Prometheus UI Graph<p>In Prometheus when the below query would mean fetching all samples observed during 5m period an...
72,147,650
Mock 'S3' feature of 'aws-sdk' (nodeJS and Jest)<p>I need to test a file in charge of retrieving data from S3 through the 'aws-sdk' (nodeJs + Jest). The file is:</p> <pre><code>const AWS = require('aws-sdk'); let S3 = null; const getS3 = async () =&gt; { if (S3 === null) { const config = { endpoint: new A...
<p>You need to add a <code>then</code> mock in your <code>mockS3Instance</code> object</p>
Mock 'S3' feature of 'aws-sdk' (nodeJS and Jest)
node.js|jestjs|aws-sdk
0
411
2
72,147,664
72,147,664
1
true
2022-05-06T21:43:15.930Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Mock 'S3' feature of 'aws-sdk' (nodeJS and Jest)<p>I need to test a file in charge of retrieving data from S3 through the 'aws-sdk' (nodeJs + Jest). The file...
72,147,674
Return sub list of elements based on matching sub strings from another list<p>I want to filter a list of string based on another list of sub strings.</p> <pre><code>main_list=['London','England','Japan','China','Netherland'] sub_list=['don','land'] </code></pre> <p>I want my result to be:-</p> <pre><code>['London','Eng...
<p>IIUC, one option is to use <code>any</code> in a list comprehension to check if a sub-string in <code>sub_list</code> exists in a string in <code>main_list</code> to filter the relevant strings:</p> <pre class="lang-py prettyprint-override"><code>out = [place for place in main_list if any(w in place for w in sub_lis...
Return sub list of elements based on matching sub strings from another list
python|list
0
23
1
72,147,705
72,147,705
1
true
2022-05-06T21:47:02.690Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Return sub list of elements based on matching sub strings from another list<p>I want to filter a list of string based on another list of sub strings.</p> <pr...
72,146,154
continuous center of user with Mapkit<p>Good afternoon,</p> <p>I am having trouble displaying a map where it only centers around the user and will stay on the user with movement. My error is in my view file where I mark //HERE.</p> <p>My error is Type '()' cannot conform to 'View'</p> <ol> <li><p>Why is it that this li...
<p>There were a couple of issues with your code. First, to answer the question asked, you should refrain from putting variables that are NOT views directly into the <code>var body</code>. While there are ways of getting around this restriction, there is not good reason to any longer. Since <code>region</code> is not a ...
continuous center of user with Mapkit
swift|swiftui
0
50
1
72,147,751
72,147,751
1
true
2022-05-06T18:51:02.903Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: continuous center of user with Mapkit<p>Good afternoon,</p> <p>I am having trouble displaying a map where it only centers around the user and will stay on th...
72,147,157
Annotate ggplot2 across multiple facets<p>I have recently started using the facet_nested function from the ggh4x package and I really like the look of the nested axis. I would like to annotate the plot to show stats that I have run. I have created a dummy dataset to illustrate my problem.</p> <pre><code>library(tidyver...
<p>One option is to use <code>cowplot</code> after making the <code>ggplot</code> object, where we can add the lines and text.</p> <pre><code>library(ggplot2) library(cowplot) results &lt;- df %&gt;% ggplot(aes(x=sample_id, y = mean_copy_no, fill = treatment)) + geom_col(colour = &quot;black&quot;) + facet_neste...
Annotate ggplot2 across multiple facets
r|ggplot2|tidyverse|facet
0
54
1
72,147,757
72,147,757
1
true
2022-05-06T20:42:29.263Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Annotate ggplot2 across multiple facets<p>I have recently started using the facet_nested function from the ggh4x package and I really like the look of the ne...
72,147,692
Center a div to the right of an image inside a header<p>I want a header with an image attached to the left and a div with some text inside, to the right of this image. The div must contain horizontally and vertically centered text.</p> <p>Something like that: <a href="https://i.stack.imgur.com/agQRp.png" rel="nofollow ...
<p>The path of least resistance for this particular case is probably just to use flex to keep the element count down. See below.</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-css lang-css prettyprint-override"><co...
Center a div to the right of an image inside a header
html|css
0
47
2
72,147,762
72,147,762
1
true
2022-05-06T21:49:03.653Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Center a div to the right of an image inside a header<p>I want a header with an image attached to the left and a div with some text inside, to the right of t...
72,147,686
Outputing single strings in python<p>I'm in need of some assistance in this code problem from a MOOC on python programming that I'm taking. This is just for self-learning, and not for any graded coursework. Could you please provide some guidance. I am stuck. Thanks in advance for your help.</p> <p>The problem statement...
<p>While dictionaries may seem like they should be ordered, it's best not to think about them that way. It's a mapping from one thing to another.</p> <p>You already have a way to get a list of the names in the dict:</p> <pre class="lang-py prettyprint-override"><code>keys_as_list = list(dictionary.keys()) </code></pre>...
Outputing single strings in python
python|python-3.x
0
163
1
72,147,815
72,147,815
1
true
2022-05-06T21:48:09.617Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Outputing single strings in python<p>I'm in need of some assistance in this code problem from a MOOC on python programming that I'm taking. This is just for ...
72,147,714
convert month of dates into sequence<p>i want to combine months from years into sequence, for example, i have dataframe like this:</p> <pre><code>stuff_id date 1 2015-02-03 2 2015-03-03 3 2015-05-19 4 2015-10-13 5 2016-01-07 6 2016-03-20 </code></pre> <p>i ...
<p>If your <code>date</code> column is a datetime (if it's not, cast it to one), you can use the <code>.dt.month</code> and <code>.dt.year</code> properties for this!</p> <p><a href="https://pandas.pydata.org/docs/reference/api/pandas.Series.dt.month.html" rel="nofollow noreferrer">https://pandas.pydata.org/docs/refere...
convert month of dates into sequence
python|dataframe|date|datetime|sequence
0
79
1
72,147,878
72,147,878
1
true
2022-05-06T21:51:50.833Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: convert month of dates into sequence<p>i want to combine months from years into sequence, for example, i have dataframe like this:</p> <pre><code>stuff_id ...
72,147,713
In java spring, how to best "change secret in production"?<p>I am currently creating a Java Spring application that works with the spring security JWT. Everywhere I look and read about the &quot;secret string&quot;, it says should be <em>changed in production</em>. Like this line in my <strong>application.properties</s...
<p>Secrets should not be added in your regular <code>application.properties</code> file because that would be checked into your version control system. There are various ways to <a href="https://docs.spring.io/spring-boot/docs/current/reference/html/features.html#features.external-config" rel="nofollow noreferrer">exte...
In java spring, how to best "change secret in production"?
java|spring|spring-security|jwt|application.properties
0
195
3
72,147,894
72,147,894
1
true
2022-05-06T21:51:46.480Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: In java spring, how to best "change secret in production"?<p>I am currently creating a Java Spring application that works with the spring security JWT. Every...
72,147,545
Dplyr Lags on Summarised Grouped Data<p>Using dplyr, I'm looking to summarise a new column of data as a lagged version of an existing column of <em>grouped</em> data.</p> <p>Reprex:</p> <pre><code> dateidx &lt;- as.Date(c(&quot;2019-01-02&quot;, &quot;2019-01-032&quot;, &quot;2019-01-02&quot;, &quot;2019-01-07&quot;...
<p>You want to first <code>summarise</code> to get the sum and the mean, then you can use a <code>mutate</code> statement to get the lag of each column, then rearrange the columns.</p> <pre><code>library(tidyverse) test.df2 &lt;- test.df1 %&gt;% group_by(dateidx) %&gt;% summarise(sumA = sum(A), meanB =...
Dplyr Lags on Summarised Grouped Data
r|dplyr
0
59
1
72,147,896
72,147,896
1
true
2022-05-06T21:28:19.827Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Dplyr Lags on Summarised Grouped Data<p>Using dplyr, I'm looking to summarise a new column of data as a lagged version of an existing column of <em>grouped</...
72,145,361
Object is not subscriptable python error django<p>I have this function where i am using models 'Start' and 'End' that contain fields latitude and longitude.. and I am trying to match them with a field called elements that I am using subscript to extract the start_id and end_id and match them with 'Start' and 'End'</p> ...
<p>Keep in mind that in your for loop the variables <code>d['start']</code> and <code>d['end']</code> each contain an instance of the <code>Start</code> model. To manipulate the fields of an instance you should use the dot <code>.</code> (you should use subscript when dealing with subscriptable objects - see <a href="h...
Object is not subscriptable python error django
python|django|geojson
0
1,850
1
72,147,919
72,147,919
1
true
2022-05-06T17:29:02.477Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Object is not subscriptable python error django<p>I have this function where i am using models 'Start' and 'End' that contain fields latitude and longitude.....
72,147,519
Retrieval of highest value of a column and their dates<p>I have done code in MySQL to get the highest deaths value country-wise with their reporting date in MySQL. I am being able to get the highest deaths value but the dates values are returning wrong. Here is my MySQL code:</p> <pre><code> SELECT d.country_na...
<p>Your queries are ok and return correct values:</p> <p><a href="https://i.stack.imgur.com/HuVZZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HuVZZ.png" alt="enter image description here" /></a></p> <p>Try to drop and recreate your data.</p>
Retrieval of highest value of a column and their dates
mysql
0
48
1
72,147,923
72,147,923
1
true
2022-05-06T21:24:47.130Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Retrieval of highest value of a column and their dates<p>I have done code in MySQL to get the highest deaths value country-wise with their reporting date in ...
72,144,316
Repo still uses 8 GB of quota after force push to initial commit (empty repo)<ul> <li>My gitlab repo was ~8GO</li> <li>To rewrite it completely with size optimisation the idea was to reset the remote to the first commit and force push (<code>git checkout &lt;initial hash&gt;; git push -f</code>)</li> <li>Then rewrite t...
<p>GitLab holds onto refs in hidden areas that are not advertised. Therefore, even force-pushing to advertised refs will not shrink the repository size. In order to actually reduce repository storage used, you'll need to follow the procedure for <a href="https://docs.gitlab.com/ee/user/project/repository/reducing_the_r...
Repo still uses 8 GB of quota after force push to initial commit (empty repo)
git|gitlab|git-gc
0
38
1
72,147,928
72,147,928
1
true
2022-05-06T15:54:30.117Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Repo still uses 8 GB of quota after force push to initial commit (empty repo)<ul> <li>My gitlab repo was ~8GO</li> <li>To rewrite it completely with size opt...
72,147,767
Graphql - how to omit tables from the auto-generated graphiql<p>Im working on postgraphile server. the stack is: nodejs, expressjs, postgraphile and knex.</p> <p>My auto-generated graphiql exposes queries to tables it doesn't need to - <code>knex_migrations</code>.</p> <p>following this doc: <a href="https://medium.com...
<p>If you want to completely omit the table completely from your graphql schema using a smart comment, you simply need to use the <code>@omit</code> tag without any following actions. Using <code>@omit create,update,delete</code> only removes the autogenerated mutations -but does not remove read operations (usage in qu...
Graphql - how to omit tables from the auto-generated graphiql
postgresql|graphql|postgraphile
0
27
1
72,148,009
72,148,009
1
true
2022-05-06T21:58:18.173Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Graphql - how to omit tables from the auto-generated graphiql<p>Im working on postgraphile server. the stack is: nodejs, expressjs, postgraphile and knex.</p...
72,147,711
Laravel docker-compose 404 not found Nginx<p>I'm facing a strange behavior when trying to run my Laravel app using docker-compose. After starting the containers, if I try to visit my website URL I get the following error:</p> <blockquote> <p>404 Not Found from Nginx.</p> </blockquote> <p>Here is the <code>docker-compos...
<p>In your nginx you set <code>root</code> with <code>root /var/www/public;</code>.<br /> In your <code>docker-compose.yml</code> you mount your source to <code>/var/www/html</code>.<br /> Make sure they are the same.</p>
Laravel docker-compose 404 not found Nginx
php|laravel|docker|nginx
0
736
1
72,148,025
72,148,025
1
true
2022-05-06T21:51:40.323Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Laravel docker-compose 404 not found Nginx<p>I'm facing a strange behavior when trying to run my Laravel app using docker-compose. After starting the contain...
72,147,225
Pytorch model object has no attribute 'predict' BERT<p>I had train a BertClassifier model using pytorch. After creating my best.pt I would like to make in production my model and using it to predict and classifier starting from a sample, so I resume them from the checkpoint. Otherwise after put it in evaluation and fre...
<p>Generally, people wrote the prediction function for you. If not, you need to handle the low level stuff. After this line, you loaded the trained parameters. model, optimizer, start_epoch, valid_loss_min = load_ckp(r&quot;./best_model/best_model.pt&quot;, bert_classifier, optimizer)</p> <p>After that, you need to do ...
Pytorch model object has no attribute 'predict' BERT
python|pytorch|huggingface-transformers|bert-language-model|sentence-transformers
0
476
1
72,148,031
72,148,031
1
true
2022-05-06T20:51:14.927Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Pytorch model object has no attribute 'predict' BERT<p>I had train a BertClassifier model using pytorch. After creating my best.pt I would like to make in pr...
72,147,773
R: Labels not displaying at a ggplot2 graph<p>Given this R script:</p> <pre><code>library(glue) library(ggplot2) ir.data &lt;- read.csv(file=&quot;~/apps/mine/cajueiro_weather_station/sensor_data/temperature_data.csv&quot;, header = F) ir.data$V1 &lt;- as.POSIXct(ir.data$V1, format = &quot;%Y-%m-%dT%H:%M:%S&quot;, tz ...
<p>It's not recognising those values in an <code>aes</code> call to <code>colour</code>. Reshape data to put all <code>y</code> values in a single column, pass a grouping variable to <code>aes(colour = ...)</code> and use <code>scale_colour_manual</code> to set colours instead:</p> <pre class="lang-r prettyprint-overri...
R: Labels not displaying at a ggplot2 graph
r|ggplot2|label
0
29
1
72,148,056
72,148,056
1
true
2022-05-06T21:59:00.437Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: R: Labels not displaying at a ggplot2 graph<p>Given this R script:</p> <pre><code>library(glue) library(ggplot2) ir.data &lt;- read.csv(file=&quot;~/apps/mi...
72,148,232
How to re-run multiple functions in JS on button click?<p>In the snippet below, I'm generating random parts of a URL and that spits out an image from <strong><a href="https://placeimg.com" rel="nofollow noreferrer">placeimg.com</a></strong>. However, I'm trying to re-run the functions that generate the different parts ...
<p>You're calling the two functions, but you aren't doing anything with their return values.</p> <p>Just use the same code you used when setting the image's <code>src</code> property on page load in the <code>click</code> event handler.</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" da...
How to re-run multiple functions in JS on button click?
javascript
0
37
2
72,148,269
72,148,269
1
true
2022-05-06T23:13:29.707Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to re-run multiple functions in JS on button click?<p>In the snippet below, I'm generating random parts of a URL and that spits out an image from <strong...
72,146,807
Wait time in a CSS keyframe<p>On my CSS code, I use keyframes to animate my text. I would like to add a FadeOut to allow a FadeIn of the text, a display of this one during 10s then a FadeOut <div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre cla...
<p>You can make one keyframes for fade in and one for fade out, then set an animation delay on the fade out.</p> <pre><code>animation-name: fade-in, fade-out; animation-duration: 3s; animation-delay: 0ms, 9000ms; </code></pre> <p>If you really want to have it in the same animation you have to calculate it with the perc...
Wait time in a CSS keyframe
css|css-animations|keyframe
0
99
1
72,148,453
72,148,453
1
true
2022-05-06T20:01:55.683Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Wait time in a CSS keyframe<p>On my CSS code, I use keyframes to animate my text. I would like to add a FadeOut to allow a FadeIn of the text, a display of t...
72,148,402
React onclick change variable/state to return different html<p>I am trying to have html be rendered while x =true, and different html while x = false. I am not sure how to do this in react but I thought of two ways, both which do not work. Way one:</p> <pre><code>function App() { var x = true function switchX() {...
<p>You're nearly there.. try not to think too much of state having to be an object like it was in class components... hooks allow you to abstract each variable and control each individual state.</p> <pre class="lang-js prettyprint-override"><code>const myComponent = () =&gt; { const [x, setX] = useState(false); ...
React onclick change variable/state to return different html
reactjs
0
182
3
72,148,505
72,148,505
1
true
2022-05-06T23:51:33.670Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: React onclick change variable/state to return different html<p>I am trying to have html be rendered while x =true, and different html while x = false. I am n...
72,148,502
Specify the padding between rows in a checkboxGroupInput<p>This is my shiny application:</p> <p><strong>ui.R</strong></p> <pre><code># values to show, or not show, these will be the 'choices' and 'selected' values # for the checkboxGroupInput() all_rows &lt;- 1:25 names(all_rows) &lt;- paste(&quot;Row&quot;, all_rows) ...
<p>Just add <code>.checkbox, .radio {margin: 0px}</code> to your <code>tags$style</code>:</p> <pre><code>tags$style( type = 'text/css', &quot;label {font-size: 10px; } .form-group {margin-top: 5px; margin-bottom: 5px;} .nav-tabs {font-family:'arial';font-size:20px} input[type=checkbox] {transform: s...
Specify the padding between rows in a checkboxGroupInput
css|r|shiny|css-multicolumn-layout
0
28
1
72,148,560
72,148,560
1
true
2022-05-07T00:14:33.240Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Specify the padding between rows in a checkboxGroupInput<p>This is my shiny application:</p> <p><strong>ui.R</strong></p> <pre><code># values to show, or not...
72,148,296
I need to verify that a variable exists in a database. Shiny in R<p>I have a query that gives me a dataframe. When I receive the data frame, I use this code to make some numeric variables:</p> <pre><code>variables_numeric&lt;-c(&quot;A&quot;,&quot;B&quot;,&quot;C&quot;,&quot;D&quot;) datos[, variables_numeric] &lt;- la...
<p>Maybe you can first find the variables in <code>datos</code> and then apply your code logic:</p> <pre><code>datos &lt;- data.frame(A = 1, B = 2, C = 3) variables_numeric &lt;- c(&quot;A&quot;,&quot;B&quot;,&quot;C&quot;,&quot;D&quot;) variables_in_df &lt;- variables_numeric[variables_numeric %in% names(datos)] dato...
I need to verify that a variable exists in a database. Shiny in R
r|shiny
0
36
1
72,148,578
72,148,578
1
true
2022-05-06T23:29:41.643Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: I need to verify that a variable exists in a database. Shiny in R<p>I have a query that gives me a dataframe. When I receive the data frame, I use this code ...
72,142,843
How do i load CheckBoxList from a Selected Value from DropDownList?<p>i'm trying to do a display database's item(tables, rows, fk,...).</p> <p>I'm stucking at first few step. I loaded the db's names into a DropDownList. But i tried to load Tables from Selected db's name into CheckBoxList but it shows nothing.</p> <p>He...
<p>Ok, while you could send your 2nd selection (the list of tables) to a check box list? (and if you needing to select multiple tables - perhaps yes).</p> <p>but, lets do one better. Lets use two combo boxes. First one, select database, fill 2nd combo box with tables.</p> <p>Then you select a table, and display the tab...
How do i load CheckBoxList from a Selected Value from DropDownList?
c#|asp.net
0
62
1
72,148,598
72,148,598
1
true
2022-05-06T14:08:50.480Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do i load CheckBoxList from a Selected Value from DropDownList?<p>i'm trying to do a display database's item(tables, rows, fk,...).</p> <p>I'm stucking a...
72,148,312
Update column values based on another dataframe's index<p>I have the following dataframes:</p> <pre><code>NUMS = ['1', '2', '3', '4', '5'] LETTERS = ['a', 'b', 'c'] df1 = pd.DataFrame(index=NUMS, columns=LETTERS) a b c 1 NaN NaN NaN 2 NaN NaN NaN 3 NaN NaN NaN 4 NaN NaN NaN 5 NaN NaN NaN df2 =...
<p>try this:</p> <pre><code>df1.fillna(df2.col2) &gt;&gt;&gt; a b c 1 10 15 14 2 10 15 14 3 10 15 14 4 10 15 14 5 10 15 14 </code></pre>
Update column values based on another dataframe's index
pandas|dataframe|indexing
0
169
2
72,148,660
72,148,660
1
true
2022-05-06T23:32:29.413Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Update column values based on another dataframe's index<p>I have the following dataframes:</p> <pre><code>NUMS = ['1', '2', '3', '4', '5'] LETTERS = ['a', 'b...
72,145,336
WIX Installer: ensure successive Version numbers on build<p>I'm trying to automate my Wix installer builds with my Visual Studio Builds. I am grabbing the application's Application Version via this in my installer.wicproj:</p> <pre class="lang-xml prettyprint-override"><code> &lt;Target Name=&quot;BeforeBuild&quot;&...
<p>I did manage this totally outside of WIX via the Pre-Build Build Event in VS. Just place this batch scripting in your Pre-Build box. Also managed the brownie point of additionally checking for lower version numbers than the last. It also posts Errors and Warnings in VS's Errors panel.</p> <p><a href="https://i.stack...
WIX Installer: ensure successive Version numbers on build
c#|visual-studio|wix|windows-installer
0
52
1
72,148,727
72,148,727
1
true
2022-05-06T17:26:54.767Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: WIX Installer: ensure successive Version numbers on build<p>I'm trying to automate my Wix installer builds with my Visual Studio Builds. I am grabbing the ap...
72,148,333
Knowing when the javascript SDK has made a definite decision as to whether the user is logged in or not upon initial load<p>I'm trying to accomplish something rather simple here but it's turning out to be a bit of a head-scratcher.</p> <p>Obviously we have the handy <a href="https://firebase.google.com/docs/reference/j...
<blockquote> <p>if the user has a stored session (logged in from last time), and returns, initially <code>onAuthStateChanged</code> will return null, and then afterward it's triggered again and returns the user.</p> </blockquote> <p>Even though I also thought that's how <code>onAuthStateChanged</code> worked for a long...
Knowing when the javascript SDK has made a definite decision as to whether the user is logged in or not upon initial load
firebase-authentication
0
17
1
72,148,776
72,148,776
1
true
2022-05-06T23:35:40.747Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Knowing when the javascript SDK has made a definite decision as to whether the user is logged in or not upon initial load<p>I'm trying to accomplish somethin...
72,148,698
How to access an object inside another object in a map in react<p>react.js is complicated sometimes, I'm trying to access an information of a state, I have an array which has one object inside, and in this object, there is another object called price, and in this last object there is one property called price too, and ...
<p>As stated in the comments,</p> <p>The problem is that one or more elements in your array doesn't have the .price.price property which would cause a type error since it doesn't exist.</p> <p>To fix this you could do <code>item?.price?.price</code></p> <p>The optional chaining operator (?.) enables you to read the val...
How to access an object inside another object in a map in react
reactjs|dictionary|object
0
539
2
72,148,788
72,148,788
1
true
2022-05-07T01:04:19.380Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to access an object inside another object in a map in react<p>react.js is complicated sometimes, I'm trying to access an information of a state, I have a...
72,147,684
Extract nested values from data frame using python<p>I've extracted the data from API response and created a dictionary function:</p> <pre><code>def data_from_api(a): dictionary = dict( data = a['number'] ,created_by = a['opened_by'] ,assigned_to = a['assigned'] ,closed_by = a['closed'] ) r...
<p>You can use <code>.str</code> and <code>get()</code> like below. If the key isn't there, it'll write None.</p> <pre><code>df = pd.DataFrame({'data':[1234, 5678, 5656], 'created_by':[{'display_value':'John Snow', 'link':'a.com'}, {'display_value':'John Dow'}, {'my_value':'Jane Doe'}]}) df['author'] = df['created_by']...
Extract nested values from data frame using python
python|pandas|api|nested-fields
0
131
1
72,148,856
72,148,856
1
true
2022-05-06T21:48:04.960Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Extract nested values from data frame using python<p>I've extracted the data from API response and created a dictionary function:</p> <pre><code>def data_fr...
72,148,705
Android UI tests with Hillt and NavComponent - NavController not set error<p>I've been trying to write some UI tests for Android app. I followed official docs, youtube tutorials and stackoverflow answers and I keep getting the same error.</p> <pre><code>Caused by: java.lang.IllegalStateException: View androidx.constrai...
<p>When you do:</p> <pre><code>HomeFragment().also { fragment -&gt; </code></pre> <p>You're creating a brand new fragment then immediately throwing it away - it is never added to the FragmentManager.</p> <p>Instead, you need to use the Fragment that <code>launchFragmentInHiltContainer</code> has already created for you...
Android UI tests with Hillt and NavComponent - NavController not set error
android|android-espresso|dagger-hilt|ui-testing|android-jetpack-navigation
0
177
2
72,148,908
72,148,908
1
true
2022-05-07T01:06:22.437Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Android UI tests with Hillt and NavComponent - NavController not set error<p>I've been trying to write some UI tests for Android app. I followed official doc...
72,148,777
Can you add apps made from (js, nodejs, express and mongodb) in a wordpress website?<p>I already have a wordpress website. I studied web development using js, node.js, express and mongodb and build some projects. I would like to add it to my website. Is this possible or I just need to create a website without wordpress...
<p><strong>WordPress</strong> has its own <strong>rest API</strong> you can use WordPress API and a <strong>frontend framework</strong> like <strong>Vuejs</strong> or <strong>React</strong> to interact with WordPress, actually, WordPress is your backend, and the frontend framework is your frontend look at the example b...
Can you add apps made from (js, nodejs, express and mongodb) in a wordpress website?
javascript|node.js|wordpress|mongodb|express
0
77
2
72,148,952
72,148,952
1
true
2022-05-07T01:25:10.167Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can you add apps made from (js, nodejs, express and mongodb) in a wordpress website?<p>I already have a wordpress website. I studied web development using js...
72,148,921
Why println is being executed in this recursive piece of code?<p>In this code arrLength starts with four and then keeps being decremented until it reaches zero. At the moment it reaches zero it should not execute what is inside the if block anymore. But what is happening is that when it reaches zero it still executes t...
<p>An easy way to understand what is happening is to modify your printElements method like this:</p> <pre><code>public void printElements(int arr[], int arrLength){ System.out.println(&quot;arrLength value is &quot; + arrLength); if(arrLength != 0){ arrLength--; printElements(arr, arrLength); ...
Why println is being executed in this recursive piece of code?
java|arrays|recursion
0
34
1
72,148,980
72,148,980
1
true
2022-05-07T02:04:21.417Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why println is being executed in this recursive piece of code?<p>In this code arrLength starts with four and then keeps being decremented until it reaches ze...
72,148,894
I am getting an error 404 using nodeJS and express<p>I'm having an issue with the routes in my project called review. My other routes have no issue so I'm not sure where I went wrong here. I keep getting error 404 in my frontend and in postman. I believe everything is linking to the right information. I go the route</p...
<p>Everything looks ok. Your api/review/addReview route method is POST, so please check you are making post request from Postman .</p>
I am getting an error 404 using nodeJS and express
node.js|express|mern
0
46
1
72,149,021
72,149,021
1
true
2022-05-07T01:56:06.637Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: I am getting an error 404 using nodeJS and express<p>I'm having an issue with the routes in my project called review. My other routes have no issue so I'm no...
72,145,366
checking array of objects<p>I wanted to check if each length of array of objects of <code>inspectionScheduleUnitContactArtifactDto</code> , if there is one <code>inspectionScheduleUnitContactArtifactDto</code> which length is equal to 0 return true , if each length of <code>inspectionScheduleUnitContactArtifactDto</cod...
<p>I believe your question can be simplified to the following: If at least one object's <code>inspectionScheduleUnitContactArtifactDto</code> array is empty -&gt; return true else return false. The simplest way to do this is with <code>some</code> which will return <code>true</code> as soon as this condition is met rat...
checking array of objects
javascript|angular|angularjs|typescript
0
75
3
72,149,045
72,149,045
1
true
2022-05-06T17:29:27.670Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: checking array of objects<p>I wanted to check if each length of array of objects of <code>inspectionScheduleUnitContactArtifactDto</code> , if there is one <...
72,143,430
Elisp, calling with progn yields different result than calling individually<p>In Emacs (with <code>C-:</code>), those 2 calls yield different results :</p> <pre><code>(progn (run-python (python-shell-parse-command) nil nil) (python-shell-send-buffer)) </code></pre> <p>and</p> <pre><code>(run-python (python-shell-parse-...
<p>As suggested by @Lindydancer, <code>run-python</code> selects the comint buffer, so <code>python-shell-send-buffer</code> will be called with <em>that</em> as the current buffer, which probably isn't what you intended.</p> <p>See also <kbd>C-h</kbd><kbd>f</kbd> <code>save-current-buffer</code></p> <p>Also note that ...
Elisp, calling with progn yields different result than calling individually
elisp
0
37
1
72,149,197
72,149,197
1
true
2022-05-06T14:49:52.167Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Elisp, calling with progn yields different result than calling individually<p>In Emacs (with <code>C-:</code>), those 2 calls yield different results :</p> <...
72,148,923
how to parse numpy array by line<p>Use cv2 to process PNG image, I want some areas to be transparent. change point [0, 0, 0, 255] to [0, 0, 0, 0].</p> <p>for example,</p> <pre class="lang-py prettyprint-override"><code># a is ndarray(880, 1330, 4) a = [[[100, 90, 80, 255], [80, 10, 10, 255],], ..., [...
<p>You need to create a mask.</p> <p>Here is a simple example:</p> <pre class="lang-py prettyprint-override"><code>import numpy as np # Create some data a = (np.random.rand(10, 10, 4)*255).astype(int) a[ :5, :5, :] = 0 a[:, :, 3] = 255 b = a.copy() </code></pre> <p>Now create a mask:</p> <pre class="lang-py prettypr...
how to parse numpy array by line
python|numpy
0
37
1
72,149,286
72,149,286
1
true
2022-05-07T02:04:51.110Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to parse numpy array by line<p>Use cv2 to process PNG image, I want some areas to be transparent. change point [0, 0, 0, 255] to [0, 0, 0, 0].</p> <p>for...
72,141,544
How to add Bearer {JWT} in swagger django?<p>when I authorize myself in Swagger UI, I have to write &quot;Bearer {then I write JWT} here&quot;</p> <p>How can I add the string &quot;Bearer&quot; automatically before the JWT token in swagger UI? Here is my Swagger Settings:</p> <pre><code>SWAGGER_SETTINGS = { &quot;S...
<p>I recommend you to migrate from <code>drf-yasg</code> to <a href="https://drf-spectacular.readthedocs.io/en/latest/readme.html" rel="nofollow noreferrer"><code>drf_spectacular</code></a>, it already includes JWT authentication automatically and without so many complications, it even uses <a href="https://spec.openap...
How to add Bearer {JWT} in swagger django?
django|swagger
0
325
1
72,149,357
72,149,357
1
true
2022-05-06T12:33:13.467Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to add Bearer {JWT} in swagger django?<p>when I authorize myself in Swagger UI, I have to write &quot;Bearer {then I write JWT} here&quot;</p> <p>How can...
72,149,320
Problems counting rows and columns with no spaces in a matrix<p>I'm trying to find the number of rows and columns in a matrix file. The matrix doesn't have spaces between the characters but does have separate lines. The sample down below should return 3 rows and 5 columns but that's not happening.</p> <p>Also when I pr...
<p>IIUC:</p> <pre><code>with open(sys.argv[1]) as f: m = np.array([[char for char in line.strip()] for line in f]) </code></pre> <pre><code>&gt;&gt;&gt; m array([['a', 'a', 'a', 'a', 'a'], ['b', 'b', 'b', 'b', 'b'], ['c', 'c', 'c', 'c', 'c']], dtype='&lt;U1') &gt;&gt;&gt; m.shape (3, 5) </code></pre>
Problems counting rows and columns with no spaces in a matrix
python
0
19
1
72,149,361
72,149,361
1
true
2022-05-07T03:41:17.583Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Problems counting rows and columns with no spaces in a matrix<p>I'm trying to find the number of rows and columns in a matrix file. The matrix doesn't have s...
72,149,457
Join to another table only matching specific records<p>I have a table of ports:</p> <pre><code>drop table if exists ports; create table ports(id int, name char(20)); insert into ports (id, name ) values (1, 'Port hedland'), (2, 'Kwinana'); </code></pre> <p>And a table of tariffs connected to those ports:</p> <pre...
<p>You can select the lowest expiry, do your join and only take the rows having this minimum expiry:</p> <pre><code>SELECT p.id, p.name, t.id, t.portId, t.price, t.expiry FROM ports p LEFT JOIN tariffs t ON p.id = t.portId WHERE expiry = (SELECT MIN(expiry) FROM tariffs WHERE 1648594700 &lt; expiry) ORDER BY p.id; </c...
Join to another table only matching specific records
mysql|join
0
22
2
72,149,571
72,149,571
1
true
2022-05-07T04:18:24.480Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Join to another table only matching specific records<p>I have a table of ports:</p> <pre><code>drop table if exists ports; create table ports(id int, name ch...
72,149,564
PyQT5 doesn't work on docker ImportError: libsmime3.so: cannot open shared object file: No such file or directory<p>I have a Dockerfile with PyQT installed like below</p> <pre><code>FROM ubuntu:20.04 ENV DEBIAN_FRONTEND=noninteractive RUN adduser --quiet --disabled-password qtuser &amp;&amp; usermod -a -G audio qtuser ...
<p>You have to install libnss3 in the Docker image.</p> <p>Adding <code>apt-get install libnss3</code> to your installation commands in the <code>Dockerfile</code> should do the trick.</p>
PyQT5 doesn't work on docker ImportError: libsmime3.so: cannot open shared object file: No such file or directory
python|docker|pyqt|pyqt5|qwebengineview
0
376
1
72,149,602
72,149,602
1
true
2022-05-07T04:45:07.090Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: PyQT5 doesn't work on docker ImportError: libsmime3.so: cannot open shared object file: No such file or directory<p>I have a Dockerfile with PyQT installed l...
72,148,447
Uncaught Error Error: Cannot find module 'express'<p>im trying to make a discord bot using discord.js it works but whenever i try hosting it i get (Uncaught Error Error: Cannot find module 'express') my friend told me it should work <a href="https://i.stack.imgur.com/CouiG.png" rel="nofollow noreferrer">image</a></p>
<p>Go your command line and type <code>npm install express</code>. This is how you install required modules.</p>
Uncaught Error Error: Cannot find module 'express'
node.js|discord.js
0
100
1
72,149,695
72,149,695
1
true
2022-05-07T00:00:05.447Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Uncaught Error Error: Cannot find module 'express'<p>im trying to make a discord bot using discord.js it works but whenever i try hosting it i get (Uncaught ...
72,147,935
How to export image links in different columns in WooCommerce?<p>I want to export the image links of my products in different columns. For example like IMG1 IMG2 IMG3.</p> <p>So i wrote this code below <em><strong>(Not Worked)</strong></em>:</p> <pre><code>foreach( $articles as $key =&gt; $article ) { if ( arra...
<p>Pass the <code>$product</code> to the function and it will return the images of the product as an array.</p> <pre><code>function get_images( $product ) { $images = $attachment_ids = array(); $product_image = $product-&gt;get_image_id(); // Add featured image. if ( ! empty( $pr...
How to export image links in different columns in WooCommerce?
php|woocommerce|wpallimport
0
33
1
72,149,776
72,149,776
1
true
2022-05-06T22:23:22.470Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to export image links in different columns in WooCommerce?<p>I want to export the image links of my products in different columns. For example like IMG1 ...
72,148,592
How can I use Continue in a choose statement in xslt<p>I want to continue to check for other if statements if the first one is met. From what I read, Choose statement does not have this functionality like other languages do. <a href="https://stackoverflow.com/questions/10194564/xslchoose-check-all-xslwhen-conditions">O...
<p>If I understand your <a href="https://xyproblem.info/" rel="nofollow noreferrer">real problem</a> correctly, you want to do simply:</p> <p><strong>XSLT 2.0</strong></p> <pre><code>&lt;xsl:stylesheet version=&quot;2.0&quot; xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot;&gt; &lt;xsl:output method='text' e...
How can I use Continue in a choose statement in xslt
xml|xslt
0
49
2
72,149,789
72,149,789
1
true
2022-05-07T00:35:56.583Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I use Continue in a choose statement in xslt<p>I want to continue to check for other if statements if the first one is met. From what I read, Choose ...
72,149,745
IndexError: list index out of range with api<pre><code>all_currencies = currency_api('latest', 'currencies') # {'eur': 'Euro', 'usd': 'United States dollar', ...} all_currencies.pop('brl') qtd_moedas = len(all_currencies) texto = f'{qtd_moedas} Moedas encontradas\n\n' moedas_importantes = ['usd', 'eur', 'gbp', 'chf', ...
<p>You have a nested loop. The while loop is entered and then execution immediately starts in the for loop. Execution remains in the for loop for all elements in <code>all_currencies.items()</code>. Each time <code>codigo</code> is found at the beginning of <code>moedas_importantes</code>, that element is removed. Even...
IndexError: list index out of range with api
python|python-3.x|python-2.7
0
27
1
72,149,940
72,149,940
1
true
2022-05-07T05:31:25.193Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: IndexError: list index out of range with api<pre><code>all_currencies = currency_api('latest', 'currencies') # {'eur': 'Euro', 'usd': 'United States dollar'...
72,148,577
How can i create this type of html layout<p>I want to create something like this in a layout where the icon line themselves up with html, how can i get this done?</p> <p><a href="https://i.stack.imgur.com/Z9OJX.png" rel="nofollow noreferrer">Layout i would like to create</a></p> <p>I Tried the following without flexbox...
<p>To achieve your design this is what you can do as shown below.</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-css lang-css prettyprint-override"><code>* { margin: 0; padding: 0; box-sizing: border-box; } ...
How can i create this type of html layout
html|layout|alignment
0
50
3
72,150,013
72,150,013
1
true
2022-05-07T00:31:13.653Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can i create this type of html layout<p>I want to create something like this in a layout where the icon line themselves up with html, how can i get this ...
72,146,757
how does singleton bean handle dynamic index<p>I am working spring data elastic search. Based on different header in the request, I create @RequestScope object IndexConfig to hold different set of indexes. It seems to be working. But I don't understand how singleton bean DocumentA/DocumentB can handle dynamic index? Do...
<p>What makes you think that <code>DocumentA</code> or <code>Document</code>B` are singletons? Thes e are the entities that you store and retrieve.</p> <p>You create an instance of <code>DocumentA</code> and store it by either using methods of <code>ElasticsearchOperations</code> or using a respository function. And wh...
how does singleton bean handle dynamic index
spring|spring-data-elasticsearch|spring-bean
0
47
1
72,150,069
72,150,069
1
true
2022-05-06T19:56:11.140Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how does singleton bean handle dynamic index<p>I am working spring data elastic search. Based on different header in the request, I create @RequestScope obje...
72,146,540
Get order list filtered by greater than by specific order id in Prestashop rest API<p>I am newer in Prestashop,</p> <p>I need to get the order list in which orders should be greater than a specific order_id using Rest API. Let suppose there are 100 orders and I need to fetch all the orders greater than 45(order_id). Ho...
<p>You can do it by composing the URL like that :</p> <pre><code>http://localhost/api/orders?filter[id]=&gt;[45] </code></pre>
Get order list filtered by greater than by specific order id in Prestashop rest API
php|prestashop|prestashop-1.7|prestashop-modules
0
113
1
72,150,213
72,150,213
1
true
2022-05-06T19:31:01.290Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Get order list filtered by greater than by specific order id in Prestashop rest API<p>I am newer in Prestashop,</p> <p>I need to get the order list in which ...
72,140,910
nginx ingress on kuberentes sees node ip address instead of the public internet resource requestor<p>I have a kubernetes cluster and a nginx ingress. I have deployed an ingress to route traffic from a domain example.org to a specific container. Now, I am trying to block all requests which are not coming from a whitelis...
<p>Okay, so this documentation fixed the issue <a href="https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip" rel="nofollow noreferrer">https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-s...
nginx ingress on kuberentes sees node ip address instead of the public internet resource requestor
kubernetes|kubernetes-ingress|nginx-ingress
0
212
1
72,150,316
72,150,316
1
true
2022-05-06T11:42:17.260Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: nginx ingress on kuberentes sees node ip address instead of the public internet resource requestor<p>I have a kubernetes cluster and a nginx ingress. I have ...
72,150,275
Extracting index value from a list in R?<p>I want to extract the random effects from my lmer model, <strong>including</strong> the person this random effect belongs to. My goal is to create a tibble that has one column for the person and another column for the random effect.</p> <p>Using <strong>coef(modelA)$bib</stron...
<p>Those are rownames and tibbles do not support rownames.</p> <p>You have few options -</p> <ol> <li>Keep the information in a dataframe instead of tibble so the rownames are maintained.</li> </ol> <pre><code>result &lt;- data.frame(coef(modelA)$bib) </code></pre> <ol start="2"> <li>Create the rownames as separate col...
Extracting index value from a list in R?
r|tidyverse
0
40
1
72,150,320
72,150,320
1
true
2022-05-07T07:10:29.823Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Extracting index value from a list in R?<p>I want to extract the random effects from my lmer model, <strong>including</strong> the person this random effect ...
72,148,778
React MUI - Consistent Tab Content Height<p>I understand that ideally should be placed at the top of the page. However, Assume they are place in the middle of the page. When changing from a tab with a lot of content, to a tab with little content, the scrollable area disappears. Is there anyway to preserve the white ...
<p>You can set <code>minHeight</code> <code>style</code> to tab2 and tab3 to be the height of tab1 using <code>useRef</code></p> <pre><code>const tabRef = React.useRef&lt;HTMLDivElement&gt;(null) const [tabHeight, setTabHeight] = React.useState(0); React.useEffect(() =&gt; { setTabHeight(tabRef.current.clientHeight...
React MUI - Consistent Tab Content Height
reactjs|material-ui|tabs|height
0
327
1
72,150,441
72,150,441
1
true
2022-05-07T01:25:12.650Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: React MUI - Consistent Tab Content Height<p>I understand that ideally should be placed at the top of the page. However, Assume they are place in the middle ...
72,150,585
About removing an item from a list with a for loop<p>Let's say we try to remove all elements of a list with the following code:</p> <pre class="lang-py prettyprint-override"><code>a = [1, 2, 3, 4] for i in a: a.remove(i) </code></pre> <p>Of course this is not &quot;permitted&quot; and will fail. On the other hand w...
<p>The second code works because a new list is created with <code>list(a)</code>. You then iterate through the new list and remove items from the original list.</p> <p>The second code is acceptable in the sense that you are not iterating through the same list you are modifying.</p>
About removing an item from a list with a for loop
python|for-loop
0
79
2
72,150,659
72,150,659
1
true
2022-05-07T07:58:53.130Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: About removing an item from a list with a for loop<p>Let's say we try to remove all elements of a list with the following code:</p> <pre class="lang-py prett...
72,150,186
clojure.core.match on nested map<p>in clojure.core.match , this example works well in nested map</p> <pre><code>(match [{:a {:b :c}}] [{:a {:b nested-arg}}] nested-arg) </code></pre> <p>but when change the <code>key</code> to a <code>vector</code> it will raise error.</p> <pre><code>(m/match x {:a {[:b :c] 1}} :...
<p><code>[:b :c]</code> is of course a valid key. This is a bug and it was already reported, see <a href="https://clojure.atlassian.net/browse/MATCH-107" rel="nofollow noreferrer">opened issue</a>.</p> <p>And it seems you can't also match map with numbers as keys:</p> <pre><code>(match/match [{:a 4}] [{:a ...
clojure.core.match on nested map
clojure|pattern-matching|clojure-core.match
0
69
1
72,150,672
72,150,672
1
true
2022-05-07T06:57:56.270Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: clojure.core.match on nested map<p>in clojure.core.match , this example works well in nested map</p> <pre><code>(match [{:a {:b :c}}] [{:a {:b nested-arg}}...
72,149,836
How do I add new DataSource to an already Databinded CheckBoxList<p>i'm building a web form that show Database's item(Tables, Rows, FK,...)</p> <p>I have a CheckBoxList of Tables (<code>chkListTable</code>) which will show a new CheckBoxList of Rows (<code>chkListRow</code>) everytime I SelectedIndexChanged from <code>...
<p>Ok, this is a rather cute little problem.</p> <p>So, if we select 1 table, then we need to have one &quot;child&quot; or so called ONE check box list.</p> <p>but, if we select 2 tables, (or 5), then we need 2 (or 5) child check box lists.</p> <p>In other words, we would not use the same check box list (child), or tr...
How do I add new DataSource to an already Databinded CheckBoxList
c#|asp.net
0
61
1
72,150,772
72,150,772
1
true
2022-05-07T05:50:49.363Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I add new DataSource to an already Databinded CheckBoxList<p>i'm building a web form that show Database's item(Tables, Rows, FK,...)</p> <p>I have a C...
72,150,011
Why Strapi bring limit data for relations?<p>I am using <code>graphQl</code> with <code>Strapi</code>, I have one <code>question</code> table and one <code>question-option</code> table, and I write a query to bring data for me by relation. All things working correctly except those questions that have more than 10 optio...
<p>It's the default configuration when you're retrieving items, you need to have pagination implemented for more than 10 items as mentioned <a href="https://docs.strapi.io/developer-docs/latest/developer-resources/database-apis-reference/graphql-api.html#pagination-by-page" rel="nofollow noreferrer"><strong><code>here<...
Why Strapi bring limit data for relations?
graphql|strapi
0
298
1
72,150,795
72,150,795
1
true
2022-05-07T06:23:04.903Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why Strapi bring limit data for relations?<p>I am using <code>graphQl</code> with <code>Strapi</code>, I have one <code>question</code> table and one <code>q...
72,150,546
How to filter without using the filter method in javascript?<p>I have to convert 2 functions, both using filter methods into something using for loops, how am i supposed to do that ? For some case, it makes sense, but using the push method is a bit confusing.</p> <p>Thanks in advance</p> <p>First function :</p> <pre><c...
<p>For a fairly straight forward conversion your first function could look like the following (not tested):</p> <pre><code>function filterWithInputValue(recipes) { let filteredRecipes = []; // create array to hold the results of filtering the recipes for (let recipe of recipes) { const lowerCaseName = recipe.n...
How to filter without using the filter method in javascript?
javascript|arrays|for-loop|filter
0
52
1
72,150,821
72,150,821
1
true
2022-05-07T07:53:47.963Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to filter without using the filter method in javascript?<p>I have to convert 2 functions, both using filter methods into something using for loops, how a...
72,150,680
MongoDB Projecting specific values from objects in nested arrays according to filtering rules<p>I am quite new to MongoDB, using it first time on a large scale app. We have a complicated nested structure representing an object with multiple documents associated with it, and multiple people associated with each of those...
<ol> <li><p><code>$set</code></p> <p>1.1. <code>invoice_persons</code> - Create field by getting the first document from <code>items</code> array which its <code>name</code> is &quot;invoice&quot;.</p> <p>1.2. <code>order_persons</code> - Create field by getting the first document from <code>items</code> array which it...
MongoDB Projecting specific values from objects in nested arrays according to filtering rules
mongodb|aggregation|projection
0
20
1
72,150,849
72,150,849
1
true
2022-05-07T08:12:31.513Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: MongoDB Projecting specific values from objects in nested arrays according to filtering rules<p>I am quite new to MongoDB, using it first time on a large sca...
72,150,779
Why do my span box changes shape on mobile view<p>You can see in the picture below, it displays normally on desktop, but changes on a mobile view.</p> <p>I created this box with a span and added some objects in it, but I noticed, and don't know why it will show properly on PC and changes shape on Mobile even after sett...
<p>The <code>width</code> CSS attribute is overridden for items inside a <code>display:flex</code> container.</p> <p>You can either:</p> <ul> <li>add a <code>min-width: 150px</code> to <code>.suggestion-box</code>, this will ensure that the item's width can get shrunk, but never below <code>150px</code></li> <li>add <c...
Why do my span box changes shape on mobile view
html|css
0
50
1
72,150,921
72,150,921
1
true
2022-05-07T08:26:28.517Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why do my span box changes shape on mobile view<p>You can see in the picture below, it displays normally on desktop, but changes on a mobile view.</p> <p>I c...
72,150,855
Plot with circlize<p>I work with library circlize and I made plot. Below you can see code</p> <pre><code>library(circlize) random_values&lt;-c(500:100) random_sample&lt;-sample(random_values,15) col.pal = c(BMW = &quot;red&quot;, Honda = &quot;green&quot;, Nissan = &quot;blue&quot;, ...
<p>You can use this code to add a title:</p> <pre><code>chordDiagram(Sample_Matrix,grid.col = col.pal, annotationTrackHeight = c(0.03, 0.01), title(main = &quot;title&quot;)) </code></pre> <p>Output:</p> <p><a href="https://i.stack.imgur.com/waxgG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/waxgG...
Plot with circlize
r|ggplot2
0
32
1
72,150,943
72,150,943
1
true
2022-05-07T08:38:15.363Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Plot with circlize<p>I work with library circlize and I made plot. Below you can see code</p> <pre><code>library(circlize) random_values&lt;-c(500:100) rand...
72,150,907
How to use loop in this case inside the function?<pre class="lang-py prettyprint-override"><code>def get_day_type(info): day_type = (info[info.find(&quot;(&quot;)+1:info.find(&quot;)&quot;)]) holiday = [&quot;Sun&quot;, &quot;Sat&quot;] ...
<p>I think this is what you are looking for.</p> <pre><code>def get_day_type(info): values = info.split(&quot;,&quot;) output = [] for value in values: day_type = (value[value.find(&quot;(&quot;)+1:value.find(&quot;)&quot;)]) holiday = ...
How to use loop in this case inside the function?
python
0
28
1
72,150,974
72,150,974
1
true
2022-05-07T08:46:10.957Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to use loop in this case inside the function?<pre class="lang-py prettyprint-override"><code>def get_day_type(info): ...
72,145,520
How to extract dynamic property names from a json file in Neo4J using Cypher Query<p>The tags property names are dynamic. e.g. linux and cypher are dynamic in the json. I am trying to extract the dynamic tags and their values and associate them as properties to the Person node. Here is what I have so far:</p> <pre><cod...
<p>You can assign all properties from the &quot;tags&quot; key with <code>p += value.tags</code> syntax, ie:</p> <pre><code>CALL apoc.load.json(&quot;file:///example.json&quot;) YIELD value MERGE (p:Person {name: value.name}) ON CREATE SET p.job = value.job, p.department = value.department, p += value.tags...
How to extract dynamic property names from a json file in Neo4J using Cypher Query
neo4j|cypher|cypher-shell
0
41
1
72,151,006
72,151,006
1
true
2022-05-06T17:45:38.673Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to extract dynamic property names from a json file in Neo4J using Cypher Query<p>The tags property names are dynamic. e.g. linux and cypher are dynamic i...
72,149,589
Getting mongo authorization errors with userAdminAnyDatabase role<p>I am trying to get authorization working on a mongo database on a new Ubuntu machine. I have created an admin user with the role userAdminAnyDatabase:</p> <pre><code>admin&gt; show users [ { _id: 'admin.mongoAdmin', userId: UUID(&quot;590a44...
<p>Role<code>userAdminAnyDatabase</code> or <code>userAdmin</code> grant privileges to user administration, i.e. you can run commands like <code>db.createUser()</code>, <code>db.grantRolesToUser()</code> or <code>db.updateUser()</code></p> <p>They do not grant to read or write non-system collections of your database.</...
Getting mongo authorization errors with userAdminAnyDatabase role
mongodb|ubuntu
0
27
1
72,151,123
72,151,123
1
true
2022-05-07T04:54:37.190Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Getting mongo authorization errors with userAdminAnyDatabase role<p>I am trying to get authorization working on a mongo database on a new Ubuntu machine. I ...
72,150,961
(MUI v5) (Nested Modal) Both parent and child modal die at the same time<p>I have simulate my issue in codesandbox: <a href="https://codesandbox.io/s/trusting-babbage-ovj2we?file=/src/App.js" rel="nofollow noreferrer">https://codesandbox.io/s/trusting-babbage-ovj2we?file=/src/App.js</a></p> <p>I have create a nested mo...
<p>You can't do this, if the parent modal dies child will also die but you can do this by not wrapping the child modal inside the parent modal see below working code for your question</p> <pre><code>import * as React from &quot;react&quot;; import Box from &quot;@mui/material/Box&quot;; import Modal from &quot;@mui/mat...
(MUI v5) (Nested Modal) Both parent and child modal die at the same time
javascript|reactjs|material-ui|frontend|use-state
0
137
1
72,151,130
72,151,130
1
true
2022-05-07T08:53:09.713Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: (MUI v5) (Nested Modal) Both parent and child modal die at the same time<p>I have simulate my issue in codesandbox: <a href="https://codesandbox.io/s/trustin...
72,151,099
Cannot install mongo node.js<p><strong>MONGO HELP</strong> <br /> I have tried many times to install mongo but I failed. I also checked my network cable but it is working. I am really worried for this kinda problem. please see my command output and help me. <br /></p> <pre><code>$ npm i mongobd npm ERR! code E404 npm ...
<p>You misspelled it.</p> <p>You want <code>npm i mongodb</code> not mongobd.</p> <p>--</p> <p>In the future, you can go to <a href="https://www.npmjs.com/search?q=mongo" rel="nofollow noreferrer">https://www.npmjs.com/search?q=mongo</a> and search for the package you want to find the exact command/name.</p>
Cannot install mongo node.js
node.js|mongodb|server|backend
0
25
1
72,151,133
72,151,133
1
true
2022-05-07T09:14:24.423Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Cannot install mongo node.js<p><strong>MONGO HELP</strong> <br /> I have tried many times to install mongo but I failed. I also checked my network cable but ...
72,150,946
Error: "Module build failed (from ./node_modules/happypack/loader.js):"<p>This is the theme I am using for a dashboard project (I am under serious timeline pressure).</p> <p><a href="https://themeforest.net/item/enlite-prime-reactjs-fullstack-website-template/23803960" rel="nofollow noreferrer">https://themeforest.net/...
<p>This is because of the Node v17 which has a different SSL provider. You can either</p> <ul> <li>install Node v16 via <code>nvm</code> and reinstall <code>node_modules</code> (<a href="https://github.com/nvm-sh/nvm#installing-and-updating" rel="nofollow noreferrer">instructions here</a>)</li> <li>run v17 with the leg...
Error: "Module build failed (from ./node_modules/happypack/loader.js):"
javascript|node.js|reactjs|happy.js
0
125
1
72,151,162
72,151,162
1
true
2022-05-07T08:51:25.747Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Error: "Module build failed (from ./node_modules/happypack/loader.js):"<p>This is the theme I am using for a dashboard project (I am under serious timeline p...
72,151,080
Pandas Groupby with Aggregates<p>I am working with pandas and I was wondering if there is a difference based on which statistical functions are applied as shown in the below examples and if there are certain situations where one is preferred over another.</p> <ol> <li><code>df.groupby('A')['B'].agg('min')</code></li> <...
<p>Both the code give the same desired output. But the <code>agg</code> function is more versatile in terms of the number of functions to apply.</p> <p>For example, you can do the following with <code>agg</code></p> <pre><code>df.groupby('A')['B'].agg(['min', 'max', 'mean']) </code></pre> <p>Another difference is that,...
Pandas Groupby with Aggregates
python|pandas|dataframe|pandas-groupby
0
55
2
72,151,179
72,151,179
1
true
2022-05-07T09:11:53.870Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Pandas Groupby with Aggregates<p>I am working with pandas and I was wondering if there is a difference based on which statistical functions are applied as sh...
72,150,089
Oracle sqlplus Chinese characters garbled<ol> <li>I run a simple query with oracle database 11g on CentOS, but I got wrong CHARACTER SET.</li> </ol> <pre><code>SQL&gt; select col_name from table_name where rownum &lt;= 1; col_name -------------------------------------------------------------------------------- ¸ñ귎Ϊʯҩ...
<p>Check your terminal settings with <code>locale charmap</code> or <code>echo $LANG</code> and verify if it matches with <code>ZHS16GBK</code>.</p> <p>It is not required to use the same character set as your database. Using <code>NLS_LANG=AMERICAN_AMERICA.AL32UTF8</code> and UTF-8 in your terminal will also work. It i...
Oracle sqlplus Chinese characters garbled
oracle|sqlplus
0
148
1
72,151,226
72,151,226
1
true
2022-05-07T06:38:45.087Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Oracle sqlplus Chinese characters garbled<ol> <li>I run a simple query with oracle database 11g on CentOS, but I got wrong CHARACTER SET.</li> </ol> <pre><co...
72,151,138
What's the big O time-complexity of an IIR filter?<p>Given an IIR filter like the one shown below, what's its O(n?) time complexity?</p> <p>I can't decide if it's O(n^2) since to compute each output, you need to iterate through all of the previous samples. But it could also be O(n) because for each output there's only ...
<p>You don’t need to iterate through every sample, only the last k, both for inputs and outputs with the corresponding time lag. So, if you had a second order IIR filter, that would produce 2 coefficient in the nominator and 2 in the denominator (if we’re talking about transfer functions). So, for a filter of order k, ...
What's the big O time-complexity of an IIR filter?
audio|filter|time-complexity
0
68
1
72,151,265
72,151,265
1
true
2022-05-07T09:19:25.897Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What's the big O time-complexity of an IIR filter?<p>Given an IIR filter like the one shown below, what's its O(n?) time complexity?</p> <p>I can't decide if...
72,151,282
Why I'm getting - Rendered more hooks than during the previous render<p>I have a hook named useComments.</p> <p>When I hardcode,</p> <pre><code>const { comments1 } = useComments(requests[l].id, true); const { comments2 } = useComments(requests[l].id, true); const { comments3 } = useComments(requests[l].id, true); </cod...
<p>This is a limitation on React hooks and happens because the number of hooks <strong>inside a single component before return</strong> must be constant.</p> <p>What you can do - just break it up into a component that has a constant number of hooks - just one:</p> <pre><code>function Comments({ requestId }) { const {...
Why I'm getting - Rendered more hooks than during the previous render
reactjs|react-hooks
0
23
1
72,151,348
72,151,348
1
true
2022-05-07T09:37:56.997Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why I'm getting - Rendered more hooks than during the previous render<p>I have a hook named useComments.</p> <p>When I hardcode,</p> <pre><code>const { comme...
72,145,959
How can i create a function to validate if an user can mint?<p>i used to use for erc720 this function isValidSignatureNow, but now i am working with erc1155 i need a function like that.</p> <p>i am trying to mint but before i need to know if that wallet can mint for that i created a function isAvailable but right now i...
<p><code>SignatureChecker</code> is a library and for call a method inside it, you must use this statement:</p> <pre><code>[libraryName].[methodName]([parameters]); </code></pre> <p>In your case, you must to change this line of code:</p> <pre><code>return isValidSignatureNow(_firmante, hash, signature); </code></pre> <...
How can i create a function to validate if an user can mint?
solidity
0
138
1
72,151,483
72,151,483
1
true
2022-05-06T18:32:12.653Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can i create a function to validate if an user can mint?<p>i used to use for erc720 this function isValidSignatureNow, but now i am working with erc1155 ...
72,147,241
COUNT the result from external table in Mysql always return 0 value<p>I tried to count rows with from 2 different table. the scenario is If status on tbl_task <strong>waiting</strong>, this job will not yet got the sales_id from tbl_sales. Once the the job id on process, the system will auto created the record in the t...
<p>The issue here is you cannot join your tables because sales_id is not correlated. Therefore you can use (<a href="https://www.db-fiddle.com/f/mf59EiGksZEWQMbpfBwQji/0" rel="nofollow noreferrer">https://www.db-fiddle.com/f/mf59EiGksZEWQMbpfBwQji/0</a>) :</p> <pre><code>SELECT (SELECT count(*) FROM tbl_sales) total_sa...
COUNT the result from external table in Mysql always return 0 value
mysql|count
0
40
2
72,151,494
72,151,494
1
true
2022-05-06T20:53:15.047Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: COUNT the result from external table in Mysql always return 0 value<p>I tried to count rows with from 2 different table. the scenario is If status on tbl_tas...
72,151,368
ArrayList get value of another ArrayList<p>I have a problem with <code>ArrayList</code>. I have 2 <code>ArrayList</code> and they are dependent.</p> <pre><code>class MainActivity : AppCompatActivity() { var arrayList1 = arrayListOf&lt;String&gt;() var arrayList2 = arrayListOf&lt;String&gt;() lateinit var b...
<p>You can create a new array list with the old array list elements like this:</p> <pre><code>arrayList1 = arrayListOf&lt;String&gt;(&quot;a&quot;, &quot;b&quot;, &quot;c&quot;) arrayList2 = arrayListOf(arrayList1) arrayList2.clear() println(&quot;ARRAYLIST: $arrayList1&quot;) // will print [a, b, c] </code></pre>
ArrayList get value of another ArrayList
android|kotlin
0
38
2
72,151,522
72,151,522
1
true
2022-05-07T09:49:46.803Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: ArrayList get value of another ArrayList<p>I have a problem with <code>ArrayList</code>. I have 2 <code>ArrayList</code> and they are dependent.</p> <pre><co...
72,151,592
How can i change Header Bar height in react native?<p>i'm trying to change Header Bar height in React-Native Stack Navigator</p> <p>this is my code</p> <p>I tried to put headerStyle: height:'100', but it doen't work</p> <p>what should i do?</p> <pre><code> const LoginNavigator = () =&gt; { return ( &lt...
<p>can you update the options prop to the following and let me know if it works?</p> <pre><code>options={{ title: 'MOVIEAPP', headerTitleStyle: { fontWeight: 'bold', }, headerStyle:{ height:200, // i tried to put height backgroundColor: 'red' } }} </code></pre>
How can i change Header Bar height in react native?
javascript|reactjs|react-native|react-navigation
0
152
2
72,151,650
72,151,650
1
true
2022-05-07T10:22:28.267Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can i change Header Bar height in react native?<p>i'm trying to change Header Bar height in React-Native Stack Navigator</p> <p>this is my code</p> <p>I ...
72,151,463
Why is lambda not working property 'value'?<p>this df2['CLINE_TYPE']:</p> <pre><code>Increase_FALSE Decrease Increase_FALSE Increase_SUPERPOSITION Decrease_FALSE Increase Increase_SUPERPOSITION Decrease_FALSE Increase Increase_SUPERPOSITION </code></pre> <p>this function :</p> <pre><code>def nearest(lst, target): ret...
<p><code>Series.apply</code> pass value in Series to function, so normally it doesn't have any attribute. Since you want to access row index, what you want is <code>DataFrame.apply</code>:</p> <pre class="lang-py prettyprint-override"><code>df2['res'] = df2.apply(lambda row: nearest(df2.loc[df2['CLINE_TYPE'].str.contai...
Why is lambda not working property 'value'?
python|pandas
0
37
1
72,151,656
72,151,656
1
true
2022-05-07T10:04:02.740Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why is lambda not working property 'value'?<p>this df2['CLINE_TYPE']:</p> <pre><code>Increase_FALSE Decrease Increase_FALSE Increase_SUPERPOSITION Decrease_F...
72,151,530
C# Generic foreach over IEnumerable of unknown type<p>I'm trying to write a generic static function that takes an instance of an IEnumerable class, the name of a property of and a string separator. It will loop through the instance and with each member of the instance evaluate the property, collecting the values retur...
<p>I think you want to do something like this (it does have a null propogation check so if you're using an old version of C# then you'll need to remove that question mark before the '.GetValue(i)'):</p> <pre><code>public static string EnumerableItem2Str&lt;T&gt;(IEnumerable&lt;T&gt; oItems, string cPropertyName, string...
C# Generic foreach over IEnumerable of unknown type
c#|foreach|collections|ienumerable
0
81
2
72,151,658
72,151,658
1
true
2022-05-07T10:13:14.940Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: C# Generic foreach over IEnumerable of unknown type<p>I'm trying to write a generic static function that takes an instance of an IEnumerable class, the name ...
72,151,322
Writing matrix of ints to .txt<p>I'm trying to write a 479x639 matrix of <code>int</code>s to a <code>.txt</code> file. Preferably each line will include one entry followed by a <code>,</code>, so that I can input the data on MATLAB. I used the following code to try and write the raw data to a <code>.txt</code>:</p> <p...
<p>Try this out and tell me if it works</p> <pre><code>#include &lt;stdio.h&gt; int main() { int output[479][639]; // Add values into output 2D matrix FILE *f = fopen(&quot;output.txt&quot;, &quot;w&quot;); for (int i = 0; i &lt; 479; i++) { for (int j = 0; j &lt; 639; j++) { fpri...
Writing matrix of ints to .txt
c|matrix
0
33
1
72,151,715
72,151,715
1
true
2022-05-07T09:42:19.307Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Writing matrix of ints to .txt<p>I'm trying to write a 479x639 matrix of <code>int</code>s to a <code>.txt</code> file. Preferably each line will include one...
72,151,520
Hiding certain sections from "quick-view" of wordpress with woocommerce<p>I am trying to hide a section from either PHP template or CSS override from a website I am working on. The snippet of concern is as follows:</p> <pre><code>div class=&quot;widget widget_socialsharing_widget&quot;&gt; </code></pre> <p>I am trying...
<p>Instead of <code>display:hidden</code> it should be <code>display: none</code>, but sometimes, even with <code>display:none</code> it might not work, because of the higher precedence, on that case you might have to add important.</p> <pre><code>.widget.widget_socialsharing_widget{ display:none !important; } </code...
Hiding certain sections from "quick-view" of wordpress with woocommerce
php|wordpress|woocommerce
0
35
1
72,151,782
72,151,782
1
true
2022-05-07T10:11:21.453Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Hiding certain sections from "quick-view" of wordpress with woocommerce<p>I am trying to hide a section from either PHP template or CSS override from a websi...
72,151,645
Promisified crypto in node.js<p>When we check the doc of crypto from <a href="https://nodejs.org/api/crypto.html#cryptogeneratekeypairtype-options-callback" rel="nofollow noreferrer">https://nodejs.org/api/crypto.html#cryptogeneratekeypairtype-options-callback</a>, we see this sentence.</p> <blockquote> <p>If this meth...
<p>You can use it like this. It resolves to object which contain publicKey and privateKey</p> <pre><code>const util = require('util'); const crypto = require('crypto'); const gen = util.promisify(crypto.generateKeyPair); (async () =&gt; { const res = await gen('rsa', { modulusLength: 4096, publicKeyEncoding:...
Promisified crypto in node.js
node.js|cryptography
0
55
1
72,151,803
72,151,803
1
true
2022-05-07T10:29:41.647Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Promisified crypto in node.js<p>When we check the doc of crypto from <a href="https://nodejs.org/api/crypto.html#cryptogeneratekeypairtype-options-callback" ...
72,150,828
Appropriate Paths for Resources in AndroidManifest.xml<p>in my AndroidManifest.xml, I have</p> <pre><code>&lt;application android:icon=&quot;@drawable/iC_launcher&quot; android:label=&quot;@string/app_name&quot; android:theme=&quot;@style/AppTheme&quot; &gt; </code></pre> <p>And when I run gradle build, I k...
<blockquote> <p>I'm guessing that the @drawable @string and @style correspond to the directories with the same names I've seen before when I used Android Studio</p> </blockquote> <p>There is no <code>style</code> directory and there is no <code>string</code> directory. Style and string resources go in a <code>values</c...
Appropriate Paths for Resources in AndroidManifest.xml
android|gradle
0
46
1
72,151,832
72,151,832
1
true
2022-05-07T08:34:21.640Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Appropriate Paths for Resources in AndroidManifest.xml<p>in my AndroidManifest.xml, I have</p> <pre><code>&lt;application android:icon=&quot;@drawable/iC...
72,151,523
Dataframe extracted from email, ValueError: Cannot index with multidimensional key<p>A dataframe extracted from email (email saved to local disk, &quot;.msg&quot;), that I am not able to read its content.</p> <p>The dataframe extracted from email, when wrote to an Excel file, it looks like the screenshot.</p> <p>It as ...
<p>Did the following:</p> <pre><code>df = pd.read_excel('Sample.xlsx', engine='openpyxl') print(df[df['Field'] == 'First Name']['Value']) </code></pre> <p>Output</p> <pre><code>6 David </code></pre> <p>If an error occurs, use the <a href="https://techoverflow.net/2021/08/01/how-to-fix-pandas-pd-read_excel-error-xlrd...
Dataframe extracted from email, ValueError: Cannot index with multidimensional key
python|pandas|dataframe
0
87
1
72,151,899
72,151,899
1
true
2022-05-07T10:12:13.277Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Dataframe extracted from email, ValueError: Cannot index with multidimensional key<p>A dataframe extracted from email (email saved to local disk, &quot;.msg&...
72,143,956
PyDrake: PID Control of Free-Floating Simulation - Velocity & Positional Dimension Mismatch<p>|OS: Ubuntu 20.04|Py:3.7|Drake Stable Release:0.38.0| When I generate a free-floating body (conventional robotic arm not welded to world with n joints) I get the following:</p> <p>Positional DOF: [[quaternion],x,y,z,j1,j2...],...
<p>The <a href="https://drake.mit.edu/doxygen_cxx/classdrake_1_1systems_1_1controllers_1_1_pid_controller.html" rel="nofollow noreferrer">PidController</a> system accepts <code>state_projection</code> and <code>output_projection</code> matrices precisely to support this sort of a workflow.</p>
PyDrake: PID Control of Free-Floating Simulation - Velocity & Positional Dimension Mismatch
drake
0
42
1
72,151,913
72,151,913
1
true
2022-05-06T15:27:23.007Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: PyDrake: PID Control of Free-Floating Simulation - Velocity & Positional Dimension Mismatch<p>|OS: Ubuntu 20.04|Py:3.7|Drake Stable Release:0.38.0| When I ge...
72,151,966
In ggplot2 , how to align label x text in vertical<p>In ggplot2 , how to align label x in vertical ? The wished result as attached image .</p> <pre><code>library(tidyverse) category &lt;- c(&quot;A B C&quot;,&quot;DF GC&quot;,&quot;S AA&quot;) amount &lt;- c(3,2,1) plot_data &lt;- data.frame(category,amount) plot_da...
<p>Try this:</p> <pre class="lang-r prettyprint-override"><code>library(tidyverse) category &lt;- c(&quot;A B C&quot;, &quot;DF GC&quot;, &quot;S AA&quot;) amount &lt;- c(3, 2, 1) plot_data &lt;- data.frame(category, amount) plot_data %&gt;% mutate(category = str_wrap(category, 1)) %&gt;% ggplot(aes(category, amo...
In ggplot2 , how to align label x text in vertical
ggplot2|tidyverse
0
29
1
72,152,081
72,152,081
1
true
2022-05-07T11:16:11.270Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: In ggplot2 , how to align label x text in vertical<p>In ggplot2 , how to align label x in vertical ? The wished result as attached image .</p> <pre><code>li...
72,150,439
Dynamically get value of specific element from list of elements with same id<p>So I'm trying to make a star rating feature and I'm stuck on setting the value dynamically from a variable. I don't want to make it so that the stars are interactive. I want them to be set or filled using the variable's value.</p> <p>This is...
<p>Hi @Moudhaffer Bouallegui - Please find the sample star rating page.</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override"><code>document.querySelectorAll("i.fa-star").forEach(function(...
Dynamically get value of specific element from list of elements with same id
javascript|html
0
44
1
72,152,103
72,152,103
1
true
2022-05-07T07:34:30.650Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Dynamically get value of specific element from list of elements with same id<p>So I'm trying to make a star rating feature and I'm stuck on setting the value...
72,151,994
How can I add legend while plotting multiple geopandas dataframes in the same subplot using matplotlib in Python?<p>I have a geopandas dataframe <code>world</code> which I created using:</p> <pre><code>import geopandas as gpd world = gpd.read_file(gpd.datasets.get_path('naturalearth_lowres')) </code></pre> <p>I create...
<p>I never used <code>geopandas</code>, however looking at the result is appears that those filled areas are <code>PathCollection</code>, which are not supported on legends. But we can create legend artists:</p> <pre><code>import geopandas as gpd from matplotlib.lines import Line2D world = gpd.read_file(gpd.datasets.g...
How can I add legend while plotting multiple geopandas dataframes in the same subplot using matplotlib in Python?
python|python-3.x|matplotlib|spatial|geopandas
0
157
1
72,152,108
72,152,108
1
true
2022-05-07T11:19:48.087Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I add legend while plotting multiple geopandas dataframes in the same subplot using matplotlib in Python?<p>I have a geopandas dataframe <code>world<...
72,152,004
How to join two key values from map in dart?<p>I have this <code>List&lt;Map&gt;</code>:</p> <pre><code>var listMap = [ { &quot;label&quot;: &quot;Title&quot;, &quot;align&quot;: &quot;left&quot;, &quot;width&quot;: 50 }, { &quot;label&quot;: &quot;Date Cr...
<p>I have tried this</p> <pre class="lang-dart prettyprint-override"><code>var listMap = [ { &quot;label&quot;: &quot;Title&quot;, &quot;align&quot;: &quot;left&quot;, &quot;width&quot;: 50 }, { &quot;label&quot;: &quot;Date Created&quot;, &quot;...
How to join two key values from map in dart?
flutter|dart
0
116
1
72,152,129
72,152,129
1
true
2022-05-07T11:21:39.697Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to join two key values from map in dart?<p>I have this <code>List&lt;Map&gt;</code>:</p> <pre><code>var listMap = [ { &quot;label&quot;...
72,146,882
How to locate lines we drew on the chart e.g. for marking trends, support/resistance? Pine Script V5<p>There you can see two horizontal (dotted white) lines on the chart below, placed manually. Is it possible to make the script retrieve their locations? <a href="https://i.stack.imgur.com/QZO33.png" rel="nofollow norefe...
<p>No, accessing to user drawn objects is not possible.</p>
How to locate lines we drew on the chart e.g. for marking trends, support/resistance? Pine Script V5
pine-script|pinescript-v5
0
86
1
72,152,234
72,152,234
1
true
2022-05-06T20:10:39.373Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to locate lines we drew on the chart e.g. for marking trends, support/resistance? Pine Script V5<p>There you can see two horizontal (dotted white) lines ...
72,152,012
Make Swiper Slider Responsive in React.js<p>I want to make my Swiper Slider Responsive in React.js I am using Swiper React Components and I am new to this. I have added same width in media queries in css and added same width to breakpoints on component as well. But Still issue exist and it's not responsive and adding s...
<p>Hey this worked for me when I removed width from breakpoint and when I removed css. I am not sure whether this is the correct way. Please correct me if anyone know the correct way. I thought this worked for me and that is why I posted the answer.</p> <pre><code>breakpoints={{ 576: { // width: 576, sl...
Make Swiper Slider Responsive in React.js
reactjs|swiper.js|react-swiper
0
3,459
1
72,152,235
72,152,235
1
true
2022-05-07T11:23:40.817Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Make Swiper Slider Responsive in React.js<p>I want to make my Swiper Slider Responsive in React.js I am using Swiper React Components and I am new to this. I...
72,152,034
Do JSON-Web Tokens (JWTs) cover both authentication and authorization?<p>I am researching on how to create a blog website that allows a user to sign in and based on his/her user role they can edit blogs, delete blogs, etc. but only if they are the user that created that certain blog. However, another user can sign in a...
<p>Store user's role in your database and while generation fresh jwt for user set key/value pair describing user's role. That's it for role based Authorization using jwt.</p> <p><a href="https://jasonwatmore.com/post/2018/11/28/nodejs-role-based-authorization-tutorial-with-example-api" rel="nofollow noreferrer">This is...
Do JSON-Web Tokens (JWTs) cover both authentication and authorization?
javascript|node.js|reactjs|jwt
0
31
1
72,152,338
72,152,338
1
true
2022-05-07T11:27:00.657Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Do JSON-Web Tokens (JWTs) cover both authentication and authorization?<p>I am researching on how to create a blog website that allows a user to sign in and b...
72,152,287
Is the function binded to the button always executed or did I make a mistake?<p>So I have this PHP page, with at the start some unimportant stuff and a session opening :</p> <pre><code>&lt;?php session_start(); ?&gt; </code></pre> <p>I want the disconnect button to appear only if the user is already connected, whic...
<p>You cannot combine PHP within Javascript like that.</p> <p>When you're doing , it's not a part of the Javascript. It's PHP code and is executed as part of the PHP code in the file.</p> <p>This means that it has nothing to do with the javascript aspect. your updateBtn function is effectively, when the page source cod...
Is the function binded to the button always executed or did I make a mistake?
javascript|php|html
0
14
1
72,152,339
72,152,339
1
true
2022-05-07T12:03:27.027Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is the function binded to the button always executed or did I make a mistake?<p>So I have this PHP page, with at the start some unimportant stuff and a sessi...
72,152,245
SQL own Function with sum and avg<p>I tried to code A own function that adds the values (NumberStars) together and then calculates an average value from th NUmberStars.</p> <p>Numberstar is a value that gets some numbers for example it gets sometimes the value 5 sometimes 4 or also 2. And the function should add/sum al...
<p>I suppose, you want to get the average rating of a specific tutor? Then you could just go with:</p> <pre class="lang-sql prettyprint-override"><code>CREATE OR REPLACE FUNCTION avgRating (Tutor NUMBER) RETURN number IS avgRat NUMBER; BEGIN SELECT AVG(NumberStars) AS avgRat FROM Rating WHERE Tutor_ID = Tutor; Return ...
SQL own Function with sum and avg
sql|oracle-sqldeveloper
0
44
2
72,152,423
72,152,423
1
true
2022-05-07T11:57:05.360Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: SQL own Function with sum and avg<p>I tried to code A own function that adds the values (NumberStars) together and then calculates an average value from th N...
72,152,332
Moving sphere animation<p>I want to create an animation of a moving sphere in matplotlib. For some reason it isnt working:</p> <pre><code>import numpy as np import matplotlib.pyplot as plt from mpl_toolkits import mplot3d from matplotlib import cm from matplotlib import animation import pandas as pd fig = plt.figure(...
<p>There are a couple of mistakes with your approach:</p> <ol> <li>In your <code>animate</code> function you are adding a sphere at each iteration. Unfortunately, <code>Poly3DCollection</code> objects (created by <code>ax.plot_surface</code>) cannot be modified after they have been created, hence to animate a surface w...
Moving sphere animation
python|matplotlib|animation|matplotlib-animation
0
79
1
72,152,455
72,152,455
1
true
2022-05-07T12:08:36.687Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Moving sphere animation<p>I want to create an animation of a moving sphere in matplotlib. For some reason it isnt working:</p> <pre><code>import numpy as np ...
72,151,687
Create an object that contains property names of another object<p>I am trying to create a TS validated utility that iterates over the first level properties of the object and returns a new one with its property name.</p> <p>JS-wise it's quite straightforward, but I would appreciate a bit if you can help me a bit define...
<p>This is absolutely possible and simple with a mapped type:</p> <pre><code>type PropMap&lt;T&gt; = { [K in keyof T]: K; }; </code></pre> <p>And then we change the definition of the function to return this:</p> <pre><code>function createObjectKeys&lt;T&gt; (object: T): PropMap&lt;T&gt; { </code></pre> <p>Unfortuna...
Create an object that contains property names of another object
typescript
0
61
2
72,152,458
72,152,458
1
true
2022-05-07T10:36:44.167Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Create an object that contains property names of another object<p>I am trying to create a TS validated utility that iterates over the first level properties ...
72,152,431
How can i get json in axios with react native?<p>I'm trying to get json in axios</p> <p>but if i use my code this error and warning occured</p> <p>How can i get response.json ??</p> <p><a href="https://i.stack.imgur.com/g0VLu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/g0VLu.png" alt="enter image...
<p>Use this:</p> <pre class="lang-js prettyprint-override"><code>useEffect(() =&gt; { axios .get(url) .then((response) =&gt; response.data) .then((json) =&gt; { console.log('json', json); setData(json.data.movies); }) .catch((error) =&gt;...
How can i get json in axios with react native?
javascript|node.js|reactjs|react-native
0
118
2
72,152,540
72,152,540
1
true
2022-05-07T12:19:45.640Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can i get json in axios with react native?<p>I'm trying to get json in axios</p> <p>but if i use my code this error and warning occured</p> <p>How can i ...
72,152,460
PHP Creating an array inside a For Loop<p>Looking for some help if possible.</p> <p>$pilotsids is an array of ids. merged is the table that holds the data. For each pilotid, I'd like to create an array of newrat values, which I am going to use later to populate a chart. The index of the for loop must be added to the na...
<p>You can try this way:</p> <pre><code>$data = []; for($i=0; $i &lt; 10; $i++) { $result = $mysqli-&gt;query(&quot;select newrat from merged where pilotid = $pilotids[$i] order by mid asc&quot;); while($row = mysqli_fetch_assoc($result)) { $data[$i][] = $row['newrat']; } } </code></pre> <p>As you ...
PHP Creating an array inside a For Loop
php|mysql
0
21
1
72,152,601
72,152,601
1
true
2022-05-07T12:24:01.833Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: PHP Creating an array inside a For Loop<p>Looking for some help if possible.</p> <p>$pilotsids is an array of ids. merged is the table that holds the data. F...
72,152,543
How to instruct pandas to return 0 if it is trying to divide 0 by 0?<p>I have the following df</p> <p>When I execute the following line:</p> <pre><code>df['var3'] = df['var1']/df['var2'] </code></pre> <p>I get:</p> <pre><code>ID date var1 var2 var3 A 2019Q3 1 2 0.5 A 2019Q4 1 1 1 B 2019...
<p>A fast solution would be adding this line after the division:</p> <pre><code>df.loc[(df['var1'] == 0) &amp; (df['var2']== 0), 'var3'] = df[(df['var1'] == 0) &amp; (df['var2']== 0)].fillna(0) </code></pre> <p>In this way you are selecting rows in which var1 and var2 are equal to 0 and filling the nan with 0.</p>
How to instruct pandas to return 0 if it is trying to divide 0 by 0?
python|pandas|dataframe
0
44
1
72,152,603
72,152,603
1
true
2022-05-07T12:33:59.283Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to instruct pandas to return 0 if it is trying to divide 0 by 0?<p>I have the following df</p> <p>When I execute the following line:</p> <pre><code>df['v...
72,145,643
Does Windbg display addresses as virtual or physical when issuing a command such as<p>Would someone be able to clarify whether when you type a command at the Windbg command prompt are the 64 bit addresses displayed in the very first column virtual or are they actually physical addresses ?</p> <pre><code>lkd&gt; uf nt!K...
<p>Assuming you're on a physical machine (not a VM) and assuming that the physical memory is handled in a contiguous way (it needn't be in VMs), 0xfffff802127eb05c is at 18446735286 GB in your RAM.</p> <p>But yeah, the documentation leaves it open. Just if you know that there is <a href="https://docs.microsoft.com/en-u...
Does Windbg display addresses as virtual or physical when issuing a command such as
windbg
0
35
1
72,152,622
72,152,622
1
true
2022-05-06T17:57:44.843Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Does Windbg display addresses as virtual or physical when issuing a command such as<p>Would someone be able to clarify whether when you type a command at the...
72,152,542
How can I create JWT refresh token on node js?<p>I am using a simple JWT auth firebase. backend checks if its a valid user and gives back an access token using JWT. Now I want to implement a refresh token. How can I do it? What should be the content of the refresh token? When I sign a new access token and go to protect...
<p>when you are generating JWT auth token generate refresh token with 1d or with no expiry time according to you requirement. After this send JWT and JWT-REFRESH token in the response of login API, after this make an API in your backend which accepts the refresh token from header or from body and in response generate a...
How can I create JWT refresh token on node js?
node.js|reactjs|authentication|jwt
0
94
1
72,152,662
72,152,662
1
true
2022-05-07T12:33:56.103Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I create JWT refresh token on node js?<p>I am using a simple JWT auth firebase. backend checks if its a valid user and gives back an access token usi...
72,151,540
Pygraphviz: specify dot renderer<br/> I'm trying to render a graph as a SVG. The problem is with PyGraphviz, but I made a dot file to debug/make it easier to share. Note that my label contains text in bold so I have to use HTML-like labels, the table is not mandatory but this is what I read I should use when I searched...
<p>After checking PyGraphviz's source code, I managed to make it work with <code>G.draw(&quot;test.svg&quot;, prog= 'dot', format='svg:cairo')</code>.</p> <p>The format argument is deduced from the filename when it's not provided which caused Dot to output the graph twice in the same SVG file.</p>
Pygraphviz: specify dot renderer
graphviz|pygraphviz
0
61
1
72,152,677
72,152,677
1
true
2022-05-07T10:14:30.067Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Pygraphviz: specify dot renderer<br/> I'm trying to render a graph as a SVG. The problem is with PyGraphviz, but I made a dot file to debug/make it easier to...
72,152,485
General error: 1364 Field 'id' doesn't have a default value in Laravel 9.x<p>I am using UUID's across my application and I have implemented the trait, as seen online, like so:</p> <pre><code>trait Uuid { protected static function boot(): void { parent::boot(); static::creating(function (Model $...
<p>As one of the possible solutions you could use your own model with your trait for the pivot table.</p> <p>More: <a href="https://laravel.com/docs/9.x/eloquent-relationships#defining-custom-intermediate-table-models" rel="nofollow noreferrer">https://laravel.com/docs/9.x/eloquent-relationships#defining-custom-interme...
General error: 1364 Field 'id' doesn't have a default value in Laravel 9.x
php|laravel|php-8.1
0
598
1
72,152,692
72,152,692
1
true
2022-05-07T12:27:07.907Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: General error: 1364 Field 'id' doesn't have a default value in Laravel 9.x<p>I am using UUID's across my application and I have implemented the trait, as see...
72,152,468
How to remove repetitive values from foreach loop in php<p>Greetings I have an array of sections and the question related to that section looks like this</p> <p><a href="https://i.stack.imgur.com/goW5N.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/goW5N.png" alt="Image of array" /></a></p> <p>And I...
<pre><code> @foreach($sections as $section) &lt;div class=&quot;form-group&quot;&gt; &lt;h2&gt;{{ $section['section_name'] }}&lt;/h2&gt; &lt;p&gt;{{ $section['section_description'] }}&lt;/p&gt; &lt;p&gt;{{ $section['section_intro'] }}&lt;/p&gt; &lt;/div&gt; &lt;div class=&quot;...
How to remove repetitive values from foreach loop in php
php|mysql|laravel
0
29
2
72,152,715
72,152,715
1
true
2022-05-07T12:25:05.100Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to remove repetitive values from foreach loop in php<p>Greetings I have an array of sections and the question related to that section looks like this</p>...
72,152,830
tic tac toe in c - Expected expression - what's wrong?<p>I'm trying to build a tic tac toe in c. I have to ask the user to choose the dimensions ( 3 * 3 / 4 * 4 / ..) the problem is that it keeps showing me that there is something wrong.. here is my code:</p> <pre><code>#include &lt;stdio.h&gt; #include &lt;stdlib.h&gt...
<pre><code>-- printBoard(char **board,int size); /// Expected expression - what's wrong? ++ printBoard(board,size); /// Fixed </code></pre>
tic tac toe in c - Expected expression - what's wrong?
arrays|c|tic-tac-toe
0
63
1
72,152,852
72,152,852
1
true
2022-05-07T13:09:30.597Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: tic tac toe in c - Expected expression - what's wrong?<p>I'm trying to build a tic tac toe in c. I have to ask the user to choose the dimensions ( 3 * 3 / 4 ...
72,148,673
Win32 application not finding icon for window<p>I created a icon as a resource</p> <p><a href="https://i.stack.imgur.com/8WbBM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8WbBM.png" alt="Icon in solution explorer" /></a></p> <p>I checked explorer and it works just fine, my exe now has that icon</...
<p>Symbolic constants for resource identifiers (such as <code>IDI_ICON1</code>) are usually stored in a separate header file called <em>Resource.h</em> by default. This allows both the resource script (.rc file) as well as source code to access the same symbols.</p> <p>To use the constants in source code you need to in...
Win32 application not finding icon for window
c++|winapi|resources
0
100
1
72,152,877
72,152,877
1
true
2022-05-07T00:57:05.870Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Win32 application not finding icon for window<p>I created a icon as a resource</p> <p><a href="https://i.stack.imgur.com/8WbBM.png" rel="nofollow noreferrer"...