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,141,614
Full text search failure on PostgreSQL<p>I have a PostgreSQL used to index text content. The SearchVector column is created successfully using the following code</p> <pre><code>UPDATE public.&quot;DocumentFiles&quot; SET &quot;SearchVector&quot; = setweight(to_tsvector('pg_catalog.italian', coalesce(&quot;DocumentFileN...
<p>The problem is probably that the parameter <code>default_text_search_configuration</code> is not set to <code>italian</code>, so that a different stemming algorithm is used.</p> <p>Be explicit and use <code>to_tsquery('italian', 'manuali')</code> rather than <code>'manuali'::tsquery</code>.</p>
Full text search failure on PostgreSQL
sql|postgresql|full-text-search
0
31
1
72,142,112
72,142,112
1
true
2022-05-06T12:38:47.107Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Full text search failure on PostgreSQL<p>I have a PostgreSQL used to index text content. The SearchVector column is created successfully using the following ...
72,139,953
Postgres order civic numbers by digits and letters<p>I've two columns in text format containing street names and civic numbers. I'd like to set a query to order rows by street name and then by digits and by characters (they can be uppercase or lowercase) from civ_text column</p> <p>This is what I get if I order just by...
<p>Query to extract leading number from civic numbers</p> <pre class="lang-sql prettyprint-override"><code>select civ_text, (regexp_match(civ_text, '^(\d+)'))[1] civ_text_start_number from ( values ('1/A 34'), ('1/A 36'), ('15A'), ('A2'), ('3A'), ('2'), (null), ('A'), ('4') ) as a (civ_text) order by coales...
Postgres order civic numbers by digits and letters
postgresql
0
71
2
72,142,120
72,142,120
1
true
2022-05-06T10:23:07.777Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Postgres order civic numbers by digits and letters<p>I've two columns in text format containing street names and civic numbers. I'd like to set a query to or...
72,138,007
How to get all the documents from an index in Redisearch?<p>I am using RediSearch and storing the data in an Index through documents. I want to get all the documents from the Index, please suggest.</p>
<p>This is half of an answer but perhaps it will spark a solution for you.</p> <p>I can't speak to the Spring Data Redis part—not my jam—but in RediSearch itself you can get all the documents in the index by simply passing <code>*</code> as your query:</p> <pre><code>&gt; FT.SEARCH my:index * </code></pre>
How to get all the documents from an index in Redisearch?
redis|spring-data-redis|redisearch
0
284
1
72,142,172
72,142,172
1
true
2022-05-06T07:56:41.220Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to get all the documents from an index in Redisearch?<p>I am using RediSearch and storing the data in an Index through documents. I want to get all the d...
72,142,024
How do I replace missing values with NaN<p>I am using the IMDB dataset for machine learning, and it contains a lot of missing values which are entered as '\N'. Specifically in the StartYear column which contains the movie year release I want to convert the values to integers. Which im not able to do right now, I could ...
<p>Here is a way to do it without using <code>replace</code>:</p> <pre class="lang-py prettyprint-override"><code>import pandas as pd import numpy as np df_basics = pd.DataFrame({'startYear':['\\N']*78760+[2017]*18267 + [2018]*18263+[2016]*17837+[2019]*17769+['1996 ','1993 ','2000 ','2019 ','2029 ']}) print(pd.value_co...
How do I replace missing values with NaN
python|pandas|missing-data
0
75
1
72,142,195
72,142,195
1
true
2022-05-06T13:10:53.703Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I replace missing values with NaN<p>I am using the IMDB dataset for machine learning, and it contains a lot of missing values which are entered as '\N...
72,141,980
send previous messages in group chat<p>I work at a chat application. I want to store messages in an object like this :</p> <pre><code>{ 'room1': ['msg1', 'msg2', ...] 'room2': ['msg3', 'msg4', ...] ... } </code></pre> <p>I defined a variable in my socket.io server <code>roomMessages</code> the problem is when I w...
<p>you can do something like this</p> <pre><code>const roomMessages = {}; const getMessages = (room) =&gt; roomMessages[room] || [] const addMessage = (room, message) =&gt; { roomMessages[room] = [...getMessages(room), message] } roomsNamespace.use((socket, next) =&gt; { const token = socket.handshake.query.tok...
send previous messages in group chat
javascript|node.js|sockets|websocket
0
35
1
72,142,204
72,142,204
1
true
2022-05-06T13:08:02.873Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: send previous messages in group chat<p>I work at a chat application. I want to store messages in an object like this :</p> <pre><code>{ 'room1': ['msg1', '...
72,141,896
Django form with dropdown list using Database returns empty fields<p>I'm discovering Django and I'm trying to develop a simple application.</p> <p>I have three tables in my database : One big table to report all the information to users and 2 tables to create drop down list on my form (but no usage of foreign keys on p...
<p>The solution was to add the name of the fields in <strong>form.py</strong> :</p> <pre class="lang-py prettyprint-override"><code>class ActionForm(forms.ModelForm): # Crée un formulaire se basant sur Action status = forms.ModelChoiceField(queryset=Status.objects.all()) receiving_area = forms.ModelChoiceField...
Django form with dropdown list using Database returns empty fields
python|django|django-models|django-views|django-forms
0
53
1
72,142,414
72,142,414
1
true
2022-05-06T13:01:45.820Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Django form with dropdown list using Database returns empty fields<p>I'm discovering Django and I'm trying to develop a simple application.</p> <p>I have thr...
72,142,311
ReactJS 17.0.2 seems to call function again when putting value into DOM<p>There is a strange behavior when running ReactJS 17.0.2.</p> <p>I have a function that generates a random number outside of a component. I assign the return value of this function to a constant inside the component and afterwards <code>console.lo...
<p><code>&lt;StrictMode&gt;</code> deliberately renders the component twice, and the version of react you're using also secretly overwrites <code>console.log</code> during the second render to silence the second log. So you're seeing the log from the first render, and the value from the second render.</p> <p>To see the...
ReactJS 17.0.2 seems to call function again when putting value into DOM
javascript|reactjs
0
20
1
72,142,500
72,142,500
1
true
2022-05-06T13:31:58.360Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: ReactJS 17.0.2 seems to call function again when putting value into DOM<p>There is a strange behavior when running ReactJS 17.0.2.</p> <p>I have a function t...
72,142,363
How to get characters from a file and display on console?<blockquote> <p>I got this code from notes about file handling. From what I understand about this code, I want to get characters till x is reached in the file using this code. Why am I getting only the first character? If this code is incorrect, how should I alte...
<p><code>a</code> is a character and <code>std::getline()</code> returns an <code>istream</code>. Isn't there something wrong here? You cannot assign an <code>istream</code> to a <code>char</code>, so the code doesn't even compile.</p> <p>You can simplify your code into this working example:</p> <pre><code>#include &lt...
How to get characters from a file and display on console?
c++|file|text-files|fstream|iostream
0
105
2
72,142,548
72,142,548
1
true
2022-05-06T13:35:12.393Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to get characters from a file and display on console?<blockquote> <p>I got this code from notes about file handling. From what I understand about this co...
72,142,364
Javascript Transformation Missing Objects<p>Hi I am transforming objects</p> <p>I have write the following program to add newName in the array</p> <p>If you take a look resultedEvents, categoryName and name is missing in the result.</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-b...
<p>you are returning only <code>resultedMarkets</code> in your outer <code>map</code></p> <p>just add <code>...items</code> like this</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override">...
Javascript Transformation Missing Objects
javascript
0
32
1
72,142,552
72,142,552
1
true
2022-05-06T13:35:15.597Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Javascript Transformation Missing Objects<p>Hi I am transforming objects</p> <p>I have write the following program to add newName in the array</p> <p>If you ...
72,142,449
How to subtract multiple cells<p><a href="https://i.stack.imgur.com/4o68m.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4o68m.png" alt="enter image description here" /></a></p> <p>I have the above cells and i want to substract each individual row . i.e. 137.61-137.61, 132.88-270.49 and print each o...
<p>After subtracting for the first operation, when you hold the cursor from the right and drag it to the last cell, it will automatically subtract all of them.</p> <p>If you want watch this video: <a href="https://www.youtube.com/watch?v=1ElcsZpA3h4&amp;ab_channel=ExcelTutorialsbyEasyClickAcademy" rel="nofollow norefer...
How to subtract multiple cells
excel|excel-formula|excel-2010
0
69
1
72,142,563
72,142,563
1
true
2022-05-06T13:41:00.867Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to subtract multiple cells<p><a href="https://i.stack.imgur.com/4o68m.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4o68m.png" alt="...
72,142,504
How to add methods dynamically to a javascript object<p>I have a scenario that need to add new methods to an object dynamically.</p> <p>Basically, this new method will be passed as parameter to a function. Then inside the function i will add this method to the object.</p> <pre><code>sampleFunction(() =&gt; console.log(...
<p>You can't use <code>new</code> without a constructor. For your object literal you do not even need a class/constructor. Just attach a new property.</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 prett...
How to add methods dynamically to a javascript object
javascript
0
30
1
72,142,608
72,142,608
1
true
2022-05-06T13:45:17.477Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to add methods dynamically to a javascript object<p>I have a scenario that need to add new methods to an object dynamically.</p> <p>Basically, this new m...
72,142,178
How to get list of palindrome in text?<p>I have the following interview question that may require traversing through the entire string.</p> <ul> <li><p><strong>Problem</strong> I searched about find Problem and most people do it like this <code>def palindrome(s): return s==s[::-1]</code> But this task is diffrent?</p> ...
<p>Let's try to avoid checking all the possible combinations :). My idea is, start from the extremities and converge:</p> <pre><code>def palindrome(s): out = [''] #we need the list to not be empty for the following check for main_start in range(len(s) - 1): for main_end in range(len(s) - 1, main_start, ...
How to get list of palindrome in text?
python|algorithm|data-structures
0
71
1
72,142,685
72,142,685
1
true
2022-05-06T13:22:50.040Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to get list of palindrome in text?<p>I have the following interview question that may require traversing through the entire string.</p> <ul> <li><p><stro...
72,141,291
Firebase profiling for a specific device?<p>As per <a href="https://firebase.google.com/docs/database/usage/profile" rel="nofollow noreferrer">documentation</a> we can measure the performance of our Firebase Realtime Database with the database profiler tool. Since my app is in live and I want to check bandwidth data by...
<p>The Firebase Realtime Database profiler runs on the entire database instance. There is no configuration option or API to run the profiler for a single device.</p> <p>If you want to profile the behavior of a single device, consider setting up a secondary database (in the same project or in its own project) and runnin...
Firebase profiling for a specific device?
firebase|firebase-realtime-database|firebase-cli
0
38
1
72,142,748
72,142,748
1
true
2022-05-06T12:13:25.133Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Firebase profiling for a specific device?<p>As per <a href="https://firebase.google.com/docs/database/usage/profile" rel="nofollow noreferrer">documentation<...
72,142,642
Concatenate the contents of two rows into one column (SQL DB2)<p>as it says in the title, I need to return two records but in the same column, for example (I clarify that the following code does not work, it is only to understand my case):</p> <pre><code>SELECT (NAMESS + &quot;|&quot; + LASTNAMESS), AGE FROM PERSON </c...
<p>There are 2 methods to concat the fields in DB2.</p> <ol> <li>CONCAT function -</li> </ol> <pre><code>SELECT CONCAT(NAMESS, LASTNAMESS), AGE FROM PERSON; </code></pre> <ol start="2"> <li>Concat Operator i.e. '||' -</li> </ol> <pre><code>SELECT NAMESS || LASTNAMESS, AGE FROM PERSON; </code></pre>
Concatenate the contents of two rows into one column (SQL DB2)
sql|db2
0
46
1
72,142,837
72,142,837
1
true
2022-05-06T13:53:27.593Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Concatenate the contents of two rows into one column (SQL DB2)<p>as it says in the title, I need to return two records but in the same column, for example (I...
72,142,633
ModelState.IsValid= False when upload image(bootstrap/Net core MVC)<p>I'm trying to upload an image, this is the view:</p> <pre><code>@model CrearAmigoModelo @{ ViewBag.Title = &quot;Nuevo amigo&quot;; } &lt;form asp-controller=&quot;Home&quot; asp-action=&quot;Create&quot; method=&quot;post&quot;&gt; &lt;div...
<p>Forms that are going to include files need to have an encoding type of <code>multipart/form-data</code>.</p> <pre><code>&lt;form enctype=&quot;multipart/form-data&quot;&gt; &lt;/form&gt; </code></pre> <p>Please reference the following Microsoft Docs for more information:</p> <p><a href="https://docs.microsoft.com/en...
ModelState.IsValid= False when upload image(bootstrap/Net core MVC)
c#|asp.net-mvc|asp.net-core
0
107
1
72,142,851
72,142,851
1
true
2022-05-06T13:52:32.943Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: ModelState.IsValid= False when upload image(bootstrap/Net core MVC)<p>I'm trying to upload an image, this is the view:</p> <pre><code>@model CrearAmigoModelo...
72,140,700
Scraping webpage with tabs that do not change url<p>I am trying to scrape Nasdaq webpage and have some issue with locating elements:</p> <p>My code:</p> <pre><code>from selenium import webdriver import time import pandas as pd driver.get('http://www.nasdaqomxnordic.com/shares/microsite?Instrument=CSE32679&amp;symbol=A...
<p>The <code>overview</code> page is under iframe</p> <pre><code>from selenium import webdriver from selenium.webdriver.chrome.service import Service from webdriver_manager.chrome import ChromeDriverManager from selenium.webdriver.chrome.options import Options from selenium.webdriver.support.ui import WebDriverWait f...
Scraping webpage with tabs that do not change url
python|selenium|web-scraping
0
53
2
72,142,883
72,142,883
1
true
2022-05-06T11:23:01.337Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Scraping webpage with tabs that do not change url<p>I am trying to scrape Nasdaq webpage and have some issue with locating elements:</p> <p>My code:</p> <pre...
72,142,318
VB.Net Public Property Return Blank Value<p>I'm New in Programming, i can't identify some bugs/error if the Application doesn't tell me where's the error is. So the case is i Code Public Property in purpose to show Text (ID) from FormLogin TextBox into A Lable in another form (FormInputTimeSheet) to Retrieve some data ...
<p>As what Steve Had Answered from the comment, the error has been Solved by Changing</p> <pre><code> Dim FIT As New FormInputTimeSheet FIT.NIKLookup2 = FlTbNIK.Text Me.Hide() ***FormInputTimeSheet.Show()*** MessageBox.Show(&quot;Login Success! Selamat Datang &quot; &amp; table.Rows(0)(1).ToString())...
VB.Net Public Property Return Blank Value
vb.net|visual-studio
0
57
1
72,142,953
72,142,953
1
true
2022-05-06T13:32:15.323Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: VB.Net Public Property Return Blank Value<p>I'm New in Programming, i can't identify some bugs/error if the Application doesn't tell me where's the error is....
72,140,581
Rendering multiple boxes only displays correctly if perfectly squared<p>I'm using some logic to add boxes to my scene, based on how many items in height, width and depth, and that works well when they are all perfectly squared.</p> <p><a href="https://i.stack.imgur.com/HdDSX.png" rel="nofollow noreferrer"><img src="htt...
<p>Change <code>mesh.position.set(x, y, z)</code> to <code>mesh.position.set(x, y, z * 4)</code>. Your boxes are 4 units deep in the z direction, but you're only moving the second rank of boxes by 1 unit, so they're overlapping.</p>
Rendering multiple boxes only displays correctly if perfectly squared
javascript|graphics|three.js
0
48
1
72,143,057
72,143,057
1
true
2022-05-06T11:13:21.630Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Rendering multiple boxes only displays correctly if perfectly squared<p>I'm using some logic to add boxes to my scene, based on how many items in height, wid...
72,143,014
How to get data from MySQL and after 30 second fetch it again in Node.js?<p>I'm trying to do is fetching the data according to timestamp from DB once (call it origin) and wait for 30sec fetch it again with same query(call it recent) in Node.js.</p> <p>Compare them if origin and recent is equal or not then do something ...
<p><code>setTimeout</code> doesn't do async at all, and just returns a Timeout object, as you noticed. (<code>await</code>ing something that's not a Promise will just return the object itself.)</p> <p>You'll want something like this. The <code>delay</code> function is a common pattern to make <code>setTimeout</code> aw...
How to get data from MySQL and after 30 second fetch it again in Node.js?
javascript|mysql|node.js|asynchronous|async-await
0
45
1
72,143,065
72,143,065
1
true
2022-05-06T14:20:32.493Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to get data from MySQL and after 30 second fetch it again in Node.js?<p>I'm trying to do is fetching the data according to timestamp from DB once (call i...
72,142,441
Javascript debounce for mousemove event not working<p>I checked SO and found this answer <a href="https://stackoverflow.com/questions/23181243/throttling-a-mousemove-event-to-fire-no-more-than-5-times-a-second">link</a> and wrote my solution <a href="https://codepen.io/maximar1es/pen/GRQpBRN" rel="nofollow noreferrer">...
<p>You wrapped <code>onMouseMoveHandler</code> in a function which prevents the debounced function from getting called. While you could do <code>debounce(...)()</code> to call it that won't be the behaviour you desire. Instead, you should make it a plain variable and assign it to the debounced function return from <cod...
Javascript debounce for mousemove event not working
javascript
0
53
1
72,143,266
72,143,266
1
true
2022-05-06T13:40:45.133Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Javascript debounce for mousemove event not working<p>I checked SO and found this answer <a href="https://stackoverflow.com/questions/23181243/throttling-a-m...
72,143,183
How to randomly simulate an array of records based on a representative record and property-specific generator functions?<p>When given a <em>structure</em> of one record, how can I randomly simulate <em>n</em> records of the same structure?</p> <h2>Example</h2> <p>Consider that I have an array of records such as:</p> <p...
<p>structureTemplateGenerators should be a function that returns one new generated data structure. Right now, it just creates a single structure with the values set already.</p> <pre><code>const structureTemplateGenerators = () =&gt; ({ id: generateId(), // 5-digit number createdAt: generateDate(), // yyyy-mm-...
How to randomly simulate an array of records based on a representative record and property-specific generator functions?
javascript|random|simulation|record
0
32
1
72,143,295
72,143,295
1
true
2022-05-06T14:32:29.167Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to randomly simulate an array of records based on a representative record and property-specific generator functions?<p>When given a <em>structure</em> of...
72,142,867
Django: After updating a template, the changes are not reflected upon refreshing the page in the browser<p>I am testing a class based view in my Django application. I am currently in development, so I want to see changes in the browser as soon as I make any change in a template.</p> <p><strong>The urls.py of the main a...
<p>I guess your template is only loaded during initialization:</p> <pre><code>loader.get_template('myapp/all.html') </code></pre> <p>You can try the following, which is also suggested by the <a href="https://docs.djangoproject.com/en/4.0/topics/class-based-views/intro/" rel="nofollow noreferrer">django documentation</a...
Django: After updating a template, the changes are not reflected upon refreshing the page in the browser
python-3.x|django|django-views
0
79
2
72,143,353
72,143,353
1
true
2022-05-06T14:10:33.240Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Django: After updating a template, the changes are not reflected upon refreshing the page in the browser<p>I am testing a class based view in my Django appli...
72,142,679
Can i have a one to many from a select case statement?<p>I have two tables that I'm working on for a project at work. The first table (crm_users) has id, username and 16 fields that start with &quot;state_license_&quot; with a state abbreviation at the end.</p> <p>The second table has a unique constraint on the userna...
<p>You would need the function <code>UNPIVOT</code>, but MySQL does not have it. In its absence the best option is <code>UNION ALL</code>.</p> <blockquote> <pre><code>select id, username, 'Alabama' as State, state_license_AL from crm_users union all select id, username, 'California' as State, state_license_CA from c...
Can i have a one to many from a select case statement?
mysql
0
36
2
72,143,359
72,143,359
1
true
2022-05-06T13:56:49.690Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can i have a one to many from a select case statement?<p>I have two tables that I'm working on for a project at work. The first table (crm_users) has id, us...
72,143,458
Add additional labels from a DataFrame to a facet_grid with existing label<p>I have a set data that I need to add to levels of labels. One on a single chart within the facet grid, and one from a small dataframe with entries for for each chart.</p> <p>In the example below you'll see that I can add to a single chart no p...
<p>It's not working in your second code because in the second <code>geom_text</code>, your <code>mpg</code> and <code>wt</code> in not in <code>aes()</code>. Also, these two variables are absent in your <code>dfl</code>.</p> <p>If you wish to have better control of the labelling of your <code>r</code> variable, you can...
Add additional labels from a DataFrame to a facet_grid with existing label
r|ggplot2|label|data-visualization|facet
0
48
1
72,143,603
72,143,603
1
true
2022-05-06T14:51:19.693Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Add additional labels from a DataFrame to a facet_grid with existing label<p>I have a set data that I need to add to levels of labels. One on a single chart ...
72,143,522
How to fix problems in docker postgres connection?<p>Tried to raise docker postres + docker flask. Neither of them was raised! I read some guides and watch videos about postgres and flask in docker, but stil can't start project. I have 2 problems: Firstly, in the docker container for postgres i have the problem:&quot;<...
<p>First error is related with line</p> <pre><code>test: [ &quot;CMD&quot;, &quot;pg_isready&quot;, &quot;-q&quot;, &quot;-d&quot;, &quot;postgres&quot;, &quot;-U&quot;, &quot;root&quot; ] </code></pre> <p><a href="https://www.postgresql.org/docs/current/app-pg-isready.html" rel="nofollow noreferrer">https://www.postgr...
How to fix problems in docker postgres connection?
python|postgresql|docker
0
78
1
72,143,657
72,143,657
1
true
2022-05-06T14:55:24.180Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to fix problems in docker postgres connection?<p>Tried to raise docker postres + docker flask. Neither of them was raised! I read some guides and watch v...
72,143,239
loop through array issue<p>I am calling an API that returns an array, i am trying to loop through the array but console is saying that the lenght is 0, never seen anything like it before and can not find out what is the issue here:</p> <pre><code>const funCall=async()=&gt;{ const userNFTsURLs = await prepareData...
<p>Your problem is you're using <code>forEach</code> which is not waiting for results as you expected.</p> <p>You should modify it to a usual <code>for</code> loop to get rid of <code>async</code> callback function in <code>forEach</code>.</p> <pre><code>for(const tokenId of tokenIds) { const token = await bloc...
loop through array issue
javascript|reactjs
0
42
1
72,143,692
72,143,692
1
true
2022-05-06T14:36:19.503Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: loop through array issue<p>I am calling an API that returns an array, i am trying to loop through the array but console is saying that the lenght is 0, never...
72,143,665
How to detect the number of grouped data based on their frequency<p>I have a vector of numbers</p> <pre><code> x &lt;- c(1,1,1,3,3,3,2,2,1,2,1,2,55,56,55,54,55,54,53,55,56,55,7,7,9,9,8,8,11,110,111,11,112,113,111,112,33) </code></pre> <p>if I plot x, <code>hist(x)</code> The histogram shows that the data are grouped in...
<p>This uses <code>hist()</code>, but does not generate the plot:</p> <pre class="lang-r prettyprint-override"><code>x &lt;- c(1,1,1,3,3,3,2,2,1,2,1,2,55, 56,55,54,55,54,53,55,56,55, 7,7,9,9,8,8,11,110,111,11, 112,113,111,112,33) h &lt;- hist(x, plot=FALSE) newx &lt;- cut(x, breaks=h$breaks, includ...
How to detect the number of grouped data based on their frequency
r
0
33
1
72,143,746
72,143,746
1
true
2022-05-06T15:06:10.213Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to detect the number of grouped data based on their frequency<p>I have a vector of numbers</p> <pre><code> x &lt;- c(1,1,1,3,3,3,2,2,1,2,1,2,55,56,55,54,...
72,143,715
mongodb query $in operator, fetch by ObjectId in Array<p>All my documents have a structure like this:</p> <pre><code>{ operational: {availableFleet: [Objectid('5bad3f452641a1186d21b5f8'), ...]} } </code></pre> <p>So every document has an operational key with many other keys inside, one of them being availableFleet w...
<p>Should be:</p> <pre><code>{'operational.availableFleet': ObjectId('5bad3f452641a1186d21b5f8')} </code></pre> <p>No need for <code>$in</code> as this is for the case of multiple options for the <code>ObjectId('5bad3f452641a1186d21b5f8')</code>.</p> <p>And nested objects are marked with a <code>.</code></p>
mongodb query $in operator, fetch by ObjectId in Array
mongodb
0
26
1
72,143,754
72,143,754
1
true
2022-05-06T15:10:41.410Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: mongodb query $in operator, fetch by ObjectId in Array<p>All my documents have a structure like this:</p> <pre><code>{ operational: {availableFleet: [Obje...
72,143,755
String Into Integer while sorting<p>Curious if there is a way to convert a string into an integer, only during the sort_values() process, or if it's easier to convert the variable to an integer prior to sorting and then convert back to string after sorting.</p> <p>Current code ran, but code is not correct, because I be...
<p>You can pass a sorting key to <code>sort_values</code>:</p> <pre class="lang-py prettyprint-override"><code>out = df.sort_values(by='D_Index', key=lambda x: x.astype(int)) </code></pre> <p>Output:</p> <pre class="lang-py prettyprint-override"><code> Model D_Index 2 Third 2 5 Sixth 3 0 First ...
String Into Integer while sorting
python|pandas|spyder
0
58
2
72,143,813
72,143,813
1
true
2022-05-06T15:13:20.730Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: String Into Integer while sorting<p>Curious if there is a way to convert a string into an integer, only during the sort_values() process, or if it's easier t...
72,143,772
Extract text after first upper case or space<p>How can I extract all text after first space in a column where data is something like this</p> <pre><code>structure(list(value = c(&quot;1.1.a Blue sea&quot;, &quot;1.2.a Red ball&quot;)), row.names = c(NA, -2L), class =c(&quot;tbl_df&quot;, &quot;tbl&quot;, &quot;data.fra...
<p>You can use the following code to select all text after the first white space:</p> <pre><code>sub(&quot;^\\S+\\s+&quot;, '', df$value) </code></pre> <p>Output:</p> <pre><code>[1] &quot;Blue sea&quot; &quot;Red ball&quot; </code></pre> <p>You can just use this to create it as a new column:</p> <pre><code>library(dply...
Extract text after first upper case or space
r|dplyr|stringr
0
99
2
72,143,884
72,143,884
1
true
2022-05-06T15:14:28.843Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Extract text after first upper case or space<p>How can I extract all text after first space in a column where data is something like this</p> <pre><code>stru...
72,143,960
hold an private array with module pattern js<p>I'm using module pattern on JS. Trying to make 2 private properties which first property will hold the number i.e 3. The second property is array of string which hold the items. I've been trying but it gives me an error (undefined)</p> <p><div class="snippet" data-lang="js...
<p><code>addObject</code> does not return any data from <code>arrhold</code>. If you want to add and print that array, you should add <code>return</code> to <code>addObject</code></p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="...
hold an private array with module pattern js
javascript
0
28
2
72,144,030
72,144,030
1
true
2022-05-06T15:27:33.497Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: hold an private array with module pattern js<p>I'm using module pattern on JS. Trying to make 2 private properties which first property will hold the number ...
72,143,330
Use environment variable as default for another env variable in Kubernetes<p>Is there a way to use an environment variable as the default for another? For example:</p> <pre><code>apiVersion: v1 kind: Pod metadata: name: Work spec: containers: - name: envar-demo-container image: gcr.io/google-samples/node-hell...
<p>I don't think there is a way to do that but anyway you can try something like this</p> <pre><code>apiVersion: v1 kind: Pod metadata: name: Work spec: containers: - name: envar-demo-container image: gcr.io/google-samples/node-hello:1.0 args: - RESULT=${SOMETIMES_SET:-${ALWAYS_SET}}; command_to_run_a...
Use environment variable as default for another env variable in Kubernetes
kubernetes
0
63
1
72,144,130
72,144,130
1
true
2022-05-06T14:43:32.840Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Use environment variable as default for another env variable in Kubernetes<p>Is there a way to use an environment variable as the default for another? For ex...
72,143,844
insert into NedB boolean value without quotation marks<p>I have a NedB database which I'm trying to insert some new data into that I retrieve from HTML form, this is my function to insert new.</p> <pre><code>addEntry(name,desc,ingred,allergy,cat,aval,price){ var entry = { Name: name, Des...
<p>Assuming that the parameter <code>aval</code> is a string, you could convert it to a boolean:</p> <pre class="lang-js prettyprint-override"><code>var entry = { Name: name, Description: desc, Ingerdients: ingred.split(','), Allergy: allergy.split(','), Category: cat, Availability: aval === &quot;true&quot...
insert into NedB boolean value without quotation marks
node.js|express|nedb
0
50
1
72,144,174
72,144,174
1
true
2022-05-06T15:19:29.193Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: insert into NedB boolean value without quotation marks<p>I have a NedB database which I'm trying to insert some new data into that I retrieve from HTML form,...
72,143,870
Summarizing table sales<p>I have order table like</p> <pre><code>CustomerId OrderAmount Orderdatetime OrderAmountCurrency AAA 120 02/03/2022 02:03 US$120 AAA 20 02/03/2022 02:20 US$20 AAA 320 03/03/2022 03:03 US$320 BBB 300 02/03/2022 02:03 $300 BBB 20 02/03/2022 02:20 $20 BBB 200 02/03/2022 03:03 ...
<p>In powerquery, it requires grouping on CustomID, with a bit of custom code as below</p> <pre><code>let Source = Excel.CurrentWorkbook(){[Name=&quot;Table1&quot;]}[Content], #&quot;Changed Type&quot; = Table.TransformColumnTypes(Source,{{&quot;Orderdatetime&quot;, type datetime}, {&quot;OrderAmount&quot;, type numbe...
Summarizing table sales
powerbi|dax|powerquery
0
25
1
72,144,235
72,144,235
1
true
2022-05-06T15:20:52.987Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Summarizing table sales<p>I have order table like</p> <pre><code>CustomerId OrderAmount Orderdatetime OrderAmountCurrency AAA 120 02/03/2022 02:03 US$1...
72,142,099
Disable Redhat Openshift Service on AWS<p>I've enabled RedHat OpenShift Service on AWS but can't find an intuitive way to disable it.</p> <p>Wondering if anyone has idea and also if the ROSA CLI is the only way to do it?</p> <p><a href="https://i.stack.imgur.com/84p88.png" rel="nofollow noreferrer"><img src="https://i....
<p>There's no cost or penalty for leaving the ROSA service enabled. I'm not aware that it's actually <em>possible</em> to disable the service, but if you don't need it, you won't be charged anything.</p> <p>The cost structure is basically a $0.03/hour cost for each ROSA cluster that you run. There is also <em>either</e...
Disable Redhat Openshift Service on AWS
amazon-web-services|openshift|devops|redhat-containers
0
106
1
72,144,248
72,144,248
1
true
2022-05-06T13:17:00.910Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Disable Redhat Openshift Service on AWS<p>I've enabled RedHat OpenShift Service on AWS but can't find an intuitive way to disable it.</p> <p>Wondering if any...
72,143,726
Dynamically add textfields with a for each loop and a button in swiftUI<p>I am trying to use a <code>ForEach</code> loop to dynamically add textfields inside a form section with a button.</p> <pre><code>Form { ForEach(0..&lt;numberOfItems, id: \.self) { _ in TextField(&quot;&quot;, t...
<p>The issue you are having boils down to trying to figure this out from demonstration code. You should really avoid using indices in <code>Lists</code> if at all possible, though there are some workarounds. In this case, the easiest thing to do is to create a <code>struct</code> conforming to <code>Identifiable</code>...
Dynamically add textfields with a for each loop and a button in swiftUI
swift|core-data|swiftui
0
213
2
72,144,270
72,144,270
1
true
2022-05-06T15:11:49.397Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Dynamically add textfields with a for each loop and a button in swiftUI<p>I am trying to use a <code>ForEach</code> loop to dynamically add textfields inside...
72,141,180
XSLT multiple templates in stylsheet with same match?<p>Even there are almost the same question, i dont get the result dont for me.</p> <p>The idea may be simple, but i dont understand all the processes in the background very well to solve that.</p> <p>I got multiple templates with the same match showing different resu...
<p>If you do want to invoke multiple templates for the same node, the answer is to use modes:</p> <pre><code>&lt;xsl:template match=&quot;/&quot; mode=&quot;Depth&quot;&gt; ... &lt;/xsl:template&gt; &lt;xsl:template match=&quot;/&quot; mode=&quot;Petro&quot;&gt; ... &lt;/xsl:template&gt; &lt;xsl:template match=&quo...
XSLT multiple templates in stylsheet with same match?
xml|xslt|xslt-1.0
0
66
2
72,144,338
72,144,338
1
true
2022-05-06T12:03:52.423Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: XSLT multiple templates in stylsheet with same match?<p>Even there are almost the same question, i dont get the result dont for me.</p> <p>The idea may be si...
72,143,817
How do I provide environmental variable with my custom Cloud Foundry buildpack?<p>I have extra simple custom sidecar buildpack. All it does in <code>/bin/supply</code> is downloading and untarring to <code>$DEPS_DIR/$DEPS_IDX/mylibrary</code> certain dependency library. Since I can have more than one sidecar buildpack ...
<p>Put script exporting that value to <code>${BUILD_DIR}/.profile.d/</code> directory (it's where app located at build). All scripts from there are moved to <code>/etc/profile.d</code> and sourced at buildpack launch. BUILD_DIR should be visible during <code>/bin/supply</code></p>
How do I provide environmental variable with my custom Cloud Foundry buildpack?
environment-variables|cloud-foundry
0
29
1
72,144,348
72,144,348
1
true
2022-05-06T15:17:17.547Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I provide environmental variable with my custom Cloud Foundry buildpack?<p>I have extra simple custom sidecar buildpack. All it does in <code>/bin/sup...
72,141,293
Using ssh to login to linux terminal from windows and run command in a logged in shell<p>First of all, this may seem like a duplicate question but I have searched stack overflow/various other forum sites and still haven't managed to find a solution.</p> <p>A few example forum posts I have reviewed to prove I've done my...
<p>Try this :</p> <pre><code>start cmd /k ssh user@host &quot;/full/path/to/roslaunch launchFile.launch; exec /bin/bash&quot; </code></pre>
Using ssh to login to linux terminal from windows and run command in a logged in shell
linux|windows|ssh|cmd|ros
0
804
1
72,144,514
72,144,514
1
true
2022-05-06T12:13:34.527Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Using ssh to login to linux terminal from windows and run command in a logged in shell<p>First of all, this may seem like a duplicate question but I have sea...
72,143,869
How to jest.mock an ES6 module import?<p>I've moved a load of helper methods into a npm published library, but some of them are being mocked in the unit tests and I can't figure out how to mock the new imports.</p> <p>Throughout my code I am able to successfully refactor .tsx files like so:</p> <p>FROM:</p> <pre><code>...
<p>Have you try to mock like this</p> <pre><code>jest.mock('@mine/my-lovely-libary', () =&gt; ({ doSomething: () =&gt; doSomethingMock, })); </code></pre> <p>here doSomething is a method from your npm library</p> <p>doSomethingMock can be jest.fn() or something like this <code>const doSomethingMock = 'mockTestValue...
How to jest.mock an ES6 module import?
reactjs|unit-testing|jestjs|es6-modules|tsx
0
1,218
1
72,144,563
72,144,563
1
true
2022-05-06T15:20:47.163Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to jest.mock an ES6 module import?<p>I've moved a load of helper methods into a npm published library, but some of them are being mocked in the unit test...
72,142,689
Single thread and asynchronous confusion<p>I've read various articles and similar questions, and I know that the two concepts are different, but I don't seem to know the correct answer.</p> <p>I understood that <code>thread</code> is in terms of number of workers, and <code>sync/async</code> is in terms of task order. ...
<p>The example is great &amp; funny. Do not forget to take later the other one for &quot;Multi-thread &amp; async&quot; otherwise it will be burnt ;) . Otherwise, It seems correct overall to me.</p> <p>The example is not very good for the &quot;Single-thread &amp; async&quot; case though and it might be the source of c...
Single thread and asynchronous confusion
multithreading|asynchronous|synchronous|single-threaded
0
70
1
72,144,582
72,144,582
1
true
2022-05-06T13:57:32.343Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Single thread and asynchronous confusion<p>I've read various articles and similar questions, and I know that the two concepts are different, but I don't seem...
72,142,177
doing a task after a looping YAML template-ized azure devOps pipeline<p>I have a YAML Azure DevOps pipeline that loops through series of configurations, copying artifacts to various places. What I want to do is, after the looping is done, to do something else (I'd like to send an email, but the question is more genera...
<p>Just define a new stage:</p> <pre><code>stages: - ${{ each configuration in parameters.configuration }}: - template: build.yml@templates parameters: configuration: ${{ configuration }} appName: all - stage: secondStage jobs: - job: jobOne steps: - task: ...
doing a task after a looping YAML template-ized azure devOps pipeline
azure-devops|yaml|azure-pipelines
0
65
1
72,144,637
72,144,637
1
true
2022-05-06T13:22:46.250Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: doing a task after a looping YAML template-ized azure devOps pipeline<p>I have a YAML Azure DevOps pipeline that loops through series of configurations, copy...
72,144,501
Oracle SQL: dummy variable from 2 data sets<p>I have two data tables. They both have an employee id column and a sales quarter column, in addition to lots of other columns. The first, which ill call &quot;Roster&quot;, has one row per employee per sales quarter. The second has multiple rows per employee per quarter,...
<p>If clauses are not possible in this way, you need a case when instead:</p> <pre><code>...CASE WHEN saletype = 'cold call' THEN 1 ELSE 0 END AS ColdCall... </code></pre>
Oracle SQL: dummy variable from 2 data sets
sql|oracle
0
32
1
72,144,722
72,144,722
1
true
2022-05-06T16:10:14.923Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Oracle SQL: dummy variable from 2 data sets<p>I have two data tables. They both have an employee id column and a sales quarter column, in addition to lots o...
72,143,672
dotNet Core 5 API Service adds objects to list but result has multiple copies of the last item<p>dotNet Core 5 C# Web API project, Service class adds objects (based on a viewmodel) to a list. Debugging shows all data correct as the object is built and added to the List, but the returned result has multiple (matching t...
<p>You're adding the same <code>accountSet</code> instance to the list multiple times, only modifying it in the loop. Thus all references to it in the list will &quot;have&quot; the most recently set values.</p> <p>You need to create a new <code>GlAccountSetViewModel</code> instance in the loop and add that one, or mak...
dotNet Core 5 API Service adds objects to list but result has multiple copies of the last item
c#|.net-core
0
14
1
72,144,727
72,144,727
1
true
2022-05-06T15:06:44.397Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: dotNet Core 5 API Service adds objects to list but result has multiple copies of the last item<p>dotNet Core 5 C# Web API project, Service class adds objects...
72,144,083
Is there a special way to upload url images to firebase?<blockquote> <p>Blockquote</p> </blockquote> <p>I'm building my app in Nuxt and Vuetify and I want to upload url images to Firebase with Axios using inputs (v-file-input). I have no problems with names but when I upload an url image and when I make the get call th...
<p>Storing an URL in Firestore will not store the referenced image itself.</p> <ol> <li>You might upload the image to Storage and a reference it in Firestore.</li> <li>Or you store the URL in Firestore and initiate a HTTP-GET request in your app to load the image from the web.</li> </ol> <p>Note:</p> <p>Firestore limit...
Is there a special way to upload url images to firebase?
firebase|axios|nuxt.js|vuetify.js
0
111
2
72,144,766
72,144,766
1
true
2022-05-06T15:37:16.210Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is there a special way to upload url images to firebase?<blockquote> <p>Blockquote</p> </blockquote> <p>I'm building my app in Nuxt and Vuetify and I want to...
72,142,794
Pass an Image imported to react Component via props<p>Happy friday all,</p> <p>Trying to pass an image that I have imported to a react component.</p> <p>My React component:</p> <pre><code>import React from &quot;react&quot;; function profile(props) { return ( &lt;&gt; &lt;img className=&quot;ab...
<p>If your image path is correct then change</p> <pre><code>&lt;img className=&quot;absolute object-cover w-full h-full rounded&quot; src={props.pfp} alt=&quot;Person&quot; /&gt; </code></pre> <p>to</p> <pre><code> &lt;img className=&quot;absolute object-cover w-full h-full rounded&quot; ...
Pass an Image imported to react Component via props
reactjs|components|jsx
0
51
1
72,144,856
72,144,856
1
true
2022-05-06T14:04:44.337Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Pass an Image imported to react Component via props<p>Happy friday all,</p> <p>Trying to pass an image that I have imported to a react component.</p> <p>My R...
72,144,050
Does Plotly similar function like matplotlib fill_between<p>I am converting some matplotlib code to Plotly.</p> <p>Does Plotly have something similar to matplotlib fill_between</p> <p>Code to convert</p> <pre><code> # ax.fill_between(fcst_t, fcst['yhat_lower'], fcst['yhat_upper'], # color='...
<p><code>go.Scatter</code> has a <code>fill</code> keyword that can be used to control the fill behavior. You can read more at this <a href="https://plotly.com/python/filled-area-plots/" rel="nofollow noreferrer">documentation page</a> or by typing <code>help(go.Scatter)</code>.</p> <pre><code>import plotly.graph_objec...
Does Plotly similar function like matplotlib fill_between
python|plotly|plotly.graph-objects
0
82
1
72,144,904
72,144,904
1
true
2022-05-06T15:34:52.530Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Does Plotly similar function like matplotlib fill_between<p>I am converting some matplotlib code to Plotly.</p> <p>Does Plotly have something similar to matp...
72,139,901
Adding shipping rate to checkout session results in "invalid array" exception<p>I am creating a checkout session where I want to add shipping rate which I've created in Stripe Dashboard.</p> <p>This is my code:</p> <pre><code>$charge = $stripeClient-&gt;checkout-&gt;sessions-&gt;create([ 'payment_method_types' ...
<p>Right now your code is just passing a single hash for <code>shipping_options</code> instead of an array, so instead of this:</p> <pre><code> 'shipping_options' =&gt; [ 'shipping_rate' =&gt; [env('SHIPPING_KEY')], ], </code></pre> <p>you need to move the brackets to look like this:</p> <pre><...
Adding shipping rate to checkout session results in "invalid array" exception
php|laravel|stripe-payments
0
104
1
72,144,977
72,144,977
1
true
2022-05-06T10:18:55.467Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Adding shipping rate to checkout session results in "invalid array" exception<p>I am creating a checkout session where I want to add shipping rate which I've...
72,145,036
check if multiples values exists in React<p>I have the foloowing data from an api</p> <pre><code> obj = { firstName: &quot;John&quot;, lastName : &quot;Doe&quot;, job :null id : 5566, }; </code></pre> <p>i want to check if the value is not empty in the <code>obj</code> before rendering I tried</p> <p...
<p>You can make use of optional chaining (?.) to make it more efficient and feasible. Even nested objects can be validated a?.b?.c?.d . For more info look into this : <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining" rel="nofollow noreferrer">https://developer.mozi...
check if multiples values exists in React
reactjs
0
85
5
72,145,236
72,145,236
1
true
2022-05-06T16:57:28.947Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: check if multiples values exists in React<p>I have the foloowing data from an api</p> <pre><code> obj = { firstName: &quot;John&quot;, lastName : &quot;D...
72,142,521
Ho to create serializer for model having foreign keys to access that foreign keys tables data also?<p>I want to rewrite the following API in a more efficient way using the serializer. In the following API, the <em>user</em> and <em>group</em> are foreign keys.</p> <p>I want to return all matching data of <em>group</em>...
<p>You could use the Django Rest Framework <code>ModelSerializer</code> to do this. Create a serializer using the model <code>GroupPostsModel</code></p> <pre><code>class GroupPostsSerializer(serializers.ModelSerializer): id = IntegerField() post_text = CharField() ... group_id = IntegerField(source=&qu...
Ho to create serializer for model having foreign keys to access that foreign keys tables data also?
django|django-models|django-rest-framework|django-views|django-orm
0
41
1
72,145,425
72,145,425
1
true
2022-05-06T13:46:28.447Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Ho to create serializer for model having foreign keys to access that foreign keys tables data also?<p>I want to rewrite the following API in a more efficient...
72,145,079
Media-queries not working on Sass project<p>I am working on a Sass project and everything worked properly, but media queries are not working. I tried adding them at the bottom of the document, adding in the chain of labels, having more specificity than the normal chain and nothing is working. Do you know what the probl...
<pre><code>&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt; </code></pre> <p>Without a viewport meta tag, your site will be rendered into the device's default virtual viewport.</p>
Media-queries not working on Sass project
html|css|sass|media-queries
0
116
1
72,145,432
72,145,432
1
true
2022-05-06T17:01:51.140Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Media-queries not working on Sass project<p>I am working on a Sass project and everything worked properly, but media queries are not working. I tried adding ...
72,143,938
Azure Functions: StatusCode cannot be set because the response has already started<p>I am trying to stream data from my Azure Function and all is fine but I get an error after it has executed.</p> <p>This is the code:</p> <pre class="lang-cs prettyprint-override"><code>[FunctionName(&quot;QueryData&quot;)] public async...
<p>After reproducing from our end we could able to get this work when we tried fixing the return type and return the EmptyResult i.e., <code>return new EmptyResult();</code>.</p> <pre><code>[FunctionName(&quot;Function1&quot;)] public static async Task&lt;EmptyResult&gt; Run( [HttpTrigger(Authorizat...
Azure Functions: StatusCode cannot be set because the response has already started
c#|azure|asynchronous|azure-functions
0
131
1
72,145,487
72,145,487
1
true
2022-05-06T15:26:04.170Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Azure Functions: StatusCode cannot be set because the response has already started<p>I am trying to stream data from my Azure Function and all is fine but I ...
72,145,409
Firebase React Native Expo login error with google<p>Error message : <code>(0, _auth.signInWithRedirect) is not a function. (In '(0, _auth.signInWithRedirect)(_firebaseConfig.authentication, _firebaseConfig.provider)', '(0, _auth.signInWithRedirect)' is undefined)</code></p> <hr /> <p>Even though I did everything right...
<p><code>signInWithRedirect</code> does not work in React Native. From Firebase <a href="https://firebase.blog/posts/2016/07/firebase-react-native" rel="nofollow noreferrer">blog</a> -</p> <blockquote> <p>Headful&quot; auth methods such as signInWithPopup(), signInWithRedirect(), linkWithPopup(), and linkWithRedirect()...
Firebase React Native Expo login error with google
android|firebase|react-native|expo
0
420
1
72,145,521
72,145,521
1
true
2022-05-06T17:33:45.490Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Firebase React Native Expo login error with google<p>Error message : <code>(0, _auth.signInWithRedirect) is not a function. (In '(0, _auth.signInWithRedirect...
72,145,230
How to filter array of nested objects with unknown depth based on given search term<p>There are similar answers here but all of the ones I've seen and tested don't go pass two levels deep, so I don't think this is a duplicate problem...I am trying to filter an array of objects. Each of its objects can have other nested...
<p>I think you'll want something like this:</p> <pre class="lang-js prettyprint-override"><code>const filterByLabel = (array, searchTerm) =&gt; { return array.reduce((prev, curr) =&gt; { const children = curr.children ? filterByLabel(curr.children, searchTerm) : undefined; return curr.label...
How to filter array of nested objects with unknown depth based on given search term
javascript|reactjs|recursion
0
189
1
72,145,536
72,145,536
1
true
2022-05-06T17:15:32.433Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to filter array of nested objects with unknown depth based on given search term<p>There are similar answers here but all of the ones I've seen and tested...
72,133,863
How do I detect if someone has removed my Google Workspace Add-On?<p>I'm creating a public Google Workspace Add On and I'd like to detect when the add-on has been removed.</p> <p>I don't see a way to do this in the <a href="https://developers.google.com/apps-script/add-ons/overview" rel="nofollow noreferrer">documentat...
<p>After extensive research through <a href="https://developers.google.com/apps-script/add-ons/how-tos/building-workspace-addons" rel="nofollow noreferrer">official documentation</a> I can confirm that at the date of this answer, there's no option to know when a user has removed your Add-on, either via the Add-On itsel...
How do I detect if someone has removed my Google Workspace Add-On?
google-workspace-add-ons
0
35
1
72,145,562
72,145,562
1
true
2022-05-05T21:31:00.667Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I detect if someone has removed my Google Workspace Add-On?<p>I'm creating a public Google Workspace Add On and I'd like to detect when the add-on has...
72,145,469
vuejs basic conditional rendering issue<p>I simply just want to show the span if the name is found in the data. If its not found in the data, I want the span to hide. I am using simply v-if or v-else.It is currently displaying &quot;my name is in the data&quot;. But it is not. I basically will have some names...and wan...
<p>I think it's better to do your conditionals like this</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override"><code>new Vue({ el: "#app", data: { FirstName:'Paul', }, meth...
vuejs basic conditional rendering issue
vue.js
0
53
3
72,145,576
72,145,576
1
true
2022-05-06T17:40:05.217Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: vuejs basic conditional rendering issue<p>I simply just want to show the span if the name is found in the data. If its not found in the data, I want the span...
72,139,327
Gstreamer: Is there way to convert h264 video-stream from byte-stream to avc format<p>I would need the above mentioned method to convert h264 stream with stream format byte-stream to avc (sort of packetized format) in order for it to be fed into matroskamux</p> <p>I have used C codes to program my pipeline and I have t...
<p>The full source or a minimal reproducible example would be useful to help you better. It seems like matroskamux is not being considered during the caps negotiation so AVC conversion is not being forced.</p> <p>Ideally, you want to figure out why this is happening. But you can simply force the conversion from byte-st...
Gstreamer: Is there way to convert h264 video-stream from byte-stream to avc format
gstreamer|h.264
0
393
1
72,145,631
72,145,631
1
true
2022-05-06T09:38:15.010Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Gstreamer: Is there way to convert h264 video-stream from byte-stream to avc format<p>I would need the above mentioned method to convert h264 stream with str...
72,145,589
Specifying fill color independent of mapping aesthetics in boxplot (R ggplot)<p>I have a lot of categorical variables that are going into a single graph, which is split on a particular status. Something like this, but with many more groups</p> <pre><code>dat &lt;- as.data.table(cbind(iris, Status = rep(c(&quot;High&quo...
<p>We can use <code>interaction</code> for the <code>fill</code> parameter, then we can color each box plot with <code>scale_fill_manual </code>.</p> <pre><code>library(ggplot2) ggplot(dat, aes(x = Species, y = Petal.Width, fill = interaction(Status,Species))) + geom_boxplot(position = position_dodge(width = 0.9)) +...
Specifying fill color independent of mapping aesthetics in boxplot (R ggplot)
r|ggplot2|boxplot|fill|aesthetics
0
105
1
72,145,717
72,145,717
1
true
2022-05-06T17:52:35.890Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Specifying fill color independent of mapping aesthetics in boxplot (R ggplot)<p>I have a lot of categorical variables that are going into a single graph, whi...
72,145,616
Every time I train my CNN on matlab, is it remembering the old weights from the previous time I trained it? Or does it reset them?<p>So for example, I have trained a CNN on my data using a learning rate of 0.0003 and 10 epochs, with a minibatch size of 32. After training it, lets say I get an accuracy of 0.7. Now I wan...
<p><strong>It will start from scratch each time.</strong></p> <p>MATLAB <em>does</em> support transfer learning which can be useful if you want to fine tune a pretrained model, but you have to program it to do so. Here's an article on transfer learning in MATLAB (I guess so you can make sure you're not doing it!)</p> <...
Every time I train my CNN on matlab, is it remembering the old weights from the previous time I trained it? Or does it reset them?
matlab|machine-learning|deep-learning|conv-neural-network|training-data
0
90
1
72,145,741
72,145,741
1
true
2022-05-06T17:54:28.933Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Every time I train my CNN on matlab, is it remembering the old weights from the previous time I trained it? Or does it reset them?<p>So for example, I have t...
72,145,689
Imports Unrecognized By IntelliJ when Getting A Project From GitHub<p>I've faced this problem quite a lot lately but I didn't care in the past and decided to rewrite the whole project I'm getting from GitHub but now when the project is enormous I can't do this anymore.</p> <p>Here is a picture of the problem:</p> <p><a...
<p>If it is a Maven project, open the Maven tab and click <code>Reimport all dependencies</code> button.</p> <p>Another solution is to use the Terminal, just run <code>mvn clean install</code> command.</p>
Imports Unrecognized By IntelliJ when Getting A Project From GitHub
github|intellij-idea
0
33
1
72,145,783
72,145,783
1
true
2022-05-06T18:02:27.030Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Imports Unrecognized By IntelliJ when Getting A Project From GitHub<p>I've faced this problem quite a lot lately but I didn't care in the past and decided to...
72,141,102
Convert String to LocalDateTime with zoned time<p>I received a String field in a topic with date and offset and I need to convert this String to a LocalDateTime by adding the offset. For example, if I received:</p> <pre><code>2021-07-20T19:00:00.000+02:00 </code></pre> <p>I want to convert in LocalDateTime:</p> <pre><c...
<p>The <code>LocalDateTime</code> class is a date-time representation which is unaware of time zones and it's only logical that the <code>LocalDateTimeDeserializer</code> ignores any time zone information in the source data.</p> <p>To account for the time zone you could use the <code>InstantDeserializer.OFFSET_DATE_TIM...
Convert String to LocalDateTime with zoned time
spring-boot|utc|objectmapper
0
51
1
72,145,867
72,145,867
1
true
2022-05-06T11:57:24.790Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Convert String to LocalDateTime with zoned time<p>I received a String field in a topic with date and offset and I need to convert this String to a LocalDateT...
72,145,466
Go generics: invalid composite literal type T<pre><code>package main import ( &quot;google.golang.org/protobuf/proto&quot; ) type NetMessage struct { Data []byte } type Route struct { } type AbstractParse interface { Parse(*NetMessage) proto.Message } type MessageParse[T proto.Message] struct { } func...
<p>Not sure you need Generics... but let's address your compilation error:</p> <pre><code>invalid composite literal type T </code></pre> <p>and the Go spec regarding <a href="https://go.dev/ref/spec#Composite_literals" rel="nofollow noreferrer">composite literal</a>:</p> <blockquote> <p>The LiteralType's core type T mu...
Go generics: invalid composite literal type T
go|generics|composite-literals
0
1,233
1
72,146,016
72,146,016
1
true
2022-05-06T17:39:59.663Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Go generics: invalid composite literal type T<pre><code>package main import ( &quot;google.golang.org/protobuf/proto&quot; ) type NetMessage struct { ...
72,145,960
Align items horizontally in a list of buttons<p>I'm a beginner in Front-End programming, and I'm trying to figure out how to align horizontally items, I tried out several methods but never got to the right result. If I use the wrong way to do this, let me know, I am trying to learn more and to do things right.</p> <p><...
<p>According to your example image, just add <code>flex-direction:column</code> to <code>.forum-list button</code>. Then add <code>display:flex; flex-direction:row;</code> to <code>forum-list-info-content</code> class.</p>
Align items horizontally in a list of buttons
html|css
0
104
1
72,146,026
72,146,026
1
true
2022-05-06T18:32:18.390Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Align items horizontally in a list of buttons<p>I'm a beginner in Front-End programming, and I'm trying to figure out how to align horizontally items, I trie...
72,145,690
Why doesn't R dplyr arrange sort properly using a vector element within a for loop<p>I'm having trouble getting r's dplyr::arrange() to sort properly when used in a for loop. I found many posts discussing this issue (like <a href="https://stackoverflow.com/questions/43832434/arrange-within-a-group-with-dplyr">ex.1</a>...
<p>This is &quot;<a href="https://dplyr.tidyverse.org/articles/programming.html" rel="nofollow noreferrer">programming with dplyr</a>&quot;, use <code>.data</code> for referencing columns by a string:</p> <pre class="lang-r prettyprint-override"><code>toy %&gt;% select(a, tf, get_it[j]) %&gt;% group_by(a) %&gt;% ...
Why doesn't R dplyr arrange sort properly using a vector element within a for loop
r|loops|sorting|dplyr
0
106
1
72,146,064
72,146,064
1
true
2022-05-06T18:02:30.897Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why doesn't R dplyr arrange sort properly using a vector element within a for loop<p>I'm having trouble getting r's dplyr::arrange() to sort properly when us...
72,145,482
Retrieve C# Attribute Data With Extension Method<p>Looking for a way to retrieve attribute data for a property on a class (many different types) in my data layer with an extension method...</p> <p>Final goal is to see the method here and be able to access the properties:</p> <p><a href="https://i.stack.imgur.com/hJmEZ....
<p>In order to getting any property attribute you need the retrieve the property info not the type, one way to do this is using expressions, next step after retrieving the <code>SchemaDetails</code> instance value would be to get some property value from it:</p> <pre><code>public static class AttributeExtensions { ...
Retrieve C# Attribute Data With Extension Method
c#|attributes
0
41
1
72,146,067
72,146,067
1
true
2022-05-06T17:41:29.110Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Retrieve C# Attribute Data With Extension Method<p>Looking for a way to retrieve attribute data for a property on a class (many different types) in my data l...
72,145,900
access DOCUMENT in useFactory<p>I want to inject @Inject(DOCUMENT) in factory. How to inject it since it is not service therefor I can't add it in deps.</p> <pre><code>// import { DOCUMENT } from '@angular/common'; providers: [ { provide: APP_INITIALIZER, deps: [Document], useFactory: (): any =&g...
<p>you almost have done the correct variant. DOCUMENT is a token that should be in deps array. And then the document object will be injected into the factory callback</p> <pre><code>import { DOCUMENT } from '@angular/common'; providers: [ { provide: APP_INITIALIZER, deps: [DOCUMENT], useFactory: (...
access DOCUMENT in useFactory
angular|angular-services
0
38
1
72,146,087
72,146,087
1
true
2022-05-06T18:25:25.887Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: access DOCUMENT in useFactory<p>I want to inject @Inject(DOCUMENT) in factory. How to inject it since it is not service therefor I can't add it in deps.</p> ...
72,146,039
Laravel Vue.js API: axios, FormData() is empty<p>I'm trying to update some data in Model using API in Laravel and Vue.js but I can't do this because FormData() is empty, I'm checking the data from formdata using the code:</p> <pre><code>for (var value of formdata.values()) { console.log(value); } </code>...
<p>Its look like you have a property products and that property have the values you are trying to get.</p> <p>so instead doing:</p> <pre><code>formdata.append(&quot;image&quot;, this.image); formdata.append(&quot;name&quot;, this.name); formdata.append(&quot;price&quot;, this.price); formdata.append(&quot;details&quot;...
Laravel Vue.js API: axios, FormData() is empty
javascript|laravel|api|vue.js|axios
0
216
1
72,146,123
72,146,123
1
true
2022-05-06T18:39:57.890Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Laravel Vue.js API: axios, FormData() is empty<p>I'm trying to update some data in Model using API in Laravel and Vue.js but I can't do this because FormDat...
72,143,194
How can I create an object in C# during program execution, specify the type and assign a value?<p>Help me, is it possible in C# to make a dynamically created <code>class</code> whose number of <code>properties and their types</code> are not known in advance?</p> <p>For example, there is a POCO class and it is necessary...
<p>You can use an <code>ExpandObject</code> which can define properties during the runtime. Below is a very simple working prototype</p> <pre><code> static void Main(string[] args) { // Define a type with the following properties // string Name // int Age // bool Alive ...
How can I create an object in C# during program execution, specify the type and assign a value?
c#|.net
0
61
1
72,146,168
72,146,168
1
true
2022-05-06T14:32:57.153Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I create an object in C# during program execution, specify the type and assign a value?<p>Help me, is it possible in C# to make a dynamically created...
72,146,055
I tried to get the user input and then compare it to somthing and i got a problem<p>I tried to get the user input and then compare it to somthing and i got a problem :(</p> <p>this is my code:</p> <pre><code>use std::io::stdin; fn main() { let mut command = String::new(); loop { stdin().read_line(&amp;...
<pre class="lang-rust prettyprint-override"><code>use std::io::stdin; fn main() { let mut command = String::new(); loop { stdin().read_line(&amp;mut command).ok().expect(&quot;Failed to read line&quot;); if String::from(&quot;help&quot;) == command.trim_end().to_string() { println!(...
I tried to get the user input and then compare it to somthing and i got a problem
string|rust|rust-cargo
0
33
1
72,146,253
72,146,253
1
true
2022-05-06T18:41:32.080Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: I tried to get the user input and then compare it to somthing and i got a problem<p>I tried to get the user input and then compare it to somthing and i got a...
72,145,965
React: React-Bootstrap Collapse is not working<p>Started using React-Bootstrap today and I want to make a collapsable card. Using Collapse component but it's not working. Any tips? My code:</p> <pre><code>import { RiArrowDownSLine, RiArrowUpSLine } from &quot;react-icons/ri&quot;; import { Collapse } from &quot;react-b...
<p>Working example by your codes is <a href="https://codesandbox.io/s/musing-fast-kl81pg?file=/src/index.js:109-171" rel="nofollow noreferrer">SandboxCodes</a> , you are forgot to import css file in the index.js like this <code>import &quot;../node_modules/bootstrap/dist/css/bootstrap.min.css&quot;;</code></p>
React: React-Bootstrap Collapse is not working
javascript|reactjs
0
207
2
72,146,299
72,146,299
1
true
2022-05-06T18:32:41.867Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: React: React-Bootstrap Collapse is not working<p>Started using React-Bootstrap today and I want to make a collapsable card. Using Collapse component but it's...
72,145,680
Setting Data Frame Column Names with Data Frame includes extra characters: ('ColumnName',)<p>I've got a python script set to pull data and column names from a Pervasive PSQL database, and it then creates the table and records in MS SQL. I'm creating data frames for the data and for the column names, then renaming the t...
<p>This worked for me and should resolve the issue. Change.</p> <p><code>df_col = pandas.DataFrame((tuple(t) for t in stRows_col))</code></p> <p>to</p> <pre><code>df_col=[] for row in stRows_col: df_col.append(row[0]) </code></pre> <p>Pyodbc would be moving the data it captures into pyodbc objects. The <code>type(s...
Setting Data Frame Column Names with Data Frame includes extra characters: ('ColumnName',)
python|pandas|sqlalchemy
0
36
1
72,146,333
72,146,333
1
true
2022-05-06T18:01:31.567Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Setting Data Frame Column Names with Data Frame includes extra characters: ('ColumnName',)<p>I've got a python script set to pull data and column names from ...
72,144,658
Weight implementation in graph<p>I am trying to find the path between two vertices and their distance. My implementation is the following:</p> <pre><code>#include &lt;iostream&gt; #include &lt;list&gt; #include &lt;string&gt; #include &lt;vector&gt; using namespace std; vector &lt;string&gt; v1 = {&quot;Prague&quot;, &...
<p>There are two main problems here. When you create the edges you do not coupled their cost to them in any way. Also when you traverse them in your algorithm you do not save the cost of traversing the edge, you only save the cities.</p> <p>Here is a simple solution if you want to keep almost an identical structure. Yo...
Weight implementation in graph
c++
0
231
1
72,146,399
72,146,399
1
true
2022-05-06T16:25:09.790Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Weight implementation in graph<p>I am trying to find the path between two vertices and their distance. My implementation is the following:</p> <pre><code>#in...
72,145,483
Vertical and Horizontal scrolling at the same time in Flutter<p>I'm building a flutter app, it requires data to be displayed in a table format, I've done it with the help of DataTable widget, but when it was rendered, the column and row count was too high so they went out of the field of view. With list view, I was abl...
<p>You Warp it with two <code>SingleChildScrollView</code> and one <code>Scrollbar</code> with give attention to <code>ScrollOrientation</code>, This example on how to implement it:</p> <p>PS: Sorry for messy Code on DataTable but I don't have time to write formated code</p> <p><a href="https://i.stack.imgur.com/v5YWs....
Vertical and Horizontal scrolling at the same time in Flutter
flutter|dart|flutter-layout
0
583
2
72,146,441
72,146,441
1
true
2022-05-06T17:41:29.250Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Vertical and Horizontal scrolling at the same time in Flutter<p>I'm building a flutter app, it requires data to be displayed in a table format, I've done it ...
72,145,041
Laravel Carbon difference in time<p>So I have this table with a start time and an end time and I am calculating hours. This works just fine unless the end time is midnight.</p> <p>I have TIME fields in my database for start and end.</p> <p>This is the calculation</p> <pre><code> @php $start = \Carbon\Carb...
<p>If clocked_out is less than the clocked-in then you need to factor in the date change.</p> <pre><code> @php $start = \Carbon\Carbon::parse($person-&gt;clocked_in_at); $end = \Carbon\Carbon::parse($person-&gt;clocked_out_at); @php if($end-&gt;lt($start) { $end-&gt...
Laravel Carbon difference in time
php|laravel|laravel-blade|php-carbon
0
428
2
72,146,497
72,146,497
1
true
2022-05-06T16:58:12.243Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Laravel Carbon difference in time<p>So I have this table with a start time and an end time and I am calculating hours. This works just fine unless the end ti...
72,145,442
Angular not grabbing elements by class name when page is loaded<p>I am trying to get the <code>document.getElementsByClassName('side-nav-link-ref');</code> elements in my angular <code>html</code> view and It keeps returning empty. I’ve narrowed it down to the <code>&lt;ng-container&gt;</code> that I have doing a <code...
<p>ngOnInit is called when the component is loaded, but the view is still loading. You need ngAfterViewInit because you're trying to manipulate the dom/view. See <a href="https://angular.io/guide/lifecycle-hooks" rel="nofollow noreferrer">Angular lifecycle hooks</a>.</p> <p>Also your ts file has the wrong classname.</p...
Angular not grabbing elements by class name when page is loaded
javascript|angular|typescript
0
46
2
72,146,551
72,146,551
1
true
2022-05-06T17:37:11.543Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Angular not grabbing elements by class name when page is loaded<p>I am trying to get the <code>document.getElementsByClassName('side-nav-link-ref');</code> e...
72,146,130
C# LINQ Filter records in child tables<p>I have a main table &quot;SALES&quot; and two secondary tables &quot;PRODUCTS&quot; and &quot;SERVICES&quot;, I need to select only the records in &quot;SALES&quot; that contain some product or service entered by the user, I don't need to bring the sales records and products, ju...
<p>Using more descriptive variable names, and assuming you meant to only find products that have the exact same name or description as one of the <code>words</code>, you would have:</p> <pre><code>var salesInPeriod = from s in _contexto.sales where Convert.ToDateTime(strDtI).Date &lt;= s.datesale.Va...
C# LINQ Filter records in child tables
c#|entity-framework|linq|asp.net-core
0
78
1
72,146,553
72,146,553
1
true
2022-05-06T18:49:05.817Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: C# LINQ Filter records in child tables<p>I have a main table &quot;SALES&quot; and two secondary tables &quot;PRODUCTS&quot; and &quot;SERVICES&quot;, I need...
72,131,031
Using RPostgres, what should I use to "set role..." for the table I will write to a db?<p>I'm new to connecting to databases via R, and I am trying to find best practices to minimize errors and problems. I am uploading a table from R to a postgres database, and I need to set the permissions to a certain group that I kn...
<p>In SQL, most commands fall under two types: action queries that affect data (i.e., <code>INSERT</code>, <code>UPDATE</code>, <code>DELETE</code>, <code>DROP</code>) or resultset queries that return data (i.e., <code>SELECT</code>).</p> <p>In R's DBI, different methods trigger these two types of commands per document...
Using RPostgres, what should I use to "set role..." for the table I will write to a db?
r|dbi|rpostgres
0
35
1
72,146,613
72,146,613
1
true
2022-05-05T17:01:31.127Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Using RPostgres, what should I use to "set role..." for the table I will write to a db?<p>I'm new to connecting to databases via R, and I am trying to find b...
72,146,336
How to get/set Azure AD B2C User MFA details via Microsoft Graph API<p><strong>Using the Microsoft Graph API v 1.0, how can I retrieve the user's MFA details?</strong></p> <p>For example, if I have an email based sign-in/sign-up policy with phone/SMS MFA, how can I see the phone number entered by the user? (and also se...
<p>There's a write-up <a href="https://medium.com/the-new-control-plane/proofing-up-users-programmatically-on-azure-ad-b2c-using-either-email-or-phone-71a71f579235" rel="nofollow noreferrer">here</a>.</p> <p>e.g:</p> <pre><code>GET https://graph.microsoft.com/beta/users/objectID/authentication/methods </code></pre>
How to get/set Azure AD B2C User MFA details via Microsoft Graph API
microsoft-graph-api|azure-ad-b2c|multi-factor-authentication
0
386
2
72,146,814
72,146,814
1
true
2022-05-06T19:10:35.443Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to get/set Azure AD B2C User MFA details via Microsoft Graph API<p><strong>Using the Microsoft Graph API v 1.0, how can I retrieve the user's MFA details...
72,146,738
creating dictionaries from values in pandas columns with repeating values<p>Considering this sample dataframe:</p> <pre><code> location emp 0 fac_1 emp1 1 fac_2 emp2 2 fac_2 emp3 3 fac_3 emp4 4 fac_4 emp5 </code></pre> <p>It can be recreated by this code:</p> <pre><code> sample_dict = {'location':...
<pre><code>data.groupby('location')['emp'].agg(list).to_dict() </code></pre> <p>Output:</p> <pre><code>{'fac_1': ['emp1'], 'fac_2': ['emp2', 'emp3'], 'fac_3': ['emp4'], 'fac_4': ['emp5']} </code></pre>
creating dictionaries from values in pandas columns with repeating values
python|pandas|dictionary
0
32
2
72,146,836
72,146,836
1
true
2022-05-06T19:53:19.080Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: creating dictionaries from values in pandas columns with repeating values<p>Considering this sample dataframe:</p> <pre><code> location emp 0 fac_1 emp...
72,146,763
Laravel migration: using a native PHP enum<p>In PHP 8.1, native support for enums were introduced. How can I use them in a Laravel Migration?</p> <p>My first thought would be something like this, but it does not work.</p> <pre class="lang-php prettyprint-override"><code>// migration public function up() { S...
<p>I'm not sure that <code>$table-&gt;enum</code> implemented enums yet but you can like this;</p> <pre class="lang-php prettyprint-override"><code>enum DayOfWeek { case Monday; case Tuesday; case Wednesday; case Thursday; case Friday; case Saturday; case Sunday; } $table-&gt;enum('day_of_...
Laravel migration: using a native PHP enum
php|laravel|laravel-migrations|php-8.1
0
282
1
72,146,853
72,146,853
1
true
2022-05-06T19:56:49.473Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Laravel migration: using a native PHP enum<p>In PHP 8.1, native support for enums were introduced. How can I use them in a Laravel Migration?</p> <p>My first...
72,146,589
Presto SQL query to calcute percent views<p>I have to calculate % contribution for each category.</p> <p><a href="https://i.stack.imgur.com/xZ5V1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xZ5V1.png" alt="enter image description here" /></a></p> <pre><code>SELECT portfolio, (total_portfolio_view...
<p>You can try using <code>sum</code> <a href="https://prestodb.io/docs/current/functions/window.html" rel="nofollow noreferrer">window function</a> to compute total views on the aggregate:</p> <pre class="lang-sql prettyprint-override"><code>SELECT portfolio, (total_portfolio_views * 1.0 / sum(total_portfolio_view...
Presto SQL query to calcute percent views
sql|presto
0
38
1
72,146,903
72,146,903
1
true
2022-05-06T19:35:42.037Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Presto SQL query to calcute percent views<p>I have to calculate % contribution for each category.</p> <p><a href="https://i.stack.imgur.com/xZ5V1.png" rel="n...
72,146,463
Gnuplot heatmap interpolation with svg<p>I am trying to plot a heatmap using gnuplot (5.2.8) with the SVG terminal. Gnuplot interpolates the colors between the center points of the cells.</p> <p>When I use the pdf terminal the result is as expected and the cells are clear and uniform faces. How do I turn the interpolat...
<p>It is not gnuplot that does the interpolation - it is the SVG viewing program. Leaving aside the question of how you might persuade the viewer not to do this, you can prevent it from happening by using the keyword <code>pixels</code> in the gnuplot command:</p> <pre><code>plot percent_sample(i) matrix with image pi...
Gnuplot heatmap interpolation with svg
gnuplot
0
39
1
72,146,904
72,146,904
1
true
2022-05-06T19:23:28.927Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Gnuplot heatmap interpolation with svg<p>I am trying to plot a heatmap using gnuplot (5.2.8) with the SVG terminal. Gnuplot interpolates the colors between t...
72,146,808
Laravel - multiple select query<p>I want to pull data from two columns in my database table, I'm not very good at querying SQL. When I do this query I get this error:</p> <p><strong>Expression #2 of SELECT list is not in GROUP BY clause and contains...</strong></p> <p>What am I missing?</p> <p><strong>My query:</strong...
<p>It is SQL Standard feature and its not anything to do with laravel. You can add required column to group by or use an aggragete function like sum etc.</p> <p>If you specify the GROUP BY clause, columns referenced must be all the columns in the SELECT clause that do not contain an aggregate function. These columns ca...
Laravel - multiple select query
laravel
0
96
1
72,146,942
72,146,942
1
true
2022-05-06T20:02:05.493Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Laravel - multiple select query<p>I want to pull data from two columns in my database table, I'm not very good at querying SQL. When I do this query I get th...
72,143,261
Material UI: how to switch from sidebar to bottom navigation when using grid<p>I want my sidebar to be bottom navigation on mobile view. How can i switch these components depending on the size of the screen. I wonder is there a way to do it with the material ui grid scaling (&quot;lg, xs etc.&quot;)?</p> <pre><code> ...
<ol> <li>Add <code>sx={{ display: { xs: &quot;none&quot;, sm: &quot;flex&quot; } }}</code> to SideBar</li> <li>Add <code>sx={{ display: { sm: &quot;none&quot; } }}</code> to BottomNavigation</li> </ol> <p>The code:</p> <pre><code>import * as React from &quot;react&quot;; import Box from &quot;@mui/material/Box&quot;; i...
Material UI: how to switch from sidebar to bottom navigation when using grid
reactjs|material-ui|responsive-design
0
548
1
72,146,962
72,146,962
1
true
2022-05-06T14:37:53.543Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Material UI: how to switch from sidebar to bottom navigation when using grid<p>I want my sidebar to be bottom navigation on mobile view. How can i switch the...
72,146,834
Problem while plotting in grouped date values in R<p>I was trying to plot the max values from a dataset with <code>x-axis = Date</code> and the <code>y-axis = max_value</code> grouped by Stations, like the picture I found on this <a href="https://stackoverflow.com/questions/59195398/plot-time-series-in-r-ggplot-using-m...
<p>The data.frame you provided is different from the plot. But if you want to get different plots for every station at once.Not calling a different ggplot for every station, maybe the <code>facet_wrap()</code> function (or <code>facet_grid()</code>) is helpful:</p> <pre><code>library(tidyverse) library(lubridate) df2 ...
Problem while plotting in grouped date values in R
r|ggplot2
0
31
2
72,146,967
72,146,967
1
true
2022-05-06T20:05:58.583Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Problem while plotting in grouped date values in R<p>I was trying to plot the max values from a dataset with <code>x-axis = Date</code> and the <code>y-axis ...
72,146,783
Groupby id and change values for all rows for the earliest date to NaN<p>I have the following id, i would like to groupby id and then replace value <code>X</code> with <code>NaN</code>. My current df.</p> <pre><code> ID Date X other variables.. 1 1/1/18 0.118758835 1 1/1/18 0.148103273 1 1...
<p>You can call <code>min</code> in <code>groupby.transform</code> to get the earliest dates for each ID; then compare it with &quot;Date&quot; to get a boolean mask; finally use the mask to <code>mask</code> earliest &quot;X&quot;s:</p> <pre class="lang-py prettyprint-override"><code>df['X'] = df['X'].mask(df.groupby(...
Groupby id and change values for all rows for the earliest date to NaN
python|pandas|dataframe|pandas-groupby
0
45
2
72,147,042
72,147,042
1
true
2022-05-06T19:58:34.583Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Groupby id and change values for all rows for the earliest date to NaN<p>I have the following id, i would like to groupby id and then replace value <code>X</...
72,146,928
Can´t copy tupel from one dataframe into another (Length of values does not match length of index)<p>I want to create columns in a dataframe (df_joined) that contains as values tupels from a second df (df_tupels). The tupels are (10,50) and (20,60).</p> <p>I tried various approaches to create it but I get the same erro...
<p>You need to create a list of tuple that matches the dataframe length.</p> <pre class="lang-py prettyprint-override"><code>for city in df_tupels.index: df_joined[city] = [df_tupels['tupels'].loc[city]] * len(df_joined) </code></pre> <pre><code>print(df) Season NY Berlin Cities NY spring (...
Can´t copy tupel from one dataframe into another (Length of values does not match length of index)
python|pandas|dataframe
0
26
1
72,147,055
72,147,055
1
true
2022-05-06T20:16:34.793Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can´t copy tupel from one dataframe into another (Length of values does not match length of index)<p>I want to create columns in a dataframe (df_joined) that...
72,143,178
Dynamically setting attributes to MDTextField in KivyMD<p>I have code below which dynamically creates a bunch of text fields in KivyMD. However, one attribute I need to set, <code>on_text</code>, will not accept my settings through python (no error thrown, just a blank field on debug), but will accept them through KV.<...
<p>Whenever you <a href="https://kivy.org/doc/stable/api-kivy.event.html?highlight=bind#kivy.event.EventDispatcher.bind" rel="nofollow noreferrer">bind</a> a callback to an event or a property that callback is supposed to be a function / method (name) not what it returns. That's why you got <code>None</code> when you d...
Dynamically setting attributes to MDTextField in KivyMD
python|kivymd
0
156
1
72,147,134
72,147,134
1
true
2022-05-06T14:32:04.580Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Dynamically setting attributes to MDTextField in KivyMD<p>I have code below which dynamically creates a bunch of text fields in KivyMD. However, one attribut...
72,145,399
Facetgrid Formatting and sorting each graph<p>Below is the code I've created to run the facetgrid graph. As you can see, merged1 is the first dataframe and merged2 is the second dataframe I am iterating on. There are two things I am trying to accomplish.</p> <pre><code>import pandas as pd import matplotlib.pyplot as pl...
<p>Well, the test data and the original test code give:</p> <pre class="lang-py prettyprint-override"><code>import matplotlib.pyplot as plt import seaborn as sns import pandas as pd # initialize list of lists data = [['tom', 5000, 200, 5, 900], ['tom', 7000, 500, 5, 900], ['nick', 7000, 300, 4, 4000], ['nick', 8000, 2...
Facetgrid Formatting and sorting each graph
python|seaborn|facet-grid
0
68
1
72,147,207
72,147,207
1
true
2022-05-06T17:32:54.887Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Facetgrid Formatting and sorting each graph<p>Below is the code I've created to run the facetgrid graph. As you can see, merged1 is the first dataframe and m...
72,146,991
How do I get a menu to go on top of everything?<p>I am trying to have a menu that takes up 100vh when the menu button is clicked. However, I also have a header at the top so the menu content is lower than it. How do I make the <code>menu</code> go on top of the <code>header</code>? I'm trying to do this without making ...
<p>I think <code>position: relative</code> is not set properly, it should only be on a parent that contains both <code>header</code> and <code>nav</code>. And then set the following css :</p> <pre><code>.menu { position: fixed; top: 0; left: 0; height: 100vh; width: 80vw; } </code></pre> <p>Add marg...
How do I get a menu to go on top of everything?
javascript|html|css|menu|header
0
84
2
72,147,227
72,147,227
1
true
2022-05-06T20:22:42.750Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I get a menu to go on top of everything?<p>I am trying to have a menu that takes up 100vh when the menu button is clicked. However, I also have a head...
72,140,200
How to properly fix - Cannot use empty array elements in arrays<p>I have the code below but it showing an error &quot;Cannot use empty array elements in arrays&quot;.</p> <p>It seems that the issue is in this line <code>}), collect(json_decode($post['comments'], true))-&gt;map(function ($comment) {</code></p> <p>Code:...
<p>If we simplify your code it seems like this;</p> <pre class="lang-php prettyprint-override"><code>'data' =&gt; [ 'comments' =&gt; collect(), collect() ] </code></pre> <p>It is not a valid syntax. You can try like this;</p> <pre class="lang-php prettyprint-override"><code>$comments = collect(json_...
How to properly fix - Cannot use empty array elements in arrays
php|laravel
0
122
1
72,147,236
72,147,236
1
true
2022-05-06T10:43:24.030Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to properly fix - Cannot use empty array elements in arrays<p>I have the code below but it showing an error &quot;Cannot use empty array elements in arra...
72,147,307
I want to create an html element, using javascript, with content drawn from two initialized arrays on page load<p>I want to create an html element, using javascript, with content drawn from two initialized arrays on page load. This is how far i have gotten but, aside from the console.log test point whice appears normal...
<p>You should call function like this <code>createTextElement(randomText);</code> but you can also cancel argument from function and call it without argument <code>createTextElement();</code></p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> ...
I want to create an html element, using javascript, with content drawn from two initialized arrays on page load
javascript|html
0
34
1
72,147,339
72,147,339
1
true
2022-05-06T20:59:47.597Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: I want to create an html element, using javascript, with content drawn from two initialized arrays on page load<p>I want to create an html element, using jav...
72,146,673
getting Error Code: 2013 Lost connection to MySQL server during query while running recursive stored procedure<p>I have read almost all related questions. but its not working for me. I am trying to traverse through whole child parent data to do so I have made recursive stored procedure.</p> <pre><code>CREATE DEFINER=`r...
<p>The normalized way to store hierarchical data is to store a reference to the parent, not store a comma-separated list of the children.</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>id</th> <th>parent_id</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>NULL</td> </tr> <tr> <td>c1</td> <t...
getting Error Code: 2013 Lost connection to MySQL server during query while running recursive stored procedure
mysql|hierarchical-data
0
100
1
72,147,383
72,147,383
1
true
2022-05-06T19:46:14.780Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: getting Error Code: 2013 Lost connection to MySQL server during query while running recursive stored procedure<p>I have read almost all related questions. bu...
72,143,900
Which version of Java do I need for this<p>I'm trying to use R and the R package rjdbc to connect to an Oracle database. Unfortunately, due to my company's strict IT department, every step of the process is kinda complicated, allow me to explain:</p> <ul> <li>For every bit of software we install, we need to get IT to ...
<p>I feel your install and update pain. The <a href="https://cran.r-project.org/web/packages/rJava/index.html" rel="nofollow noreferrer">rJava CRAN entry</a> says:</p> <blockquote> <p>SystemRequirements: Java JDK 1.2 or higher (for JRI/REngine JDK 1.4 or higher), GNU make</p> </blockquote> <p>So pretty bare minimum v...
Which version of Java do I need for this
java|r|rjdbc
0
116
1
72,147,425
72,147,425
1
true
2022-05-06T15:23:43.133Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Which version of Java do I need for this<p>I'm trying to use R and the R package rjdbc to connect to an Oracle database. Unfortunately, due to my company's ...
72,146,749
Load and use a Glade layout in GTK2/C<p>I was trying to load a Glade layout into a GTK2 C code.</p> <p>It consists of a window in which there is a VBox with 2 elements: a label and a button. I want to associate a signal to the button to close the application.</p> <p>If I make all of this by using only C code it works f...
<p>You might want to check the name you gave your button widget in the glade file. The only way I could replicate your error was when the name of the button widget defined in the glade file was something different from &quot;button1&quot; as referenced in the program statement:</p> <pre><code>GtkWidget * btn = (GtkWid...
Load and use a Glade layout in GTK2/C
c|user-interface|gtk|glade|gtk2
0
63
1
72,147,469
72,147,469
1
true
2022-05-06T19:54:44.637Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Load and use a Glade layout in GTK2/C<p>I was trying to load a Glade layout into a GTK2 C code.</p> <p>It consists of a window in which there is a VBox with ...
72,144,870
Is exists a way to commit several directories not in a tree structure in only one master branch on git?<p>What I'm trying to do is git in a one master branch the following structure:</p> <pre><code>/var/www/mysite/public_html /dev/only_this_file.txt /etc/directory/things /other/other/other/other </code></pre> <p>and ev...
<p>you can use a working directory with the use of <code>--git-dir</code> and <code>--work-dir</code> (or the corresponding environment variables <code>GIT_DIR</code> and <code>GIT_WORK_TREE</code>)</p> <p>e.g.</p> <pre class="lang-sh prettyprint-override"><code>cd /var/www/mysite/public_html export GIT_WORK_TREE=$(pwd...
Is exists a way to commit several directories not in a tree structure in only one master branch on git?
git|debian|debian-buster
0
22
1
72,147,484
72,147,484
1
true
2022-05-06T16:43:26.393Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is exists a way to commit several directories not in a tree structure in only one master branch on git?<p>What I'm trying to do is git in a one master branch...
72,147,166
How to Connect to MySQL database using Swift-Nio<p>I used node js to connect mysql server and it is working good. I used the API developed in node js and used in the local macOS app. The problem is querying the data from mysql database on workbench is fast but in node js API it is very delay. So, I've to connect mysql...
<p>In the app sandbox, you'll need to enable &quot;Outgoing connections (client)&quot; and then it should work.</p> <p><a href="https://i.stack.imgur.com/R2lcV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/R2lcV.png" alt="outgoing connections" /></a></p> <p>Unfortunately, because of a <a href="http...
How to Connect to MySQL database using Swift-Nio
mysql|swift|macos|cocoa|swift-nio
0
119
1
72,147,493
72,147,493
1
true
2022-05-06T20:43:12.637Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to Connect to MySQL database using Swift-Nio<p>I used node js to connect mysql server and it is working good. I used the API developed in node js and us...
72,146,908
how to restart subprocess if it crashes?<p>I'm trying to restart a subprocess if it crashes, but somewhy this loop just doesn't work. I've been wondering if that's even possible?</p> <pre><code>def dont_stop(conv): try: subprocess.call(['python', 'main.py', str(conv)]) except: dont_stop(conv) i...
<p>The <code>subprocess.call</code> function doesn't raise an exception if the program it is running exits in a non-standard way. All it does is return the &quot;return code&quot; from the process you told it to run. That's usually <code>0</code> for a process that exits normally, and some other value for a program tha...
how to restart subprocess if it crashes?
python|multithreading|subprocess
0
117
1
72,147,513
72,147,513
1
true
2022-05-06T20:13:30.197Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to restart subprocess if it crashes?<p>I'm trying to restart a subprocess if it crashes, but somewhy this loop just doesn't work. I've been wondering if ...
72,147,526
Passing action to a component optionally<p>I've learnt that it's possible to pass action to a component: <a href="https://stackoverflow.com/a/66142037/15943057">https://stackoverflow.com/a/66142037/15943057</a>. Now I wonder if it would be possible to pass one optionally.</p> <p>I'm building a reusable <code>&lt;Wrappe...
<p>You can just set a default that does nothing:</p> <pre class="lang-html prettyprint-override"><code>&lt;script&gt; export let action = () =&gt; {}; export let actionParams = undefined; &lt;/script&gt; &lt;div use:action={actionParams} &gt; &lt;slot/&gt; &lt;/div&gt; </code></pre> <p><a href="https://svelte....
Passing action to a component optionally
svelte|svelte-3|svelte-component
0
70
1
72,147,599
72,147,599
1
true
2022-05-06T21:25:42.990Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Passing action to a component optionally<p>I've learnt that it's possible to pass action to a component: <a href="https://stackoverflow.com/a/66142037/159430...
72,147,291
Reload does not change POST state<p>I have a problem where I want to reload the page on submit. I did this with the simple script function shown below. However, the echo'd &quot;hello&quot; does not disappear when I reload. Is there a reload function that changes the state of my submit post, and the &quot;hello&quot; i...
<p>If you want to redirect to a new page (or even the same page) but without POST values, then use</p> <p>window.location.replace(url)</p> <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/Location/replace" rel="nofollow noreferrer">https://developer.mozilla.org/en-US/docs/Web/API/Location/replace</a></p>
Reload does not change POST state
javascript|php|if-statement|post|reload
0
36
1
72,147,649
72,147,649
1
true
2022-05-06T20:58:07.267Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Reload does not change POST state<p>I have a problem where I want to reload the page on submit. I did this with the simple script function shown below. Howev...