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,910,870
How to select rows from a table based on duplicated values in a column Snowflake<p>I have a table A that looks similar to:</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>ID</th> <th>PET</th> <th>COUNTRY</th> </tr> </thead> <tbody> <tr> <td>45</td> <td>DOG</td> <td>US</td> </tr> <tr> <td>72...
<p>What about simply doing:</p> <pre><code>WITH RES AS (SELECT PET, COUNT(*) FROM A GROUP BY PET HAVING COUNT(*) &gt; 1) SELECT ID, PET, COUNTRY FROM A WHERE PET IN (SELECT PET FROM RES); </code></pre> <p>This would give you all rows with pets present in more than one row.</p>
How to select rows from a table based on duplicated values in a column Snowflake
filter|group-by|duplicates|snowflake-cloud-data-platform|having
0
53
2
72,911,195
72,911,195
0
true
2022-07-08T11:42:05.217Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to select rows from a table based on duplicated values in a column Snowflake<p>I have a table A that looks similar to:</p> <div class="s-table-container"...
72,917,663
SwiftUI button hittable outside image?<p>I have a button in SwiftUI (macOS) defined like this:</p> <pre><code> Button(action: { print(&quot;hit&quot;) }, label: { Image(systemName: &quot;minus&quot;) }) .frame(width: 21, height: 21) .contentShape(Rectangle()) .buttonStyle(.plai...
<p>Instead of set external frame (which adds space &quot;around&quot; button), move it inside, to content, which will &quot;increase&quot; the button, like</p> <pre><code> Button(action: { print(&quot;hit&quot;) }, label: { Image(systemName: &quot;minus&quot;) .frame(width: 21, heig...
SwiftUI button hittable outside image?
macos|swiftui
3
53
1
72,919,009
72,919,009
0
true
2022-07-08T22:43:15.920Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: SwiftUI button hittable outside image?<p>I have a button in SwiftUI (macOS) defined like this:</p> <pre><code> Button(action: { print(&quot;hit&quot;) }...
72,904,306
How can I explicitly apply default browser rendering color for anchor elements with CSS?<p>I have a table built with a column of links using the default browser rendering for anchors. There is a search which uses XSL to display search results. However, the XSL needs a specific CSS class to render the anchor elements.</...
<p>The default colour of a link according to browser styles is: <code>rgb(0, 102, 204)</code></p> <p>If you don't alter the CSS, this would be the default. If you are seeing something slightly purple, I'm guessing this is because it has been visited and receives dedicated styling.</p> <p>This can be amended in your CSS...
How can I explicitly apply default browser rendering color for anchor elements with CSS?
html|css
0
53
4
72,904,379
72,904,379
0
true
2022-07-07T21:14:21.573Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I explicitly apply default browser rendering color for anchor elements with CSS?<p>I have a table built with a column of links using the default brow...
72,830,261
How to change the type of an input with javascript<p>I want to create a modern password input, with a toggle password button that changes the type of input.</p> <p>Problem:</p> <p>I did all of the things below but when I test it and click on the icon, it is not changing anything.</p> <p><div class="snippet" data-lang="...
<p>You are using same id in two different inputs. Since the id <code>toggle_password</code> appears first on the <code>&lt;i&gt;</code> element, <code>&lt;i&gt;</code> was being taken into account</p> <p>Also <code>document</code> was missing in <code>const input = document.getElementById(&quot;password&quot;);</code>...
How to change the type of an input with javascript
javascript|html
0
53
3
72,830,362
72,830,362
0
true
2022-07-01T13:46:17.160Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to change the type of an input with javascript<p>I want to create a modern password input, with a toggle password button that changes the type of input.<...
72,789,749
How do I access a custom taxonomy created in Wordpress in Google Tag Manager?<p>I created a custom taxonomy in WordPress for article lengths. It's called 'Length' and these are the items within it: <a href="https://i.stack.imgur.com/Q71sO.png" rel="nofollow noreferrer">image</a></p> <p>I also created a custom dimension...
<p>I didn't try exactly what was suggested but for those wondering this is what worked for me:</p> <pre><code>function(){ var length = document.querySelector(&quot;.status-publish.post&quot;).className.split('length-')[1].split(' ')[0]; return length; } </code></pre> <p>I had an issue where it would track the d...
How do I access a custom taxonomy created in Wordpress in Google Tag Manager?
google-tag-manager|custom-taxonomy|google-datalayer|custom-dimensions|dot-notation
0
53
2
72,887,998
72,887,998
0
true
2022-06-28T16:00:58.103Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I access a custom taxonomy created in Wordpress in Google Tag Manager?<p>I created a custom taxonomy in WordPress for article lengths. It's called 'Le...
72,908,468
[aiofiles & asyncio dont write logs in file.txt<p>The question is as to why it does not write certain logs to the file, errors are not shown. Bot for tg on aiogram.</p> <p>logs.py:</p> <pre><code>import aiofiles import asyncio async def writelog(user_id: int, log: str): return async with aiofiles.open('assets...
<p>You are returning from the functions, that's why it is not working.</p> <p>Change the code to this</p> <pre class="lang-py prettyprint-override"><code>import aiofiles import asyncio async def writelog(user_id: int, log: str): async with aiofiles.open('assets/recently.txt', mode='w') as f: await f.write(...
[aiofiles & asyncio dont write logs in file.txt
python-3.x|aiogram
0
53
1
72,908,791
72,908,791
0
true
2022-07-08T08:09:01.403Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: [aiofiles & asyncio dont write logs in file.txt<p>The question is as to why it does not write certain logs to the file, errors are not shown. Bot for tg on a...
72,769,105
Using attributes of one class in another class<p>I am trying to move the assertThat method from Authentication class to the BDDStyledMethod class but the current code will generate the following error &quot;'Creds(java.lang.String)' in 'steps.Authentication' cannot be applied to '()'&quot;</p> <p>How do i correct my co...
<p>The problem is with the Creds method. It is not returning anything and the exception is raised in this line -&gt; Authentication.Creds().response.statusLine()<br /> We can return a string from Creds method and then try to apply assert() on the returned string in GetActivityById class.</p> <pre><code> public class...
Using attributes of one class in another class
java|class|methods|attributes|assert
0
53
1
72,769,420
72,769,420
0
true
2022-06-27T08:28:50.943Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Using attributes of one class in another class<p>I am trying to move the assertThat method from Authentication class to the BDDStyledMethod class but the cur...
72,805,513
Unable to render navigation screen using react native navigation, stack navigator<p>I want to navigate in react navigation with my custom side nav bar(Not using drawerNavigator for this). I have placed the side nav bar and bottom bar fixed in app.js as it will be present in all screens. The middle content area should b...
<p>Edit: The problem was in the style property: <code>alignItems: 'center'</code>. When that was taken away, navigation began working again.</p> <p>I would first confirm that your custom made navigator works with native-stack. Native stack uses the OS' navigation to navigate between pages. The issue may lie in your cus...
Unable to render navigation screen using react native navigation, stack navigator
javascript|reactjs|react-native|mobile-application|react-navigation-v6
0
53
1
72,806,253
72,806,253
0
true
2022-06-29T17:22:29.777Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Unable to render navigation screen using react native navigation, stack navigator<p>I want to navigate in react navigation with my custom side nav bar(Not us...
72,941,318
HTML fix position when minimize the window<p>I am new at HTML and want to know how to fix the position of my elements in a window because every time I try to minimize the window everything becomes messy. I am about to make a website and this is my first try so bear with errors. Here's my code:</p> <p><div class="snippe...
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-css lang-css prettyprint-override"><code>body, html { background-color: #cc9966; max-height: 100%; max-width: 100%; } .Container { width: 100%; min-width: 700px...
HTML fix position when minimize the window
html|css
0
53
1
72,942,820
72,942,820
0
true
2022-07-11T15:54:18.197Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: HTML fix position when minimize the window<p>I am new at HTML and want to know how to fix the position of my elements in a window because every time I try to...
72,980,558
S3 Bucket upload restriction based on file name and extension<p>Please check this JSON code and let me know what is wrong? All files gets denied. I need code where certain types of files can be uploaded by the users in the console.</p> <pre><code>{ &quot;Version&quot;: &quot;2012-10-17&quot;, &quot;Id&quot;: &quot;Poli...
<p>I have solved this on my own.</p> <pre><code>{ &quot;Version&quot;: &quot;2012-10-17&quot;, &quot;Id&quot;: &quot;Policy1657799010112&quot;, &quot;Statement&quot;: [{ &quot;Sid&quot;: &quot;Stmt1657798687256&quot;, &quot;Effect&quot;: &quot;Allow&quot;, &quot;Principal&quot;: &quo...
S3 Bucket upload restriction based on file name and extension
amazon-web-services|amazon-s3|amazon-iam|aws-policies|aws-permissions
0
53
1
73,022,557
73,022,557
0
true
2022-07-14T12:31:09.353Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: S3 Bucket upload restriction based on file name and extension<p>Please check this JSON code and let me know what is wrong? All files gets denied. I need code...
73,000,014
Why can't access struct pointer outside of function<p>Describe Issue: I'm able to access buffer variable inside of malloc function and can retrieve and set data with no issues</p> <p>any attempt to access *(buffer+ insert some index here)-&gt;data outside of malloc function results in following error</p> <pre><code>mem...
<p>This if statement</p> <pre><code>if(*(demo+1)-&gt;data == 0x00) { </code></pre> <p>is equivalent to</p> <pre><code>if( *( ( demo + 1 )-&gt;data ) == 0x00) { </code></pre> <p>but <code>data</code> is not a pointer. It has the type <code>unsigned char</code></p> <pre><code>typedef struct{ _Bool allocated; unsi...
Why can't access struct pointer outside of function
c|if-statement|pointers|compiler-errors|dereference
1
53
2
73,000,043
73,000,043
0
true
2022-07-15T22:05:43.647Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why can't access struct pointer outside of function<p>Describe Issue: I'm able to access buffer variable inside of malloc function and can retrieve and set d...
73,016,829
Send email to the new google form submission only<p>I'm new to the Google apps script. I wrote a script to send emails when there is a new submission from google forms using data and template from a spreadsheet. However, it sends an email to not just the new submission but also to all of the previous submissions. The w...
<p>Instead of reading the values from the spreadsheet take advantage of the form submit event object. This event object has two properties including the form submission values, one is an Array of form submission values in the same order than the sheet columns, the other is an object having a property for each question ...
Send email to the new google form submission only
email|google-apps-script|google-sheets|google-forms
0
53
1
73,016,966
73,016,966
0
true
2022-07-18T02:45:06.297Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Send email to the new google form submission only<p>I'm new to the Google apps script. I wrote a script to send emails when there is a new submission from go...
73,022,110
Delete Duplicate Rows with Multiple columns Mysql<p>I have a list of cars, and it will do a lot, the base is not small, about 70k. I want to delete repeated tables, can you tell me how this can be done? For example, if the model and make are repeated, it will delete and leave one.</p> <p>Use Mysql 5.7.34 version</p> <p...
<p>We can delete using a join approach:</p> <pre class="lang-sql prettyprint-override"><code>DELETE t1 FROM yourTable t1 LEFT JOIN ( SELECT model, make, MIN(id) AS min_id FROM yourTable GROUP BY model, make ) t2 ON t2.model = t1.model AND t2.make = t1.make AND t2.min_id = t1.id WHERE ...
Delete Duplicate Rows with Multiple columns Mysql
mysql
1
53
1
73,022,172
73,022,172
0
true
2022-07-18T12:09:54.910Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Delete Duplicate Rows with Multiple columns Mysql<p>I have a list of cars, and it will do a lot, the base is not small, about 70k. I want to delete repeated ...
72,919,038
How do I add a column to my dataframe which indicates datemodified minus 1 month of a file in os directory?<p>I have a dataframe called temp</p> <pre><code>temp Partner Zip Phone VIP 002 267... </code></pre> <p>I have a script that goes through my os directory and adds data to these columns I wanted a new column ca...
<p>Given a list of file paths you can invoke <code>os.path.getmtime()</code> to obtain the timestamp (in seconds) at which the file was last modified. <code>.replace(month = ...)</code> allows you to decrease the date's month by one.</p> <p>The code is given by</p> <pre><code> import os from datetime import date...
How do I add a column to my dataframe which indicates datemodified minus 1 month of a file in os directory?
python|pandas|operating-system
2
53
1
72,919,573
72,919,573
0
true
2022-07-09T04:55:07.413Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I add a column to my dataframe which indicates datemodified minus 1 month of a file in os directory?<p>I have a dataframe called temp</p> <pre><code>t...
72,954,628
Cut off emulator's internet while keeping wifi and mobile data on<p>I'd like to cut off emulator's internet while keeping wifi and mobile data enabled so I can run some automated tests covering this case without having to turn off the internet manually.</p> <p>While running an emulator on the PC it gets its internet ac...
<p>Diego's answer pushed me in the right direction.</p> <p>Using: <code>add shell settings put global http_proxy &lt;ip&gt;:&lt;port&gt;</code> and <code>add shell settings put global http_proxy :0</code> to set and reset emulator's global proxy along with using the same proxy in the code (if it's set, to check so I'm ...
Cut off emulator's internet while keeping wifi and mobile data on
android|adb
0
53
2
72,971,803
72,971,803
0
true
2022-07-12T15:15:32.553Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Cut off emulator's internet while keeping wifi and mobile data on<p>I'd like to cut off emulator's internet while keeping wifi and mobile data enabled so I c...
72,785,423
Repeat date sequence in Excel<p>I would like to ask how to create the sequence formula in order to repeate a date 10 times and do it for the whole year. For example starting from 01/01/2022 to copy this date 10x then for 02/01/2022 to copy it 10x and so on. I started to use following formula for sequence:</p> <p>=DATE(...
<p>You can take advantage of the fact that a date in excel is, conveniently, an integer number, and do it like that:</p> <pre><code>=INT((ROW(B1)-1)/10) + $B$1 </code></pre> <p>That'll repeat the date entered in B1 10 times and than switch to next day, using the row number as a guide (so if you are not on the first row...
Repeat date sequence in Excel
date|excel-formula|sequence
2
53
1
72,785,828
72,785,828
0
true
2022-06-28T11:13:12.253Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Repeat date sequence in Excel<p>I would like to ask how to create the sequence formula in order to repeate a date 10 times and do it for the whole year. For ...
72,949,993
How to correct the string returned based on a regex<p>Here is the <code>message</code> and <code>Type</code></p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>message</th> <th>Type</th> </tr> </thead> <tbody> <tr> <td>IND SMD 0402 1.2nH 50pH 390mA 100MOHM</td> <td>MAG</td> </tr> </tbody> </t...
<p>If you use the code to check if the type is <code>MAG</code>, you can use a bit more specific pattern to get the value <code>1.2nH</code> with a single capture group</p> <pre><code>^IND\b.*?\h(\d*\.?\d+(?:(?:[UuMmNn])?H|h))\b </code></pre> <p><strong>Explanation</strong></p> <ul> <li><code>^</code> Start of string</...
How to correct the string returned based on a regex
java|regex
0
53
1
72,950,849
72,950,849
0
true
2022-07-12T09:25:01.030Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to correct the string returned based on a regex<p>Here is the <code>message</code> and <code>Type</code></p> <div class="s-table-container"> <table clas...
72,777,449
Dates converting incorrectly in R<p>I have written this piece of code:</p> <p>Everything in this code is working great, except for that last line. Essentially, If the date for Invoicing is greater than the date for Invoiced, then I want it to find the biggest value between the two and replace invoicing.</p> <p>The code...
<p>I cannot explain <em>why</em> it happens in the first place, but the attempted fix of adding <code>%&gt;% as.Date(origin = &quot;1970-01-01&quot;)</code> won't work because this command will attempt to change the <strong>entire</strong> data frame to Date type.</p> <p>What does work is changing only the affected col...
Dates converting incorrectly in R
r|date
0
53
1
72,780,134
72,780,134
0
true
2022-06-27T19:31:30.877Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Dates converting incorrectly in R<p>I have written this piece of code:</p> <p>Everything in this code is working great, except for that last line. Essentiall...
72,862,770
Remove Unwanted Styles from Excel workbook<p>My excel workbook has come upon a limit for excel Styles. I found VBA code to RemoveTheStyles that were not BuiltIn, applied it and found the Styles were BuiltIn and &quot;SAPBEXstdItem*&quot;.</p> <p>Running this code sadly had no effect. There are approx 36000 styles tha...
<p>You shouldn't use a code word like <code>style</code> as variable name.</p> <p>This works for me</p> <pre class="lang-vb prettyprint-override"><code>Dim sty As Style '-- don't use style as variable name For Each sty In ThisWorkbook.Styles If sty.BuiltIn = false then sty.delete ElseIf sty.Name Like ...
Remove Unwanted Styles from Excel workbook
excel|vba|styles
0
53
1
72,864,618
72,864,618
0
true
2022-07-04T23:28:43.627Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Remove Unwanted Styles from Excel workbook<p>My excel workbook has come upon a limit for excel Styles. I found VBA code to RemoveTheStyles that were not Bui...
72,774,285
Abort trap 6 when merging arrays in bottom-up Merge Sort<p>I was trying to implement Merge Sort (Bottom-up approach) until a mysterious Abort trap occurs:</p> <pre><code>void botup_mergesort(int *arr, int begin, int end) { for (int merge_sz = 1; merge_sz &lt; (end - begin); merge_sz *= 2) { for (int par...
<p>The following change will fix the error:</p> <pre><code> const int&amp; m = std::min(par + merge_sz, end); </code></pre> <p>The code could be a bit faster if a one time allocation of a full sized second array was done, and if the direction of merge was changed on each pass, instead of doing a copy back after ...
Abort trap 6 when merging arrays in bottom-up Merge Sort
c++|arrays|mergesort
0
53
1
72,811,024
72,811,024
0
true
2022-06-27T15:02:07.710Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Abort trap 6 when merging arrays in bottom-up Merge Sort<p>I was trying to implement Merge Sort (Bottom-up approach) until a mysterious Abort trap occurs:</p...
72,937,188
Custom activation function dependant on other output nodes in Keras<p>I would like to predict a multi-dimensional array using Long Short-Term Memory (LSTM) networks while imposing restrictions on the shape of the surface of interest.</p> <p>I thought to accomplish this by setting some elements of the output (regions of...
<p>The <a href="https://github.com/keras-team/keras/issues/4076#issue-183230193" rel="nofollow noreferrer">keras-team on the GitHub</a> answered the question about how to make a custom activation function.</p> <p>There also is <a href="https://stackoverflow.com/questions/43915482/how-do-you-create-a-custom-activation-f...
Custom activation function dependant on other output nodes in Keras
keras|neural-network|lstm|activation-function
0
53
1
72,939,479
72,939,479
0
true
2022-07-11T10:33:58.993Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Custom activation function dependant on other output nodes in Keras<p>I would like to predict a multi-dimensional array using Long Short-Term Memory (LSTM) n...
72,951,302
Regex: Trying to extract all values (separated by new lines) within an XML tag<p>I have a project that demands extracting data from XML files (values inside the <code>&lt;Number&gt;</code>... <code>&lt;/Number&gt;</code> tag), however, in my regular expression, I haven't been able to extract lines that had multiple dat...
<p>finally i was able to find the right regular expression, I'll leave it below if anyone needs it:</p> <p><code>&lt;Type&gt;\d&lt;/Type&gt;\n&lt;Number&gt;(\d+\n)+(\d+&lt;/Number&gt;)</code></p> <p>Explanation:</p> <ul> <li><code>\d</code>: Shortcut for digits, same as [1-9]</li> <li><code>\n</code>: Newline.</li> <li...
Regex: Trying to extract all values (separated by new lines) within an XML tag
regex|notepad++
-2
53
4
72,967,298
72,967,298
0
true
2022-07-12T11:05:58.807Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Regex: Trying to extract all values (separated by new lines) within an XML tag<p>I have a project that demands extracting data from XML files (values inside ...
73,030,444
get total count of each type in a column<p>I am doing a jasper report to count the statistic of the fruits choices.</p> <p>I have 2 table, Fruit, Fruit_choices</p> <p>Table <strong>Fruit</strong> :</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>id</th> <th>fruit</th> </tr> </thead> <tbody>...
<p>If you have only 3 choice, you can get the result with combination of UNION and Aggregation.</p> <p>If your number of choices increase, then the query would be more complicated and expensive</p> <pre><code>SELECT f.FRUIT,SUM(C1COUNT),SUM(C2COUNT),SUM(C3COUNT) FROM FRUIT f JOIN ( SELECT CHOICE_1 AS FRU...
get total count of each type in a column
mysql
-1
53
2
73,031,000
73,031,000
0
true
2022-07-19T02:23:03.803Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: get total count of each type in a column<p>I am doing a jasper report to count the statistic of the fruits choices.</p> <p>I have 2 table, Fruit, Fruit_choic...
72,920,898
How to compress an image with codeigniter image_lib?<p>I am trying to compress size of the image in my codeigniter php website and wrote the following code in my controller:</p> <pre><code>$this-&gt;load-&gt;library('image_lib'); $this-&gt;load-&gt;library('upload'); $image = array(); $ImageCount = count($_FILES['pimag...
<p>You need to pair the config setting with a library action like resize (R), cropping (C), rotation (X) or watermark (W).</p> <p>see <a href="https://codeigniter.com/userguide3/libraries/image_lib.html#processing-methods" rel="nofollow noreferrer">Processing Methods</a></p> <p>and Preferences:</p> <div class="s-table-...
How to compress an image with codeigniter image_lib?
php|image|codeigniter|compression|codeigniter-3
2
53
1
72,923,940
72,923,940
0
true
2022-07-09T11:14:12.730Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to compress an image with codeigniter image_lib?<p>I am trying to compress size of the image in my codeigniter php website and wrote the following code i...
72,926,453
How to satisfy the condition of 2 columns different rows at the same time<p>My logic is like this:</p> <p><code>cond2</code> column is true before <code>expected</code> column, and <code>cond1</code> column is true before <code>cond2</code> column, then <code>expected</code> column can be true</p> <p>input</p> <pre><co...
<p>The description is not fully clear. It looks like you need a <code>cummax</code> per group starting with True in cond1:</p> <pre><code>m = df.groupby(df['cond1'].cumsum())['cond2'].cummax() df['expected'] = df['cond2'].ne(m) </code></pre> <p>Output:</p> <pre><code> cond1 cond2 expected 0 False False False...
How to satisfy the condition of 2 columns different rows at the same time
python|pandas|dataframe
1
53
2
72,926,494
72,926,494
0
true
2022-07-10T06:02:41.800Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to satisfy the condition of 2 columns different rows at the same time<p>My logic is like this:</p> <p><code>cond2</code> column is true before <code>expe...
72,876,243
Unable to to Import folder MS Access Export Text Wizard Error<p>When I perform a query on a database and try to export the results to a text (CSV) I get the following error:</p> <blockquote> <p>&quot;The wizard is unable to import the folder 'Query3'. This is usually because the name of the folder contains a space and...
<p>To solved this issue by running the designed query, saving the query, then exporting to text file.</p>
Unable to to Import folder MS Access Export Text Wizard Error
ms-access
-1
53
1
72,886,375
72,886,375
0
true
2022-07-05T22:38:26.710Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Unable to to Import folder MS Access Export Text Wizard Error<p>When I perform a query on a database and try to export the results to a text (CSV) I get the ...
72,804,759
Explicit wait not getting applied<p>I am trying to write following code but I am getting <code>NoSuchElementException</code>. I see that the explicit wait is not getting applied.</p> <pre><code>WebDriver driver = WebDriverManager.chromedriver().create(); driver.manage().window().maximize(); driver.get(&quot;abc&quot;);...
<p><strong>Try:</strong></p> <pre><code>... driver.findElement(By.id(&quot;-signin-submit&quot;)).click(); WebDriverWait wait = new WebDriverWait(driver, 20); wait.until(ExpectedConditions.presenceOfElementLocated(By.cssSelector(&quot;portal-application[title='AW Acc']&quot;))); </code></pre> <p>You catch exception be...
Explicit wait not getting applied
java|selenium|selenium-webdriver
1
53
1
72,806,113
72,806,113
0
true
2022-06-29T16:20:11.920Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Explicit wait not getting applied<p>I am trying to write following code but I am getting <code>NoSuchElementException</code>. I see that the explicit wait is...
72,858,875
Merging two adjacent string slices<p>When writing a parser I ran into the problem that there are two string slices that come from the same origin string and are next to each other in memory. Of course it would be possible to simply copy the strings and merge them back into one, but that would require unnecessary comput...
<p>You can chain the character within the splitted string:</p> <pre class="lang-rust prettyprint-override"><code>fn main() { //This is the owned string. //(Of course, this is also just a slice of a static string, but that makes no difference here). let origin: &amp;str = &quot;Hello World&quot;; ...
Merging two adjacent string slices
string|rust|slice
0
53
1
72,859,273
72,859,273
0
true
2022-07-04T15:13:25.617Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Merging two adjacent string slices<p>When writing a parser I ran into the problem that there are two string slices that come from the same origin string and ...
72,909,844
Update single database value on a website with many users<p>For this question, I'm particularly struggling with how to structure this:</p> <ol> <li>User accesses website</li> <li>User clicks button</li> <li>Value x in database increments</li> </ol> <p>My issue is that multiple people could potentially be on the website...
<p>To solve this problem I would suggest you follow a micro service architecture.</p> <p>A service called worker would handle the flask route that's called when the user clicks on the link/button on the website. It would generate a message to be sent to another service called queue manager that maintains a queue of inc...
Update single database value on a website with many users
python|flask
-1
53
2
72,914,148
72,914,148
0
true
2022-07-08T10:08:39.237Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Update single database value on a website with many users<p>For this question, I'm particularly struggling with how to structure this:</p> <ol> <li>User acce...
72,910,978
My dataframe column output NaN for all values<pre><code>41-45 93 46-50 81 36-40 73 51-55 71 26-30 67 21-25 62 31-35 61 56-70 29 56-60 26 61 or older 23 15-20 10 Name: age, dtype: int64 </code></pre> <pre><code> pd.to_numeric(c...
<p>try the below:</p> <pre><code>import pandas as pd df = pd.DataFrame({&quot;age&quot;: [&quot;41-45&quot;, &quot;46-50&quot;,&quot;61 or older&quot;], &quot;Col2&quot;: [93, 81, 23]}) Cols = [&quot;Lower_End_Age&quot;, &quot;Higher_End_Age&quot;,] # list of column names for later # replacing whitespace by delimite...
My dataframe column output NaN for all values
python|pandas|dataframe|nan
-3
53
1
72,913,618
72,913,618
0
true
2022-07-08T11:52:03.960Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: My dataframe column output NaN for all values<pre><code>41-45 93 46-50 81 36-40 73 51-55 71 26-30 67 21-25 ...
72,773,784
Wouldn't it be against the use of an optional object for validation?<p>I have a CRUD job.</p> <p>Read -&gt; Retrieves one object. Most have a value, but if an incorrect ID is entered, there may be no return value.</p> <p>So we wrap it in an Optional object and return it.</p> <p>Create -&gt; Let's pass.</p> <p>Update -&...
<p>What do you mean by 'optional gets destroyed'?</p> <p>You want <code>CallCounselEntity entity = getCallCounselByUserId(...).orElseThrow(...)</code>. If the code doesn't throw, then the method continues with <code>entity</code> now being assigned a non-optional value which you can use to make the update. If the code ...
Wouldn't it be against the use of an optional object for validation?
java|spring|validation|option-type
0
53
1
72,775,368
72,775,368
0
true
2022-06-27T14:29:19.857Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Wouldn't it be against the use of an optional object for validation?<p>I have a CRUD job.</p> <p>Read -&gt; Retrieves one object. Most have a value, but if a...
72,848,209
Formatting p-value cut-off line in a volcano plot in R<p>I am using the following function in R to develop a simple volcano plot:</p> <pre><code>EnhancedVolcano(all_genes, x = &quot;logFC&quot;, y = &quot;adjust.p.value&quot;, lab = all_genes$Gene.ID, pCutoff = 10e-2, FCcutoff = 1) </code></pre> <p>I w...
<p>I think you want the following code where the p-value is calculated like p=10^-s where s is your 1.3 like this:</p> <pre><code>library(EnhancedVolcano) EnhancedVolcano(all_genes, x = &quot;logFC&quot;, y = &quot;adjust.p.value&quot;, lab = all_genes$Gene.ID, pCutoff = 10^-1.3, FCcutoff = 1) </code><...
Formatting p-value cut-off line in a volcano plot in R
r
0
53
1
72,848,911
72,848,911
0
true
2022-07-03T16:32:37.777Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Formatting p-value cut-off line in a volcano plot in R<p>I am using the following function in R to develop a simple volcano plot:</p> <pre><code>EnhancedVolc...
72,978,645
button invisible with condition from field<p>This is my py</p> <pre><code>purchase_type = fields.Selection([ ('import', 'Import'), ('local', 'Local'), ], string='Purchase Type') </code></pre> <p>This is my xml</p> <pre><code>&lt;button name=&quot;action_approve&quot; string=&quot;Approve&quot; type=&quot;object...
<p>You can use the <code>attrs</code>:</p> <pre><code>attrs=&quot;{'invisible': [('purchase_type', '!=', 'import')]}&quot;&gt; </code></pre> <p>According to the <a href="https://www.odoo.com/documentation/13.0/fr/developer/reference/addons/views.html#semantic-components" rel="nofollow noreferrer">documentation</a> (che...
button invisible with condition from field
python|odoo|odoo-8
0
53
1
72,979,015
72,979,015
0
true
2022-07-14T09:57:31.553Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: button invisible with condition from field<p>This is my py</p> <pre><code>purchase_type = fields.Selection([ ('import', 'Import'), ('local', 'Local')...
73,013,529
How do I observe a result from FutureTask in ViewModel?<p>Please help~ I want to observe a result from FutureTask in ViewModel. When I ran it, I found that it sleeps for 5 seconds but I still can't get the answer. I confirmed in debug mode that it is executing longJob(), and the answer is 3. But I still can't get the a...
<p>I fixed my program as following. Then it's work.</p> <p>activity_main.xml</p> <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt; &lt;androidx.constraintlayout.widget.ConstraintLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot; xmlns:app=&quot;http://schemas.andro...
How do I observe a result from FutureTask in ViewModel?
java|android
0
53
1
73,018,728
73,018,728
0
true
2022-07-17T16:29:54.550Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I observe a result from FutureTask in ViewModel?<p>Please help~ I want to observe a result from FutureTask in ViewModel. When I ran it, I found that i...
72,981,526
Efficient creation of thread pool (C++)<p>What is the 'best' way to create a thread pool for more efficient calculation?</p> <p>Suppose I have the following code to print out how many primes are in a given interval (for demonstration only, I know it's super slow):</p> <pre class="lang-cpp prettyprint-override"><code>#i...
<p>Consider you would calculate the results for the intervals sequentially. Then you would use loops and you can do the same with <code>std::asynch</code> and <code>std::future</code> (<code>std::asynch</code> does not return a thread).</p> <pre><code>auto get_future_chunk(int from, int to){ return std::async(std::...
Efficient creation of thread pool (C++)
c++|multithreading
0
53
2
72,981,859
72,981,859
0
true
2022-07-14T13:41:29.533Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Efficient creation of thread pool (C++)<p>What is the 'best' way to create a thread pool for more efficient calculation?</p> <p>Suppose I have the following ...
72,933,666
I want to filter single value or multiple value in Laravel controller<p>I want to filter one value or multiple values in the Laravel controller</p> <pre><code>$news_paper_machine_ads = newsPaperMachineAds::join('news_paper_district', 'news_paper_district.idnews_paper_district', '=', 'news_paper_machine_ads.news_paper_d...
<pre><code> $district = $request-&gt;district; $city = $request-&gt;city; $machine_field = $request-&gt;machine_field; $data_arry = array(); if ($district != &quot;Select&quot;) { $data_arry[&quot;district&quot;] = $district; } if ($city != &quot;Select&quo...
I want to filter single value or multiple value in Laravel controller
php|mysql|sql|laravel|search
0
53
3
72,976,729
72,976,729
0
true
2022-07-11T04:19:49.510Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: I want to filter single value or multiple value in Laravel controller<p>I want to filter one value or multiple values in the Laravel controller</p> <pre><cod...
72,779,178
Node.javascript get on local host<p>I'm trying to follow a video but still can't get when I load by local host in the web browser.</p> <p>I am get a console log of listening at <code>3000</code> but it seems that this line:</p> <blockquote> <p>&quot;app.use(express.static(&quot;/Users/name/Desktop/Weather App/public/ap...
<p>If you just want <code>app.html</code> to show when <code>http://localhost:3000</code> is the URL, then you can do this:</p> <pre><code>const express = require(&quot;express&quot;); const app = express(); app.get(&quot;/&quot;, (req, res) =&gt; { res.sendFile(&quot;/Users/name/Desktop/Weather App/public/app.htm...
Node.javascript get on local host
javascript|node.js|server
0
53
2
72,779,440
72,779,440
0
true
2022-06-27T23:14:41.330Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Node.javascript get on local host<p>I'm trying to follow a video but still can't get when I load by local host in the web browser.</p> <p>I am get a console ...
72,872,296
How to import a typescript module before it is officially added to npm or yarn<p>I am new to typescript as well as js. trying to import a module that is being developed, so not yet added to npm.</p> <p>how do import it to my code?</p> <p>this is the repo: adding via yarn doesnt work, how or where do i place this code...
<pre><code>&quot;dependencies&quot; : { &quot;name1&quot; : &quot;git://github.com/user/project.git#commit-ish&quot;, &quot;name2&quot; : &quot;git://github.com/user/project.git#commit-ish&quot; } </code></pre> <p>Try this.</p>
How to import a typescript module before it is officially added to npm or yarn
javascript|typescript|npm|yarn-v2
0
53
1
72,872,336
72,872,336
0
true
2022-07-05T15:51:34.570Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to import a typescript module before it is officially added to npm or yarn<p>I am new to typescript as well as js. trying to import a module that is bei...
72,890,250
Filter & Delete rows of data based off of column value fast! (Google Sheets)<p>Is there a way to filter the data in column Q off my google sheet faster then reading line one by one. There is daily about 400+ lines it needs to scan through and I need to delete every row of data if the data in column Q is less than 1 rig...
<p>Try it this way:</p> <pre><code>function UpdateLog() { const ss = SpreadsheetApp.getActive(); const sh = ss.getSheetByName('Sheet0'); const vs = sh.getDataRange().getValues(); let d = 0; vs.forEach((r, i) =&gt; { if (!isNaN(r[16]) &amp;&amp; r[16] &lt; 1){ sh.deleteRow(i + 1 - d++); } }); ...
Filter & Delete rows of data based off of column value fast! (Google Sheets)
performance|google-chrome|google-apps-script|google-sheets|formula
0
53
1
72,890,448
72,890,448
0
true
2022-07-06T21:52:41.260Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Filter & Delete rows of data based off of column value fast! (Google Sheets)<p>Is there a way to filter the data in column Q off my google sheet faster then ...
72,768,817
pause the other playing video when play a new video jquery<p>I have many videos on one page. I am using jquery to play and pause the videos when I click on the play button it should play. I did this using jquery. now I need to pause the other videos when I press play on the next or previous video. could you help me, pl...
<p>To do what you require you can create a function which loops through all <code>video</code> elements and calls <code>pause()</code> on then. You can then call this function when a video is played.</p> <p>In addition, note that instead of looping through the video elements on document.ready, you can instead attach ev...
pause the other playing video when play a new video jquery
javascript|jquery|html5-video
1
53
1
72,769,013
72,769,013
0
true
2022-06-27T08:05:21.480Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: pause the other playing video when play a new video jquery<p>I have many videos on one page. I am using jquery to play and pause the videos when I click on t...
73,016,563
Dropdown menu background hover only around text<p>Im quite new to this so very sorry for the basic questions! I'm currently trying to create a dropdown menu within my navigation bar and having a little trouble trying to trouble shoot why my background hover in my sub-menu only displays from the left of the box to the e...
<p>i have check your code &amp; i have fixed some issues in your code.</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-css lang-css prettyprint-override"><code>.BottomNav { background: #fac2ad; display: flex...
Dropdown menu background hover only around text
html|css|menu|navigation
0
53
2
73,017,714
73,017,714
0
true
2022-07-18T01:43:49.563Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Dropdown menu background hover only around text<p>Im quite new to this so very sorry for the basic questions! I'm currently trying to create a dropdown menu ...
72,853,330
Incorrect saving of transparent UIImage to Photo Library as png with UIImageWriteToSavedPhotosAlbum<p>I have a <a href="https://stackoverflow.com/a/48759198/19276981">function</a> <code>cropAlpha()</code> that trims the extra space defined by the transparency.</p> <pre><code>func cropAlpha() -&gt; UIImage { let cgI...
<p>The problem is that <code>UIImageWriteToSavedPhotosAlbum</code> does not handle properly saving a <code>UIImage</code> with premultiplied alpha (or at least the result of saving such image is not what you expect) and your cropping method uses premultipliedLast format. You also can't just simply change <code>CGImageA...
Incorrect saving of transparent UIImage to Photo Library as png with UIImageWriteToSavedPhotosAlbum
swift|iphone|uikit|transparency|save-image
1
53
1
73,057,203
73,057,203
0
true
2022-07-04T07:47:15.347Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Incorrect saving of transparent UIImage to Photo Library as png with UIImageWriteToSavedPhotosAlbum<p>I have a <a href="https://stackoverflow.com/a/48759198/...
73,029,923
Bash redirecting a substituted process that redirects back to itself<p>Consider</p> <pre><code>$ zzz &gt; &gt;(echo fine) 2&gt; &gt;(echo error &gt;&amp;2) fine error </code></pre> <p>I was expecting this to keep printing 'error' to terminal because this is what I think is happening here:</p> <p>First set up all the re...
<p>Figured it out.</p> <p>Let's start with</p> <pre><code>$ &gt; &gt;(echo fine) 2&gt; &gt;(echo error) fine </code></pre> <p>Here the effect is the same as <code>echo error | echo fine</code>.</p> <p>Next</p> <pre><code>$ &gt; &gt;(echo fine) 2&gt; &gt;(echo error &gt;&amp;2) fine error </code></pre> <p>Here the effec...
Bash redirecting a substituted process that redirects back to itself
bash|redirect|process|substitution
0
53
1
73,031,639
73,031,639
0
true
2022-07-19T00:33:19.773Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Bash redirecting a substituted process that redirects back to itself<p>Consider</p> <pre><code>$ zzz &gt; &gt;(echo fine) 2&gt; &gt;(echo error &gt;&amp;2) f...
72,932,022
How to override default xamarin.forms.entry behavior<p>I need to make custom control for uwp project that derives from xamarin forms entry element. The border of the control needs to remain red when hovering on it. But it sticks to its default behavior and changes border color on hover to gray. I created the CypressEnt...
<blockquote> <p>How to override default xamarin.forms.entry behavior</p> </blockquote> <p>It is UWP native <code>FormsTextBox</code> default behavir, the textbox will update border element with specific solidcolorbrush when pointover or focused.</p> <p>The easy way copy <a href="https://github.com/xamarin/Xamarin.For...
How to override default xamarin.forms.entry behavior
xaml|xamarin|uwp
1
53
1
72,933,093
72,933,093
0
true
2022-07-10T21:27:17.557Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to override default xamarin.forms.entry behavior<p>I need to make custom control for uwp project that derives from xamarin forms entry element. The borde...
72,775,010
JsonArray is not adding all JsonObjects<p>When I add a list of test JsonObjects, only the last JsonObject is add to the JsonArray. I do not understand why because I am following documentation from oracle. <a href="https://docs.oracle.com/javaee/7/api/javax/json/JsonArray.html" rel="nofollow noreferrer">https://docs.ora...
<p>You need to create an <a href="https://docs.oracle.com/javaee/7/api/javax/json/JsonArrayBuilder.html" rel="nofollow noreferrer"><code>JsonArrayBuilder</code></a> inside for loop instead of creating JsonArray at each step. Then build the builder outside of for loop like:</p> <pre><code>JsonArrayBuilder arrayBuilder =...
JsonArray is not adding all JsonObjects
java|json
1
53
2
72,775,243
72,775,243
0
true
2022-06-27T15:55:49.583Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: JsonArray is not adding all JsonObjects<p>When I add a list of test JsonObjects, only the last JsonObject is add to the JsonArray. I do not understand why be...
72,817,366
how can i make 4 rows into 1 row in pandas dataframe?<p>I'm using python3 and jupyter notebook in intel-cpu mac</p> <p>I want to make 15 column and 25600 rows csv file into</p> <p>60 column and 6400 rows</p> <p>just making</p> <p>new 0th row = 0th row, 1st row, 2nd row, 3rd row</p> <p>new 1th row = 4th row, 5th row, 6t...
<p>You can do:</p> <pre><code>df2 = pd.concat( [pd.DataFrame(df.iloc[i:i+4].stack().tolist()).T for i in range(0, len(df), 4)] ).reset_index(drop=True) df2.columns = np.ravel([df.columns]*4) </code></pre> <p>Basically get 4 rows stack them and form a list and concatenate them into a dataframe.</p> <p>Example:</p> <...
how can i make 4 rows into 1 row in pandas dataframe?
python|pandas|dataframe
0
53
1
72,818,004
72,818,004
0
true
2022-06-30T14:14:01.763Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how can i make 4 rows into 1 row in pandas dataframe?<p>I'm using python3 and jupyter notebook in intel-cpu mac</p> <p>I want to make 15 column and 25600 row...
72,770,004
Getting blank while fetching Delegated permissions of Service Principal via PowerShell<p>I am trying to get the list of delegated permissions that I granted to Service principal by querying via PowerShell like below:</p> <pre><code>Get-AzureADOAuth2PermissionGrant | Where-Object { $_.ClientId -eq 'myappclientid' } | S...
<p>Please <strong>note</strong> that when you are registering application in Azure AD it automatically creates a Service Principal under Enterprise Applications with same name but with different <strong><code>object_id</code></strong></p> <p>Make sure to pass that <strong><code>object_id</code></strong> of your Enterpr...
Getting blank while fetching Delegated permissions of Service Principal via PowerShell
azure-ad-powershell-v2
0
53
1
72,771,201
72,771,201
1
true
2022-06-27T09:43:14.367Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Getting blank while fetching Delegated permissions of Service Principal via PowerShell<p>I am trying to get the list of delegated permissions that I granted ...
72,779,664
combing two models and only retrieving a.firstname, a.lastname, b.name and returning as list to populate in mvc view using linq<p>I have a <code>UserTbl</code> and a <code>CongregationTbl</code> and I am trying to combine them so that I can retrieve <code>a.FirstName</code>, <code>a.LastName</code> and <code>b.Name</co...
<p>You should model your merged one like this. It's like making a custom model that allocates the first two models's important fields:</p> <pre><code>public class MergedModel{ public string congregation {get;set;} public string firstname {get;set;} public string lastname {get;set;} } </code></pre> <p>The...
combing two models and only retrieving a.firstname, a.lastname, b.name and returning as list to populate in mvc view using linq
c#|asp.net-mvc|linq
1
53
1
72,781,246
72,781,246
1
true
2022-06-28T00:57:56.403Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: combing two models and only retrieving a.firstname, a.lastname, b.name and returning as list to populate in mvc view using linq<p>I have a <code>UserTbl</cod...
72,782,572
Describe each table's columns<p>I'm doing table analysis to understand each table column in a database. Currently, I know how to list all the tables details.</p> <pre class="lang-sql prettyprint-override"><code>select TABLE_SCHEMA , TABLE_NAME , TABLE_TYPE , TABLE_ROWS from information_schema.TABLES...
<p>You could use <code>information_schema.COLUMNS</code> to get all the fields returned by describe command.</p> <p>Try:</p> <pre><code>select TABLE_SCHEMA as 'database', TABLE_NAME as 'table', COLUMN_NAME as 'Field', DATA_TYPE as 'Type', IS_NULLABLE as 'Null', COLUMN_KEY as 'Key', ...
Describe each table's columns
mysql|sql|columnsorting
0
53
2
72,782,741
72,782,741
1
true
2022-06-28T07:49:00.537Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Describe each table's columns<p>I'm doing table analysis to understand each table column in a database. Currently, I know how to list all the tables details....
72,782,734
How to remove rows with ? mark instead of NA in R<p>I have a dataframe in r, but instead of NA, there is question mark. So using na.omit doesn't work. How can i remove rows having ? in it.</p> <p>Thanks</p>
<pre><code>&gt; a &lt;- c(1:5) &gt; b &lt;- c(2:5,&quot;?&quot;) &gt; c &lt;- c(&quot;a&quot;,&quot;b&quot;,&quot;?&quot;,&quot;d&quot;,&quot;e&quot;) &gt; &gt; df &lt;- data.frame(a,b,c) &gt; df a b c 1 1 2 a 2 2 3 b 3 3 4 ? 4 4 5 d 5 5 ? e &gt; df[df == &quot;?&quot;] &lt;- NA &gt; df a b c 1 1 2 a 2...
How to remove rows with ? mark instead of NA in R
r
-2
53
4
72,782,855
72,782,855
1
true
2022-06-28T08:00:23.770Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to remove rows with ? mark instead of NA in R<p>I have a dataframe in r, but instead of NA, there is question mark. So using na.omit doesn't work. How ca...
72,778,909
Lua Multi-Line comment remover<p>I'm trying to remove all normal and multi-line comments from a string, but it doesn't remove entire multi-line comment I tried</p> <pre><code>str:gsub(&quot;%-%-[^\n\r]+&quot;, &quot;&quot;) </code></pre> <p>on this code</p> <pre><code>print(1) --a print(2) --b --[[ print(4) ]] </co...
<p>The pattern you have provided to <code>gsub</code>, <code>%-%-[^\n\r]+</code>, will only remove &quot;short&quot; comments (&quot;line&quot; comments). It doesn't even attempt to deal with &quot;long&quot; comments and thus just treats their first line as a line comment, removing it.</p> <p>Thus Piglet is right: You...
Lua Multi-Line comment remover
lua|string-matching
1
53
2
72,783,302
72,783,302
1
true
2022-06-27T22:29:53.967Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Lua Multi-Line comment remover<p>I'm trying to remove all normal and multi-line comments from a string, but it doesn't remove entire multi-line comment I tri...
72,783,161
Rename multiple files by removing filename prefix<p>I'm new to Python, I have multiple files in a folder where I need to rename those files as the the given pattern.</p> <p>Example:</p> <p>Folder : <code>/Users/Usr1/Documents/FilesFolder</code> and</p> <p>File's :</p> <ol> <li><code>0. a101.employee.txt</code></li> <li...
<p>You may use <a href="https://en.wikipedia.org/wiki/Regular_expression" rel="nofollow noreferrer">regular expression</a>:</p> <pre><code>import os import re path = '/Users/User1/Documents/FilesFolder' files = os.listdir(path) p = &quot;.*a101.(.+)&quot; for file in files: m = re.match(p, file) if m is not...
Rename multiple files by removing filename prefix
python
0
53
4
72,783,600
72,783,600
1
true
2022-06-28T08:30:32.733Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Rename multiple files by removing filename prefix<p>I'm new to Python, I have multiple files in a folder where I need to rename those files as the the given ...
72,786,472
How do I output from multiple threads to a .txt file?<p>This is my current thread, I use it to stress test the CPU, I need to output the &quot;Hcount&quot; every hour to a .txt file, currently, it will print it but only from one thread ,when another hour passes it deletes what is written on the .txt file and rewrite th...
<p>Writing into file from multiple threads is a bad idea. I suggest you create a queue (even if just in memory queue) and have all your threads writing the info that they want to write into your file into this queue. In other words your queue will have multiple producers. And than have a single consumer on your queue t...
How do I output from multiple threads to a .txt file?
java|multithreading
-1
53
2
72,787,018
72,787,018
1
true
2022-06-28T12:30:54.900Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I output from multiple threads to a .txt file?<p>This is my current thread, I use it to stress test the CPU, I need to output the &quot;Hcount&quot; e...
72,787,907
Where is the 'pubspec.yaml' file? Pub.dev examples won't compile in Android Studio with Flutter Plugin without adding a path, but where is it?<p>I have successfully installed the Flutter plugin to Android Studio on my Windows10 system, and flutter doctor -v gives me all green check marks. However, the DART examples fro...
<p>[enter image description here][1] [1]: https://i.stack.imgur.com/Y5CDd.png</p> <p>This is a default folder and file structure of a Flutter project. In your case pubspec.yaml file isn't present, which should be there. So I think this is an issue related to build. So just try to rebuild the project, and it should be c...
Where is the 'pubspec.yaml' file? Pub.dev examples won't compile in Android Studio with Flutter Plugin without adding a path, but where is it?
flutter|android-studio|dart|pubspec
0
53
1
72,788,093
72,788,093
1
true
2022-06-28T14:02:56.127Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Where is the 'pubspec.yaml' file? Pub.dev examples won't compile in Android Studio with Flutter Plugin without adding a path, but where is it?<p>I have succe...
72,785,835
Is it possible to import data and metadata from a single csv file to R<p>I know how to import a simple <code>csv</code> file using <code>R</code>. But, is it possible to import a file to <code>R</code> including variable and value labels (similar to SPSS <code>sav</code> files).</p> <p>Or instead, shall I have two <cod...
<p>You can do it like this in this case:</p> <pre class="lang-r prettyprint-override"><code>for(each_var in metadata$var) { each_label &lt;- metadata$val_lab[metadata$var==each_var] # Get data out of weird tuple format values_list &lt;- strsplit( gsub(&quot;\\(|\\)|'&quot;, &quot;&quot;, strspli...
Is it possible to import data and metadata from a single csv file to R
r|label|metadata
0
53
1
72,789,094
72,789,094
1
true
2022-06-28T11:46:12.097Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is it possible to import data and metadata from a single csv file to R<p>I know how to import a simple <code>csv</code> file using <code>R</code>. But, is it...
73,016,289
How can I change my xbee setup for AP = 0 from API mode (AP = 1 or AP =2) by using digi module in python (AT mode or transparent mode)?<p>I am using XBee PRO S3B for wireless radio communication.</p> <p>Currently I am configuring it by XCTU, however, sometimes I need to reset or re configure with non graphical interfac...
<pre><code>from digi.xbee.devices import XBeeDevice from digi.xbee.models.mode import OperatingMode xbee0=XBeeDevice(&quot;/dev/ttyUSB0&quot;,9600) xbee0.open(force_settings=True) xbee0.reset() xbee0.set_parameter(('AP'),bytearray([OperatingMode.AT_MODE.code])) </code></pre>
How can I change my xbee setup for AP = 0 from API mode (AP = 1 or AP =2) by using digi module in python (AT mode or transparent mode)?
python|at-command|xbee
2
53
1
73,296,103
73,296,103
0
true
2022-07-18T00:30:16.907Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I change my xbee setup for AP = 0 from API mode (AP = 1 or AP =2) by using digi module in python (AT mode or transparent mode)?<p>I am using XBee PRO...
73,003,541
dj-rest-auth registration fetch<p>Using dj-rest-auth for user auth and registration on my react app. Got login and logout to work using api endpoints in the docs. Failing to register a user, getting HTTP bad request 400. Reading on the web, explains that there's something wrong with my request but cannot figure what.</...
<p>The issue was in the settings, in config of drf auth, in this case it would work with:</p> <pre><code>ACCOUNT_USERNAME_REQUIRED = True ACCOUNT_EMAIL_REQUIRED = False ACCOUNT_EMAIL_VERIFICATION = 'none' ACCOUNT_AUTHENTICATION_METHOD = 'username' </code></pre>
dj-rest-auth registration fetch
javascript|django|fetch|dj-rest-auth
0
53
1
73,599,259
73,599,259
0
true
2022-07-16T10:48:08.403Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: dj-rest-auth registration fetch<p>Using dj-rest-auth for user auth and registration on my react app. Got login and logout to work using api endpoints in the ...
72,864,853
kinesis data stream performance testing with partition key<p>I am using the Kinesis Data Generator tool and I was wondering how to define the partition key in the test data so that the data is distributed to all the shard evenly.</p> <p><a href="https://awslabs.github.io/amazon-kinesis-data-generator/web/producer.html"...
<p>The tool already distributes data evenly which can be verified by enabling shard-level metrics specifically the incoming records metric.</p>
kinesis data stream performance testing with partition key
amazon-kinesis|amazon-kinesis-analytics
0
53
1
73,454,257
73,454,257
1
true
2022-07-05T06:29:14.547Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: kinesis data stream performance testing with partition key<p>I am using the Kinesis Data Generator tool and I was wondering how to define the partition key i...
72,238,953
Can't get thymeleaf parameter in href from model attribute<p>I'm new to thymeleaf. I can't get systemId in th:href ,but I can do it in &lt;p th:text...</p> <p>What's the problem? Pls, help</p> <p><a href="https://i.stack.imgur.com/JwODH.png" rel="nofollow noreferrer">My code</a></p> <p><a href="https://i.stack.imgur.co...
<p>Just replace this code &lt;a th:href=&quot;@{|/${systemId}/releases/${release.getReleaseId()}|}&quot;</p> <p>&lt;a th:href=&quot;@{|/${systemId}/releases/new|}&quot; the &quot;| |&quot; is solution of the problem</p> <p><a href="https://www.thymeleaf.org/doc/tutorials/3.0/usingthymeleaf.html" rel="nofollow norefer...
Can't get thymeleaf parameter in href from model attribute
html|attributes|thymeleaf|href
-1
53
2
72,239,118
72,239,118
0
true
2022-05-14T09:33:58.550Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can't get thymeleaf parameter in href from model attribute<p>I'm new to thymeleaf. I can't get systemId in th:href ,but I can do it in &lt;p th:text...</p> <...
72,252,643
How to select a certain key value and skip if a certain key is not present in the list of dictionaries?<pre><code> d = [{'email': 'harimsri@math.uvic.ca', 'gid': '5b869a4fe1cd8e14a38d67b5', '_id': '53f49508dabfaeb4c677b4a4', 'name': 'Hiromasa Habuchi', 'org': 'Department of Mathematics and Statistics, University of Vi...
<p>You can use a list comprehension that will check for each dictionary if the key <code>name</code> belongs to the dictionary list of keys.</p> <pre><code>dicts = [{'email': 'harimsri@math.uvic.ca', 'gid': '5b869a4fe1cd8e14a38d67b5', '_id': '53f49508dabfaeb4c677b4a4', 'name': 'Hiromasa Habuchi', 'org': 'Department of...
How to select a certain key value and skip if a certain key is not present in the list of dictionaries?
python|python-3.x|list|dictionary|key-value
-2
53
1
72,252,656
72,252,656
0
true
2022-05-15T22:32:06.433Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to select a certain key value and skip if a certain key is not present in the list of dictionaries?<pre><code> d = [{'email': 'harimsri@math.uvic.ca', '...
72,259,597
I'm getting an error even though I defined a string and I'm getting an error even though I defined a string<pre><code> import {Pipe, PipeTransform} from '@angular/core'; import {Product} from &quot;./product&quot;; @Pipe({ name: 'productFilter' }) export class ProductFilterPipe implements PipeTransform { trans...
<p>Try with this</p> <pre><code>import {Pipe, PipeTransform} from '@angular/core'; import {Product} from &quot;./product&quot;; @Pipe({ name: 'productFilter' }) export class ProductFilterPipe implements PipeTransform { transform(value: Product[], filterText?: string): Product[] { let pattern = filterText ? fi...
I'm getting an error even though I defined a string and I'm getting an error even though I defined a string
javascript|angular|typescript|intellij-idea
0
53
1
72,259,879
72,259,879
0
true
2022-05-16T12:57:02.933Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: I'm getting an error even though I defined a string and I'm getting an error even though I defined a string<pre><code> import {Pipe, PipeTransform} from '...
72,260,432
Set intercept to 0 on a linear regression plot using Altair in Python<p>I am trying to plot a linear regression in python using altair. I want to set/force the intercept to be 0. Can't find it anywhere in the literature (apols if missing something).</p> <p>Can someone please show me how to do it if this is possible? I ...
<p>This is currently not possible in Altair because <a href="https://github.com/vega/vega/issues/2859" rel="nofollow noreferrer">is has not been implemented in Vega yet</a>. Since Altair builds on Vega-Lite which in turn builds on Vega, you can follow that issue for when the implementation might happen and add a compel...
Set intercept to 0 on a linear regression plot using Altair in Python
python|altair
1
53
1
72,260,931
72,260,931
0
true
2022-05-16T14:00:26.317Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Set intercept to 0 on a linear regression plot using Altair in Python<p>I am trying to plot a linear regression in python using altair. I want to set/force t...
72,252,837
How to upgrade util-linux from 2.32.1 to 2.34 in Redhat<p>Is there a way to upgrade package util-linux 2.32.1 to version 2.34 on RHEL 8.5. Version 2.34 has many more output columns available for lsblk compared to 2.32.1 that I would like to use.</p> <p>Searching the repo shows I have the latest.</p> <pre><code>Updating...
<p>Had to clone this repo <code>https://github.com/util-linux/util-linux.git</code></p> <p>Then follow this how-to found here.</p> <p><code>https://github.com/util-linux/util-linux/blob/next/Documentation/howto-compilation.txt</code></p> <pre><code>lsblk --version lsblk from util-linux 2.38.141-581b1 </code></pre>
How to upgrade util-linux from 2.32.1 to 2.34 in Redhat
linux|terminal|redhat
-1
53
1
72,267,315
72,267,315
0
true
2022-05-15T23:19:52.083Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to upgrade util-linux from 2.32.1 to 2.34 in Redhat<p>Is there a way to upgrade package util-linux 2.32.1 to version 2.34 on RHEL 8.5. Version 2.34 has m...
72,284,238
What ist the difference between ontouchend and ontouchleave?<p>It seems like for the following question Google should give an answer but (for me) it doesn't.<br> What ist the difference between the events <code>ontouchend</code> and <code>ontouchleave</code> or <code>ontouchstart</code> and <code>ontouchenter</code>, r...
<p>you have to consider your widget as a collision box that react to touch on screen</p> <p>ontouchend() is called when you lift off you finger off the screen, won't activate if you first slide ouside the colision box.</p> <p>ontouchleave() is called if your finger touche the colision box werever it come from et leave ...
What ist the difference between ontouchend and ontouchleave?
c#|blazor
0
53
1
72,284,420
72,284,420
0
true
2022-05-18T06:37:05.103Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What ist the difference between ontouchend and ontouchleave?<p>It seems like for the following question Google should give an answer but (for me) it doesn't....
72,284,639
changing div content using button<p>I want to make a button that will create a <code>back page</code> if I click this it will return to the last div content. I already have the function for the next page but I'm already ran out of logic for making a function for the <code>back page</code> button.</p> <p>Here is my code...
<p>You could do it like this:</p> <pre><code>function next() { var div = $(&quot;div[id^=content]:visible&quot;) var nextdiv = div.next(&quot;[id^=content]&quot;); if (nextdiv) { div.addClass(&quot;hidden&quot;); nextdiv.removeClass(&quot;hidden&quot;); $(&quot;#back&quot;).show(); $('#next').togg...
changing div content using button
html|jquery
0
53
2
72,284,780
72,284,780
0
true
2022-05-18T07:11:46.687Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: changing div content using button<p>I want to make a button that will create a <code>back page</code> if I click this it will return to the last div content....
72,277,320
How do you copy data from a dataframe to another<p>I am having a difficult time getting the correct data from a reference csv file to the one I am working on.</p> <p>I have a csv file that has over 6 million rows and 19 columns. I looks something like this : <a href="https://i.stack.imgur.com/FAY6a.png" rel="nofollow n...
<p>Thank you for providing updates I was able to put something together that should be able to help you</p> <pre><code>#You drop these two columns because you won't need them once you join them to df1 (which is your 2nd table provided) df.drop(['Fuel_consu_1', 'Fuel_consu_2'], axis = 1 , inplace = True) #This will join...
How do you copy data from a dataframe to another
pandas|csv|reference|copy
0
53
1
72,291,085
72,291,085
0
true
2022-05-17T16:05:09.503Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do you copy data from a dataframe to another<p>I am having a difficult time getting the correct data from a reference csv file to the one I am working on...
72,296,216
Regex to extract irregular delimiters<p>I have a column of data containing id numbers that are between 4 and 10 digits in length. However, these id numbers are manually entered and have no systematic delimiters. In some cases, id numbers are delimited by a comment. With the caveat that the real data is unpredictable...
<p>If you want to extract the ids, you could use for example:</p> <pre class="lang-py prettyprint-override"><code>import re data = [ '13796352', '2113146, 2113148, 2113147', 'asdf ee A070_321 on 4.3.99 - MC', 'blah blah3', '1914844\xa0, 3310339, 1943270, 2190351, 1215262', '789702/ 89057', '1 ...
Regex to extract irregular delimiters
python|regex|delimiter
0
53
2
72,296,849
72,296,849
0
true
2022-05-18T21:29:55.767Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Regex to extract irregular delimiters<p>I have a column of data containing id numbers that are between 4 and 10 digits in length. However, these id numbers ...
72,242,673
Why does a model based on Dense layers gives better results than one based on Conv2D?<p>In Tensorflow, the results of training a model based on <a href="https://www.tensorflow.org/api_docs/python/tf/keras/layers/Dense" rel="nofollow noreferrer">Dense</a> layers are better than a model based on equivalent <a href="https...
<p>There are two issues here:</p> <ol> <li>The shape of the features (None, input_height, 1) doesn't match the shape of the model's input (None, input_height, 1, 1).</li> <li>The shape of the labels (None, 1) doesn't match the shape of model's output (None, 1, 1, 1).</li> </ol> <p>Each of these has an impact on the per...
Why does a model based on Dense layers gives better results than one based on Conv2D?
tensorflow|machine-learning|conv-neural-network
0
53
2
72,298,078
72,298,078
0
true
2022-05-14T17:50:24.297Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why does a model based on Dense layers gives better results than one based on Conv2D?<p>In Tensorflow, the results of training a model based on <a href="http...
72,298,716
What is the correct syntax of JavaScript Factory Function? JavaScript Factory Function Syntax confusion<p>Both function getMyCar1 &amp; getMyCar2 has same result but which one is the correct way of doing?</p> <p>getMycar2: Why value have to use instead of key? key:value (carBrand:brand).</p> <pre><code>function selectC...
<p>It depends on what you want to achieve. i.e., If you want that function to return the current state of a car instance, you have <strong>getMycar1</strong> function: Example:</p> <pre><code>let bmw = selectCar(&quot;bmw&quot;, &quot;X6&quot;, &quot;White&quot;); bmw.carColor= &quot;black&quot; console.log(&quot;My C...
What is the correct syntax of JavaScript Factory Function? JavaScript Factory Function Syntax confusion
javascript|function|syntax|factory
-1
53
1
72,299,068
72,299,068
0
true
2022-05-19T04:38:58.860Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What is the correct syntax of JavaScript Factory Function? JavaScript Factory Function Syntax confusion<p>Both function getMyCar1 &amp; getMyCar2 has same re...
72,301,627
How to delete file after closing it in python?<p>What my code should do: It creates a temp image and opens it in Windows, after that, when user close that image, it should be deleted from the folder. How can i do that?</p> <pre><code> if (selected_langs != &quot;&quot;): os.startfile('temp' + '.' + ...
<p>Following a comment from <a href="https://stackoverflow.com/users/2878796/unholysheep">UnholySheep</a>, you'll need to check whether the file is closed or not. For example, do this:</p> <pre><code>import os import time selected_langs = &quot;lang&quot; format = &quot;txt&quot; waiting_time = 1 # seconds def is_op...
How to delete file after closing it in python?
python
0
53
2
72,304,672
72,304,672
0
true
2022-05-19T09:03:45.373Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to delete file after closing it in python?<p>What my code should do: It creates a temp image and opens it in Windows, after that, when user close that im...
72,296,277
Django: populating many to many field using modelformset_factory<p>I try to populate a many-to-many field. The Relationship exists between the Menus and Course Model. I added some custom fields to the M2M Table, so I can store the order of the courses and their type (i.e. Starter, Appetizer, etc.).</p> <p>To get a dyna...
<p>Based on this thread (<a href="https://stackoverflow.com/questions/17304148/set-form-field-value-before-is-valid/17304350#17304350">Set form field value before is_valid()</a>) I solved my problem.</p> <p>I added the field <code>course_type</code> to the course_formset. I retrieved the data from request.POST itself.<...
Django: populating many to many field using modelformset_factory
python|django|many-to-many|formset
1
53
1
72,311,264
72,311,264
0
true
2022-05-18T21:36:12.237Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Django: populating many to many field using modelformset_factory<p>I try to populate a many-to-many field. The Relationship exists between the Menus and Cour...
72,311,570
when placing items in the toolbar, How do you remove the space where a navigation title would go<p>I've created a sample project that has a toolbar with text. All of my content has a space above it where a navigation title would go if I had one. I would like to remove this space. Here's my sample project:</p> <pre><cod...
<p>putting <code>.navigationBarTitleDisplayMode(.inline)</code> on the VStack fixes this issue. (credit: ChrisR for the comment)</p>
when placing items in the toolbar, How do you remove the space where a navigation title would go
swift|swiftui|swiftui-navigationview
0
53
1
72,318,230
72,318,230
0
true
2022-05-19T22:08:19.873Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: when placing items in the toolbar, How do you remove the space where a navigation title would go<p>I've created a sample project that has a toolbar with text...
72,319,509
Or-tools not printing results when changing an example<p>I am trying to put my hands on the example from the page. The example I am trying to reproduce is <a href="https://developers.google.com/optimization/routing/cvrp#entire_program" rel="nofollow noreferrer">this one</a>. Code below:</p> <pre class="lang-py prettypr...
<p>It does not print anything because it does not find any solution. Most likely the modified problem is infeasible.</p>
Or-tools not printing results when changing an example
python|or-tools
0
53
1
72,319,622
72,319,622
0
true
2022-05-20T13:11:45.843Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Or-tools not printing results when changing an example<p>I am trying to put my hands on the example from the page. The example I am trying to reproduce is <a...
72,318,684
Spring Data JDBC many to many relationship management<p>I have a many-to-many relationship person -&gt; person_address &lt;- address and use a reference class. But in my Person aggregate root it seems only adding person_address works (addresses collection):</p> <pre><code>@MappedCollection(idColumn = &quot;PERSON_ID&qu...
<p>You should be able to just remove entries from <code>Person.addresses</code> and save the entity again.</p> <p><a href="https://github.com/schauder/stackoverflow/tree/main/jdbc/remove-reference" rel="nofollow noreferrer">I created a sample to demonstrate this on GitHub</a>.</p> <p>On pitfall I fell into in the past...
Spring Data JDBC many to many relationship management
spring-data-jdbc
0
53
1
72,319,727
72,319,727
0
true
2022-05-20T12:09:04.830Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Spring Data JDBC many to many relationship management<p>I have a many-to-many relationship person -&gt; person_address &lt;- address and use a reference clas...
72,320,212
How to design a method that can deal with two different object types<p>I have two collections, that have almost similar attributes:</p> <pre><code>HashSet&lt;BuyerUser&gt; HashSet&lt;SellerUser&gt; </code></pre> <p>I want to write a method that serializes the objects as JSON and sends it to a web API. My problem is, ho...
<p>Since the parameterized type is lost on runtime, you cannot do it. You can either create a wrapper for each <code>HashSet</code> and add a method to it which returns the type:</p> <pre><code>public class MySet&lt;T&gt; extends HashSet&lt;T&gt; { private Class&lt;T&gt; type; public MySet(Class&lt;T&gt; c) ...
How to design a method that can deal with two different object types
java
2
53
2
72,320,425
72,320,425
0
true
2022-05-20T14:01:58.727Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to design a method that can deal with two different object types<p>I have two collections, that have almost similar attributes:</p> <pre><code>HashSet&lt...
72,311,154
How to read only once from Android build in Accelerometer per second?<p>With help of sensorManager I am reading accelerometer reading. Currently slowest setting ie SENSOR_DELEY_NORMAL ,accelerometer reads around 10 times every second. Is there any way by which it can reduce sending reading , may be once every second.<...
<p>Based on this <a href="https://stackoverflow.com/questions/10044158/what-is-the-difference-between-sensor-delay-normal-sensor-delay-game-sensor-de">answer</a>, you could also define your own rate, for example 1000 ms = 1s:</p> <pre class="lang-java prettyprint-override"><code> @Override public void onSensorChang...
How to read only once from Android build in Accelerometer per second?
java|android|accelerometer|android-sensors|sensormanager
0
53
1
72,322,111
72,322,111
0
true
2022-05-19T21:14:43.357Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to read only once from Android build in Accelerometer per second?<p>With help of sensorManager I am reading accelerometer reading. Currently slowest sett...
72,323,621
How to save matplotlib plot with a custom filename that includes timestamp?<p>I'm trying to write a program in Python which can save a plot with a filename that includes the timestamp as part of its name with <code>matplotlib</code>, for example, &quot;temperature_vs_time_16-09-23&quot; (16-09-23 meaning 4:09:23PM). I ...
<p>You can use <code>datetime</code> and join strings as filename</p> <pre><code>import matplotlib.pyplot as plt import numpy as np from datetime import datetime values = np.random.randint(0,10,100) now = datetime.now() today_filename = &quot;temperature_vs_time_&quot;+now.strftime(&quot;%d-%m-%Y&quot;)+&quot;.png&quot...
How to save matplotlib plot with a custom filename that includes timestamp?
python|matplotlib
0
53
2
72,323,889
72,323,889
0
true
2022-05-20T18:52:32.980Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to save matplotlib plot with a custom filename that includes timestamp?<p>I'm trying to write a program in Python which can save a plot with a filename t...
72,334,834
expected str instance, set found when using Boto3<p>I'm using boto3 and putting in my credentials like-so:</p> <pre><code>dynamodb_client = boto3.client('dynamodb', region_name='us-west-2', aws_access_key_id={access_key}, aws_secret_access_key={secret_key}) </code></pre> <p>I get this error and from searching online it...
<p>The issue isn't that you don't have a session token.</p> <p>The issue is that you're wrapping your access key ID &amp; secret access key within dictionaries but Boto3 expects 2 string values.</p> <p>The hint is in:</p> <blockquote> <p>expected str instance, set found</p> </blockquote> <p>Replace:</p> <pre class="lan...
expected str instance, set found when using Boto3
python|amazon-web-services|boto3
-1
53
1
72,336,143
72,336,143
0
true
2022-05-22T04:36:43.923Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: expected str instance, set found when using Boto3<p>I'm using boto3 and putting in my credentials like-so:</p> <pre><code>dynamodb_client = boto3.client('dyn...
72,341,835
React - getting error when filter array of dates<p>This gives me a array of createdAt timestamps like: ['2022-05-22T21:57:45.202Z', '2022-05-22T21:57:45.205Z']</p> <pre><code> const unpaid = feeStatus.map((date) =&gt; { return date.createdAt; }); </code></pre> <p>Now i wanna try to filter the array and show only ...
<p>First of all, the <code>getTime()</code> function is a method of the <code>Date</code> object. So you will need to convert the strings to valid <code>Date</code> objects. e.g. <code>new Date(str)</code>, or using a library to handle it, like <code>date-fns</code>.</p> <p>Secondly, there is a group of brackets missin...
React - getting error when filter array of dates
arrays|reactjs|filter
0
53
2
72,341,921
72,341,921
0
true
2022-05-22T23:00:06.073Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: React - getting error when filter array of dates<p>This gives me a array of createdAt timestamps like: ['2022-05-22T21:57:45.202Z', '2022-05-22T21:57:45.205Z...
72,344,866
Show form result calculation after submit in apps script<p>I'm trying to create an html form that loads data into a google sheet and after submitting and loading it to the sheet, I want to show in the html the result of calculating the fields. The calculation is in a specific cell in the google sheet according to the s...
<p>In your script, how about the following modification?</p> <h3>Google Apps Script side: <code>Code.gs</code></h3> <h4>From:</h4> <pre><code> else if (branch == &quot;Rishonim&quot;) {sheet.getRange('B10').setValue(participants), sheet.getRange('F10').setValue(engagment), predictedValue = sheet.getRange('G2').getValu...
Show form result calculation after submit in apps script
google-apps-script
1
53
2
72,345,152
72,345,152
0
true
2022-05-23T07:40:47.980Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Show form result calculation after submit in apps script<p>I'm trying to create an html form that loads data into a google sheet and after submitting and loa...
72,346,181
Docker-Compose Output File To Local Host<p>I have the below <code>docker-compose.yaml</code> file that sets up a database and runs a python script</p> <pre><code>version: '3.3' services: db: image: mysql:8.0 cap_add: - SYS_NICE restart: always environment: - MYSQL_DATABASE=test_db - ...
<p>it seems using <code>docker-compose run -v $(pwd)/output:/app/output py_service</code> did the job</p>
Docker-Compose Output File To Local Host
python|docker-compose
0
53
1
72,346,551
72,346,551
0
true
2022-05-23T09:26:00.927Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Docker-Compose Output File To Local Host<p>I have the below <code>docker-compose.yaml</code> file that sets up a database and runs a python script</p> <pre><...
72,348,885
Find a valor from list of dict<p>i have this list of dicts:</p> <pre><code>l = [{'campo': 'Admin_state', 'valor': 'enable'}, {'campo': 'LinkState', 'valor': 'enable'}, {'campo': 'ONU_interface', 'valor': 'gpon-onu_1/2/15:31'}, {'campo': 'Profile_type_Ont', 'valor': 'ZTE-F660V3'}] </code></pre> <p>i need ...
<p>Using <a href="https://docs.python.org/3/library/functions.html#filter" rel="nofollow noreferrer"><code>filter</code></a> and <a href="https://docs.python.org/3/library/functions.html#next" rel="nofollow noreferrer"><code>next</code></a>:</p> <pre><code>l = [{'campo': 'Admin_state', 'valor': 'enable'}, {'campo'...
Find a valor from list of dict
python|arrays
-3
53
2
72,349,127
72,349,127
0
true
2022-05-23T12:56:32.530Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Find a valor from list of dict<p>i have this list of dicts:</p> <pre><code>l = [{'campo': 'Admin_state', 'valor': 'enable'}, {'campo': 'LinkState', 'val...
72,340,745
When I make an e-mail intent in kotlin, the recipient mail is not added directly<pre><code>binding.navView.setNavigationItemSelectedListener { when(it.itemId){ R.id.requestWallpaper-&gt;{ val emailIntent=Intent().apply { action=Intent.ACTION_SEND ...
<p>You're <em>so</em> close here, the only thing that's missing is the <code>Intent.EXTRA_EMAIL</code> extra. That property is expecting an array of <code>String</code> values rather than a single <code>String</code>.</p> <pre class="lang-kotlin prettyprint-override"><code>binding.navView.setNavigationItemSelectedListe...
When I make an e-mail intent in kotlin, the recipient mail is not added directly
android-studio|kotlin|email|android-intent|imagebutton
0
53
1
72,349,385
72,349,385
0
true
2022-05-22T19:34:57.877Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: When I make an e-mail intent in kotlin, the recipient mail is not added directly<pre><code>binding.navView.setNavigationItemSelectedListener { wh...
72,350,984
mysql query takes 3 hours to run and process<p>I have a query that is ran on a cron job late at night. This query is then processed through a generator as it has to populate another database and I make some additional processes and checks before it is sent to the other DB.</p> <p>I am wondering is there anyway for me t...
<p>Seems you have an useless select DISTINTC .. could you are looking for a conut(distinct .. )<br /> In this way you can avoid nested select for each rows in main select ..</p> <pre><code>SELECT c.id as &quot;campaign_id&quot;, c.created_by_user, c.name, c.date_added, c.date_modifi...
mysql query takes 3 hours to run and process
mysql|query-optimization
-1
53
1
72,351,242
72,351,242
0
true
2022-05-23T15:19:16.210Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: mysql query takes 3 hours to run and process<p>I have a query that is ran on a cron job late at night. This query is then processed through a generator as it...
72,349,461
ggplot2 plot two columns with same x axis<p>I have a data frame with 3 columns:</p> <ol> <li>A date time column</li> <li>water level of a pond over 2 years (hourly)</li> <li>daily precipitation over 2 years (daily)</li> </ol> <p>I want to plot the date time on the x axis and the other two as two separate y axis.</p> <p...
<p>I used the sec.axis method with</p> <pre><code>geom_point(aes(y=(prcp_amt/150)+72), col='blue') </code></pre> <p>and</p> <pre><code>scale_y_continuous(sec.axis = sec_axis(~(.-72)*150, name='Precipitation (mm)') </code></pre> <p>and rescaling the data, so they both fit on the same scale. I know this isn't the best ...
ggplot2 plot two columns with same x axis
r|ggplot2
-1
53
2
72,359,068
72,359,068
0
true
2022-05-23T13:31:46.090Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: ggplot2 plot two columns with same x axis<p>I have a data frame with 3 columns:</p> <ol> <li>A date time column</li> <li>water level of a pond over 2 years (...
72,278,727
I can't get a response from the server via socket python<pre><code> import socket with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as socket_server: socket_server.connect((&quot;77.222.42.207&quot;, 1337)) socket_server.send(&quot;get_flag&quot;.encode()) server_unswer = (socket_server.recv(1024...
<pre><code>import socket with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as socket_server: socket_server.connect((&quot;77.222.42.207&quot;, 1337)) server_unswer = (socket_server.recv(1024)).decode() print(server_unswer) socket_server.send(&quot;get_flag\n&quot;.encode()) server_unswer = (socket_s...
I can't get a response from the server via socket python
python|sockets
0
53
2
72,364,290
72,364,290
0
true
2022-05-17T18:04:00.627Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: I can't get a response from the server via socket python<pre><code> import socket with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as socket_server...
72,309,881
Does the Shippo API have the capability to suggest address corrections upon validation<p>When doing an address validation, does the Shippo API response have the ability to return address suggestions? For example, in e-commerce sites, when you enter in your shipping address, you sometimes get a popup with multiple addre...
<p>Cathy , The address validation doesn't provide address suggestions. It provides info on whether the address is valid or not in the response.</p> <p>For validating addresses for US and get suggestions, you would want to rely on 3rd party apis something like this : <a href="https://www.smarty.com/products/apis/us-stre...
Does the Shippo API have the capability to suggest address corrections upon validation
shippo
-2
53
1
72,366,719
72,366,719
0
true
2022-05-19T19:04:51.127Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Does the Shippo API have the capability to suggest address corrections upon validation<p>When doing an address validation, does the Shippo API response have ...
72,368,138
Pandas add columns error must be same length as key?<p>I got this error when I try to split one column and create additional columns in current dataframe:</p> <p>Columns must be same length as key</p> <pre><code>if 'FULLNAME' in dataset.columns: dataset[['FIRSTNAME','LASTNAME']] = dataset.FULLNAME.str.split(&quo...
<p>I think you want to pass expand=True into split so that it returns a DataFrame...</p> <pre><code>if 'FULLNAME' in dataset.columns: dataset[['FIRSTNAME','LASTNAME']] = dataset.FULLNAME.str.split(&quot; &quot;, 1, expand=True) </code></pre>
Pandas add columns error must be same length as key?
python|pandas
0
53
1
72,368,298
72,368,298
0
true
2022-05-24T18:58:22.577Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Pandas add columns error must be same length as key?<p>I got this error when I try to split one column and create additional columns in current dataframe:</p...
72,370,435
Insert current timestamp from groovy to db2<p>DB2 has CURRENT_TIMESTAMP function that returns current timestamp in this format: 2022-05-24-11:22:13.022543</p> <p>Is there equivalent to CURRENT_TIMESTAMP in groovy? How to store current timestamp from groovy to DB2?</p>
<p>You can set Timestamp <code>import java.sql.Timestamp;</code> Also set your database column as Timestamp.</p> <pre><code>stmt.setTimestamp(1, new Timestamp(System.currentTimeMillis())); </code></pre>
Insert current timestamp from groovy to db2
sql|groovy|db2
0
53
1
72,371,234
72,371,234
0
true
2022-05-24T23:19:51.513Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Insert current timestamp from groovy to db2<p>DB2 has CURRENT_TIMESTAMP function that returns current timestamp in this format: 2022-05-24-11:22:13.022543</p...
72,368,765
Cross-referecing columns in Snowflake SQL<p>I'm trying to build an amortization schedule using Snowflake-SQL however I need two columns to reference each other in order to calculate the active and the present value. In excel, it would be something like this:</p> <p><a href="https://i.stack.imgur.com/VYjNQ.png" rel="nof...
<p>so with a janky CTE for the seed data:</p> <pre><code>with data(y,start_date, amount, interest_y_c4, payment_c9, interest_d_c4_p1) as ( select * ,(0.0007223821155291760::double) + 1.00::double from values (1,'2021-11-10', 1690.96::double, 0.263669472168149::double, 304.90::double) ), payment_days(...
Cross-referecing columns in Snowflake SQL
sql|snowflake-cloud-data-platform|finance|amortization
1
53
1
72,371,860
72,371,860
0
true
2022-05-24T19:54:12.127Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Cross-referecing columns in Snowflake SQL<p>I'm trying to build an amortization schedule using Snowflake-SQL however I need two columns to reference each oth...
72,359,205
Create multicolor single letter (character) with Swift 5<p>I have a requirement to create colourful string where each letter should have multicolors / rainbow colors. Refer the attached image for better understanding. This need to create using Swift 5+ (UIKit) coding for an iOS app's dashboard.</p> <p>In web, there are...
<p>With the help of Zeeshan Ahmed and Shadowrun, I able to solve my problem. My final solution is,</p> <pre><code>override func viewDidLoad() { super.viewDidLoad() let gradient = CAGradientLayer() gradient.colors = [UIColor.red.cgColor, UIColor.green.cgColor, UIColor.blue.cgColor] ...
Create multicolor single letter (character) with Swift 5
ios|swift|string|colors|uikit
-1
53
3
72,377,635
72,377,635
0
true
2022-05-24T07:57:55.690Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Create multicolor single letter (character) with Swift 5<p>I have a requirement to create colourful string where each letter should have multicolors / rainbo...
72,379,315
Is it possible to have a different super(message) be displayed for a customException?<p>I have a custom exception class <code>InvalidNameException</code> that is supposed to handle an error if the input string either is too short or has any special characters.</p> <p>I was wondering if it is possible to have a differen...
<p>You cannot call super twice. To make this work, you would have to throw a new exception for each condition like this:</p> <pre><code>public InvalidNameException(String name) throws Exception { if(validName(name)){ throw new Exception(&quot;Name Contains Special Characters&quot;); } else if(validL...
Is it possible to have a different super(message) be displayed for a customException?
java|exception
0
53
2
72,379,685
72,379,685
0
true
2022-05-25T14:18:02.073Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is it possible to have a different super(message) be displayed for a customException?<p>I have a custom exception class <code>InvalidNameException</code> tha...
72,378,892
Creating Subdirectory function in C#<p>I am currently attempting to create a function code that creates a subdirectory inside a user-specific path by having the user input the Directory path and then in main use the Directory.GetDirectories(arwgs) function to get a string array of there path.</p> <p>This code works for...
<p>*A crude way of fixing but when looking back this can work for folders with the suffix &quot;UnitCal&quot;. At least for my directory. Not the most elegant but works.</p> <pre><code>static void UnitCalFolderCheck(string[] sDirectoryPath, string[] NewFolder) { //possible ...
Creating Subdirectory function in C#
c#|performance|for-loop|system.io.directory
-2
53
1
72,380,851
72,380,851
0
true
2022-05-25T13:50:02.970Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Creating Subdirectory function in C#<p>I am currently attempting to create a function code that creates a subdirectory inside a user-specific path by having ...
72,381,819
Python script automatic interaction without 'expect' or 'pexpect'<p>I'm trying to write a python script that call a bash script with user interaction. For security reasons, I can't install expect or pexpect on any server -- we have very strict policies.</p> <p>The bash script is present on multiple servers (called via ...
<p>Two options come to mind:</p> <ol> <li>use the shell to send the input:</li> </ol> <pre class="lang-py prettyprint-override"><code>con = subprocess.Popen(&quot;{ echo; echo; } | ./confirm.sh&quot;, shell = True, stdin = subprocess.PIPE, stdout = subprocess.PIPE, stderr = subprocess.PIPE, universal_newlines = False) ...
Python script automatic interaction without 'expect' or 'pexpect'
python|python-3.x|linux|bash
1
53
1
72,382,997
72,382,997
0
true
2022-05-25T17:16:06.317Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python script automatic interaction without 'expect' or 'pexpect'<p>I'm trying to write a python script that call a bash script with user interaction. For se...
72,384,073
if else condition inside for loop using angular<p>I am working on a task where I am looping an array inside a tag &amp; using target=&quot;_blank&quot; attribute but one of the array element should not want this target=&quot;_blank&quot; attribute so what to do?</p> <pre><code>&lt;ul *ngIf=&quot;item.menu&quot;&gt; ...
<p>You can use [target] around any tag property to add JS/TS code to it.</p> <pre><code> &lt;a href=&quot;{{subMenu.link}}&quot; [target]=&quot;condition ? '_blank' :'other target type'&quot;&gt;{{'landing.menu.' + subMenu.name | translate}}&lt;/a&gt; </code></pre> <p>Other target type list: <a href="https://www.w3scho...
if else condition inside for loop using angular
javascript|angular
0
53
2
72,384,152
72,384,152
0
true
2022-05-25T20:55:04.853Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: if else condition inside for loop using angular<p>I am working on a task where I am looping an array inside a tag &amp; using target=&quot;_blank&quot; attri...
72,282,875
Mapping existing data to match data structure<p>I have a redux state <code>clubDetails</code> that comes back from an API response. I basically need to map it to match the object of the structured data from below. For each <code>operationalHours</code> day it needs to be part of the object <code>openingHoursSpecificati...
<p>This is the solution I decided to go with.</p> <pre><code>const generateStructuredData = (clubDetails, pathname) =&gt; { let weekDays = [ &quot;Monday&quot;, &quot;Tuesday&quot;, &quot;Wednesday&quot;, &quot;Thursday&quot;, &quot;Friday&quot; ]; let clubDetailsObj = {}; clubDetailsObj[&qu...
Mapping existing data to match data structure
javascript|reactjs
-1
53
2
72,385,115
72,385,115
0
true
2022-05-18T03:25:18.757Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Mapping existing data to match data structure<p>I have a redux state <code>clubDetails</code> that comes back from an API response. I basically need to map i...
72,360,485
How to change the default number of particles in gmapping launch file?<p>I would like to ask is this is the correct coding to change the number of particles of the gmapping package in launch file?</p> <pre><code>&lt;launch&gt; &lt;!-- Arguments --&gt; &lt;arg name=&quot;model&quot; default=&quot;$(env TURTLEBOT3_MO...
<p>Yes it is correct. The coding that you have done in the launch file is the correct code. But, you also can change the number of particles in the file=&quot;$(find turtlebot3_slam)/config/gmapping_params.yaml&quot;</p>
How to change the default number of particles in gmapping launch file?
ros|slam
0
53
1
72,390,164
72,390,164
0
true
2022-05-24T09:30:02.787Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to change the default number of particles in gmapping launch file?<p>I would like to ask is this is the correct coding to change the number of particles ...
72,389,748
How to center items inside a col horizontally in Bootstrap 5<p>I have created a Grid system with just 2 columns. The first one is text and in the second one I have included a carousel. I have set the image size to custom for the carousel image. No matter what I do I am unable to center the carousel image inside my col ...
<p>You need to apply centering to the carousel, not the container (unless you apply flexbox, which isn't really needed).</p> <p>I put <code>.mx-auto</code> on <code>.carousel</code>.</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre clas...
How to center items inside a col horizontally in Bootstrap 5
javascript|html|css|twitter-bootstrap|bootstrap-5
0
53
1
72,393,072
72,393,072
0
true
2022-05-26T09:38:01.170Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to center items inside a col horizontally in Bootstrap 5<p>I have created a Grid system with just 2 columns. The first one is text and in the second one ...
72,393,201
search for common value(patient ID) from column 1 and if all there values in other column (pathologies) is null delete the rows of these common ID's<div class="s-table-container"> <table class="s-table"> <thead> <tr> <th style="text-align: center;">PATIENT_ID</th> <th style="text-align: left;">PATHOLOGIES</th> </tr> </...
<p>To remove all patients with only <code>&quot;null&quot;</code> variables you can use this example:</p> <pre class="lang-py prettyprint-override"><code>import csv from itertools import groupby with open(&quot;input.csv&quot;, &quot;r&quot;) as f_in: reader = csv.reader(f_in) next(reader) # skip header ...
search for common value(patient ID) from column 1 and if all there values in other column (pathologies) is null delete the rows of these common ID's
python|csv
2
53
1
72,393,444
72,393,444
0
true
2022-05-26T14:10:28.037Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: search for common value(patient ID) from column 1 and if all there values in other column (pathologies) is null delete the rows of these common ID's<div clas...
72,398,560
Discord.py Issue<pre><code>import discord import os import discord.ext #^ basic imports for other features of discord.py and python ^ client = discord.Client() @client.event async def on_message(message): if message.author.id == 526450002986401805: message.channel.send('https://cdn.discordapp.com/attachments/83240271...
<p><code>'Messageable.send' was never awaited</code> tells you what went wrong here.</p> <p>The library is <code>async</code> so if you want to send a message, to state an example here, you have to <code>await</code> it.</p> <p><strong>Your new code:</strong></p> <pre class="lang-py prettyprint-override"><code>if messa...
Discord.py Issue
python|discord|discord.py
-1
53
2
72,398,592
72,398,592
0
true
2022-05-26T22:18:39.143Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Discord.py Issue<pre><code>import discord import os import discord.ext #^ basic imports for other features of discord.py and python ^ client = discord.Client...