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,176,336 | How create bar chart with 2d data bars with different scale axis<p>I would like to create graph like this:</p>
<p><a href="https://i.stack.imgur.com/AKFH4.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AKFH4.jpg" alt="enter image description here" /></a></p>
<p>Where only first half of the graph is ... | <p>You could plot it by combining two plots, which seems to be what the provided output is doing:</p>
<pre><code># dummy data
x = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
y = [10000, 200000, 30000, 40000, 50000, 60000, 70000, 80000, 90000, 100000, 100001, 12000]
y2 = [1, 2, 45, 4, 5, 6, 2, 8, 9, 10, 11, 1]
fig = plt.fi... | How create bar chart with 2d data bars with different scale axis | python|python-3.x|matplotlib|graph|data-visualization | 0 | 47 | 1 | 72,176,905 | 72,176,905 | 1 | true | 2022-05-09T17:57:59.550Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How create bar chart with 2d data bars with different scale axis<p>I would like to create graph like this:</p>
<p><a href="https://i.stack.imgur.com/AKFH4.jp... |
72,175,353 | How to remove type attribute from XML using XSLT1.0<p>Assume that I have an XML as below.</p>
<pre><code><CustomerOrder>
<CustomerId type="string">1000</CustomerId>
<CustomerName type="string">Johnny</CustomerName>
<Age type="Number">20</Age&... | <p>Just use this stylesheet realizing what was suggested in the first comment:</p>
<pre><code><?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" omit-xml-declarat... | How to remove type attribute from XML using XSLT1.0 | xml|xslt-1.0 | 0 | 33 | 1 | 72,177,122 | 72,177,122 | 1 | true | 2022-05-09T16:33:14Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to remove type attribute from XML using XSLT1.0<p>Assume that I have an XML as below.</p>
<pre><code><CustomerOrder>
<CustomerId type="s... |
72,175,722 | How to map a JSON response with different indexes<p>I'm tryin to map a JSON response from API with different indexes in react-native.</p>
<p>This is the JSON RESPONSE stored in state modules and I wanted to get the label value inside of every modules.</p>
<pre><code>{
"attributes": {
"Account... | <p>If you want an array of label values then:</p>
<pre><code>Object.entries(this.state.modules.attributes).map(([k, v]) => v.label);
</code></pre> | How to map a JSON response with different indexes | json|react-native | 0 | 46 | 2 | 72,177,125 | 72,177,125 | 1 | true | 2022-05-09T17:02:36.547Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to map a JSON response with different indexes<p>I'm tryin to map a JSON response from API with different indexes in react-native.</p>
<p>This is the JSON... |
72,176,696 | Python Pandas - Matrix Generation From CSV<p>Beginner to Pandas, but i <em>think</em> it is the right tool for this.</p>
<p>I have a CSV file that looks like this, showing the relationship between Source/Destination/Value:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>Source</th>
<th>Dest... | <p>There are few options for you. You can go with <code>pivot</code> (an example is already in the comments) or <code>pivot_table</code>. The difference of them is that <code>pivot_table</code> can handle duplicate values of a pivoted column, so if you do have rows where the same relationship is shown again, go with th... | Python Pandas - Matrix Generation From CSV | python|pandas|csv | 0 | 113 | 2 | 72,177,150 | 72,177,150 | 1 | true | 2022-05-09T18:32:09.283Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python Pandas - Matrix Generation From CSV<p>Beginner to Pandas, but i <em>think</em> it is the right tool for this.</p>
<p>I have a CSV file that looks like... |
72,177,062 | Replace value in pandas dataframe based on where condition<p>I have created a dataframe called <code>df</code> with this code:</p>
<pre><code>import numpy as np
import pandas as pd
# initialize data of lists.
data = {'Feature1':[1,2,-9999999,4,5],
'Age':[20, 21, 19, 18,34,]}
# Create DataFrame
df = pd.DataFr... | <p>You can use <code>np.where</code> or <code>Series.mask</code></p>
<pre class="lang-py prettyprint-override"><code>df['Feature1'] = df['Feature1'].mask(df['Feature1'].eq(-9999999), df['Age'])
# or
df['Feature1'] = np.where(df['Feature1'].eq(-9999999), df['Age'], df['Feature1'])
</code></pre> | Replace value in pandas dataframe based on where condition | pandas|dataframe|replace|where-clause | 0 | 152 | 1 | 72,177,154 | 72,177,154 | 1 | true | 2022-05-09T19:05:22.290Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Replace value in pandas dataframe based on where condition<p>I have created a dataframe called <code>df</code> with this code:</p>
<pre><code>import numpy as... |
72,174,902 | PostgreSQL: Segmentation Fault when calling procedure with temporary tables<p>I apologize for the lack of a better title. I'm at a loss as to what the exact problem could be.</p>
<p>PostgreSQL 13.4<br />
TimescaleDB 2.4.2<br />
Ubuntu 18.04.6 LTS
Running in Docker (Dockerfile further down)<br />
shared_memory 16GB<br /... | <p>It seems like the error comes from doing</p>
<pre class="lang-sql prettyprint-override"><code>CREATE TEMPORARY TABLE unprocessed (
"timestamp" timestamp,
clientid text,
devicecpuid text,
customer text,
traffic bigint
) ON COMMIT DELETE ROWS;
</code></pre>
<p>As ... | PostgreSQL: Segmentation Fault when calling procedure with temporary tables | postgresql|psql|procedure|timescaledb | 0 | 417 | 1 | 72,177,340 | 72,177,340 | 1 | true | 2022-05-09T15:58:49.087Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
PostgreSQL: Segmentation Fault when calling procedure with temporary tables<p>I apologize for the lack of a better title. I'm at a loss as to what the exact ... |
72,175,924 | Multi-tenant database : create .BAK file for single tenat<p>In my application I use multi tenant design in my SQL Server database.</p>
<p>My question is: what if one of my customer comes and say, I want my own data as a backup file, how can I create backup file for just that tenant?</p>
<p>Is there is any way to do tha... | <blockquote>
<p>how can I create backup file for just that tenant?</p>
</blockquote>
<p>There is no way to do this without running an ETL job either to extract the tenant's data, or to remove the other tenants' data from a restored copy of the database.</p>
<p>This is one of the (many) reasons why you should favor usin... | Multi-tenant database : create .BAK file for single tenat | sql|sql-server|database|database-administration|database-backups | 0 | 60 | 1 | 72,177,504 | 72,177,504 | 1 | true | 2022-05-09T17:20:30.387Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Multi-tenant database : create .BAK file for single tenat<p>In my application I use multi tenant design in my SQL Server database.</p>
<p>My question is: wha... |
72,174,307 | Size card to viewport in Bootstrap 4.6<p>I'd like create a bootstrap card whose height and width consume the entire viewport. The card-header and card-footer must each be 15% the viewport height with the remaining 70% allocated to the card-body. If card-body's content exceeds 70%, it needs to maintain its height and ad... | <p>I'd eliminate all the unnecessary grid structure around the card and use Bootstrap's
<a href="https://getbootstrap.com/docs/4.6/utilities/sizing/#relative-to-the-viewport" rel="nofollow noreferrer">viewport sizing utilities</a>. I'd then apply Bootstrap's <a href="https://getbootstrap.com/docs/4.6/utilities/flex/#en... | Size card to viewport in Bootstrap 4.6 | bootstrap-4|bootstrap-cards | 0 | 113 | 1 | 72,177,557 | 72,177,557 | 1 | true | 2022-05-09T15:14:05.877Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Size card to viewport in Bootstrap 4.6<p>I'd like create a bootstrap card whose height and width consume the entire viewport. The card-header and card-footer... |
72,177,073 | AttributeError: module 'MyModule' has no attribute 'Module1'<p>I am trying to turn a project of mine into a package so I can deploy it as a wheel.
I have a project directory setup like this:</p>
<pre><code>ProjectDir
├── setup.py
├── MyModule
│ ├── __init__.py
│ ├── Module1
│ │ ├── __init__.py
│ │ ├── main.... | <p>This is expected because by default submodules are not imported.
You should import them like so to use them:</p>
<pre><code>import MyModule.Module1
</code></pre>
<p>To change this you have to tweak the <code>MyModule/__init__.py</code> file by adding:</p>
<pre><code>import MyModule.Module1
</code></pre>
<p>This way,... | AttributeError: module 'MyModule' has no attribute 'Module1' | python|package|python-wheel | 0 | 328 | 1 | 72,177,569 | 72,177,569 | 1 | true | 2022-05-09T19:07:02.023Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
AttributeError: module 'MyModule' has no attribute 'Module1'<p>I am trying to turn a project of mine into a package so I can deploy it as a wheel.
I have a p... |
72,177,074 | Create new columns using a column value and fill values from another column<p>I have the following table in PostgreSQL</p>
<pre><code>id type name
146 INN Ofloxacin
146 TRADE_NAME Ocuflox
146 TRADE_NAME Ofloxacin
146 TRADE_NAME Tarivid i.v.
146 TRADE_NAME Tarivid 400
147 TRADE_NAME Mictral
147 TRADE_NAME Neggra... | <p>You can get a result set of distinct ids and then join that back to the same table. Once to get trade_names and once to get inn records:</p>
<pre><code>SELECT ids.id,
tradenames.name as trade_name,
inns.name as inn
FROM
(SELECT DISTINCT id FROM yourtable) as ids
LEFT OUTER JOIN yourtable as traden... | Create new columns using a column value and fill values from another column | postgresql | 0 | 69 | 1 | 72,177,625 | 72,177,625 | 1 | true | 2022-05-09T19:07:02.480Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Create new columns using a column value and fill values from another column<p>I have the following table in PostgreSQL</p>
<pre><code>id type name
146 INN ... |
72,176,237 | How to populate Map in Drools ResponseObject<p>I have an object defined in .drl :</p>
<p>package drools.types</p>
<pre><code>declare ResponsibilityManager
@propertyReactive
internal : java.lang.Long
attr1 : java.lang.String
band : java.lang.Long
resourceMap : java.util.HashMap
end
</code></pre>... | <p>Well, clearly the <code>resourceMap</code> was never instantiated.</p>
<p>When you create the ResponsibilityManager, you need to make sure to create the resourceMap inside of it as well.</p>
<pre><code>rule "Whatever creates the ResponsibilityManager instance"
when
// ...
then
ResponsibilityManager r =... | How to populate Map in Drools ResponseObject | hashmap|drools|rules | 0 | 45 | 1 | 72,177,640 | 72,177,640 | 1 | true | 2022-05-09T17:49:29.390Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to populate Map in Drools ResponseObject<p>I have an object defined in .drl :</p>
<p>package drools.types</p>
<pre><code>declare ResponsibilityManager
... |
72,177,046 | Scroll into a div that is hidden initially in react<p>Im building a web chat app in next.js and i have a emoji picker button that when its clicked the menu of emojis appear.The thing is that in order to the user sees the menu of the emojis he has to scroll down.I have tried scrollIntoView() but it doesnt seem to work,p... | <p>Hey try adding a div below the picker and scroll to that div because sometimes
those third party libraries come with there css and you could not override them</p>
<pre><code>import {Picker} from "emoji-mart";
const pickerRef = useRef()
const[showEmojis,setShowEmojis]=useState(false);
useEffect(() => {
... | Scroll into a div that is hidden initially in react | javascript|css|reactjs|next.js | 0 | 79 | 2 | 72,177,694 | 72,177,694 | 1 | true | 2022-05-09T19:03:44.307Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Scroll into a div that is hidden initially in react<p>Im building a web chat app in next.js and i have a emoji picker button that when its clicked the menu o... |
72,177,567 | Why does button block file selection?<p>Why does it block you to select a file when you click on the button? If you put a span or div in the label, they allow you to select a file when you click on them, but the button does not</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel=... | <p>the problem is that the <code>button</code> is a separate element it is not related to the input even if you wrapped them in one <code>label</code></p>
<p>so to work around that you need to remove the button and style the label instead</p>
<p>CSS</p>
<pre><code>label {
/* style the input here */
display: bl... | Why does button block file selection? | css | 0 | 32 | 1 | 72,177,754 | 72,177,754 | 1 | true | 2022-05-09T19:56:28.637Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why does button block file selection?<p>Why does it block you to select a file when you click on the button? If you put a span or div in the label, they allo... |
72,176,027 | Area plotting data using plotly library Python<p>Trying to create similar chat that on picture 1 with only one difference, I want to start fill area from 1.01 , not 0. On second picture is quick example what I'm looking for.</p>
<pre><code>chartData = {'Price': [0.965879, 0.964773, 0.96447, 0.961223, 0.958788, 0.956747... | <p>Since you didn't provide a dataframe, I'm going to come up with a simple example. Also, I rarely use <code>plotly.express</code> so I'm going to show you how I would achieve that with <code>plotly.graph_objects</code>. Hopefully, you'll be able to adapt it to <code>plotly.express</code>, or change your code to <code... | Area plotting data using plotly library Python | python|charts|plotly | 0 | 34 | 1 | 72,177,793 | 72,177,793 | 1 | true | 2022-05-09T17:29:44.583Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Area plotting data using plotly library Python<p>Trying to create similar chat that on picture 1 with only one difference, I want to start fill area from 1.0... |
72,177,685 | In MYSQL, can a Stored Procedure be set up to be used without permissions to underlying SELECT tables?<p>I have a series of complicated SELECTS with JOINS and UNIONS which I use frequently that I have placed in stored procedures. I wanted a more secure user set up that could only call these SELECT statements within the... | <p>Grant <code>SELECT</code> permission on the tables only to a special username. Then make that user the definer of the procedure and use the <code>SQL SECURITY DEFINER</code> option in the <code>CREATE PROCEDURE</code> statement.</p>
<p>Give the ordinary users <code>EXECUTE</code> permission on the procedures (see <a... | In MYSQL, can a Stored Procedure be set up to be used without permissions to underlying SELECT tables? | mysql|select|stored-procedures|permissions | 0 | 19 | 2 | 72,177,814 | 72,177,814 | 1 | true | 2022-05-09T20:08:38.157Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
In MYSQL, can a Stored Procedure be set up to be used without permissions to underlying SELECT tables?<p>I have a series of complicated SELECTS with JOINS an... |
72,171,559 | Google sheets - Numerate rows between values in arrayformula<p>I have an arrayformula that numbers "chapters" based on finding the word "foo" in a range. I need it to also number the "sub-chapters" of those chapters, starting at 1 and resetting for each chapter.</p>
<p>A bit hard to explai... | <p>use:</p>
<pre><code>=ARRAYFORMULA(ARRAY_CONSTRAIN({IF(B2:B="", COUNTIFS(
VLOOKUP(ROW(B2:B), IF(B2:B<>"", {ROW(B2:B), B2:B}), 2, 1),
VLOOKUP(ROW(B2:B), IF(B2:B<>"", {ROW(B2:B), B2:B}), 2, 1),
ROW(B2:B), "<="&ROW(B2:B))-1, B2:B), C2:C},
MAX((B2:B<>... | Google sheets - Numerate rows between values in arrayformula | arrays|google-sheets|count|formula|array-formulas | 0 | 31 | 1 | 72,177,815 | 72,177,815 | 1 | true | 2022-05-09T11:52:50.010Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Google sheets - Numerate rows between values in arrayformula<p>I have an arrayformula that numbers "chapters" based on finding the word "foo&q... |
72,178,065 | python replace json list values without knowing the keys<p>I have this code snippet:</p>
<pre class="lang-py prettyprint-override"><code>data = {
"links": [
{"key_name_not_known": "replace_by_first_value_in_list"},
{"key_name_not_known": "replace_by_secon... | <pre><code>for index, obj in enumerate(data['links']):
for key,val in obj.items():
if len(list) > index:
data['links'][index][key] = list[index]
</code></pre> | python replace json list values without knowing the keys | python|arrays|json|python-3.x|list | 0 | 25 | 1 | 72,178,103 | 72,178,103 | 1 | true | 2022-05-09T20:49:29.083Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
python replace json list values without knowing the keys<p>I have this code snippet:</p>
<pre class="lang-py prettyprint-override"><code>data = {
"l... |
72,177,723 | assigning index number to row in table<p>I want to add an index number to each row in a table automatically, like the one in the screenshot that I got from bootstrap's site <a href="https://i.stack.imgur.com/elwWw.png" rel="nofollow noreferrer">here</a>, I have tried multiple solutions but kept getting an index of -1 f... | <p>Does this work for you?</p>
<pre><code>// tbl is the table
var rows = tbl.rows; n = 1;
for (i=0; i<rows.length; i++) {
row = rows[i];
f = row.firstElementChild;
if (f) {
el = document.createElement(f.tagName);
el.innerHTML = (f.tagName == "TH") ? "#" : n;
row.insertBefore(el,... | assigning index number to row in table | javascript|html|css | 0 | 37 | 1 | 72,178,174 | 72,178,174 | 1 | true | 2022-05-09T20:11:43.987Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
assigning index number to row in table<p>I want to add an index number to each row in a table automatically, like the one in the screenshot that I got from b... |
72,178,083 | python split string according to letter position in another string<p>Ok so lets say I have two strings.</p>
<p>the first string is a series of 44 o's with 6 random v's</p>
<p>the second string is a some text and is 44 characters in length</p>
<pre><code>random_string = "bzpsvawxqpvjmldhnmvdseftystvfjimcrwoftvchmql... | <p>You can use string slices, based on lengths of the split <code>random_string</code> parts</p>
<pre><code>text_split = []
current_i = 0
for random_substr in random_string.split('v'):
text_substr = some_text[current_i:current_i+len(random_substr)]
text_split.append(text_substr)
current_i += len(random_subs... | python split string according to letter position in another string | python | 0 | 29 | 2 | 72,178,190 | 72,178,190 | 1 | true | 2022-05-09T20:50:58.707Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
python split string according to letter position in another string<p>Ok so lets say I have two strings.</p>
<p>the first string is a series of 44 o's with 6 ... |
72,165,175 | Python websockets - how to connect after timeout in asyncio loop?<p>I'm running an asyncio loop in the code below to retrieve data using websockets. Occasionally the network connection drops or the server is unresponsive so I have introduced a <code>timeout</code> which is caught by an exception handler. The <code>time... | <p>I haven't tried this, but this is the philosophy.</p>
<pre><code>import asyncio
import websockets
import json
from concurrent.futures import TimeoutError as ConnectionTimeoutError
async def call_dapi():
while True:
async with websockets.connect('wss://test.deribit.com/ws/api/v2') as websocket:
... | Python websockets - how to connect after timeout in asyncio loop? | python|websocket|python-asyncio | 0 | 526 | 1 | 72,178,251 | 72,178,251 | 1 | true | 2022-05-08T21:21:51.900Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python websockets - how to connect after timeout in asyncio loop?<p>I'm running an asyncio loop in the code below to retrieve data using websockets. Occasion... |
72,178,247 | Pandas dataframe reports no matching string when the string is present<p>Fairly new to python. This seems to be a really simple question but I can't find any information about it.
I have a list of strings, and for each string I want to check whether it is present in a dataframe (actually in a particular column of the d... | <p>The way to deal with this is to compare the whole dataframe with <code>"time"</code>. That will return a mask where each value of the DF is True if it was <code>time</code>, False otherwise. Then, you can use <code>.any()</code> to check if there are any True values:</p>
<pre><code>>>> A = pd.Data... | Pandas dataframe reports no matching string when the string is present | python|pandas|string|dataframe|search | 0 | 76 | 4 | 72,178,315 | 72,178,315 | 1 | true | 2022-05-09T21:11:08.240Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pandas dataframe reports no matching string when the string is present<p>Fairly new to python. This seems to be a really simple question but I can't find any... |
72,176,577 | How to gain control over annotate arrows<p>I'm trying to insert arrows (brackets) in plots using the <code>annotate</code> package, but I cannot figure out what the input parameters mean. I read the documentation and I'm still unsure of how to control the arrows. Here's an example starting point:</p>
<pre><code>impor... | <p>I think the parameter you want is <code>mutation_scale</code>.</p>
<p>I changed your annotate command to this and I think it looks reasonable now, but it took some manual adjustment. If you had a consistent pattern in multiple figures you could probably calculate the angles and lengths that you want and use them as ... | How to gain control over annotate arrows | matplotlib|annotate | 0 | 37 | 1 | 72,178,340 | 72,178,340 | 1 | true | 2022-05-09T18:20:51.543Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to gain control over annotate arrows<p>I'm trying to insert arrows (brackets) in plots using the <code>annotate</code> package, but I cannot figure out w... |
72,178,347 | how to merge rows summing over each column without iteration<p>I have the following <code>df</code>:</p>
<pre><code> prevent _p _n _id
0 1 0 0 83135
0 0 1 0 83135
0 0 1 0 82238
</code></pre>
<p>I would like to merge all rows having the same column <code>_... | <p>Treat 0 and 1 as boolean with <code>any</code>, then convert them back to integers:</p>
<pre class="lang-py prettyprint-override"><code>df.groupby("_id").any().astype("int").reset_index()
</code></pre> | how to merge rows summing over each column without iteration | python|pandas|vectorization | 0 | 31 | 2 | 72,178,382 | 72,178,382 | 1 | true | 2022-05-09T21:23:41.407Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to merge rows summing over each column without iteration<p>I have the following <code>df</code>:</p>
<pre><code> prevent _p _n _id
0 1 ... |
72,178,119 | Update /.aws/config file on your local machine<p>I am trying to update the local aws/config file on my mac. I am not able to read or update any contents of the config file.</p>
<pre><code>import configparser
import os
creds_dir = os.path.dirname("~/.aws/config")
config = configparser.RawConfigParser()
if not... | <p>Change this to be:</p>
<pre><code>creds_file = os.path.expanduser("~/.aws/config")
</code></pre>
<p>or</p>
<pre><code>with open(os.path.expanduser("~/.aws/config"), 'a') as file_out:
</code></pre>
<p>The <code>~</code> expansion is part of the shell normally and so you need to expand it. <code>e... | Update /.aws/config file on your local machine | python|amazon-web-services|aws-config | 0 | 35 | 1 | 72,178,385 | 72,178,385 | 1 | true | 2022-05-09T20:54:50.203Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Update /.aws/config file on your local machine<p>I am trying to update the local aws/config file on my mac. I am not able to read or update any contents of t... |
72,175,610 | using glob to substitute a variable<p>After reading some docs from globs in bash</p>
<p><a href="https://mywiki.wooledge.org/glob#extglob" rel="nofollow noreferrer">https://mywiki.wooledge.org/glob#extglob</a></p>
<p>I´m struggling to replace a part of a variable:</p>
<p>Just an example that i am using to learn a bit m... | <p>If you <em>really</em> can't use Bash, then you can maybe do what you want with lowest common denominator shell features like this:</p>
<pre><code>pre=${myvar%%value2=*}
post=${myvar#"$pre"value2=}
v2=${post%%[!a-z0-9-]*}
post=${post#"$v2"}
myvar="${pre}value2=${value2}${post}"
</code><... | using glob to substitute a variable | bash|glob | 0 | 60 | 1 | 72,178,428 | 72,178,428 | 1 | true | 2022-05-09T16:53:18.483Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
using glob to substitute a variable<p>After reading some docs from globs in bash</p>
<p><a href="https://mywiki.wooledge.org/glob#extglob" rel="nofollow nore... |
72,148,865 | How to reference bazel c++ protobuf output headers in a different workspace/package<p>I just started using Bazel a couple days ago in hopes of something better than CMake. I have a small library that contains only protobuf definitions in its own repository. I've gotten bazel building the proto types and see them in the... | <p>In general, you should be able to depend on the <code>cc_proto_library</code> directly, so the intermediate <code>cc_library</code> <code>my-protobuf-common</code> isn't needed generally. The cc toolchain uses <code>-iquote</code> to add the proto deps, so I believe <code>#include "proto/point.pb.h"</code>... | How to reference bazel c++ protobuf output headers in a different workspace/package | protocol-buffers|bazel|bazel-rules|bazel-cpp|bazel-protobuf | 0 | 328 | 2 | 72,178,445 | 72,178,445 | 1 | true | 2022-05-07T01:49:03.610Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to reference bazel c++ protobuf output headers in a different workspace/package<p>I just started using Bazel a couple days ago in hopes of something bett... |
72,178,330 | Button disable atribute can`t be changed when aplication is loaded in Angular project<p>im making some register pages in a Ionic-Angular project, and i use some buttons to go to the next requisites to register. For example: first I ask for email, and until email format isnt't correct, my button to go to next page is di... | <p>Angular keeps track of the DOM in it's own special way, and provides
ample ways for you to access element properties, values etc. You
shouldn't hardly ever be trying to find elements with
document.getElementById and the like...</p>
<p>Use ngModel (import the forms module - <a href="https://stackoverflow.com/question... | Button disable atribute can`t be changed when aplication is loaded in Angular project | javascript|html|angular|typescript|ionic-framework | 0 | 86 | 1 | 72,178,494 | 72,178,494 | 1 | true | 2022-05-09T21:21:18.313Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Button disable atribute can`t be changed when aplication is loaded in Angular project<p>im making some register pages in a Ionic-Angular project, and i use s... |
72,178,319 | Search by Gelocation proximity having just address string in database?<p>We would like to implement a new feature in our app where users can see some stores sorted by proximity. Currently in our database we just have fields of string (country, state, city, address). In this situation which would be the best way to impl... | <p>You need to convert country/state/city/address to latitude & longitude. Having script to convert all your data to new format is first step you should done. When you have lat/lng points then you can do some math to find stores by proximity.</p> | Search by Gelocation proximity having just address string in database? | laravel|geolocation | 0 | 33 | 1 | 72,178,551 | 72,178,551 | 1 | true | 2022-05-09T21:20:34.123Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Search by Gelocation proximity having just address string in database?<p>We would like to implement a new feature in our app where users can see some stores ... |
72,178,053 | Copy git submodules from one repo to another<p>I'm developing a set of libraries that depend on a common set of other libraries.</p>
<p>I'd like to copy the .gitsubmodules file from one repo that has all of the necessary submodules into all of the other repos.</p>
<p>However I can't seem to get git to recognize the sub... | <p>Git needs two things to realize a submodule:</p>
<ol>
<li>the configuration from the <code>.gitmodules</code> file, and</li>
<li>a corresponding <code>commit</code> entry in the index...which you get by running <code>git submodule add</code>.</li>
</ol>
<p>This is explicit <a href="https://git-scm.com/docs/git-submo... | Copy git submodules from one repo to another | git|git-submodules | 0 | 67 | 1 | 72,178,584 | 72,178,584 | 1 | true | 2022-05-09T20:48:26.347Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Copy git submodules from one repo to another<p>I'm developing a set of libraries that depend on a common set of other libraries.</p>
<p>I'd like to copy the ... |
72,178,254 | Javascript: Trying to make text randomly generate<p>I am trying to make the starting text state <code>Hi there, as you can see I am Sheldon Aldridge</code> and in the javascript <code>sentenceArray</code> will contain the list of text that will replace the <code>speech-bubble class</code> with the innerHTML, I started ... | <p>This should work. using <code>setInterval</code> with a interval of 2 seconds</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>let sentenceArray = [
"Fun fact about me, I l... | Javascript: Trying to make text randomly generate | javascript | 0 | 60 | 2 | 72,178,593 | 72,178,593 | 1 | true | 2022-05-09T21:12:28.847Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Javascript: Trying to make text randomly generate<p>I am trying to make the starting text state <code>Hi there, as you can see I am Sheldon Aldridge</code> a... |
72,178,564 | Tabindex for radios<pre><code> <label>What is your gender?</label><br>
<input id="male" name="items" type="radio" value="male" checked>
<label for="male">Male</label><br>
<input id="female&... | <p>This is actually the expected action. Once the tab stop happens, you need to use the arrow keys to select the right one. Not the tabs.</p>
<p><a href="https://i.stack.imgur.com/hZ0lr.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hZ0lr.gif" alt="preview" /></a></p>
<p>Also you could use <code>tab... | Tabindex for radios | html|css|tabindex | 0 | 25 | 1 | 72,178,600 | 72,178,600 | 1 | true | 2022-05-09T21:52:59.730Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Tabindex for radios<pre><code> <label>What is your gender?</label><br>
<input id="male" name="items" ... |
72,177,548 | How to GetForegroundWindow From Path Program<p>When I use <code>Process.Start(Path);</code> Sometimes the program does not appear in the foreground, but it does appear in the taskbar To solve this problem, I must use the "AutoItX" reference to show the program in the foreground using GetForegroundWindow(), Bu... | <p>I can't test it, but it should work:</p>
<pre><code>private const int ALT = 0xA4;
private const int EXTENDEDKEY = 0x1;
private const int KEYUP = 0x2;
private const int SHOW_MAXIMIZED = 3;
[DllImport("user32.dll")]
private static extern IntPtr GetForegroundWindow();
[DllImport("user32.dll")]
priv... | How to GetForegroundWindow From Path Program | c#|wpf|path|getforegroundwindow | 0 | 57 | 1 | 72,178,617 | 72,178,617 | 1 | true | 2022-05-09T19:54:56.007Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to GetForegroundWindow From Path Program<p>When I use <code>Process.Start(Path);</code> Sometimes the program does not appear in the foreground, but it d... |
72,178,562 | React.js setState on page load not working, how to fix<p>I am using the react-apexcharts to create a piechart.
I am with success in rendering the series=[] because it is native from the component apexcharts.</p>
<p>But I am trying to render also the labels, which is a simple array.</p>
<p>If I run the console.log:</p>
... | <p><code>labels</code> is under <code>options</code></p>
<p>so in order to update the label on the state, you need to do</p>
<pre><code>this.setState((prevState)=> ({
...prevState,
options:{ ...prevState.options,
labels: this.props.total.map(a=>a.name)
}
}))
</code></pre> | React.js setState on page load not working, how to fix | javascript|reactjs | 0 | 81 | 1 | 72,178,640 | 72,178,640 | 1 | true | 2022-05-09T21:52:41.787Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
React.js setState on page load not working, how to fix<p>I am using the react-apexcharts to create a piechart.
I am with success in rendering the series=[] b... |
72,170,670 | Issue with Azure Bot Deployment<p>I'm testing to check if I can deploy a dummy bot to Azure Bot Services and run it across multiple channels. I'm using Azure CLI to deploy the bot on ubuntu. The command I ran was, (found on Bot SDK official documentaion)</p>
<pre><code>az deployment sub create --template-file "/ho... | <p>There are a few of things wrong here that I can see immediately.</p>
<p>Firstly, <code>botid</code> is the <strong>name</strong> of the bot, not an ID number or subscription number. Enter a unique bot name here, such as "TitanTestBot1". This name must be unique across Azure, as Azure Bot resources cannot b... | Issue with Azure Bot Deployment | botframework|azure-cli|azure-bot-service | 0 | 76 | 1 | 72,178,660 | 72,178,660 | 1 | true | 2022-05-09T10:40:36.723Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Issue with Azure Bot Deployment<p>I'm testing to check if I can deploy a dummy bot to Azure Bot Services and run it across multiple channels. I'm using Azure... |
72,176,000 | Problem when using @@rowcount on function in SQL Server 2019<p>I am using <code>@@rowcount</code> in my functions like this:</p>
<pre><code>ALTER FUNCTION [dbo].[GetUserNameFamily]
(@UsrID INT)
RETURNS NVARCHAR(MAX)
AS
BEGIN
DECLARE @Name NVARCHAR(MAX)
DECLARE @Family NVARCHAR (MAX)
DECLARE @cou INT
... | <p>As mentioned by others, there <a href="https://docs.microsoft.com/en-us/sql/relational-databases/user-defined-functions/scalar-udf-inlining?view=sql-server-ver15#inlineable-scalar-udfs-requirements" rel="nofollow noreferrer">was a bug</a> in the new (2019) feature called <em>Scalar UDF Inlining</em> that involved si... | Problem when using @@rowcount on function in SQL Server 2019 | sql-server | 0 | 71 | 1 | 72,178,819 | 72,178,819 | 1 | true | 2022-05-09T17:27:15.310Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Problem when using @@rowcount on function in SQL Server 2019<p>I am using <code>@@rowcount</code> in my functions like this:</p>
<pre><code>ALTER FUNCTION [d... |
72,174,761 | Scroll bar is automatically added to figure element<p>When I try to add an image inside a <code><figure></code> element, sometimes I get a vertical scroll bar next to it in my markdown editor. If I export it to HTML, it is gone, but if I export it to PDF, the scroll bar persists. This is unpleasant and ugly and I... | <p>The vertical scroll bars appears because the height of the element is not big enough, to fix this use the css attribute <code>height: auto;</code> in the figure section.</p>
<p>for now I interpret you want to keep the scrolling but simply disable the showing of the scrolling bar, to do this do the following.</p>
<p>... | Scroll bar is automatically added to figure element | html|css|image|markdown|figure | 0 | 118 | 2 | 72,178,830 | 72,178,830 | 1 | true | 2022-05-09T15:48:10.143Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Scroll bar is automatically added to figure element<p>When I try to add an image inside a <code><figure></code> element, sometimes I get a vertical scr... |
72,178,739 | Javascript - Dependency between arguments of partial applications<h2>Introduction</h2>
<p>I have created the given partial application in my module:</p>
<pre><code>// GENERIC
const sendEmail = (subject, template) =>
async (to, ...props) => {
const mailsRef = firestore.collection("mails");
cons... | <p>I would suggest to simply make the <code>subject</code> parameter a function accepting a language as well, just like your <code>template</code> parameter already is:</p>
<pre><code>const makeSendEmail = (subjectTemplate, bodyTemplate) => async (to, ...props) => {
const mailsRef = firestore.collection("... | Javascript - Dependency between arguments of partial applications | javascript|node.js|design-patterns|functional-programming | 0 | 35 | 1 | 72,178,857 | 72,178,857 | 1 | true | 2022-05-09T22:15:35.890Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Javascript - Dependency between arguments of partial applications<h2>Introduction</h2>
<p>I have created the given partial application in my module:</p>
<pre... |
72,177,696 | docker-compose how to run 2 long running jobs<p>I have 2 infinite process, I am trying to run in the same container. Let's say 2 of the process are one with jupyter notebook and another one is custom python file, workflow.py. Workflow.py has an infinite loop that keeps downloading file at several time. I am trying to r... | <p>You'd typically run only one process in a container, and so to run two processes you'd launch two containers. In each container run the single command you want to run as a foreground process, overriding the <code>command:</code> as necessary.</p>
<p>Since you're already running this in Compose, it's straightforward... | docker-compose how to run 2 long running jobs | python-3.x|docker|docker-compose | 0 | 33 | 1 | 72,178,912 | 72,178,912 | 1 | true | 2022-05-09T20:09:39.487Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
docker-compose how to run 2 long running jobs<p>I have 2 infinite process, I am trying to run in the same container. Let's say 2 of the process are one with ... |
72,178,765 | Match and set child's ID based on condition<p>I've got a primary incremental <strong>ID</strong> column and have to find and set all its childs (in <strong>ParentID</strong> column) based on values from two other columns (<em>Condition1</em> and <em>Condition2</em>)
Started ParentID always has Condition2 = 1 (and the s... | <p>I think one intuitive way of doing this is</p>
<pre><code>UPDATE [db].[dbo].[tbl] u
SET u.ParentID = (SELECT id FROM [db].[dbo].[tbl] u2 WHERE u2.condition1 = u.condition1 and u2.condition2 = 1)
</code></pre>
<p>I don't mean that this is better than what you're trying to do, just that I think it's very intuitive and... | Match and set child's ID based on condition | sql|sql-server|tsql | 0 | 31 | 1 | 72,178,962 | 72,178,962 | 1 | true | 2022-05-09T22:18:40.467Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Match and set child's ID based on condition<p>I've got a primary incremental <strong>ID</strong> column and have to find and set all its childs (in <strong>P... |
72,174,577 | Usage of variables in Helm<p>I'm using a Helm chart and I was wondering how I can define a value by default. In my case, I wanna define a date when it isn't defined in values.yaml and I have the following code:</p>
<pre><code>{{- if ne .Value.persistence.home.restoreBackup.date "" }}
{{- $bkDate := .Value.per... | <p>The <a href="https://pkg.go.dev/text/template" rel="nofollow noreferrer">Go <code>text/template</code> documentation</a> notes (under "Variables"):</p>
<blockquote>
<p>A variable's scope extends to the "end" action of the control structure ("if", "with", or "range") ... | Usage of variables in Helm | kubernetes|kubernetes-helm|go-templates | 0 | 597 | 2 | 72,178,982 | 72,178,982 | 1 | true | 2022-05-09T15:33:27.980Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Usage of variables in Helm<p>I'm using a Helm chart and I was wondering how I can define a value by default. In my case, I wanna define a date when it isn't ... |
72,178,591 | pandas, for each unique value in a column, get first three rows in which examples of each unique value occurs<p>I have a dataframe with two columns (more but only two of interest) such as below:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>Column 1</th>
<th>Column 2</th>
</tr>
</thead>
<... | <p>You can use grouping (<a href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.groupby.html" rel="nofollow noreferrer">groupby manual</a>) and then take only n first elements of each group (<a href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.core.groupby.GroupBy.hea... | pandas, for each unique value in a column, get first three rows in which examples of each unique value occurs | python|pandas | 0 | 73 | 1 | 72,179,003 | 72,179,003 | 1 | true | 2022-05-09T21:56:43.440Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
pandas, for each unique value in a column, get first three rows in which examples of each unique value occurs<p>I have a dataframe with two columns (more but... |
72,178,841 | bipartite graph for the yelp dataset rstudio<p>I am trying to produce a bipartite graph for a yelp sample dataset. If the user reviews one restaurant, one edge will connect this user and the restaurant, that is, <code>reviewed == 1</code>, otherwise, <code>reviewed == 0</code>. How can I draw a bipartite graph based o... | <p>I will do this with <code>igraph</code>. It is fairly easy to make the graph connecting all of your user-restaurant pairs, then delete the edges for which <code>reviewed = 0</code>. To get a nice plot, you will want to lay out the vertices as a bipartite graph.</p>
<pre><code>library(igraph)
DF = data.frame(cbind(... | bipartite graph for the yelp dataset rstudio | r|graph|bipartite | 0 | 33 | 1 | 72,179,015 | 72,179,015 | 1 | true | 2022-05-09T22:30:45.470Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
bipartite graph for the yelp dataset rstudio<p>I am trying to produce a bipartite graph for a yelp sample dataset. If the user reviews one restaurant, one ed... |
72,173,748 | Treat Oracle subtype as supertype<p>I have a query that uses Oracle's <strong>MDSYS</strong>.ST_GEOMETRY type (<a href="https://docs.oracle.com/en/database/oracle/oracle-database/21/spatl/sql-multimedia-type-support.html#GUID-22FE0E11-C9F0-4E1A-B512-D494E588FFAA" rel="nofollow noreferrer">link</a>):</p>
<pre><code>sele... | <p>The st_geometry uses sdo_geometry as its storage. So you would assume the TREAT would happily return the st_geometry as no storage change is needed.</p>
<p><code>select mdsys.st_point(1,2,26917).geom.get_wkt() as geom from dual;</code></p>
<p>Conversion can be done directly,:</p>
<p><code>select Mdsys.st_geometry(md... | Treat Oracle subtype as supertype | oracle|inheritance|type-conversion|oracle18c|oracle-spatial | 0 | 70 | 2 | 72,179,121 | 72,179,121 | 1 | true | 2022-05-09T14:35:55.947Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Treat Oracle subtype as supertype<p>I have a query that uses Oracle's <strong>MDSYS</strong>.ST_GEOMETRY type (<a href="https://docs.oracle.com/en/database/o... |
72,169,522 | Concourse put task into docker-image resource. Build_args are not passed to Dockerfile<p>I have a case when the following Concourse pipeline build_args are not used/passed to docker build phase. The pipeline looks like below one:</p>
<pre><code> name: project
type: git
check_every: 1m
source:
uri: ((project-u... | <p>The pipeline you pasted has been edited down too heavily for me to put a finger on exactly what's wrong, but one thing I notice is that the image resource is named 'registry' but the put refers to the <code>build</code> resource (?!). The <code>registry</code> is referenced by a <code>resource</code> param, <a href=... | Concourse put task into docker-image resource. Build_args are not passed to Dockerfile | docker|dockerfile|concourse | 0 | 198 | 1 | 72,179,139 | 72,179,139 | 1 | true | 2022-05-09T09:10:52.210Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Concourse put task into docker-image resource. Build_args are not passed to Dockerfile<p>I have a case when the following Concourse pipeline build_args are n... |
72,177,464 | .NET CORE incorrect controller routing<p>I have a problem with controller actions not returning views. They are looking in the wrong area.</p>
<p>I'm new to core but I've tried to read up online for material and I'm seeing a lot of Global.asax.cs, App_Start files etc that I'm not seeing in my created project.</p>
<p>My... | <p>The problem is with the action link here. Since you did not mention Area, the default route of Home was selected.</p>
<p>The Actionlink format should be as below:</p>
<pre><code>@Html.ActionLink("Link Text", "ActionName", "ControllerName", new { Area = "AreaName" }, new{})
</c... | .NET CORE incorrect controller routing | asp.net-core|.net-5|asp.net-mvc-areas | 0 | 61 | 1 | 72,179,210 | 72,179,210 | 1 | true | 2022-05-09T19:46:25.143Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
.NET CORE incorrect controller routing<p>I have a problem with controller actions not returning views. They are looking in the wrong area.</p>
<p>I'm new to ... |
72,179,215 | Streamlining if statement conditions to include a <= statement<p>Managed to use an answer from someone else's question 11 years ago (<a href="https://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser">How can you detect the version of a browser?</a>) to retrieve the browser name and versio... | <p>A regular expression test will do the trick.</p>
<pre><code>if (/Safari (?:12|11|10|9)/.test(navigator.sayswho)) {
</code></pre>
<p>Another approach would be to match the trailing digits, then check if they're in the range.</p>
<pre><code>const match = navigator.sayswho.match(/Safari (\d+)/);
const num = match ? Num... | Streamlining if statement conditions to include a <= statement | javascript | 0 | 30 | 2 | 72,179,231 | 72,179,231 | 1 | true | 2022-05-09T23:35:08.297Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Streamlining if statement conditions to include a <= statement<p>Managed to use an answer from someone else's question 11 years ago (<a href="https://stackov... |
72,178,356 | Pop up Modal not updating<p>I am currently following a tutorial to edit my blog via a modal, however, whenever I press the edit button within the modal, I get the following error <code>Failed to execute 'fetch' on 'Window': Invalid name</code> in my console. Here is the following code where the error lies within:</p>
<... | <p>I managed to replicate the error by typing this in the browser console</p>
<pre class="lang-js prettyprint-override"><code>fetch('http://localhost:3000', {method: 'PUT', headers: {'Content Type': 'application/json'}, body: "{}"})
</code></pre>
<p>And the error was not shown when I type this:</p>
<pre class... | Pop up Modal not updating | javascript|html|css|reactjs|bootstrap-modal | 0 | 86 | 2 | 72,179,247 | 72,179,247 | 1 | true | 2022-05-09T21:24:10.443Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pop up Modal not updating<p>I am currently following a tutorial to edit my blog via a modal, however, whenever I press the edit button within the modal, I ge... |
72,179,013 | Add indexes to index list around index value in numpy<p>I have the following arrays:</p>
<pre class="lang-py prettyprint-override"><code>time = [1e-6, 2e-6, 3e-6, 4e-6, 5e-6, 6e-6, 7e-6, 8e-6, 9e-6, 10e-6]
signal = [0, 10, 3, 2, 1, 0, 10, 2, 2, 5]
</code></pre>
<p>and I want to remove (from both arrays) any datapoints ... | <p>Let's try this one. The idea is to create a boolean mask which returns True if a <code>signal</code> is out of reach of <code>threshold</code> for each <code>padding</code>. I divided the <code>padding</code> by 3, since IIUC, a <code>padding</code> is a window of size 3, so we only need to consider the <code>signal... | Add indexes to index list around index value in numpy | python|numpy|numpy-ndarray | 0 | 37 | 1 | 72,179,318 | 72,179,318 | 1 | true | 2022-05-09T22:59:19.670Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Add indexes to index list around index value in numpy<p>I have the following arrays:</p>
<pre class="lang-py prettyprint-override"><code>time = [1e-6, 2e-6, ... |
72,179,255 | Restsharp error "Cannot send a content-body with this verb-type."<p>I am making a call to an eBay api using restsharp. The code follows.</p>
<pre><code> Async Sub fulfillmentPolicies()
Dim request As New RestRequest(sFulfillmentURL, Method.Get)
request.AddHeader("Authorization", "Bear... | <p><code>Content-Type</code> describes the format of the body in the REQUEST. It is not supposed to be used to tell the server what type of data to return.</p>
<p>The presence of the Content-Type header is causing an error in the .NET library as it tries to enforce the rule of not including a body with GET, and not inc... | Restsharp error "Cannot send a content-body with this verb-type." | vb.net|restsharp | 0 | 688 | 1 | 72,179,337 | 72,179,337 | 1 | true | 2022-05-09T23:42:40.750Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Restsharp error "Cannot send a content-body with this verb-type."<p>I am making a call to an eBay api using restsharp. The code follows.</p>
<pre><code> A... |
72,179,327 | Store different types of data in one Hive Box<p>I am using Flutter and Hive to store data.
I have created Boxes for several different primitive types (list - map - string).</p>
<p>I read the docs but it's still unclear.</p>
<p>Is it possible to store different types in one Box? Currently I am using different boxes to h... | <p>yes you can, its mentioned in their documentation <a href="https://docs.hivedb.dev/#/basics/read_write?id=write" rel="nofollow noreferrer">here</a></p>
<pre><code>var box = Hive.box('myBox');
box.put('name', 'Paul');
box.put('friends', ['Dave', 'Simon', 'Lisa']);
box.put(123, 'test');
box.putAll({'key1': 'value1... | Store different types of data in one Hive Box | flutter|dart|flutter-hive | 0 | 407 | 1 | 72,179,359 | 72,179,359 | 1 | true | 2022-05-09T23:56:57.847Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Store different types of data in one Hive Box<p>I am using Flutter and Hive to store data.
I have created Boxes for several different primitive types (list -... |
72,179,372 | How can I downcast this object in java?<pre><code>public class Main {
public static void main(String[] args) {
Vehicle vehicle = new Vehicle();
vehicle = (car) Vehicle;
}
}
class Vehicle {
static void transport() {
}
}
class Car extends Vehicle {
int age;
String brand;
}
</code... | <p>Downcasting doesn't change what class the object <em>is</em> — it only changes what the compiler knows at compile-time. If you have a <code>Vehicle</code> which is not a <code>Car</code> (as you do, since you instantiated it as <code>new Vehicle()</code>), then you can't downcast it; any attempt to will result in a ... | How can I downcast this object in java? | java | 0 | 36 | 1 | 72,179,393 | 72,179,393 | 1 | true | 2022-05-10T00:03:54.263Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I downcast this object in java?<pre><code>public class Main {
public static void main(String[] args) {
Vehicle vehicle = new Vehicle();
... |
72,163,502 | Is DiffSuppressFunc or being more restrictive when saving to TF state is preferable in Terraform SDKv2?<p>context: I'm adding a new resource to TF Provider (using SDKv2) with roughly the following schema:</p>
<pre><code>resource "player" "football" {
type = "FOOTBALL"
...
config =... | <p>In some other Terraform providers that deal with similar situations (where a particular argument has a mixture of configuration-provided and remote-system-provided nested values), the resource type implementation takes a compromise position of effectively exposing the same data in two different attributes, where one... | Is DiffSuppressFunc or being more restrictive when saving to TF state is preferable in Terraform SDKv2? | terraform|terraform0.12+ | 0 | 35 | 1 | 72,179,409 | 72,179,409 | 1 | true | 2022-05-08T17:24:52.797Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is DiffSuppressFunc or being more restrictive when saving to TF state is preferable in Terraform SDKv2?<p>context: I'm adding a new resource to TF Provider (... |
72,178,595 | dataframe.write.mode("overwrite") just deletes the old file in S3<p>I have the following PySpark code which I execute on a EMR notebook:</p>
<pre><code>s3_path = "s3://bucket/key/file.csv"
df = spark.read.csv(s3_path, header=True)
df.repartition(1).write.mode("overwrite").csv(s3_path)
</code></pre>... | <p>Check to make sure your your IAM S3 bucket policies are functioning as intended. EMR might not have access to that particular bucket.</p>
<p>another reason causes this kind of problem is that you are reading and writing to the same path that you are trying to overwrite. It is standard Spark issue and nothing to do w... | dataframe.write.mode("overwrite") just deletes the old file in S3 | apache-spark|amazon-s3|pyspark | 0 | 381 | 1 | 72,179,610 | 72,179,610 | 1 | true | 2022-05-09T21:57:09.013Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
dataframe.write.mode("overwrite") just deletes the old file in S3<p>I have the following PySpark code which I execute on a EMR notebook:</p>
<pre><code>s3_pa... |
72,179,642 | pandas read excel same columns merge<pre><code>excel = pandas.read_excel(file, ...)
columns = df.columns
print(columns)
["AA", "AA.1", "AA.2"]
</code></pre>
<p>this is same names</p>
<p>how do you names merge?</p>
<p>i want ["AA"]</p> | <p>You say merge, do you want sum? Use <code>groupby</code> with <code>axis=1</code> and use string manipulation on columns names:</p>
<pre><code>df.groupby(df.columns.str.split('.').str[0], axis=1).sum()
</code></pre> | pandas read excel same columns merge | python|pandas | 0 | 25 | 1 | 72,179,675 | 72,179,675 | 1 | true | 2022-05-10T01:01:21.433Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
pandas read excel same columns merge<pre><code>excel = pandas.read_excel(file, ...)
columns = df.columns
print(columns)
["AA", "AA.1", &... |
72,179,719 | RSA Algorithm 1 Mod Phi = 1?<p>On this <a href="https://www.educative.io/edpresso/what-is-the-rsa-algorithm" rel="nofollow noreferrer">website</a> it states for the calculation of "d" you must use the formula e.d = 1 Mod Phi. <br> I don't quite understand as I believed 1 Mod anything will result in 1 (or 0 in... | <p>Wikipedia says this is a <a href="https://en.wikipedia.org/wiki/Modular_multiplicative_inverse" rel="nofollow noreferrer">Modular multiplicative inverse</a>. The formula should be read as <em>e</em> * <em>d</em> equals 1, when the result is expressed modulo <em>Phi</em>, or <code>(e*d) % Phi == 1</code> in pseudocod... | RSA Algorithm 1 Mod Phi = 1? | encryption|cryptography|rsa|mod | 0 | 191 | 1 | 72,179,800 | 72,179,800 | 1 | true | 2022-05-10T01:15:40.053Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
RSA Algorithm 1 Mod Phi = 1?<p>On this <a href="https://www.educative.io/edpresso/what-is-the-rsa-algorithm" rel="nofollow noreferrer">website</a> it states ... |
72,164,350 | How to forecast a Time Series Regression Models with Distributed Lag (using dLagM)?<p>I am trying to forecast a time series with distributed lag (using <code>dLagM</code>). I guess I can fit the model properly, it shows all the expected results. But I am unable to forecast any value. The error, at least for me, is opaq... | <p>Thanks for posting this. There was a bug in the code related to the variable names. I fixed the issue in the new version of dLagM 1.1.8. Also, please note that you need to avoid nested variable names working with version 1.1.8. For example, if you have "x1" as a variable, avoid using a name that has "... | How to forecast a Time Series Regression Models with Distributed Lag (using dLagM)? | r|statistics|time-series|forecasting | 0 | 141 | 1 | 72,179,856 | 72,179,856 | 1 | true | 2022-05-08T19:12:44.130Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to forecast a Time Series Regression Models with Distributed Lag (using dLagM)?<p>I am trying to forecast a time series with distributed lag (using <code... |
72,179,788 | How to pass setInterval() into a Javascript class method?<p>I'm trying to make a photo slide show. I'm trying to set a timer to run every 5 seconds with <code>setInterval()</code>, I'm practicing classes and don't know how would I incorporate it within the class.</p>
<p><div class="snippet" data-lang="js" data-hide="fa... | <p>Here's a working snippet below. I've made it so that it transitions every 0.5 seconds just so that you can see it faster. If you want it at 5 seconds, change the interval to 5000 instead of 500.</p>
<p>In general, setInterval doesn't work any differently in a class than outside it. You just have to be mindful of <co... | How to pass setInterval() into a Javascript class method? | javascript|html|class|oop | 0 | 49 | 2 | 72,179,873 | 72,179,873 | 1 | true | 2022-05-10T01:29:23.033Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to pass setInterval() into a Javascript class method?<p>I'm trying to make a photo slide show. I'm trying to set a timer to run every 5 seconds with <cod... |
72,179,751 | Saving file paths to JSON as objects in Python<p>I have a file that looks like this:</p>
<pre><code>[["/home/onur/PycharmProjects/file-tagging/data/world_building_budget.txt", []], ["/home/onur/PycharmProjects/file-tagging/data/data3/world_elements.png", []], ["/home/onur/PycharmProjects/file-t... | <p>Writing a json file:</p>
<pre><code>data = {
"/some/path": ["tag1", "tag2"],
"/other/path": [],
"/different/path": ["tag3", "tag4", "tag5"]
}
with open('content-log.json', 'w') as f:
json.dump(data, f)
</code></pre>
<p>R... | Saving file paths to JSON as objects in Python | python|arrays|json|list | 0 | 31 | 1 | 72,179,946 | 72,179,946 | 1 | true | 2022-05-10T01:21:52.483Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Saving file paths to JSON as objects in Python<p>I have a file that looks like this:</p>
<pre><code>[["/home/onur/PycharmProjects/file-tagging/data/worl... |
72,166,517 | Discord JS, my users are able to create unlimited ticket channels when they react to the emoji<p>Users are able to create unlimited ticket channels when they react on this emoji, what part do I miss in my script so that users are only able to create one ticket until they close it again?</p>
<p>My bots ID below is: 701... | <p>Add these lines to your code</p>
<pre class="lang-js prettyprint-override"><code>bot.on('messageReactionAdd', async (reaction, user, channel) => {
if(user.partial) await user.fetch();
if(reaction.partial) await reaction.fetch();
if(reaction.message.partial) await reaction.message.fetch();
... | Discord JS, my users are able to create unlimited ticket channels when they react to the emoji | javascript|discord|permissions|script | 0 | 62 | 1 | 72,179,950 | 72,179,950 | 1 | true | 2022-05-09T02:49:03.110Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Discord JS, my users are able to create unlimited ticket channels when they react to the emoji<p>Users are able to create unlimited ticket channels when they... |
72,179,929 | Trying to reverse a string using a while loop & other specific conditions<p>So here is the deal, I need to reverse a user-defined string without using [::-1] or a reverse function call. I think I have a found a possible solution but I don't know enough about python to troubleshoot why it does not work, why can't I take... | <p>If we were to correct the solution you have provided, it would be this:</p>
<pre><code>name= str((input("Enter the name: ")))
i = len(name) - 1
while i >= 0:
print(name[i], end = '')
i = i - 1
</code></pre> | Trying to reverse a string using a while loop & other specific conditions | python | 0 | 71 | 5 | 72,179,951 | 72,179,951 | 1 | true | 2022-05-10T01:57:09.647Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Trying to reverse a string using a while loop & other specific conditions<p>So here is the deal, I need to reverse a user-defined string without using [::-1]... |
72,167,895 | pagedown html resume - How to move disclaimer section within aside section to the last page?<p>Taking the <a href="https://pagedown.rbind.io/html-resume" rel="nofollow noreferrer">template resume from pagedown</a> as an example, I would like the disclaimer section (currently on the bottom right of the first page, readi... | <p>The best way for what you want is to ask the author to support this feature. Here is a hack to do so without changing the source code. Add this chunk to the end of your Rmd</p>
<pre><code>```{js move_disclaim, echo=FALSE}
(function() {
var pages
var timer = 0;
var changeDC = setInterval(function() {
... | pagedown html resume - How to move disclaimer section within aside section to the last page? | css|r|r-markdown|rstudio|pagedown | 0 | 214 | 1 | 72,179,993 | 72,179,993 | 1 | true | 2022-05-09T06:45:33.797Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
pagedown html resume - How to move disclaimer section within aside section to the last page?<p>Taking the <a href="https://pagedown.rbind.io/html-resume" rel... |
72,178,402 | Is there a way to lookup a value from a CSV in nextflow? Or, alternately, reuse a CSV?<p>I have a simple csv created as part of a workflow, like below:</p>
<pre><code>sample,value
A,1
B,0.5
</code></pre>
<p>Separately, I have another channel with file names matching the sample names. I'd like to be able to use the valu... | <p>If you have a <a href="https://www.nextflow.io/docs/latest/channel.html#value-channel" rel="nofollow noreferrer">value channel</a>, you can reuse a file (like a CSV) an unlimited number of times without consuming the channel. For example:</p>
<pre><code>workflow {
input1 = file( params.input1 )
input2 = file(... | Is there a way to lookup a value from a CSV in nextflow? Or, alternately, reuse a CSV? | csv|awk|groovy|nextflow | 0 | 100 | 1 | 72,180,044 | 72,180,044 | 1 | true | 2022-05-09T21:30:43.500Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is there a way to lookup a value from a CSV in nextflow? Or, alternately, reuse a CSV?<p>I have a simple csv created as part of a workflow, like below:</p>
<... |
72,179,914 | Operator to concatenate two dbt Jinja sets?<p>In a given model, I am using two macros to create sets for a later loop.</p>
<p>Adapting <a href="https://docs.getdbt.com/docs/building-a-dbt-project/jinja-macros#set-variables-at-the-top-of-a-model" rel="nofollow noreferrer">the example</a> from the docs, it looks somethin... | <p>Your code, as written works. The value of <code>payment_methods</code> at the end of your code is</p>
<pre><code>['bank_transfer', 'credit_card', 'gift_card']
</code></pre>
<p>It's worth pointing out that these are lists, not sets. If items are duplicated across your list, they will be duplicated in the result. As... | Operator to concatenate two dbt Jinja sets? | jinja2|dbt | 0 | 502 | 1 | 72,180,051 | 72,180,051 | 1 | true | 2022-05-10T01:54:01.573Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Operator to concatenate two dbt Jinja sets?<p>In a given model, I am using two macros to create sets for a later loop.</p>
<p>Adapting <a href="https://docs.... |
72,175,883 | How to batch send documents in DocumentAI?<p>I am doing the processDocument process using the expense parser as in the example <a href="https://cloud.google.com/document-ai/docs/send-request#online-processor" rel="nofollow noreferrer">here</a>. Since the billing costs too much, instead of sending the documents one by o... | <p>Unfortunately there is no way to make the billing cheaper because the pricing of Document AI is calculated on a per page/document basis. See <a href="https://cloud.google.com/document-ai/pricing#document-ai-pricing" rel="nofollow noreferrer">Document AI pricing</a>.</p>
<p>With regards to your question:</p>
<blockqu... | How to batch send documents in DocumentAI? | google-cloud-platform|cloud-document-ai | 0 | 130 | 1 | 72,180,129 | 72,180,129 | 1 | true | 2022-05-09T17:16:31.393Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to batch send documents in DocumentAI?<p>I am doing the processDocument process using the expense parser as in the example <a href="https://cloud.google.... |
72,180,114 | How to compare 2 dataframes and then output an ID to inform if a row has changed?<p>I have 2 dataframes:</p>
<p><code>df1 = pd.DataFrame({"id1": ["A", "B", "C", "D"], "id2": ["1", "2", "2", "1"], "id3": ["... | <p>You can <code>merge</code> and build a boolean mask that returns True if a value didn't change (or was expanded) and <code>map</code> Y/N values according to it:</p>
<pre class="lang-py prettyprint-override"><code>df2 = df2.merge(df1, on='id1', how='left', suffixes=('_',''))
df2['Modified_ID'] = (df2['id2_'].eq(df2[... | How to compare 2 dataframes and then output an ID to inform if a row has changed? | python|pandas|dataframe | 0 | 33 | 1 | 72,180,157 | 72,180,157 | 1 | true | 2022-05-10T02:30:05.850Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to compare 2 dataframes and then output an ID to inform if a row has changed?<p>I have 2 dataframes:</p>
<p><code>df1 = pd.DataFrame({"id1": [&... |
72,179,461 | Azure Cognitive Search query results are not JSON but String in Unicode notation enclosed in double quotes<p>In the official documentation, the query result is shown in JSON notation with syntax highlighting as shown below.</p>
<p><img src="https://docs.microsoft.com/ja-jp/azure/search/media/search-explorer/search-expl... | <p>THis is a known issue with the portal search explorer, and will be fixed sometime this week. In the meantime, if you use any other HTTP client such as Postman to do your queries, you should the results in JSON format as expected.</p> | Azure Cognitive Search query results are not JSON but String in Unicode notation enclosed in double quotes | azure|azure-cognitive-search | 0 | 35 | 1 | 72,180,180 | 72,180,180 | 1 | true | 2022-05-10T00:19:18.480Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Azure Cognitive Search query results are not JSON but String in Unicode notation enclosed in double quotes<p>In the official documentation, the query result ... |
72,180,258 | How can I remove non-breaking spaces in my aws athena table?<p>I have timestamp stored as a string [imported from csv].
string :<code>2022-05-04[NBSP]02:46:35</code></p>
<p>actual string: <code>2022-05-04 02:46:35</code></p>
<p>the middle space is a nonbreaking space and prevents casting to timestamp.</p>
<p>I have tri... | <p>While an update can't be done, a new view can be created on top of the existing table and referenced downstream. The syntax for replacement <code>myts = REPLACE(myts, CHR('00A0'), '')</code> will remove the space entirely -- to get the desired format casting as timestamp, it should be</p>
<pre><code>myts = REPLACE(m... | How can I remove non-breaking spaces in my aws athena table? | sql|amazon-athena|datagrip | 0 | 369 | 1 | 72,180,259 | 72,180,259 | 1 | true | 2022-05-10T02:57:06.027Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I remove non-breaking spaces in my aws athena table?<p>I have timestamp stored as a string [imported from csv].
string :<code>2022-05-04[NBSP]02:46:3... |
72,178,306 | How to Merge two Panel data sets on Date and a combination of columns?<p>I have two datasets, <code>df1</code> &<code>df2</code>, that look like this:</p>
<p><code>df1</code>:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>Date</th>
<th>Code</th>
<th>City</th>
<th>State</th>
<th>Popula... | <p>It sounds like you're looking for the <code>how</code> keyword argument in <a href="https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.merge.html?highlight=how%20outer" rel="nofollow noreferrer"><code>pd.DataFrame.merge</code></a> and <a href="https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.... | How to Merge two Panel data sets on Date and a combination of columns? | python|pandas|dataframe|merge | 0 | 95 | 1 | 72,180,301 | 72,180,301 | 1 | true | 2022-05-09T21:18:34.247Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to Merge two Panel data sets on Date and a combination of columns?<p>I have two datasets, <code>df1</code> &<code>df2</code>, that look like this:</p... |
72,180,134 | Accumulate specific rows from pandas dataframe<p>My Pandas dataframe looks like this:</p>
<p><a href="https://i.stack.imgur.com/IgEwl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IgEwl.png" alt="enter image description here" /></a></p>
<p>Notice that for each task there are exactly 2 rows: row for... | <p>Using <code>pandas.pivot()</code> function you can simply do it like this assuming df is your dataframe:</p>
<pre><code>new_df = df.pivot(index="Task", columns="Action", values="DateTime")
</code></pre> | Accumulate specific rows from pandas dataframe | python|pandas|dataframe | 0 | 53 | 2 | 72,180,423 | 72,180,423 | 1 | true | 2022-05-10T02:33:56.957Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Accumulate specific rows from pandas dataframe<p>My Pandas dataframe looks like this:</p>
<p><a href="https://i.stack.imgur.com/IgEwl.png" rel="nofollow nore... |
72,180,219 | Error is not a known variable while assigning a query with a single row result<p>I have three tables: prescriptions, items, and orders.
The prescriptions and items table both have a non nullable column called price.
In the orders table, I have multiple columns.</p>
<ol>
<li>type - enum of either 'prescription' or 'item... | <p>This syntax for variable declaration is not supported. You should to use <a href="https://www.postgresql.org/docs/current/plpgsql-declarations.html" rel="nofollow noreferrer"><code>DECLARE statement</code></a> before block.</p>
<pre><code>DECLARE x int;
BEGIN
x := 10;
END
</code></pre> | Error is not a known variable while assigning a query with a single row result | postgresql|plpgsql | 0 | 66 | 1 | 72,180,426 | 72,180,426 | 1 | true | 2022-05-10T02:49:37.027Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Error is not a known variable while assigning a query with a single row result<p>I have three tables: prescriptions, items, and orders.
The prescriptions and... |
72,180,095 | LateInitializationError when accessing a page for the first time in flutter mobile<p>Currently when I access a page in my flutter mobile app I get the following error</p>
<p><code>LateError (LateInitializationError: Field 'library' has not been initialized.)</code></p>
<p>When I save or refresh that page the data final... | <p><code>_getMangas()</code> is an async function, hence <code>library</code> list is being initialized after being used inside the list view. You need to initialized <code>library</code> list with empty list before using it.</p>
<p>For your reference:</p>
<pre><code> @override
void initState() {
super.initState... | LateInitializationError when accessing a page for the first time in flutter mobile | flutter|dart | 0 | 18 | 2 | 72,180,480 | 72,180,480 | 1 | true | 2022-05-10T02:26:41.487Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
LateInitializationError when accessing a page for the first time in flutter mobile<p>Currently when I access a page in my flutter mobile app I get the follow... |
72,170,258 | Prevent error console from appearing using .exe file<p>I have created an exe file using autopy to exe.</p>
<p>At the beginning, I ask the user to enter the file to use using the following code:</p>
<pre><code>filename = filedialog.askopenfilename(initialdir="/", title="Select file to convert")
</cod... | <p>The root cause of the <code>FileNotFoundError</code> is that it cannot find the file with an empty string path, which it will never find that one.</p>
<p>I will elaborate on what @Sagitario has explained. The <code>os.path.exists(filename)</code> used to check if the <code>filename</code> is valid and exists or not:... | Prevent error console from appearing using .exe file | python|python-3.x|pandas | 0 | 30 | 2 | 72,180,492 | 72,180,492 | 1 | true | 2022-05-09T10:07:00.777Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Prevent error console from appearing using .exe file<p>I have created an exe file using autopy to exe.</p>
<p>At the beginning, I ask the user to enter the f... |
72,180,713 | Calculate % Change Avoiding NA's, By Group<p>I have the following sample data:</p>
<pre><code>df <- structure(list(person = c("a", "a", "a", "a", "a", "a", "a",
"b", "b", "b", "b", "c", "c&qu... | <p>For simplicity I would drop all the <code>NA</code> rows first then it is easy to calculate the values that you want. Function <code>nth(..)</code> or <code>head</code>/<code>tail</code> can help us provide last and second last values.</p>
<p>If a <code>person</code> has all the <code>NA</code> values it would be dr... | Calculate % Change Avoiding NA's, By Group | r|dataframe|dplyr | 0 | 43 | 1 | 72,180,751 | 72,180,751 | 1 | true | 2022-05-10T04:20:27.023Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Calculate % Change Avoiding NA's, By Group<p>I have the following sample data:</p>
<pre><code>df <- structure(list(person = c("a", "a"... |
72,180,700 | Ubuntu openssl not asking for Common Name<p>I have Ubuntu 12.04.5 LTS and OpenSSL 1.0.1 versions installed. I want to generate a CSR for SSL and when I run,</p>
<pre><code>openssl genrsa -out domain.key 2048
</code></pre>
<p>I get following output,</p>
<pre><code>Generating RSA private key, 2048 bit long modulus
..+++
... | <p>The command you issued is doing exactly what you have asked, it is to say to generate a 2048 private key.</p>
<p>Now you need to generate a CSR (a request certificate) where you will have to provide the required information including of course the CN.</p>
<p>Try adding</p>
<pre><code>openssl req -new -key <MyPri... | Ubuntu openssl not asking for Common Name | ubuntu|ssl|openssl|ubuntu-12.04|csr | 0 | 48 | 1 | 72,180,771 | 72,180,771 | 1 | true | 2022-05-10T04:17:28.227Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Ubuntu openssl not asking for Common Name<p>I have Ubuntu 12.04.5 LTS and OpenSSL 1.0.1 versions installed. I want to generate a CSR for SSL and when I run,<... |
72,180,779 | How to find column b when column a equals a certain value in data frames python<p>I have a csv that contains user Ids movie Ids and ratings and I would like to return all of the movie ids for certain user ids. This is what the data looks like</p>
<pre><code> userId movieId rating timestamp
1 1 4.0 ... | <p>You should loop on the same row:</p>
<pre class="lang-py prettyprint-override"><code>for x in zip(ratings["userId"], ratings["movieId"]):
if x == 1:
print(y)
</code></pre>
<p>Or</p>
<pre class="lang-py prettyprint-override"><code>res = ratings.loc[ratings["userId"].eq(1),&qu... | How to find column b when column a equals a certain value in data frames python | python|pandas|dataframe|numpy|for-loop | 0 | 45 | 2 | 72,180,837 | 72,180,837 | 1 | true | 2022-05-10T04:30:08.413Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to find column b when column a equals a certain value in data frames python<p>I have a csv that contains user Ids movie Ids and ratings and I would like ... |
72,179,399 | ParseException when changing data type in Spark Dataframe<p>In my <code>Databricks</code> notebook, I am getting <code>ParseException</code> in the last line of the code below when converting string to Date data type. The column in <code>csv</code> file does correctly have <code>hiring_date</code> in a date format.</p>... | <p>If it is the last line of your code, with reference to this <a href="https://sparkbyexamples.com/pyspark/pyspark-cast-column-type/" rel="nofollow noreferrer">doc</a>, the code should be modified as follows:</p>
<pre class="lang-python prettyprint-override"><code>df2 = df.withColumn("hiring_date", df.hiring... | ParseException when changing data type in Spark Dataframe | python|python-3.x|apache-spark|databricks|azure-databricks | 0 | 112 | 1 | 72,180,876 | 72,180,876 | 1 | true | 2022-05-10T00:07:19.287Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
ParseException when changing data type in Spark Dataframe<p>In my <code>Databricks</code> notebook, I am getting <code>ParseException</code> in the last line... |
72,179,850 | React useLayoutEffect in a child of a portal runs before the component renders<p>I'm using a Portal component to create a portal and add it to the document.
Some component (a tooltip, in my actual use case) is a child of the portal and needs to read its width (in my case, to check if the tooltip will be outside the win... | <p><a href="https://reactjs.org/docs/portals.html" rel="nofollow noreferrer">The portal</a> is to render the component on the utmost top of the DOM tree and does not depend on the parent components of the portal's component. That's why it cannot calculate sizes initially which usually depends on containers (parent comp... | React useLayoutEffect in a child of a portal runs before the component renders | reactjs|react-ref|react-portal | 0 | 196 | 2 | 72,180,968 | 72,180,968 | 1 | true | 2022-05-10T01:43:10.240Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
React useLayoutEffect in a child of a portal runs before the component renders<p>I'm using a Portal component to create a portal and add it to the document.
... |
72,180,908 | OnMouseEnter enter change background color react<p>Attempting to change the background color of a Grid section on mouse enter. Here's where I am at but now am stuck. I figured I could call a function to change the bg color on mouse enter.</p>
<pre><code>const [isShown, setIsShown] = React.useState(false)
function chang... | <p>You could use the style prop on your Grid and it should work fine.</p>
<pre><code>const [isShown, setIsShown] = React.useState(false)
function changeBackground(e) {
e.target.style.background = 'red';
<Grid
onMouseEnter={() => setIsShown(true)}
onMouseLeave={() => setIsShown(false)}
styl... | OnMouseEnter enter change background color react | html|css|reactjs|hover | 0 | 164 | 1 | 72,180,980 | 72,180,980 | 1 | true | 2022-05-10T04:53:48.627Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
OnMouseEnter enter change background color react<p>Attempting to change the background color of a Grid section on mouse enter. Here's where I am at but now a... |
72,168,689 | How to pass firebase data from one activity to another?<p>I want to pass data from one activity to another, first I download it from Firebase Realtime Database and then pass it to another activity and how to use it in it.</p>
<p>my data like this.(image from the internet)</p>
<pre><code> cam_firebase.addChildEventList... | <p>Assuming that <code>pXGb...lGE2</code> is the UID of the logged-in user, to be able to read the data that corresponds to your schema, then please use the following lines of code:</p>
<pre><code>String uid = FirebaseAuth.getInstance().getCurrentUser().getUid();
DatabaseReference db = FirebaseDatabase.getInstance().ge... | How to pass firebase data from one activity to another? | java|android|firebase|firebase-realtime-database|google-cloud-platform | 0 | 90 | 1 | 72,181,041 | 72,181,041 | 1 | true | 2022-05-09T07:57:38.797Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to pass firebase data from one activity to another?<p>I want to pass data from one activity to another, first I download it from Firebase Realtime Databa... |
72,180,165 | Why does OS know it's time to enter ACPI mode<p>I know that entering ACPI mode is by setting the SCI_EN bit after receiving an event, but why does the OS start ACPI mode when this bit is set?
Why is the SCI_EN bit set instead of other bits when an event is received?</p> | <p>When a computer is first turned on firmware is in control of power management, and anything that would cause a power management event is treated as an SMI to cause the firmware to enter a special mode called System Management Mode where it can determine what the event was and take care of the event.</p>
<p>When an O... | Why does OS know it's time to enter ACPI mode | operating-system|bios|acpi | 0 | 43 | 1 | 72,181,240 | 72,181,240 | 1 | true | 2022-05-10T02:41:04.653Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why does OS know it's time to enter ACPI mode<p>I know that entering ACPI mode is by setting the SCI_EN bit after receiving an event, but why does the OS sta... |
72,181,122 | Bind input element to Observable in Angular<p>I'm missing something basic. But all similar posts that i found contained solutions with @Input and objects i haven't found any with a simple variable.</p>
<p>So i have a component with a list of posts and a input.</p>
<p>so here is my HTML:</p>
<pre><code><input placeho... | <p>I don't think you can bind an observable to ngModel input.
Anyway you can do it much simpler, for example like this:</p>
<pre class="lang-html prettyprint-override"><code><input (ngModelChange)="filterPosts($event)" [(ngModel)]="filterString" />
</code></pre> | Bind input element to Observable in Angular | html|angular|rxjs | 0 | 98 | 1 | 72,181,289 | 72,181,289 | 1 | true | 2022-05-10T05:24:26.293Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Bind input element to Observable in Angular<p>I'm missing something basic. But all similar posts that i found contained solutions with @Input and objects i h... |
72,177,663 | GDB set breakpoint in function offset<p>I can set breakpoint like</p>
<pre><code>b some_function
</code></pre>
<p>But hiw can I put a breakpoint in offset 0x10 of this function</p>
<pre><code>b some_function +0x10
</code></pre>
<p>Or
b (some_function +0x10)</p>
<p>Doesn't work</p> | <pre><code>(gdb) p &foo
$1 = (<text variable, no debug info> *) 0x555555555129 <foo>
(gdb) b *foo+0x10
Breakpoint 2 at 0x555555555139
</code></pre>
<p>QED.</p> | GDB set breakpoint in function offset | linux|debugging|gdb|breakpoints|gdbserver | 0 | 98 | 1 | 72,181,296 | 72,181,296 | 1 | true | 2022-05-09T20:06:18.590Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
GDB set breakpoint in function offset<p>I can set breakpoint like</p>
<pre><code>b some_function
</code></pre>
<p>But hiw can I put a breakpoint in offset 0x... |
72,181,154 | How to convert a vertical grouped bar plot into a horizontal grouped bar plot in python<p>I have a code in which I am plotting a graph in a vertical manner. What changes should I make in this code in order for the bar graph to be horizontal?</p>
<pre><code># importing package
import matplotlib.pyplot as plt
import pand... | <p>To change the existing vertical bar graph to horizontal, you only need to update the plot code as below</p>
<pre><code>df.plot.barh(x='Team',
stacked=False,
title='Grouped Bar Graph with dataframe')
</code></pre>
<p>Output graph</p>
<p><a href="https://i.stack.imgur.com/v6W1p.png" rel="nofollow noref... | How to convert a vertical grouped bar plot into a horizontal grouped bar plot in python | python | 0 | 27 | 1 | 72,181,333 | 72,181,333 | 1 | true | 2022-05-10T05:30:50.800Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to convert a vertical grouped bar plot into a horizontal grouped bar plot in python<p>I have a code in which I am plotting a graph in a vertical manner. ... |
72,181,253 | Variable is turning (intermediate value) at return statement while it is corrent inside of the function<p>I get stuck on a async function that is changing it's value through the executing. This function makes call to "openlibrary", that takes isbn number from the function parameter. So the call to the library... | <p>"Hello fellow being that shares the same plane of existence" - Rem. I think the problem might actually be with the ISBN you are trying out!</p>
<p>When I take a look at the JSON provided with this link:
<a href="https://openlibrary.org/api/books?bibkeys=ISBN:1234567890&jscmd=details&format=json" re... | Variable is turning (intermediate value) at return statement while it is corrent inside of the function | javascript|asynchronous|return | 0 | 26 | 1 | 72,181,448 | 72,181,448 | 1 | true | 2022-05-10T05:43:49.887Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Variable is turning (intermediate value) at return statement while it is corrent inside of the function<p>I get stuck on a async function that is changing it... |
72,162,351 | How do I Change the Terraform Version in VSCode?<p>I have installed the latest Terraform version, however in VSCode, in my directory when I type terraform --version I get this.</p>
<pre><code>Terraform v0.11.7
+ provider.azurerm v2.3.0
Your version of Terraform is out of date! The latest version
is 1.1.9. You can upd... | <p><strong>Thank You <a href="https://stackoverflow.com/users/7661119/ervin-szilagyi">Ervin Szilagyi</a> for your suggestion, Tested in my enviorment working fine for me.</strong></p>
<p>You need to update the version of terraform exectutable file in the exectable path of terrform. To get the current executable path fo... | How do I Change the Terraform Version in VSCode? | visual-studio-code|terraform|terraform-provider-azure | 0 | 327 | 1 | 72,181,523 | 72,181,523 | 1 | true | 2022-05-08T15:10:17.817Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I Change the Terraform Version in VSCode?<p>I have installed the latest Terraform version, however in VSCode, in my directory when I type terraform --... |
72,180,747 | Supertokens: Adding custom form fields with modifier function capabilities<p>I'm adding custom fields to the Sign Up form in Supertokens. I see there is a builtin <code>validate</code> function and you can basically have a true or false return on some conditional. I was wondering if there was a way to apply a "mas... | <p>The <code>validate</code> function is only meant for checking if the input is correct or not. It's not meant for normalisation.</p>
<p>The SuperTokens react library render react components for the login / sign up UI, so you can use plain JS to change the form behaviour:</p>
<ul>
<li>You want to add an event listener... | Supertokens: Adding custom form fields with modifier function capabilities | javascript|node.js | 0 | 93 | 1 | 72,181,591 | 72,181,591 | 1 | true | 2022-05-10T04:25:54.593Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Supertokens: Adding custom form fields with modifier function capabilities<p>I'm adding custom fields to the Sign Up form in Supertokens. I see there is a bu... |
72,176,645 | Identity Server 4 validate own issued JWTs<p>Ok, user authenticates and client gets the JWT from my IS4 instance. All that works. Now, for reasons I still cry at nights after being tormented by people who authoritatively claim to know OAuth but do not, the client is sending me the identity token JWT over the wire to an... | <p>The receiver of a token should always validate the signature of the token to make sure it came from your IdentityServer. This is usually automatically done by most proper JWT-libraries. The library will download the public-key from your IdentityServer and use it to verify the signature of the token.</p>
<p>If you ar... | Identity Server 4 validate own issued JWTs | oauth-2.0|jwt|identityserver4|openid | 0 | 68 | 1 | 72,181,611 | 72,181,611 | 1 | true | 2022-05-09T18:26:46.537Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Identity Server 4 validate own issued JWTs<p>Ok, user authenticates and client gets the JWT from my IS4 instance. All that works. Now, for reasons I still cr... |
72,177,039 | It is possible to call trigger with old, or new in procedure?<p>I want to insert data using procedure. At first I wanna insert match, but id for football match is generated automatically using trigger. Secondly I want use this id for other table - stats_footballmatch_club. It is possible?</p>
<pre><code>INSERT INTO Foo... | <p>Short answer: no you cannot use a trigger for that. A trigger cannot be referenced in code.</p>
<p>Solution: Use the <code>RETURNING INTO</code> clause.</p>
<p>Simplified example:</p>
<pre><code>DROP TABLE stats_footballmatch_club;
DROP TABLE footballmatch;
DROP SEQUENCE footballmatch_s;
CREATE TABLE footballmatch(... | It is possible to call trigger with old, or new in procedure? | sql|plsql | 0 | 43 | 1 | 72,181,767 | 72,181,767 | 1 | true | 2022-05-09T19:02:53.427Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
It is possible to call trigger with old, or new in procedure?<p>I want to insert data using procedure. At first I wanna insert match, but id for football mat... |
72,175,064 | WARNING: [ServiceBusTechnology] features were found in myproject.jpr but are not installed. Install these technologies before you proceed<p>I inherited a project at work that uses Oracle Service Bus and was told to install JDeveloper. When I open the project, JDev says</p>
<blockquote>
<p>WARNING: [ServiceBusTechnology... | <p>Service Bus is part of the SOA Suite. You have to download the <a href="https://www.oracle.com/middleware/technologies/soasuite/downloads.html" rel="nofollow noreferrer">SOA Suite</a> the normal JDev Studio installation doesn'T have the SOA stuff built in. However, how to proceed from there depends on the version yo... | WARNING: [ServiceBusTechnology] features were found in myproject.jpr but are not installed. Install these technologies before you proceed | jdeveloper|osb | 0 | 30 | 1 | 72,181,789 | 72,181,789 | 1 | true | 2022-05-09T16:10:36.123Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
WARNING: [ServiceBusTechnology] features were found in myproject.jpr but are not installed. Install these technologies before you proceed<p>I inherited a pro... |
72,181,914 | How can I write Javascript function in React JSX?<p>I got this error called <strong>"TypeError: Cannot read properties of undefined (reading 'split')"</strong>
I am aware of where the error came from, but I don't know how to put the right code in it.
I am using Next.js and TailwindCSS :)</p>
<p>The code below... | <p>Inside the same file of your component, you can define:</p>
<pre class="lang-js prettyprint-override"><code>function extractURL(category) {
if (!category.url) {
// handle the problem somehow and return an appropriate value
}
return `/${category.url.split('/').splice(2, 2).join('/')}`;
}
</code></pre>
<p>An... | How can I write Javascript function in React JSX? | javascript|reactjs | 0 | 77 | 2 | 72,181,961 | 72,181,961 | 1 | true | 2022-05-10T07:00:04.273Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I write Javascript function in React JSX?<p>I got this error called <strong>"TypeError: Cannot read properties of undefined (reading 'split')&qu... |
72,180,902 | Append data to existing dataframe in R<p>Hi Is there a way to append data to existing data in R. For example below application has dataframe populated based on user values , but right now, it is only creating new row and not appending.</p>
<p>Can we append this dataframe. I tried using reactive values as well. But did ... | <p>You need to maintain a <code>reactiveVal</code> which holds your rows and to which you append on change:</p>
<pre class="lang-r prettyprint-override"><code>library(shiny)
library(tidyr)
library(dplyr)
library(purrr)
ui <- basicPage(
fluidRow(
column(
width = 6,
textInput("a&qu... | Append data to existing dataframe in R | r|shiny | 0 | 47 | 1 | 72,182,046 | 72,182,046 | 1 | true | 2022-05-10T04:53:06.427Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Append data to existing dataframe in R<p>Hi Is there a way to append data to existing data in R. For example below application has dataframe populated based ... |
72,180,895 | Rails Action Mailer async ECONNREFUSED localhost:25<p>I am testing out Action Mailer for the first time, attempting to configure a User Welcome email upon signup. I understand that an email will not actually be send in development mode, but the logs seem to be showing an error.</p>
<p>Upon creating a user, my logs look... | <p>Did you set action_mailer <a href="https://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration-for-gmail" rel="nofollow noreferrer">configuration</a> for Gmail in your environment?</p>
<pre><code>config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
address: ... | Rails Action Mailer async ECONNREFUSED localhost:25 | ruby-on-rails|actionmailer | 0 | 67 | 1 | 72,182,078 | 72,182,078 | 1 | true | 2022-05-10T04:52:14.860Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Rails Action Mailer async ECONNREFUSED localhost:25<p>I am testing out Action Mailer for the first time, attempting to configure a User Welcome email upon si... |
72,181,909 | How to display a snackbar after entering text in a TextField?<p>I have a text field. I need a snackbar to appear after the user has finished typing words into it after 300ms.Snackbar should appear in the middle of the screen. How can I make the snackbar appear 300ms after the user has stopped typing in the text field?
... | <p>Similar to other answer, but will appear after user stopped typing and not when user submits the <code>TextField</code> :</p>
<pre class="lang-dart prettyprint-override"><code> Timer? t;
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: TextField(
o... | How to display a snackbar after entering text in a TextField? | flutter|dart | 0 | 98 | 2 | 72,182,131 | 72,182,131 | 1 | true | 2022-05-10T06:59:14.847Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to display a snackbar after entering text in a TextField?<p>I have a text field. I need a snackbar to appear after the user has finished typing words int... |
72,175,369 | Durable Orchestrator gets stuck after Task.WhenAll<p>I have an orchestrator with 4 activites:</p>
<ol>
<li><strong>PromoDataFromActpm</strong> - single activity that downloads some data
from API.</li>
<li><strong>PromoDataExport</strong> - single activity that sends data from activity #1
to Azure Storage</li>
<li><stro... | <p>Since in the comments you mentioned you are launching 3000 activities in parallel in step 3, I have one idea what could be happening.
Remember that each activity will add rows to the history table that all need to be loaded on each replay of the orchestrator (which occurs after each activity returns).
So the load ti... | Durable Orchestrator gets stuck after Task.WhenAll | c#|azure|parallel-processing|azure-functions|azure-durable-functions | 0 | 172 | 1 | 72,182,193 | 72,182,193 | 1 | true | 2022-05-09T16:34:33.820Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Durable Orchestrator gets stuck after Task.WhenAll<p>I have an orchestrator with 4 activites:</p>
<ol>
<li><strong>PromoDataFromActpm</strong> - single activ... |
72,152,736 | How can I filter by a value inside a pivot table using Supabase?<p>I'm building a bike rental app where users can reserve bikes for a certain number of days. Bikes and users have a many-to-many relationship, there's a bike_user pivot table that contains the information about reservation start and end dates. See the dia... | <p>The <a href="https://supabase.com/docs/reference/javascript/select#filtering-with-inner-joins" rel="nofollow noreferrer">documentation</a> is not exactly clear on this one, but you can use the <code>inner</code> keyword to filter your results by values from your joined table like this:</p>
<pre class="lang-js pretty... | How can I filter by a value inside a pivot table using Supabase? | supabase|supabase-database | 0 | 106 | 1 | 72,182,234 | 72,182,234 | 1 | true | 2022-05-07T12:56:11.560Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I filter by a value inside a pivot table using Supabase?<p>I'm building a bike rental app where users can reserve bikes for a certain number of days.... |
72,182,095 | Multiple group by in pandas with condition to help create report<p>I'm trying to create a consolidated report from another report. The initial data I have is in this format
<a href="https://i.stack.imgur.com/L6ShR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/L6ShR.png" alt="Initial Report" /></a><... | <p>I think instead of grouping by in different operations and merging back to the original df, you could do it in one go, and then, add 'rate'. Something like:</p>
<pre><code>tmp=xdf.groupby('SID').agg({'ID':'count','Active':'sum','Score':'mean'}).rename(columns={'ID': 'total','Score':'agg_score'})
tmp['rate'] = round(... | Multiple group by in pandas with condition to help create report | pandas|pandas-groupby | 0 | 40 | 3 | 72,182,487 | 72,182,487 | 1 | true | 2022-05-10T07:15:29.787Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Multiple group by in pandas with condition to help create report<p>I'm trying to create a consolidated report from another report. The initial data I have is... |
72,168,216 | Is there an equivalent to doOnNext but ignoring any reactive results (except errors)?<p>Presently I am doing this</p>
<pre><code>final ReactiveHashOperations<String, String, String> ops = redisTemplate.opsForHash();
var theMonoIWant =
Mono.fromCallable(this::generateSomeComplexDataThatProducesTheValueIWant)
... | <p>Nope, the first solution is the idiomatic one.</p>
<p>"doSubscriptionOnNext" is quite literally <code>flatMap</code>.</p>
<p>Ignoring the value(s) from said inner subscription is something better described in the inner publisher via composition rather than trying to predict all possible patterns as top-lev... | Is there an equivalent to doOnNext but ignoring any reactive results (except errors)? | java|project-reactor | 0 | 57 | 1 | 72,182,513 | 72,182,513 | 1 | true | 2022-05-09T07:14:54.230Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is there an equivalent to doOnNext but ignoring any reactive results (except errors)?<p>Presently I am doing this</p>
<pre><code>final ReactiveHashOperations... |
72,175,502 | Nestjs Typeorm query still using 'postgres' database<p>When I try to query using <code>repository</code> for login api, I receive this error</p>
<pre><code>QueryFailedError: relation "user" does not exist
</code></pre>
<p>After debuging, I realize the <code>nestjs</code> still using database with name "p... | <p>TypeormModule has the database property which provides the database name. You are using name in <strong>provider.module.ts</strong>:</p>
<ul>
<li><strong>Wrong</strong> name : databaseName</li>
<li><strong>Right</strong> database : databaseName</li>
</ul>
<pre><code>TypeOrmModule.forRootAsync({
useFactory: () =&... | Nestjs Typeorm query still using 'postgres' database | node.js|postgresql|nestjs|typeorm | 0 | 542 | 1 | 72,182,532 | 72,182,532 | 1 | true | 2022-05-09T16:44:10.990Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Nestjs Typeorm query still using 'postgres' database<p>When I try to query using <code>repository</code> for login api, I receive this error</p>
<pre><code>Q... |
72,182,317 | Issue with word-spacing in search bar<p>A client has asked me to create a search bar like this</p>
<p><a href="https://i.stack.imgur.com/riHM4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/riHM4.png" alt="enter image description here" /></a></p>
<p>I succeeded this far</p>
<p><a href="https://i.sta... | <p>You can just add spaces, you don't need to use word spacing for this. The only downside of this is that when sending a post, it would show up as "Homepage(&nbsp; spam)Blog(&nbsp; spam)Sample Page".</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
... | Issue with word-spacing in search bar | css|word-spacing | 0 | 43 | 2 | 72,182,582 | 72,182,582 | 1 | true | 2022-05-10T07:34:59.290Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Issue with word-spacing in search bar<p>A client has asked me to create a search bar like this</p>
<p><a href="https://i.stack.imgur.com/riHM4.png" rel="nofo... |
72,179,628 | Mui Datepicker show red text before validation<p>I am using Mui Date picker and date time picker and when I just open the modal I see this:</p>
<p><a href="https://i.stack.imgur.com/SdgtV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SdgtV.png" alt="enter image description here" /></a></p>
<p>I don... | <p>You can check if the <code>value</code> is <code>null</code> before error in <code>TextField</code> :</p>
<pre><code><TextField
{...params}
{...validator.getFieldProps("start_date")}
error={startDate !== null && validator.getFieldProps("start_date").error} // Add this
/&g... | Mui Datepicker show red text before validation | reactjs|material-ui | 0 | 593 | 1 | 72,182,620 | 72,182,620 | 1 | true | 2022-05-10T00:57:47.680Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Mui Datepicker show red text before validation<p>I am using Mui Date picker and date time picker and when I just open the modal I see this:</p>
<p><a href="h... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.