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,816,394 | Firebase query orderBy with multiple nodes<p>I want to fetch polls whose pollEndingTime is greater than the current time so for that reason I have used where query and in order to work where query I have applied orderBy on pollEndingTime also, but also I have to orderBy it in terms of totalVote received till now.
So my... | <p>If you have multiple <code>orderBy</code> statements in a single query, the database handles them in the order specified. So the results you get are <em>first</em> ordered by <code>pollEndingTime</code> and only then on <code>totalVote</code>. The consequence of this is that the ordering of <code>totalVote</code> is... | Firebase query orderBy with multiple nodes | flutter|firebase|google-cloud-firestore | 0 | 40 | 1 | 72,818,028 | 72,818,028 | 1 | true | 2022-06-30T13:08:29.067Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Firebase query orderBy with multiple nodes<p>I want to fetch polls whose pollEndingTime is greater than the current time so for that reason I have used where... |
72,817,557 | Could not `chan` pass through RPC in Go?<p>For the following code, get Message via RPC, why its Done field is nil?</p>
<p>Could not <code>chan</code> pass through RPC?</p>
<pre class="lang-golang prettyprint-override"><code>type Message struct {
Text string
Done chan bool
}
type (
GetArgs struct {
... | <p>No. RPC arguments can only be those that are serializable by <code>encoding/gob</code>, and chans are <a href="https://pkg.go.dev/encoding/gob" rel="nofollow noreferrer">not one of them</a></p>
<blockquote>
<p>Functions and channels will not be sent in a gob. Attempting to encode such a value at the top level will f... | Could not `chan` pass through RPC in Go? | go|rpc|channel | -2 | 40 | 1 | 72,818,175 | 72,818,175 | 1 | true | 2022-06-30T14:27:18.727Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Could not `chan` pass through RPC in Go?<p>For the following code, get Message via RPC, why its Done field is nil?</p>
<p>Could not <code>chan</code> pass th... |
72,816,990 | I'm not able to run the react web project and npm install also not working<p>I'm getting following errors if npm install
<a href="https://i.stack.imgur.com/FKnDX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FKnDX.png" alt="enter image description here" /></a></p>
<p>i tried clean cache also like t... | <p>The error message you're seeing trying to run build makes sense. You can't run your <strong>build</strong> script if you haven't installed the dependencies first - since you don't have the libraries necessary to compile the project yet! <code>npm run build</code> is a synonym for "react-scripts build" acc... | I'm not able to run the react web project and npm install also not working | reactjs|npm | -1 | 40 | 1 | 72,818,615 | 72,818,615 | 1 | true | 2022-06-30T13:49:52.987Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I'm not able to run the react web project and npm install also not working<p>I'm getting following errors if npm install
<a href="https://i.stack.imgur.com/F... |
72,818,531 | How can I echo a shell command as a string<p>I want place the following string into my .zshrc file using the command line</p>
<p><code>eval "$(docker exec -it <abc-123>)"</code></p>
<p>I've tried:</p>
<p><code>echo "eval "$(docker exec -it <abc-123>)"" >> .zshrc</code></p... | <pre><code>echo 'eval "$(docker exec -it <abc-123>)"' >> .zshrc
</code></pre>
<p>Will add</p>
<pre><code>eval "$(docker exec -it <abc-123>)"
</code></pre>
<p>at the end of your <code>.zshrc</code> file</p> | How can I echo a shell command as a string | shell|zsh|zshrc | 0 | 40 | 2 | 72,818,723 | 72,818,723 | 1 | true | 2022-06-30T15:38:39.987Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I echo a shell command as a string<p>I want place the following string into my .zshrc file using the command line</p>
<p><code>eval "$(docker ex... |
72,807,200 | Is there a way to modify the path for ".." ( shortcut )?<p>Whenever I download repositories from my team from other departments they have scripts ( .m files )in MATLAB which are runned from a path file which contain ".." ( like a shortcut ) in their path link and I do not know how to change that on my MATLAB ... | <p>Actually I am stupid. ".." is like "cd.." in MS-DOS....
I was in the wrong folder all the time. I am not supposed to be in the parent directory of the project when I run the main script. I am supposed to be in the folder directory where the main script is running (main.m).</p>
<p>So when I am in ... | Is there a way to modify the path for ".." ( shortcut )? | matlab|path | 0 | 40 | 2 | 72,819,711 | 72,819,711 | 1 | true | 2022-06-29T20:02:01.483Z | 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 modify the path for ".." ( shortcut )?<p>Whenever I download repositories from my team from other departments they have scripts ( .m files ... |
72,820,706 | How can I print hole HTML tag using javascript. like how to print thi hole line (<a href="link">text</a>) instead of just text as a link<p>when I saw this example , it used <code>getElementsByTagName()</code> method to bring all anchor tags then using the index [0] to bring the first element inside this HTMLCollection.... | <p>When you assign <code>x</code> to <code>innerHTML</code>, it's converted to a string. Converting a DOM element to a string doesn't return the full HTML of the element; in most cases it returns a string like <code>[object HTMLDivElement]</code>, but anchors override this and returns the <code>href</code> value (see <... | How can I print hole HTML tag using javascript. like how to print thi hole line (<a href="link">text</a>) instead of just text as a link | javascript|html | 1 | 40 | 2 | 72,820,813 | 72,820,813 | 1 | true | 2022-06-30T18:50:04.897Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I print hole HTML tag using javascript. like how to print thi hole line (<a href="link">text</a>) instead of just text as a link<p>when I saw this ex... |
72,823,808 | BigInteger Sorting, Complexity O(n)<p>The function 'bigSorting' takes BigInteger input as a 'List of Strings'. I have a single loop approach to sort the String List in the given complexity but still, the string is not sorted/ the BigInteger List is not sorted.</p>
<p>INPUT:
(List of Strings)
314159265358979323846264338... | <pre class="lang-java prettyprint-override"><code>int x = a.compareTo(b);
if(x>1)
</code></pre>
<p>This conditional will never pass. <a href="https://docs.oracle.com/javase/7/docs/api/java/math/BigInteger.html#compareTo(java.math.BigInteger)" rel="nofollow noreferrer">The docs</a> for <code>compareTo</code> say</p>
... | BigInteger Sorting, Complexity O(n) | java | -1 | 40 | 1 | 72,823,896 | 72,823,896 | 1 | true | 2022-07-01T02:25:12.203Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
BigInteger Sorting, Complexity O(n)<p>The function 'bigSorting' takes BigInteger input as a 'List of Strings'. I have a single loop approach to sort the Stri... |
72,823,863 | React MUI-Card content testing<p>I'm trying to select a React Material-UI card from the page based on the title of the card. Within that card I need to verify the recipe text.</p>
<pre class="lang-html prettyprint-override"><code> <Card sx={{ maxWidth: 345 }}>
<CardHeader
avatar={
<Avat... | <p>The title attribute of the MUI-card is transformed into a <code><span></code> on the runtime web page, so you cannot use the selector <code>[title="Shrimp and Chorizo Paella"]</code>.</p>
<p>I would suggest targeting the <code>MuiCardHeader</code> since it is a sibling of the content section, using <... | React MUI-Card content testing | cypress | 1 | 40 | 1 | 72,823,937 | 72,823,937 | 1 | true | 2022-07-01T02:37:39.203Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
React MUI-Card content testing<p>I'm trying to select a React Material-UI card from the page based on the title of the card. Within that card I need to verif... |
72,820,691 | Create automatic bar chart subplots in Python<p>I have a dataframe like so:</p>
<pre><code>Date ID Data
2022-05-31 21 1
2022-05-31 22 4
2022-05-31 28 3
2022-06-01 21 2
2022-06-01 22 9
2022-06-01 28 2
2022-06-02 22 12
2022-06-03 22 10
2022-06-03 23 1
2022-07-03 25 1
2022-07-04 22 12
2022-07... | <p>Since you had plotly in the tags, plotly.express has the ability to automatically create faceted graphs. faceted graphs by ID. If you prefer two columns, set <code>face_col_wrap=2</code>. Also, the color bar is displayed, so I hide it. I also exclude unnecessary dates. I create an index of minimum to maximum dates a... | Create automatic bar chart subplots in Python | python|python-3.x|matplotlib|plotly | 0 | 40 | 2 | 72,824,606 | 72,824,606 | 1 | true | 2022-06-30T18:48:17.033Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Create automatic bar chart subplots in Python<p>I have a dataframe like so:</p>
<pre><code>Date ID Data
2022-05-31 21 1
2022-05-31 22 4
2022-05-3... |
72,826,238 | Replace an imported certificate with AWS Issued<p>I'm having some trouble understanding how to replace my imported wildcard cert with an AWS Issued one without taking my site offline. Currently I have an imported SSL certificate in ACM. In the DNS I have a record such as:</p>
<p><code>*.example.com A Simple - 11.22... | <p>I've never used imported certificates in aws, I directly used certificates issued by AWS (and domains registered in AWS), so maybe I'm wrong.</p>
<p>If I don't remember bad, when you create a certificate in AWS Certificate manager, you choose your domain (mydomain.com), then you add another domain (*.mydomain.com) s... | Replace an imported certificate with AWS Issued | amazon-web-services|ssl-certificate|amazon-certificate-manager | 0 | 40 | 1 | 72,827,353 | 72,827,353 | 1 | true | 2022-07-01T08:09:31.327Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Replace an imported certificate with AWS Issued<p>I'm having some trouble understanding how to replace my imported wildcard cert with an AWS Issued one witho... |
72,828,609 | How Toggle Works in React<p>Following is a simple React Toggle functionality. But I have a confusion. In the first click, I understand that the 'setState' function makes the 'state' to 'true' so the content shows. But in the second click 'setState' is already true. Then how the false state working.</p>
<ol>
<li>First C... | <p>The initial value of <code>state</code> is <code>false</code>. So, after you do the first click, you set <code>state</code> to <code>!state</code>, which makes it <code>true</code> (because <code>!false</code> equals <code>true</code>). On the second click, it will become <code>false</code> because <code>state</code... | How Toggle Works in React | reactjs|toggle|use-state | 0 | 40 | 2 | 72,828,811 | 72,828,811 | 1 | true | 2022-07-01T11:31:04.637Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How Toggle Works in React<p>Following is a simple React Toggle functionality. But I have a confusion. In the first click, I understand that the 'setState' fu... |
72,829,796 | How do I call the functions of the imported library from my function?<p>While trying to get information from some web pages using BeautifulSoup, there are many overlapping codes, so I want to make it a function, but I want to call a function within <code>bs</code> such as <code>find_all</code> and <code>select</code>. ... | <p>If you call the function like (you may have to provide additional arguments)</p>
<pre><code>test('www','find_all')
</code></pre>
<p>You can call the method "find_all" in the function like:</p>
<pre><code>result = getattr(soup, function)(*lst)
</code></pre> | How do I call the functions of the imported library from my function? | python | 0 | 40 | 1 | 72,829,899 | 72,829,899 | 1 | true | 2022-07-01T13:09:20.390Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I call the functions of the imported library from my function?<p>While trying to get information from some web pages using BeautifulSoup, there are ma... |
72,830,354 | Does Airflow clear Tasks remove data from the database also?<p>We have a use case where we have to populate fresh data in our DB. There is already old data present from the successful DAG run in our DB . Now we need to delete the old data and re run the task.
Airflow already provides a command to clear selection.</p>
... | <p>I guess you meant : <code>airflow **tasks** clear ...</code></p>
<p>It is only clear the set of task instance, as if they never ran (it is not rollback)</p> | Does Airflow clear Tasks remove data from the database also? | postgresql|airflow | 0 | 40 | 1 | 72,830,633 | 72,830,633 | 1 | true | 2022-07-01T13:53:27.243Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Does Airflow clear Tasks remove data from the database also?<p>We have a use case where we have to populate fresh data in our DB. There is already old data p... |
72,831,189 | SQL Function to Currency Convertion<p>I'm trying to create a function that will do currency conversion based on a table. The table is called ds_exchange_rate and looks like this:</p>
<p><a href="https://i.stack.imgur.com/6TH7A.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6TH7A.png" alt="enter imag... | <p>There are some errors, the reserved word for returning function is "returns"
also your selects should return into your conversion_rate variable, so corrected looks like this:</p>
<pre><code>CREATE OR REPLACE FUNCTION CONVERT_FROM_TO(
value NUMERIC,
from_currency TEXT,
to_currency TEXT,
r... | SQL Function to Currency Convertion | sql|postgresql|sql-function | 1 | 40 | 2 | 72,831,955 | 72,831,955 | 1 | true | 2022-07-01T15:01:56.537Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SQL Function to Currency Convertion<p>I'm trying to create a function that will do currency conversion based on a table. The table is called ds_exchange_rate... |
72,832,578 | Add a new column in each table of a list, and fill it with the name of the table<p>I have a list of 25 data table, each table has 2 columns. The tables inside the list are named from 1 to 25. I would like to add a column in each table containing in each row just the name of the table, like this:</p>
<p>Table 1</p>
<pre... | <p>We could use <code>map2</code>. Here we create first a vector with the number of dataframes in the list in this example 1:3. In your original example 1:25:</p>
<pre><code>library(purrr)
my_list <- list(table1,table2, table3)
ID <- 1:3
map2(my_list, ID, ~cbind(.x, ID = .y))
</code></pre>
<pre><code>[[1]]
A... | Add a new column in each table of a list, and fill it with the name of the table | r|list|dataframe | 1 | 40 | 3 | 72,832,655 | 72,832,655 | 1 | true | 2022-07-01T17:05:00.577Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Add a new column in each table of a list, and fill it with the name of the table<p>I have a list of 25 data table, each table has 2 columns. The tables insid... |
72,831,885 | Spring Integration - specify 'schema' in StoredProcPollingChannelAdapter<p>How do I set the schema when using <code>StoredProcPollingChannelAdapter</code>? I do have 2 to 3 schemas on the same database connection object and the traditional "schema"."stored_proc" reference does not seem to work when ... | <p>I two words this is not supported as clean as possible at the moment.
We have an old JIRA ticket to see what and how is possible: <a href="https://jira.spring.io/browse/INT-3348" rel="nofollow noreferrer">https://jira.spring.io/browse/INT-3348</a>.</p>
<p>As a workaround I would suggest to go directly with the <code... | Spring Integration - specify 'schema' in StoredProcPollingChannelAdapter | spring-integration | 1 | 40 | 1 | 72,834,032 | 72,834,032 | 1 | true | 2022-07-01T15:59:32.483Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Spring Integration - specify 'schema' in StoredProcPollingChannelAdapter<p>How do I set the schema when using <code>StoredProcPollingChannelAdapter</code>? I... |
72,839,699 | React-native FlexDirection:'row' not working<p>I am trying to list these itemsNames into a row- put them horizontaly, but it is not working. I can't figure out the reason why. I would really appreciate some help</p>
<pre><code>const Text = () => {
const Menu = [
{'id':1,
'menuName':'whatever',
},
{'id':2,
'men... | <p><strong>Reason for not to work.</strong></p>
<p>In order to arrange the items in a view, you need to set flexDirection='row' in your case items inside your View(Container) needed to be arranged horizontally so the flex-direction will be applied to View(Container)</p>
<p><strong>Please make the following changes in s... | React-native FlexDirection:'row' not working | javascript|reactjs|react-native | 0 | 40 | 1 | 72,839,981 | 72,839,981 | 1 | true | 2022-07-02T14:11:53.493Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
React-native FlexDirection:'row' not working<p>I am trying to list these itemsNames into a row- put them horizontaly, but it is not working. I can't figure o... |
72,818,068 | How to convert UTC time to local time based on city name?<p>I have a Pandas Dataframe that has time in UTC. I also have another column that has the timezone to which I would like to convert it to</p>
<pre><code>time, timezone
2022-06-23 01:00:00, Montevideo
2022-05-10 05:00:00, Brasilia
2022-07-16 22:47:00, Casablanca
... | <p>With the help of <a href="https://geocoder.readthedocs.io/index.html" rel="nofollow noreferrer">Geocoder</a>, here is one way to do it:</p>
<pre class="lang-py prettyprint-override"><code>import geocoder
import pandas as pd
df = pd.DataFrame(
[
{"utc_time": "2022-06-23 01:00:00", &qu... | How to convert UTC time to local time based on city name? | pandas|timezone | 1 | 40 | 1 | 72,840,717 | 72,840,717 | 1 | true | 2022-06-30T15:04:30.310Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to convert UTC time to local time based on city name?<p>I have a Pandas Dataframe that has time in UTC. I also have another column that has the timezone ... |
72,841,263 | Combine column counts from different dataframes pandas<p>I have two dataframes. One has demographics information about patients and other has some feature information. Below is some dummy data representing my dataset:</p>
<p>Demographics:</p>
<pre><code>demographics = {
'PatientID': [10, 11, 12, 13],
'DOB': ['1971-... | <p>Cross-tabulate <code>features</code> and merge with <code>demographics</code>.</p>
<pre class="lang-py prettyprint-override"><code># cross-tabulate feature df
# and reindex it by PatientID to carry PatientIDs without features
feature_counts = (
pd.crosstab(features['PatientID'], features['Feature'])
.add_pr... | Combine column counts from different dataframes pandas | python|pandas|dataframe|count | 0 | 40 | 2 | 72,841,324 | 72,841,324 | 1 | true | 2022-07-02T17:46:40.910Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Combine column counts from different dataframes pandas<p>I have two dataframes. One has demographics information about patients and other has some feature in... |
72,841,483 | Django static tag on css(style-bg-image)<p>I am trying to make a webpage in django everything works well</p>
<p>{% static 'website/img/core-img/s1.png' %}</p>
<p>but when I try to do static style="background-image: url({% static 'website/img/bg-img/1.jpg'%});</p>
<p>it gives me errors:
<a href="https://i.stack.img... | <p>Your IDE isn't configured to work with Django markup language, try add django plugin:</p>
<p>Search <code>django</code> on plugins and hit install.
<a href="https://i.stack.imgur.com/bmBqB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bmBqB.png" alt="screenshot showing vscode plugins and install... | Django static tag on css(style-bg-image) | django|django-templates | -2 | 40 | 1 | 72,842,233 | 72,842,233 | 1 | true | 2022-07-02T18:23:55.930Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Django static tag on css(style-bg-image)<p>I am trying to make a webpage in django everything works well</p>
<p>{% static 'website/img/core-img/s1.png' %}</p... |
72,842,409 | Unwanted white space when I go into mobile view<p>Does someone know how to remove this white space?
This only occurs when I'm in mobile view.
Image of the problem. Untitled:<br />
<a href="https://i.stack.imgur.com/6WcGy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6WcGy.png" alt="Untitled" /></a>... | <p>replace your class <code>img-fluid</code> for <code>w-100 h-100</code> and <code>object-fit: cover</code> in css</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-css lang-css prettyprint-override"><code>img {
ob... | Unwanted white space when I go into mobile view | html|css|image|bootstrap-4 | 0 | 40 | 1 | 72,842,462 | 72,842,462 | 1 | true | 2022-07-02T21:05:36.157Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Unwanted white space when I go into mobile view<p>Does someone know how to remove this white space?
This only occurs when I'm in mobile view.
Image of the pr... |
72,844,011 | Wagtail - Can't render orderables on my HTML<p>I want to extract the name of my snippets to put it on my blog in the form of a list, but they just don't appear.</p>
<p>I have coded the snippets, console does not throws any error, i have created the respective snippets on the admin panel and then added them onto my deta... | <p>The <code>related_name</code> argument on <code>page = ParentalKey("home.BlogDetailPage", related_name="categorias")</code> will make a relation called <code>categorias</code> available on the BlogDetailPage model, so <code>self.categorias.all</code> is correct (not <code>self.categoria.all</code... | Wagtail - Can't render orderables on my HTML | python|html|wagtail | 0 | 40 | 1 | 72,849,026 | 72,849,026 | 1 | true | 2022-07-03T05:03:13.397Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Wagtail - Can't render orderables on my HTML<p>I want to extract the name of my snippets to put it on my blog in the form of a list, but they just don't appe... |
72,849,671 | Multiplication going wrong<p>I have a lot of data and I want to make an account with them. I calculate x, then y. When I calculate x times y, the count is going wrong, why?? Sounds like something simple, where did I multiply it wrong, please?</p>
<p><a href="https://i.stack.imgur.com/1PTlv.png" rel="nofollow noreferrer... | <p>It seems that you did</p>
<pre><code>print('x=',(1/um)*x)
</code></pre>
<p>and</p>
<pre><code>print('y=',(1/um)*y)
</code></pre>
<p>Then, when you multiplied x*y, you actually multiplied different values in comparison to what you printed.</p>
<p>As I understand, for it to be correct you would need something like</p>... | Multiplication going wrong | python|math | -1 | 40 | 1 | 72,849,752 | 72,849,752 | 1 | true | 2022-07-03T20:26:39.497Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Multiplication going wrong<p>I have a lot of data and I want to make an account with them. I calculate x, then y. When I calculate x times y, the count is go... |
72,836,147 | Using sklearn's toarray method results in the use of all RAM<p>In the following code on Google Colab when it reaches to the <code>toarray</code> method, it uses all the RAM. I looked for an answer and it's been suggested the use of <code>HashingVectorizer</code>.
How can I implement it in the following code?</p>
<p>The... | <p>Just don't use <code>toarray</code>. The output of the count vectorizer is a sparse matrix, which <code>MultinomialNB</code> should handle fine it seems.</p>
<p>If you really want to use hashing, you should just be able to replace <code>CountVectorizer</code> by <code>HashingVectorizer</code>.</p> | Using sklearn's toarray method results in the use of all RAM | python|scikit-learn|toarray | 0 | 40 | 1 | 72,851,115 | 72,851,115 | 1 | true | 2022-07-02T02:56:23.487Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Using sklearn's toarray method results in the use of all RAM<p>In the following code on Google Colab when it reaches to the <code>toarray</code> method, it u... |
72,851,891 | Toggle icon symbol on click using js<p>In this menu, I'm trying to change the "+" symbol to "-" on click, but I don't know how to proceed. It will be a button that I'll change to custom icons later...</p>
<p>html</p>
<pre><code><header id="header">
<div class="header-co... | <p>All you got to do is use <code>innerText</code> on your <code>btn-mobile</code></p>
<pre><code>const btnMobile = document.getElementById('btn-mobile');
function toggleMenu() {
const nav = document.getElementById('nav');
const btnMobile = document.getElementById('btn-mobile');
nav.classList.toggle('active');
... | Toggle icon symbol on click using js | javascript|html | 0 | 40 | 2 | 72,851,929 | 72,851,929 | 1 | true | 2022-07-04T04:51:34.200Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Toggle icon symbol on click using js<p>In this menu, I'm trying to change the "+" symbol to "-" on click, but I don't know how to proceed... |
72,854,202 | How to add dropdown menu to another dropdown?<p>I want to create a class for adding dropdown to menu even in the other dropdowns. I almost did it, but there is a problem and when I try to close the inner drop-down, the outer drop-down also closes.</p>
<p>When you click on secondary dropdown the first one will also clos... | <p>The main issue is because the event is propagating up the DOM, so although you click to toggle the child dropdown, the event is caught by the parent which then toggles and hides. To fix this problem, amend your click handler function to receive the event as an argument, then call <code>stopPropagation()</code> on it... | How to add dropdown menu to another dropdown? | javascript|html|jquery|css | 1 | 40 | 1 | 72,854,284 | 72,854,284 | 1 | true | 2022-07-04T09:02:55.333Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to add dropdown menu to another dropdown?<p>I want to create a class for adding dropdown to menu even in the other dropdowns. I almost did it, but there ... |
72,855,518 | Custom Resource Lambda should run on Create but instead runs on first Update<p>As per the AWS documentation <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/crpg-ref-requests.html#crpg-ref-request-fields" rel="nofollow noreferrer">here</a> (See: RequestType) a custom Lambda function can be trigge... | <p>The Lambda-backed custom resources are triggered, as you mentioned, in the <code>create-stack</code>, <code>update-stack</code>, and <code>delete-stack</code> operations.</p>
<p>But they are triggered for each custom resource that is part of your template.</p>
<p>That means that when you add a new <code>Custom::</co... | Custom Resource Lambda should run on Create but instead runs on first Update | amazon-web-services|amazon-cloudformation|aws-cloudformation-custom-resource | 0 | 40 | 1 | 72,856,053 | 72,856,053 | 1 | true | 2022-07-04T10:46:42.857Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Custom Resource Lambda should run on Create but instead runs on first Update<p>As per the AWS documentation <a href="https://docs.aws.amazon.com/AWSCloudForm... |
72,849,443 | Multi-plots with insets - R basic plot function<p>I would like to plot multiple raster layers with insets using the basic plot function in R. Ideally, I can do this using the tmap package; however, I do not like the visual appeal of the plotting result with tmap. I want to use tim.color() function from the fields packa... | <p>Using the solution provided for multi plots in this <a href="https://stackoverflow.com/questions/52177564/using-insets-with-multi-panel-plots-base-plot">post</a> and the advice from <a href="https://www.datamentor.io/r-programming/subplot/" rel="nofollow noreferrer">here</a> I was able to find a solution to my probl... | Multi-plots with insets - R basic plot function | r|plot | 1 | 40 | 1 | 72,858,982 | 72,858,982 | 1 | true | 2022-07-03T19:47:54.997Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Multi-plots with insets - R basic plot function<p>I would like to plot multiple raster layers with insets using the basic plot function in R. Ideally, I can ... |
72,867,430 | How to replace "array elements" of a numpy.ndarray with respect to a condition without using explicit loops?<p>I have a three dimensional <code>numpy.ndarray</code> with shape (5, 4, 3) and I would like to replace some of the arrays with three elements inside my array by another one. For instance, I would like to repla... | <p>You need find index of <code>[3,3,3]</code> for this you can use <code>all(axis=-1)</code>, then replace with <code>[0,0,0]</code>:</p>
<pre><code>row, col = np.where((c==3).all(-1))
c[row, col] = [0,0,0]
print(c)
</code></pre>
<p>Output:</p>
<pre><code>[[[0 0 0]
[2 2 2]
[0 0 0]
[4 4 4]]
[[1 1 1]
[2 2 2]
... | How to replace "array elements" of a numpy.ndarray with respect to a condition without using explicit loops? | python|arrays|numpy|performance | -1 | 40 | 1 | 72,867,767 | 72,867,767 | 1 | true | 2022-07-05T09:56:56.850Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to replace "array elements" of a numpy.ndarray with respect to a condition without using explicit loops?<p>I have a three dimensional <code>numpy.ndarray... |
72,867,258 | r plot binary and numerical variables in same plot<p>I am looking to plot binary variable and numerical variable in the same plot. I have tried but the y axis seems to just be the Binary scale.
<a href="https://i.stack.imgur.com/JohNu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JohNu.png" alt="en... | <p>It is maybe not completely what you want, but you can make a "conditional density plot" using <code>cdplot</code>. These plots provide an overview of how a categorical variable (Lowt and Hit) change across various levels of a continuous variable (SID). First you need to modify you data a bit where the Lowt... | r plot binary and numerical variables in same plot | r|plot|binary | 0 | 40 | 2 | 72,867,775 | 72,867,775 | 1 | true | 2022-07-05T09:44:19.223Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
r plot binary and numerical variables in same plot<p>I am looking to plot binary variable and numerical variable in the same plot. I have tried but the y axi... |
72,870,875 | Deactivate a region of range slider<p>I'd like to show on my range slider 0 to 300 but only allow the user to select from 80 to 300</p>
<pre class="lang-dart prettyprint-override"><code>
RangeSlider(
min: 0.0,
max: 300.0,
divisions: 10,
labels: RangeLabels(
_startValue.round().toString(),
_endValue.roun... | <p>You can check start value on <code>onChanged</code> and stop user from going <80.</p>
<pre class="lang-dart prettyprint-override"><code>onChanged: (values) {
if (values.start < 80) return;
setState(() {
_startValue = values.start;
_endValue = values.end;
});
},
</code></pre> | Deactivate a region of range slider | flutter|dart | 1 | 40 | 3 | 72,870,946 | 72,870,946 | 1 | true | 2022-07-05T14:10:20.573Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Deactivate a region of range slider<p>I'd like to show on my range slider 0 to 300 but only allow the user to select from 80 to 300</p>
<pre class="lang-dart... |
72,873,442 | Why can't I delete the first element of my array? (React JS)<p>I have a series of checkboxes that when clicked will populate an array with the id of that checkbox. When unclicked it will remove the id from the array and so forth. It all works well except for one strange behavior. Whatever the first checkbox I click (wh... | <p>You'd want to set the state again in that <code>else</code> rather than simply splicing the array in state. I've made a couple of modifications to the code.</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang... | Why can't I delete the first element of my array? (React JS) | javascript|reactjs|arrays|events|indexof | 0 | 40 | 3 | 72,873,548 | 72,873,548 | 1 | true | 2022-07-05T17:32:15.903Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why can't I delete the first element of my array? (React JS)<p>I have a series of checkboxes that when clicked will populate an array with the id of that che... |
72,875,771 | plots.jl heatmap does not preserve orientation<p>I'm trying to use the heatmap function fro plots.jl as a simple means to visualize small grayscale pixel grids. But I've discovered that this function does not preserve the orientation of the matrix it plots. For example:</p>
<pre><code>julia> using Random, Plots
j... | <p>use the <code>yflip</code> keyword argument:</p>
<pre><code>heatmap(mymatrix, color=:greys, yflip=true)
</code></pre> | plots.jl heatmap does not preserve orientation | julia|julia-plots | 1 | 40 | 1 | 72,875,862 | 72,875,862 | 1 | true | 2022-07-05T21:32:01.350Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
plots.jl heatmap does not preserve orientation<p>I'm trying to use the heatmap function fro plots.jl as a simple means to visualize small grayscale pixel gri... |
72,879,490 | React.js handler function doesnt set state immediately<p>Simply wanted to do dynamic modal . When i click the button it works but doesnt set state immediately. First console.log returns empty array. Others work properly.</p>
<p>//State and handler</p>
<pre><code>const [showModal, setShowModal] = React.useState([])
con... | <p><strong>Two</strong> things you need to know about the <strong>state update</strong> in React:</p>
<ul>
<li>State is updated asynchronously</li>
<li>In any particular render, state and props don't change, changes are
only reflected when component re-renders</li>
</ul>
<p>If you want to log the updated value of <code... | React.js handler function doesnt set state immediately | javascript|reactjs | -1 | 40 | 1 | 72,879,736 | 72,879,736 | 1 | true | 2022-07-06T07:32:06.443Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
React.js handler function doesnt set state immediately<p>Simply wanted to do dynamic modal . When i click the button it works but doesnt set state immediatel... |
72,880,298 | Recursion error with if statement when changing items in PYQT5 table python<p>I have a table in pyqt5 and when I modify a cell I call a method(changeIcon), inside this method I use an if statement to check which column has been changed and based on the column I change some items, everytime I modify the column 3 and 4 i... | <p>I find out why it returned that error , everytime I change the item of the column 3 or 4 it gives a signal and calls this method, so when I try to change the column 4 automatically the column 3 changes based on column 4, but when the columns 3 changes the column 4 changes as well, this for infinte times. The solutio... | Recursion error with if statement when changing items in PYQT5 table python | python|pyqt5|recursionerror | -1 | 40 | 1 | 72,880,786 | 72,880,786 | 1 | true | 2022-07-06T08:35:49.113Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Recursion error with if statement when changing items in PYQT5 table python<p>I have a table in pyqt5 and when I modify a cell I call a method(changeIcon), i... |
72,879,190 | how to add additional query after link path<p>I am sending link to email address for password reset functionality and after sometime i want this link to expire. for that i have created a token(which is encrytped using a key) and expire-date and i want to put these as query in my email link but i don't know to do it.
th... | <p>Here is my suggestion, instead of adding expiration token query parameters with URL manage this at your method action level i.e.</p>
<ol>
<li><p>You already have the information that which login is going to this URL. All you have to do is that before sending this URL via email, make a separate temp table that will h... | how to add additional query after link path | c#|html|asp.net-mvc | 0 | 40 | 1 | 72,881,186 | 72,881,186 | 1 | true | 2022-07-06T07:04:00.313Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to add additional query after link path<p>I am sending link to email address for password reset functionality and after sometime i want this link to expi... |
72,882,439 | React redux update a list of objects nested objects<p>Im trying to create this structure in my redux store,
havea feature to add a user,struggling to update the structure to add cars to a user ,
im passing object think i need to do a map on state but its not working correctly</p>
<p><div class="snippet" data-lang="js... | <p>I think you should specify to which user you want to add car to. Your ADD_CAR payload can look like this:</p>
<pre><code>{ userId, carOptions: { model: "Porsche", year: "2009" } }
</code></pre>
<p>In reducer you will first find the user by userId and then add car to this user, smth like this:</p>... | React redux update a list of objects nested objects | javascript|reactjs|object|redux|spread | 0 | 40 | 1 | 72,882,580 | 72,882,580 | 1 | true | 2022-07-06T11:02:14.030Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
React redux update a list of objects nested objects<p>Im trying to create this structure in my redux store,
havea feature to add a user,struggling to update... |
72,884,573 | Change cell value by comparing to cell above<p>I have the following dataframe:</p>
<pre><code>ID year level
1 2000 NA
1 2001 3
1 2002 3
1 2003 2
1 2004 1
2 2000 1
2 2001 3
2 2002 3
2 2003 3
2 2004 3
</code></pre>
<p>I want to update each value in "level" column by ID based on the previous ... | <pre class="lang-r prettyprint-override"><code>library(data.table)
df <- data.frame(
ID = c(1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L),
year = c(2000L,2001L,2002L,2003L,2004L,
2000L,2001L,2002L,2003L,2004L),
level = c(NA, 3L, 3L, 2L, 1L, 1L, 1L, 1L, 1L, 1L)
)
setDT(df)[!... | Change cell value by comparing to cell above | r|dataframe|data.table | 2 | 40 | 2 | 72,884,750 | 72,884,750 | 1 | true | 2022-07-06T13:38:49.113Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Change cell value by comparing to cell above<p>I have the following dataframe:</p>
<pre><code>ID year level
1 2000 NA
1 2001 3
1 2002 3
1 2003 2
1 2... |
72,883,629 | Ansible: Need help in manipulating with date and time<p>Example:</p>
<pre><code>12:02:43.569 UTC Wed Jul 06 2022
</code></pre>
<p>I wish to get an ansible script to go back 15 minutes from the above timing</p>
<pre class="lang-yaml prettyprint-override"><code>---
- name: Cisco NXOS
hosts: all
connection: network... | <p>For example, neglecting microseconds,</p>
<pre class="lang-yaml prettyprint-override"><code>- debug:
msg: |
{{ arr.0 }}
{{ t1 }}
{{ t2 }}
{{ t3 }}
vars:
t1: "{{ (arr.0|to_datetime('%H:%M:%S.%f %Z %a %b %d %Y')).strftime('%s') }}"
t2: "{{ t1|int - 15 * 60 }}"
... | Ansible: Need help in manipulating with date and time | ansible | 1 | 40 | 1 | 72,886,694 | 72,886,694 | 1 | true | 2022-07-06T12:32:27.453Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Ansible: Need help in manipulating with date and time<p>Example:</p>
<pre><code>12:02:43.569 UTC Wed Jul 06 2022
</code></pre>
<p>I wish to get an ansible sc... |
72,889,931 | using includes in React with arrays<p>I've done a few apollo queries in react and I'm trying to run an includes check against them. It however it always comes up false in the console log. Here's my code:</p>
<pre><code>const onSubmit = (data: any) => {
console.log (data1)
console.log(data2)
console.log(data2.item)
c... | <p>Include will check to see if the objects are the same by reference value. You can check if an entry's item is matching by using <code>some</code>.</p>
<pre class="lang-js prettyprint-override"><code>console.log(data1.some(d => d.item === data2.item));
</code></pre> | using includes in React with arrays | javascript | 0 | 40 | 1 | 72,889,993 | 72,889,993 | 1 | true | 2022-07-06T21:15:39.787Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
using includes in React with arrays<p>I've done a few apollo queries in react and I'm trying to run an includes check against them. It however it always come... |
72,891,713 | how to draw a flag using ImageMagic<p>I am trying to create flag image files from the command line that look something like this:
<a href="https://i.stack.imgur.com/31buf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/31buf.png" alt="enter image description here" /></a></p>
<p>Having 5 or 4 rectangl... | <p>This command will make a flag of simple horizontal stripes, evenly spaced...</p>
<pre><code>convert xc:#36399A xc:#EF1897 xc:#FEDF12 xc:#FFFFFF xc:#A77BCA -append -scale 1800x900! +repage flag.png
</code></pre>
<p>That creates a single pixel of each color in the flag, appends them vertically, and scales the result t... | how to draw a flag using ImageMagic | imagemagick|imagemagick-convert | 0 | 40 | 1 | 72,891,976 | 72,891,976 | 1 | true | 2022-07-07T02:37:01.637Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to draw a flag using ImageMagic<p>I am trying to create flag image files from the command line that look something like this:
<a href="https://i.stack.im... |
72,861,613 | Why ajax is showing me 0 on the screen when backend flask return str(0) and str(2) value of a function?<p>Hello I am developing an OTP device verification system.
How does it works:
user enters his credentials, like phone number and password and after that ajax calls <code>/signin</code> function from backend which ver... | <p>First remove that form tags in sign-in form and then replace the javascript function with this</p>
<pre><code>function ValidatePassword() {
var mobileno = $('#lmobileno').val();
var password = $('#password').val();
if (validate_mobile(mobileno)==true && password != null) {
$('#overlay').f... | Why ajax is showing me 0 on the screen when backend flask return str(0) and str(2) value of a function? | javascript|python|flask | 0 | 40 | 2 | 72,896,834 | 72,896,834 | 1 | true | 2022-07-04T20:12:17.927Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why ajax is showing me 0 on the screen when backend flask return str(0) and str(2) value of a function?<p>Hello I am developing an OTP device verification sy... |
72,898,331 | Python namedtuples elementwise addition<p>Is there a more pythonic way to implement elementwise addition for named tuples?</p>
<p>Using this class that inherits from a namedtuple generated class named "Point I can do elementwise addition for this specific named tuple.</p>
<pre><code> class Point(namedtuple(&quo... | <p>This is a possible solution:</p>
<pre><code>class Point(namedtuple("Point", "x y")):
def __add__(self, other):
return Point(**{field: getattr(self, field) + getattr(other, field)
for field in self._fields})
</code></pre> | Python namedtuples elementwise addition | python|inheritance|namedtuple|elementwise-operations | 1 | 40 | 2 | 72,898,656 | 72,898,656 | 1 | true | 2022-07-07T13:03:36.640Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python namedtuples elementwise addition<p>Is there a more pythonic way to implement elementwise addition for named tuples?</p>
<p>Using this class that inher... |
72,900,356 | How to fix TypeError: a bytes-like object is required, not 'str'<p>I'm having a python error but I don't know how to fix it. Here is the error message I'm getting:</p>
<pre><code>Traceback (most recent call last):
File "/home/Documents/venvs/socket_search.py", line 21, in <module>
main()
File &... | <p>Your function returns a <a href="https://docs.python.org/3/c-api/bytes.html" rel="nofollow noreferrer">bytes</a> object and you are using the <a href="https://docs.python.org/3/library/stdtypes.html?highlight=strip#str.strip" rel="nofollow noreferrer">strip</a> method which required a str. If you simply convert tha... | How to fix TypeError: a bytes-like object is required, not 'str' | python | -1 | 40 | 1 | 72,900,530 | 72,900,530 | 1 | true | 2022-07-07T15:16:22.507Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to fix TypeError: a bytes-like object is required, not 'str'<p>I'm having a python error but I don't know how to fix it. Here is the error message I'm ge... |
72,896,248 | Filled area in 3d in gnuplot<p>I am plotting a 3D heat map in gnuplot. I would like to plot a filled area on top of it.
The datafile looks the following</p>
<pre><code>118.01363 0.31794
139.62999 0.31216
173.51509 0.30177
210.90555 0.28675
244.79065 0.26942
268.15969 0.25209
293.86563 0.23764
318.40312 ... | <p>The plot style <code>with polygons</code> works in both 2D and 3D plots. You can provide a constant z value of zero or some other value to make sure the polygon sits in front of or behind whatever else is in the plot.</p>
<pre><code>$Data << EOD
118.01363 0.31794
139.62999 0.31216
173.51509 0.30177
210.9... | Filled area in 3d in gnuplot | gnuplot | 0 | 40 | 2 | 72,901,166 | 72,901,166 | 1 | true | 2022-07-07T10:31:14.887Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Filled area in 3d in gnuplot<p>I am plotting a 3D heat map in gnuplot. I would like to plot a filled area on top of it.
The datafile looks the following</p>
... |
72,807,124 | Server controlled Maintenance Screen in Flutter (Firebase as Backend)<p>So i have a question... is it possible, that I can implement a maintenance screen to my app when I need it?</p>
<p>So like, that the App is checking status from the server and when the Value is at maintenance for example, the App loads to the maint... | <p>I was able to achieve this using GetX. I store a boolean in the DB and have a Hasura subscription on it. As soon as it changes, the following controller gets called and the routing is being done.</p>
<pre><code>class MaintenanceController extends GetxController {
RxBool isMaintenance = false.obs;
@overr... | Server controlled Maintenance Screen in Flutter (Firebase as Backend) | flutter|firebase | 1 | 40 | 1 | 72,901,615 | 72,901,615 | 1 | true | 2022-06-29T19:54:36.773Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Server controlled Maintenance Screen in Flutter (Firebase as Backend)<p>So i have a question... is it possible, that I can implement a maintenance screen to ... |
72,902,829 | Modal keeps on closing automatically with onClick Event in ReactJs<p>I made a menu to display options. The code was working fine before. I copied it from a udemy course. He used the same code. Now all of sudden it is not working anymore. It keeps on hiding the menu whenever I try to open it. I cant seem to find the bug... | <p>I did some fixes in your <a href="https://codesandbox.io/s/naughty-silence-vsvtyo?file=/src/App.js" rel="nofollow noreferrer">codesandbox</a>. Let me explain what I did.
The problem is that a click on button propagates down to your custom component and it catches a click event, which closes your modal. To fix that, ... | Modal keeps on closing automatically with onClick Event in ReactJs | reactjs | 0 | 40 | 3 | 72,903,462 | 72,903,462 | 1 | true | 2022-07-07T18:48:16.113Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Modal keeps on closing automatically with onClick Event in ReactJs<p>I made a menu to display options. The code was working fine before. I copied it from a u... |
72,904,904 | How to live count input if value is entered or active by using javascript<p>I want to count the input after it is filled with numbers, but if it is not filled then the input is not counted.</p>
<p>I tried using the following HTML</p>
<pre><code><input type="number" class="myclass" value="4&q... | <p>With <code>document.getElementsByClassName('myclass').length</code> you get the length of the array with HTMLNodes. If you have 4 elements with that class name then you get a length of 4. Maybe this is what you want:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">... | How to live count input if value is entered or active by using javascript | javascript | 0 | 40 | 1 | 72,905,217 | 72,905,217 | 1 | true | 2022-07-07T22:33:19.140Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to live count input if value is entered or active by using javascript<p>I want to count the input after it is filled with numbers, but if it is not fille... |
72,898,871 | How to get NodeRef of specific folder in Alfresco share using javascript?<p>I am working on Alfresco project for some time. This is my first time facing Alfresco, so the help will be useful.
I need to get a nodeRef of specific folder from one site using JavaScript.
I have not prepare any code, sorry for that, but I hav... | <p>I suggest you install <a href="https://github.com/share-extras/js-console" rel="nofollow noreferrer">js-console</a> first, which gives you an interactive javascript console in Share's Admin-Tools. The js-console supports autocomplete (ctl-space) like a IDE and is the best way to learn and implement js in Alfresco.</... | How to get NodeRef of specific folder in Alfresco share using javascript? | javascript|alfresco|alfresco-share|alfresco-webscripts | 0 | 40 | 1 | 72,907,874 | 72,907,874 | 1 | true | 2022-07-07T13:39:32.620Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to get NodeRef of specific folder in Alfresco share using javascript?<p>I am working on Alfresco project for some time. This is my first time facing Alfr... |
72,914,639 | having problem when I want to put image inside input<p>why I can't put an image inside input with positions???</p>
<p>input right now:</p>
<p><a href="https://i.stack.imgur.com/85qK9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/85qK9.png" alt="enter image description here" /></a></p>
<pre><code>&l... | <p>this should do the trick</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-css lang-css prettyprint-override"><code> .password-container {
position: relative;
}
.main-input {
/* box-shadow: inset 0 0... | having problem when I want to put image inside input | html|css | 0 | 40 | 3 | 72,914,752 | 72,914,752 | 1 | true | 2022-07-08T16:55:14.020Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
having problem when I want to put image inside input<p>why I can't put an image inside input with positions???</p>
<p>input right now:</p>
<p><a href="https:... |
72,914,254 | Hugo: Escape special Characters in taxonomy (tag) paths<p>I have post tags like <code>C#</code> and <code>F#</code>. Similar cases also show up in titles.</p>
<p>The problem is that Hugo does not appear to support # in a url. Such pages 404 and fail my Netlify build.
With content pages, I can set an explicit url to get... | <p>You can set-up specific URL for almost anything in Hugo. To set-up a different URL for those tags:</p>
<ol>
<li>Create a file: <code>./content/tags/C#/_index.md</code></li>
<li>Set the following in it's frontmatter (YAML assumed):</li>
</ol>
<pre><code>url: "/tags/c-sharp"
</code></pre> | Hugo: Escape special Characters in taxonomy (tag) paths | netlify|hugo | 0 | 40 | 1 | 72,915,837 | 72,915,837 | 1 | true | 2022-07-08T16:17:13.200Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Hugo: Escape special Characters in taxonomy (tag) paths<p>I have post tags like <code>C#</code> and <code>F#</code>. Similar cases also show up in titles.</p... |
72,916,153 | How to determine git remote name by giving the repo URL?<p>I'm trying to get the remote name of the giving URL:</p>
<pre><code>$ git ls-remote --get-url
git@github.com:foo/bar.git
</code></pre>
<pre><code>$ git remote -v
origin git@github.com:my-username/bar.git (fetch)
origin git@github.com:my-username/bar.git (pu... | <p>I'm not aware of a way to do this directly with git, but you could pipe the result into a grep and format it:</p>
<pre class="lang-bash prettyprint-override"><code>git remote -v | grep "git@github.com:foo/bar.git" | cut -f1 | head -1
</code></pre> | How to determine git remote name by giving the repo URL? | git|shell|github|version-control|git-remote | 1 | 40 | 1 | 72,916,215 | 72,916,215 | 1 | true | 2022-07-08T19:27:18.233Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to determine git remote name by giving the repo URL?<p>I'm trying to get the remote name of the giving URL:</p>
<pre><code>$ git ls-remote --get-url
git... |
72,921,814 | Adjust number of fields of the form based on the argument in the view<p>I have a form with 4 fields.</p>
<pre><code>class data_collect_form(forms.Form):
data_entry1 = forms.IntegerField(widget = forms.NumberInput(attrs={"class":"form-control","initial":0}))
data_entry2 = forms.Inte... | <p>should be pretty straight forward like this:</p>
<pre><code>number_of_fields = 3
form2 = data_collect_form(number_of_fields)
</code></pre>
<p>init for class data_collect_form</p>
<pre><code>def __init__(self, number_of_fields, *args, **kwargs):
super(data_collect_form, self).__init__(*args, **kwargs)
if num... | Adjust number of fields of the form based on the argument in the view | python|django|django-views|django-forms | 0 | 40 | 1 | 72,922,454 | 72,922,454 | 1 | true | 2022-07-09T13:37:40.820Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Adjust number of fields of the form based on the argument in the view<p>I have a form with 4 fields.</p>
<pre><code>class data_collect_form(forms.Form):
... |
72,923,415 | find number of hours gap when no one is working<p>i have a table <a href="https://i.stack.imgur.com/aggfg.png" rel="nofollow noreferrer">view of table</a>
taking scenario of a hotel that works 24/7 non stop, i want to calculate total number of hours in a month when no one is present .</p>
<p>in image you can see we hav... | <p>You can generate the shifts and then find the shifts where no-one worked:</p>
<pre class="lang-sql prettyprint-override"><code>WITH shifts (shift_start) AS (
SELECT DATE '2022-07-01' + INTERVAL '6' HOUR + INTERVAL '8' HOUR * (LEVEL - 1)
FROM DUAL
CONNECT BY
DATE '2022-07-01' + INTERVAL '6' HOUR + IN... | find number of hours gap when no one is working | sql|oracle | -1 | 40 | 1 | 72,923,672 | 72,923,672 | 1 | true | 2022-07-09T17:28:24.690Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
find number of hours gap when no one is working<p>i have a table <a href="https://i.stack.imgur.com/aggfg.png" rel="nofollow noreferrer">view of table</a>
ta... |
72,925,011 | Use .map not flatlist with activityIndicator in react native<p>I am getting a list of data using <code>map</code> not <code>flatlist</code>, I want to use .map not flatlist, when I apply ActivityIndicator to it while fetching the data, it did not work see below</p>
<p><strong>Below is my code</strong></p>
<pre><code>&l... | <p>Try using a boolean for your conditional render such as a loading state which you can easily toggle on and off at the beginning of the fetch and at the end respectively. You can also state the logic of your map outside of your component so it looks way cleaner and easy to read like this example:</p>
<pre><code>impor... | Use .map not flatlist with activityIndicator in react native | react-native|activity-indicator | 0 | 40 | 1 | 72,925,209 | 72,925,209 | 1 | true | 2022-07-09T22:28:16.223Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Use .map not flatlist with activityIndicator in react native<p>I am getting a list of data using <code>map</code> not <code>flatlist</code>, I want to use .m... |
72,924,436 | (Assembly Language) I'm trying to get a string to move across the screen 5 times before stopping<p>As the title states, I'm using assembly language to try to get a text to move left to right 5 times. I've pasted my code below. As of right now, what happens is it moves left to right 4 and a half times, starts over at th... | <blockquote>
<p>what happens is it moves left to right 4 and a half times, starts over at the very left and it repeats infinity times.</p>
</blockquote>
<p>I don't see where you get that '4 and a half times'. The infinite behaviour starts right away.</p>
<blockquote>
<pre><code>dem: mov cx,5
push cx
</code></pre... | (Assembly Language) I'm trying to get a string to move across the screen 5 times before stopping | loops|assembly|x86-16|bios | 1 | 40 | 1 | 72,928,004 | 72,928,004 | 1 | true | 2022-07-09T20:30:12.510Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
(Assembly Language) I'm trying to get a string to move across the screen 5 times before stopping<p>As the title states, I'm using assembly language to try to... |
72,929,005 | Prevent Scrollable Widget scroll out of top in Flutter<p>Sorry because I don't know how to explain this behavior exactly in English. So I give a gif image for easy understanding.</p>
<p>I want to avoid/ prevent seeing white background when scrolling over the top of SingleChildScrollView.</p>
<p>These are my code for th... | <p>To the SingleChildScrollView add</p>
<pre><code>physics : ClampingScrollPhysics(),
</code></pre>
<p>For more info about scrollphysics check <a href="https://api.flutter.dev/flutter/widgets/ScrollPhysics-class.html" rel="nofollow noreferrer">this</a></p> | Prevent Scrollable Widget scroll out of top in Flutter | flutter|dart|flutter-layout|flutter-animation | 0 | 40 | 1 | 72,929,147 | 72,929,147 | 1 | true | 2022-07-10T13:53:26.307Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Prevent Scrollable Widget scroll out of top in Flutter<p>Sorry because I don't know how to explain this behavior exactly in English. So I give a gif image fo... |
72,926,549 | Angular Material button change colour based on server response<p>I am trying to change the colour of the button based on some conditions. But for some reason it is not getting applied.
My template code</p>
<pre><code><div class="button-wrap text-center">
<button ma... | <p>You are applying in wrong way the condition. Your condition is always true, because, 'START' always return true, since you do not compare with anything.</p>
<pre><code>// false || true is always true.
job_status.get(data.id) == 'NEW' || 'START'? 'primary' : 'warn'"
</code></pre>
<p>Solution:</p>
<pre><code>job_... | Angular Material button change colour based on server response | angular|angular-material | -1 | 40 | 1 | 72,929,743 | 72,929,743 | 1 | true | 2022-07-10T06:29:10.673Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Angular Material button change colour based on server response<p>I am trying to change the colour of the button based on some conditions. But for some reason... |
72,935,475 | Replace DNA nucleotide at given position in DNA sequence using for loop<p>In the R data frame, I am trying to replace mutation column DNA nucleotide into WT.seq using position column numbers.</p>
<p>Following is my data frame</p>
<pre><code> transcript position ref mutation type WT.seq
1 trx1 5 A ... | <p>You could <code>strsplit</code>, <code>replace</code> position with mutation in <code>Map</code> and <code>paste</code> back together.</p>
<pre><code>transform(dat, WT.mut=Map(replace, strsplit(WT.seq, ''), position, mutation) |>
sapply(paste, collapse=''))
# transcript position ref mutation type W... | Replace DNA nucleotide at given position in DNA sequence using for loop | python|r|dataframe | 1 | 40 | 1 | 72,935,524 | 72,935,524 | 1 | true | 2022-07-11T08:08:17.077Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Replace DNA nucleotide at given position in DNA sequence using for loop<p>In the R data frame, I am trying to replace mutation column DNA nucleotide into WT.... |
72,935,002 | I got a query error when calling the user login in django<p>views.py</p>
<pre><code>from .models import Profile
@login_required(login_url='/signin')
def settings(request):
user_profile=Profile.objects.get(user=request.user)
return render(request,'setting.html',{'user_profile':user_profile})
</code></pre>
<p>I t... | <p>There may be a <code>User</code> instance for the user you are trying to log in as, however that does not mean there is a <code>Profile</code> present as well. You need to make sure every <code>User</code> has a profile. There are a few ways to do it:</p>
<ol>
<li>(Recommended) Override the <code>save()</code> metho... | I got a query error when calling the user login in django | django|django-models | 0 | 40 | 1 | 72,935,582 | 72,935,582 | 1 | true | 2022-07-11T07:23:39.313Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I got a query error when calling the user login in django<p>views.py</p>
<pre><code>from .models import Profile
@login_required(login_url='/signin')
def sett... |
72,940,115 | Applying Filter to Multi Dimensional Numpy Array ,eg: Cifar10 Data<pre><code>from keras.datasets import cifar10
# load dataset
(trainX, trainy), (testX, testy) = cifar10.load_data()
# summarize loaded dataset
print('Train: X=%s, y=%s' % (trainX.shape, trainy.shape))
print('Test: X=%s, y=%s' % (testX.shape, testy.shape)... | <p>what you're looking for is <code>np.where()</code>. see the code</p>
<pre><code>TrainX = TrainX[np.where(trainMask)]
TestX = TestX[np.where(testMask)]
</code></pre> | Applying Filter to Multi Dimensional Numpy Array ,eg: Cifar10 Data | python|numpy | -1 | 40 | 2 | 72,940,673 | 72,940,673 | 1 | true | 2022-07-11T14:24:54.097Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Applying Filter to Multi Dimensional Numpy Array ,eg: Cifar10 Data<pre><code>from keras.datasets import cifar10
# load dataset
(trainX, trainy), (testX, test... |
72,940,613 | Bash how to edit a variable<p>I am new to using bash. Now I am about to read a value, but the output of the console is too long and I just want to shorten it to the specific value.</p>
<pre><code>netstat -m
24270/3315/27585 mbufs in use (current/cache/total)
4142/1724/5866/1000000 mbuf clusters in use (current/cache/t... | <p>What about this:</p>
<pre><code>mbuf=$(netstat -m | grep "mbuf clusters in use" | awk -F/ '{print $3}')
</code></pre>
<p>The difference with the answer from <a href="https://stackoverflow.com/users/1491895/barmar">Barmar</a> is that I'm looking for the line, containing "mbuf clusters in use" inst... | Bash how to edit a variable | bash | 0 | 40 | 4 | 72,940,700 | 72,940,700 | 1 | true | 2022-07-11T15:01:13.153Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Bash how to edit a variable<p>I am new to using bash. Now I am about to read a value, but the output of the console is too long and I just want to shorten it... |
72,942,417 | self join table to get hierarchy for specific root node<p>Im using postgresql db and i want to use sql get the children of the root node '0' (including the root node) of the table below. Most examples online show how to get all the hierarchies (thats easy with self-join).</p>
<p>However i want to inform the root (say '... | <p>You want to use a <a href="https://www.postgresql.org/docs/current/queries-with.html#QUERIES-WITH-RECURSIVE" rel="nofollow noreferrer">recursive CTE</a> to do to this. They are complicated to wrap your head around, but they are very common solution for a parent/child hierarchy table.</p>
<p>In your case it would loo... | self join table to get hierarchy for specific root node | sql|postgresql | 0 | 40 | 2 | 72,942,517 | 72,942,517 | 1 | true | 2022-07-11T17:24:27.107Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
self join table to get hierarchy for specific root node<p>Im using postgresql db and i want to use sql get the children of the root node '0' (including the r... |
72,938,354 | How to properly escape image path in tailwind.config.js file?<p>I tried adding a background image property to my tailwind.config.js file by writing the path to my image which uses backslashes (am on windows). I tried escaping with double backslashes (\) but it doesn't seems to work. Here's a snippet of my code:
<a href... | <p>I don't think the <code>public</code> folder is needed, as it's considered as the root folder.<br>
You should use regular slashes, no need to put backslashes or escape them. source: <a href="https://tailwindcss.com/docs/background-image#customizing-your-theme" rel="nofollow noreferrer">Tailwind docs</a><br>
Also, is... | How to properly escape image path in tailwind.config.js file? | tailwind-css | 0 | 40 | 2 | 72,944,173 | 72,944,173 | 1 | true | 2022-07-11T12:09:03.593Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to properly escape image path in tailwind.config.js file?<p>I tried adding a background image property to my tailwind.config.js file by writing the path ... |
72,894,866 | Trying to fix arrow on my virtual Google map<p>So, i'm trying - and failing - to fix the right chevron (red arrow) on my virtual Google map popup. I'll try to document all the relevant code but i'm not sure it'll be reproducible without a Google map.</p>
<p>Basically, I want the right chevron to elegantly match the lef... | <p><strong>Position: fixed</strong> to any element will be positioned relative to the viewport. Please use <strong>position: absolute</strong> with added <strong>position : relative</strong> to its parent element to make it work relative to the parent element.</p>
<pre><code>*.glyphicon-chevron-right {
position: fixe... | Trying to fix arrow on my virtual Google map | html|css|twitter-bootstrap|twitter-bootstrap-3 | 0 | 40 | 1 | 72,947,823 | 72,947,823 | 1 | true | 2022-07-07T08:49:46.133Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Trying to fix arrow on my virtual Google map<p>So, i'm trying - and failing - to fix the right chevron (red arrow) on my virtual Google map popup. I'll try t... |
72,949,096 | Calling a method with parameters from main method properly<p>I am in my first week of programming Java and am finding the syntax and errors extremely confusing. I am expected to write the code for the following inputs/output:</p>
<blockquote>
<p>Access: public</p>
<p>Name: evaluateFormula</p>
<p>Return: double</p>
<p>P... | <p>option 1:
you do the method static</p>
<pre><code>public static void evaluateFormula(int valA, int valB) {
</code></pre>
<p>or</p>
<p>option 2:</p>
<p>you create an instance of class Area and call the method in main(...)</p>
<pre><code>public static void main(String[] args)
{
Area a = new Area();
a.evalua... | Calling a method with parameters from main method properly | java | 1 | 40 | 1 | 72,949,124 | 72,949,124 | 1 | true | 2022-07-12T08:18:26.373Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Calling a method with parameters from main method properly<p>I am in my first week of programming Java and am finding the syntax and errors extremely confusi... |
72,944,449 | How can I automate searching strings on a website search tool and record the data in R?<p>I have a dataset of 464 Toronto addresses. The addresses look like this:</p>
<pre><code>raw_data = as.data.frame(c("570 BLOOR ST W TORONTO ON M6G1K1", "10 STAYNER AVE NORTH YORK ON M6B1N4", "1200 WOODBINE ... | <p>A solution without <code>RSelenium</code>. By the way, the last address that you provided does not exist according to the website.</p>
<pre><code>require(tidyverse)
require(httr2)
df <- tibble(
address = c(
"570 BLOOR ST W TORONTO ON M6G1K1",
"10 STAYNER AVE NORTH YORK ON M6B1N4",
... | How can I automate searching strings on a website search tool and record the data in R? | r|web-scraping | 0 | 40 | 2 | 72,949,889 | 72,949,889 | 1 | true | 2022-07-11T20:42:50.957Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I automate searching strings on a website search tool and record the data in R?<p>I have a dataset of 464 Toronto addresses. The addresses look like ... |
72,952,890 | Code works the long way but not as function<p>I have a dice program which I have programmed two different ways. One way is long, that is I have repeated code, and it works fine. When I try and put the repeated code into a function, the program no longer works when a double is rolled. This is the code that works;</p>
<p... | <p>exactly like <a href="https://stackoverflow.com/users/4815530/macko">Macko</a> suggested above (15 seconds before me :) ), the variable <code>dice1</code> and <code>dice2</code> inside the function <code>doubles_roll()</code> cannot be accessed outside the function where they are generated, for using them you have ... | Code works the long way but not as function | python|function|dice | 0 | 40 | 2 | 72,953,061 | 72,953,061 | 1 | true | 2022-07-12T13:11:42.640Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Code works the long way but not as function<p>I have a dice program which I have programmed two different ways. One way is long, that is I have repeated code... |
72,924,240 | how to save values in wpf after switching combobox (wpf)<p>I have <code>two selections</code> in my ComboBox and 3 <code>RadioButtons</code>. And I want to save my last <code>RadioButton</code>-Selection every time I switch my <code>ComboBox</code>.</p>
<p>So I need following:
I have Item <code>"Test1"</code>... | <p>You could store the mappings between the selected item in the <code>ComboBox</code> and the selected <code>RadioButton</code> in a dictionary. This code should give you the idea:</p>
<pre><code>public partial class MainWindow : Window
{
private readonly Dictionary<string, RadioButton> _items = new Dictiona... | how to save values in wpf after switching combobox (wpf) | c#|wpf|windows | 0 | 40 | 2 | 72,953,733 | 72,953,733 | 1 | true | 2022-07-09T19:58:50.897Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to save values in wpf after switching combobox (wpf)<p>I have <code>two selections</code> in my ComboBox and 3 <code>RadioButtons</code>. And I want to s... |
72,955,370 | REST. Checking the type of incoming field<p>how can I check the field type of the incoming response to the REST request.</p>
<p>For example, I receive an answer with the
"pay" field:"1000"
I want to check that the incoming field, its value is of type int
What verification methods are there?</p> | <p>You can use <a href="https://mvnrepository.com/artifact/io.rest-assured/rest-assured/5.1.1" rel="nofollow noreferrer">Rest Assured</a></p>
<p>Say you have this endpoint: <a href="https://mocki.io/v1/0f2701f8-46ab-48b5-9584-7e58da29498d" rel="nofollow noreferrer">https://mocki.io/v1/0f2701f8-46ab-48b5-9584-7e58da2949... | REST. Checking the type of incoming field | java|rest|unit-testing|cucumber | 0 | 40 | 1 | 72,955,760 | 72,955,760 | 1 | true | 2022-07-12T16:14:48.780Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
REST. Checking the type of incoming field<p>how can I check the field type of the incoming response to the REST request.</p>
<p>For example, I receive an ans... |
72,956,316 | How much space does a null value and an empty value take in postgreSQL?<p>I read on internet that null values take up to 1bit of space but I am unclear about empty values. Please help me in this. Thank-you in advance</p> | <p><a href="https://www.postgresql.org/docs/current/storage-page-layout.html#STORAGE-TUPLE-LAYOUT" rel="nofollow noreferrer">The documentation</a> gives information about that:</p>
<blockquote>
<p>All table rows are structured in the same way. There is a fixed-size header (occupying 23 bytes on most machines), followed... | How much space does a null value and an empty value take in postgreSQL? | sql|database|postgresql | 1 | 40 | 1 | 72,956,550 | 72,956,550 | 1 | true | 2022-07-12T17:35:40.597Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How much space does a null value and an empty value take in postgreSQL?<p>I read on internet that null values take up to 1bit of space but I am unclear about... |
72,956,284 | How to fetch a Map<String, List<bool>> from firestore?<p>I am trying to fetch data from firestore, but I struggle with this part :</p>
<p><a href="https://i.stack.imgur.com/rEEXx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rEEXx.png" alt="enter image description here" /></a></p>
<p>Flutter throw ... | <p>The only thing I can think of is <code>playersAnswers = Map.from(snapshot['playersAnswers'] as Map<String, List<bool>>)</code> because I think <code>Map.from</code> is considering <code>snapshot['playersAnswers']</code> as <code>Map<String, dynamic></code> instead of <code>Map<String, List<bo... | How to fetch a Map<String, List<bool>> from firestore? | flutter|firebase|google-cloud-firestore | 0 | 40 | 1 | 72,957,012 | 72,957,012 | 1 | true | 2022-07-12T17:33:27.717Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to fetch a Map<String, List<bool>> from firestore?<p>I am trying to fetch data from firestore, but I struggle with this part :</p>
<p><a href="https://i.... |
72,954,409 | Flink - Creating TumblingEventTimeWindows on event time<p>I'm trying to create <code>TumblingEventTimeWindows</code> for event time from kafka where records are expected every 1 min. Instead of each minute granularity, I want to down-sample the same for some time frame and I'm trying the below:</p>
<pre><code>val strat... | <p>If the window isn't producing the expected results, then the watermarks aren't becoming large enough to trigger the window. This can be caused by</p>
<ul>
<li>empty or idle kafka partitions (can be solved by using the <code>withIdleness</code> option on the watermark strategy)</li>
<li>some or all of the kafka parti... | Flink - Creating TumblingEventTimeWindows on event time | apache-flink | 0 | 40 | 1 | 72,957,048 | 72,957,048 | 1 | true | 2022-07-12T14:59:08.587Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Flink - Creating TumblingEventTimeWindows on event time<p>I'm trying to create <code>TumblingEventTimeWindows</code> for event time from kafka where records ... |
72,958,020 | How to manually overrule flex property for specified element<p>I have a <code>section</code> in my page which has a <code>h1</code> and 3 <code>div</code>. I set the <code>display</code> property of the <code>section</code> to <code>flex</code>; and so the <code>h1</code> as well as the <code>div</code> aligned themsel... | <p>I would recommend using <code>flex-wrap: wrap</code> in oder to make the rest of the items begin in a new line like that:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-css lang-css prettyprint-override"><code>#... | How to manually overrule flex property for specified element | html|css|flexbox | 0 | 40 | 3 | 72,958,195 | 72,958,195 | 1 | true | 2022-07-12T20:27:48.983Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to manually overrule flex property for specified element<p>I have a <code>section</code> in my page which has a <code>h1</code> and 3 <code>div</code>. I... |
72,901,224 | How to execute PostgreSQL functions with PSQL-specific arguments as stored procedures with Npgsql 6?<p>I'm having some trouble porting C# code from Npgsql 2.2.7 to Npgsql 6.0.5 (PostgreSQL is version 12.x). Following code works just fine with Npgsql 2.2.7:</p>
<pre><code>using (var conn = OpenConnection())
using (var c... | <p>Looked deeper into it and this is unfortunately more complicated than it seems - there's indeed a fundamental issue here.</p>
<p>PG supports two ways of transferring parameter data: text and binary. The binary encoding of <code>regconfig</code> is a simple int (IIRC an oid key in the pg_catalog.pg_ts_config table). ... | How to execute PostgreSQL functions with PSQL-specific arguments as stored procedures with Npgsql 6? | c#|npgsql | 0 | 40 | 1 | 72,961,835 | 72,961,835 | 1 | true | 2022-07-07T16:20:57.713Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to execute PostgreSQL functions with PSQL-specific arguments as stored procedures with Npgsql 6?<p>I'm having some trouble porting C# code from Npgsql 2.... |
72,962,550 | How to loop Options in EJS and not repeating 'selected' like this?<p>How to loop Options in EJS and not repeating options every size is chosen?
if i add more size, the else if statement must be written again</p>
<pre><code><% if (size == "s") {%>
<options value="s" selected>Small</... | <p>use tenary operator</p>
<p>more info here >> <a href="https://www.javascripttutorial.net/javascript-ternary-operator/" rel="nofollow noreferrer">https://www.javascripttutorial.net/javascript-ternary-operator/</a></p>
<pre><code><options value="s" <%= size == "s" ? "selected"... | How to loop Options in EJS and not repeating 'selected' like this? | javascript|node.js|ejs | 0 | 40 | 1 | 72,962,645 | 72,962,645 | 1 | true | 2022-07-13T07:38:07.260Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to loop Options in EJS and not repeating 'selected' like this?<p>How to loop Options in EJS and not repeating options every size is chosen?
if i add more... |
72,960,463 | scrollView depends on content<p>i have o content on my VC: TitleLabel and DescriptionLabel, sometimes i have very long description and it is not placed in my VC, so i decided to add scrollView there. But scroll is not working, and how can i calculate scrollView size depends on description?</p>
<pre><code>lazy var scrol... | <p>To make a dynamic height and vertically scrollable, embed those labels in a view:</p>
<pre class="lang-swift prettyprint-override"><code>func configureUI() {
self.view.addSubview(scrollView)
scrollView.snp.makeConstraints { (make) in
make.top.bottom.equalTo(self.view.safeAreaLayoutGuide)
... | scrollView depends on content | swift|scrollview | 1 | 40 | 1 | 72,962,743 | 72,962,743 | 1 | true | 2022-07-13T03:03:44.923Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
scrollView depends on content<p>i have o content on my VC: TitleLabel and DescriptionLabel, sometimes i have very long description and it is not placed in my... |
72,960,589 | Oracle - PL/SQL Developer shows column name in a PIVOT query<p>In PLSQL Developer, a pivot query is OK when column name is 9 characters long but garbled when 10 characters long.
<a href="https://i.stack.imgur.com/GvsvR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GvsvR.png" alt="enter image descri... | <p>You can give the columns an alias:</p>
<pre class="lang-sql prettyprint-override"><code>SELECT *
FROM (SELECT 'your string' AS name FROM DUAL)
PIVOT (
COUNT(1)
FOR name IN (
'your string' AS alias1,
'other string' AS alias2
)
)
</code></pre>
<p>or, if you want to use a non-ASCII alias then use quoted... | Oracle - PL/SQL Developer shows column name in a PIVOT query | sql|oracle|plsql|plsqldeveloper | 0 | 40 | 2 | 72,963,217 | 72,963,217 | 1 | true | 2022-07-13T03:27:39.733Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Oracle - PL/SQL Developer shows column name in a PIVOT query<p>In PLSQL Developer, a pivot query is OK when column name is 9 characters long but garbled when... |
72,962,630 | How do I use the response header from a POST request to make a new GET request? Flutter/Dart/HTTP<p>I have made a POST request and received a response body and header. Now how do I use the header to make a GET request?</p>
<p>This is the code for the POST Login Request.</p>
<pre><code>void sendLogin() async {
var m... | <p>To append some of your custom headers to your GET request you can that call method somehow like this.</p>
<pre><code>var response = await http.get(url, headers: headers);
</code></pre>
<p>Where headers will be your custom parsed map e.g.:</p>
<pre><code> Map<String, String> headers = {
'Content-type': '... | How do I use the response header from a POST request to make a new GET request? Flutter/Dart/HTTP | flutter|dart|http|http-post|http-get | 0 | 40 | 1 | 72,963,579 | 72,963,579 | 1 | true | 2022-07-13T07:46:06.223Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I use the response header from a POST request to make a new GET request? Flutter/Dart/HTTP<p>I have made a POST request and received a response body a... |
72,964,103 | Python regex where the desired match could be either one or two integers<p>I have some filenames with information I need toe extract, the information is either one or two numbers in the string. I have code to do either one number or 2 numbers but I cannot get it to work to handle both. I have looked at this <a href="ht... | <p>In the second case there is no match with <code>reg_exp = '\d\d'</code>, as there is only one digit.</p>
<p>You can however solve this with one regex that combines them all:</p>
<pre><code>def volts_from_filename(filename):
result = re.search(r"[-_](\d+)G?L", filename)
if result:
file_volts... | Python regex where the desired match could be either one or two integers | python|regex|regex-group | 0 | 40 | 3 | 72,964,260 | 72,964,260 | 1 | true | 2022-07-13T09:41:30.967Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python regex where the desired match could be either one or two integers<p>I have some filenames with information I need toe extract, the information is eith... |
72,965,666 | variable hard coded vs. from file<p>I'm still a beginner in PowerShell and I'm trying the first things. I know a lot more about VBA.
I am currently writing a small tool which should read several IP's from an .ini file and ping them. The result should then be displayed in a DataGridView. For testing I have entered the I... | <p>Instead of using an ini file, put all the IP addresses on separate lines in a simple text file:</p>
<pre class="lang-none prettyprint-override"><code>10.10.10.1
10.10.10.2
10.10.10.3
</code></pre>
<p>Then read it into your variable with <code>Get-Content</code>:</p>
<pre><code>$IP = Get-Content path\to\file\with\IPs... | variable hard coded vs. from file | powershell | 0 | 40 | 1 | 72,965,906 | 72,965,906 | 1 | true | 2022-07-13T11:42:07.387Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
variable hard coded vs. from file<p>I'm still a beginner in PowerShell and I'm trying the first things. I know a lot more about VBA.
I am currently writing a... |
72,966,327 | Is it possible to animate height change in MUI Dialog?<p>I have created this <a href="https://codesandbox.io/s/customizeddialogs-demo-material-ui-forked-m7h4n2?file=/demo.tsx" rel="nofollow noreferrer">code sandbox</a> that shows the problem.</p>
<p>We load an MUI dialog with a content. Then we load more content dynami... | <p>You can make the height change less interrupting by wrapping it inside a <code><Collapse /></code> which also comes with material ui.</p>
<pre><code> <Collapse in={!progress}>
<>
<Typography gutterBottom>
Praesent commodo cursus magna, vel sc... | Is it possible to animate height change in MUI Dialog? | reactjs|material-ui | 0 | 40 | 1 | 72,967,787 | 72,967,787 | 1 | true | 2022-07-13T12:30:58.630Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is it possible to animate height change in MUI Dialog?<p>I have created this <a href="https://codesandbox.io/s/customizeddialogs-demo-material-ui-forked-m7h4... |
72,967,569 | How to pass variables from a list<p>I have created a class containing a single button with certain parameters. In the future I want to make an array of buttons containing random parameters</p>
<pre><code>class _ButtonWidget extends StatelessWidget {
_ButtonWidget({Key? key}) : super(key: key);
@override
Widget b... | <p>Try like this.</p>
<p>Alter your ButtonWidget to accept a StyleButtonParam.</p>
<pre><code>class ButtonWidget extends StatelessWidget {
const ButtonWidget({Key? key, required this.buttonStyle}) : super(key: key);
final StyleButton buttonStyle;
@override
Widget build(BuildContext context) {
return Center... | How to pass variables from a list | flutter|list|dart|parameters | 0 | 40 | 2 | 72,967,952 | 72,967,952 | 1 | true | 2022-07-13T13:57:40.583Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to pass variables from a list<p>I have created a class containing a single button with certain parameters. In the future I want to make an array of butto... |
72,908,786 | Trying to figure out Swift Clients for Thrift<p>I want to utilize thrift from within my new MacOS App. The app is working fine so far as a menubar app.. it takes in a string and lets you save it to memory somewhere... if you click on the clipboard button it saves your string to clipboard.</p>
<p><a href="https://i.sta... | <p>happily I hand rolled the library (Thrift) into my project.. for some reason I think the package mangement didn't work.. once added it was a breeze to generate my .thrift files</p>
<pre><code>thrift --gen swift <my_thrift_service>.thrift
</code></pre>
<p>once I buttoned all that together in XCode.. the last pa... | Trying to figure out Swift Clients for Thrift | swift|xcode|macos|thrift | 0 | 40 | 1 | 72,972,470 | 72,972,470 | 1 | true | 2022-07-08T08:37:52.043Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Trying to figure out Swift Clients for Thrift<p>I want to utilize thrift from within my new MacOS App. The app is working fine so far as a menubar app.. it ... |
72,973,227 | How to properly do user favorites? JPA<p>I'm trying to create a favorites mapping and I'm somewhat confused on how to do it,
Here is my user class, for the sake of clarity it has only 2 bindings(1st one(file) - @OneToMany, 2nd one(favorite file) - @ManyToMany.</p>
<pre><code> @OneToMany(mappedBy = "app_user")... | <blockquote>
<p>It tries to connect only to 1 field on the other side</p>
</blockquote>
<p>Well with <code>@OneToMany(mappedBy = "app_user")</code> you explicitly tell it to map it to the same field.
Which doesn't make sense, because</p>
<ol>
<li>why would you have the same relation represented twice in one e... | How to properly do user favorites? JPA | java|hibernate|jpa|spring-data-jpa | -1 | 40 | 1 | 72,976,926 | 72,976,926 | 1 | true | 2022-07-13T22:19:37.590Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to properly do user favorites? JPA<p>I'm trying to create a favorites mapping and I'm somewhat confused on how to do it,
Here is my user class, for the s... |
72,976,402 | XSLT - select only elements with a specific attribute value (but get all)<p>When I select elements with a specific attribute value, still all elements are selected. Why?
So, I applied a standard solution but it does not work. Tried many alternatieves without success. Yup, XLST is pretty new for me.</p>
<p>XLST:</p>
<pr... | <p>You can do simply:</p>
<p><strong>XSLT 1.0</strong></p>
<pre><code><xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match=&q... | XSLT - select only elements with a specific attribute value (but get all) | xml|xslt | 0 | 40 | 1 | 72,977,003 | 72,977,003 | 1 | true | 2022-07-14T06:55:27.850Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
XSLT - select only elements with a specific attribute value (but get all)<p>When I select elements with a specific attribute value, still all elements are se... |
72,970,915 | Detecting whether page is navigated to or off C#<p>In my WPF application i have multiple pages.
One page is called "startup" and this is the one shown most of the time.
An NFC-Reader is running in the background on a thread and everytime you scan a card, it executes code.</p>
<p>My navigation works by having ... | <p>You could use the <code>Page</code>'s <code>IsLoaded</code> property to determine whether it's currently loaded and displayed in the <code>Frame</code>.</p>
<p>This property can however not be accessed directly from a background thread so you could either add your own field or property to the start page and handle t... | Detecting whether page is navigated to or off C# | c#|wpf|xaml | -2 | 40 | 1 | 72,981,829 | 72,981,829 | 1 | true | 2022-07-13T18:20:07.020Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Detecting whether page is navigated to or off C#<p>In my WPF application i have multiple pages.
One page is called "startup" and this is the one sh... |
72,982,915 | Cannot assign to property: 'absoluteString' is a get-only property<p>I'm trying to fill the textfield with the current web page url but i'm getting this error</p>
<blockquote>
<p>Cannot assign to property: 'absoluteString' is a get-only property</p>
</blockquote>
<pre><code> @ObservedObject var navigationState ... | <p>It should be created URL from string, like</p>
<pre><code> TextField("username", text: Binding<String>(
get: {self.navigationState.url?.absoluteString ?? ""},
set: {self.navigationState.url = URL(string: $0) }))
</code></pre> | Cannot assign to property: 'absoluteString' is a get-only property | swift|swiftui | 2 | 40 | 1 | 72,982,935 | 72,982,935 | 1 | true | 2022-07-14T15:19:07.230Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Cannot assign to property: 'absoluteString' is a get-only property<p>I'm trying to fill the textfield with the current web page url but i'm getting this erro... |
72,981,436 | FileSystemWatcher Not Triggering Events in Windows Service Created with VB.NET<p>Trying to create a Windows service using VB.NET which will watch for changes in a folder using FileSystemWatcher. Service installs and starts fine but doesn't trigger any events when I add or delete a file.</p>
<p>The "started watcher... | <p>Thank you for the help.
Not sure what was preventing it from working earlier but it is now working. Here is working code for anyone interested.</p>
<pre><code>Option Strict On
Imports System.IO
Public Class TestFileWatcher
Dim watcher As System.IO.FileSystemWatcher = New System.IO.FileSystemWatcher()
Dim ... | FileSystemWatcher Not Triggering Events in Windows Service Created with VB.NET | vb.net|windows-services|filesystemwatcher | 1 | 40 | 1 | 72,983,267 | 72,983,267 | 1 | true | 2022-07-14T13:35:01.203Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
FileSystemWatcher Not Triggering Events in Windows Service Created with VB.NET<p>Trying to create a Windows service using VB.NET which will watch for changes... |
72,983,969 | Issue setting folder path in Python<p>I have an image gallery made in Tkinter that lets you cycle through images. I am trying to set a path to a folder where the images can be stored. When there is no path set the code runs just fine because the images and script are saved in the same place (Pycharm). However, when a p... | <p>You are passing multiple params to <code>Image</code>.</p>
<pre><code>image = PIL.Image.open(mpath + '/' + image_list[current], 'r')
</code></pre>
<p>Concatenate the folder path and image name instead of passing them as separate params.</p>
<p>You can also do something like,</p>
<pre><code>image = PIL.Image.open(os.... | Issue setting folder path in Python | python|image|tkinter|python-imaging-library | 0 | 40 | 2 | 72,984,121 | 72,984,121 | 1 | true | 2022-07-14T16:42:10.797Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Issue setting folder path in Python<p>I have an image gallery made in Tkinter that lets you cycle through images. I am trying to set a path to a folder where... |
72,984,027 | how to link User to Model from CreateView?<p>I am trying to build an application that allows user Accounts to create, join, leave, update (if they have auth) and delete Groups. The issue I'm running into is figuring out a way to link the two models so that Accounts will display the Groups they've created.</p>
<p>users/... | <p>You can do anything in a <code>form_valid</code> method. If I understand what is needed correctly...</p>
<pre><code>def form_valid( self, form):
instance = form.save()
instance.joined.add( self.request.user) # add the creating user to the group
account = self.request.user.account
account.created_gr... | how to link User to Model from CreateView? | python|django|django-models|django-views|django-templates | -1 | 40 | 1 | 72,984,843 | 72,984,843 | 1 | true | 2022-07-14T16:47:05.570Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to link User to Model from CreateView?<p>I am trying to build an application that allows user Accounts to create, join, leave, update (if they have auth)... |
72,985,396 | XSLT - copy all children except specific sub element<p>How can I copy all children of an element EXCEPT one element?
I studied a few examples but that solution does not work apparently in my case.</p>
<p>Example input:</p>
<pre><code><?xml version="1.0" encoding="utf-8"?>
<company>
&... | <p>You could do it like this:</p>
<pre><code><?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="xml" indent="yes"/>
<!-- Remove all role el... | XSLT - copy all children except specific sub element | xml|xslt | 0 | 40 | 1 | 72,985,843 | 72,985,843 | 1 | true | 2022-07-14T18:54:37.870Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
XSLT - copy all children except specific sub element<p>How can I copy all children of an element EXCEPT one element?
I studied a few examples but that soluti... |
72,984,809 | What permissions do I need to grant a user that wants to view the definition of a stored procedure, function, view or trigger?<p>If I want to allow a user to see the definition of a database object that they are not allowed to select or execute how would I do that?</p> | <p>With a few exceptions like <code>pg_authid</code>, all PostgreSQL metadata tables are readable by <code>PUBLIC</code>, that is everybody. In particular, you can get the function definition with</p>
<pre><code>SELECT prosrc
FROM pg_proc
WHERE proname = 'myfunc';
</code></pre>
<p>(The source of new-style SQL functions... | What permissions do I need to grant a user that wants to view the definition of a stored procedure, function, view or trigger? | postgresql|permissions | 1 | 40 | 1 | 72,988,629 | 72,988,629 | 1 | true | 2022-07-14T17:57:48.550Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What permissions do I need to grant a user that wants to view the definition of a stored procedure, function, view or trigger?<p>If I want to allow a user to... |
72,992,621 | Azure Pipeline - How to make delayForMinutes task use value from variable instead of hardcoded value<p>How to make Delay task take value from variable instead of hardcoded value for delayForMinutes input?
<br>
When i do following, it works fine:</p>
<pre><code>- job: WaitForDeploy
dependsOn: Main
pool: Server
... | <p>In order to use a variable in a different stage/job you need to set the isoutput flag when setting the variable</p>
<pre><code>print(f'##vso[task.setvariable variable=SleepCount;isoutput=true]{delay_seconds}')
</code></pre>
<p><a href="https://docs.microsoft.com/en-us/azure/devops/pipelines/process/set-variables-scr... | Azure Pipeline - How to make delayForMinutes task use value from variable instead of hardcoded value | azure|azure-pipelines|pipeline|delay | 0 | 40 | 1 | 72,992,981 | 72,992,981 | 1 | true | 2022-07-15T10:30:19.347Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Azure Pipeline - How to make delayForMinutes task use value from variable instead of hardcoded value<p>How to make Delay task take value from variable instea... |
72,993,096 | regexp extract pyspark sql: ParseException Literals of type 'R' are currently not supported<p>I'm using Pyspark SQL with regexp_extract in this way:</p>
<pre><code>df = spark.createDataFrame([['id_20_30', 10], ['id_40_50', 30]], ['id', 'age'])
df.createOrReplaceTempView("table")
sql_statement=""&quo... | <p>You need to escape the '\' with '\' and you need two of them.</p>
<pre><code>sql_statement="select regexp_extract(id, '([0-9]+)', 1) as id from table "
#or
sql_statement="select regexp_extract(id, '(\\\\d+)', 1) as id from table "
df = spark.sql(sql_statement)
df.show()
+---+
| id|
+---+
| 20|
| ... | regexp extract pyspark sql: ParseException Literals of type 'R' are currently not supported | apache-spark|pyspark|apache-spark-sql|amazon-emr|emr-serverless | 0 | 40 | 1 | 72,993,995 | 72,993,995 | 1 | true | 2022-07-15T11:11:28.473Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
regexp extract pyspark sql: ParseException Literals of type 'R' are currently not supported<p>I'm using Pyspark SQL with regexp_extract in this way:</p>
<pre... |
72,995,675 | Convert each Array in a typescript object to a set<p>I am a beginner in Typescript, and I am looking for a neat way to convert all the arrays in an object to a set.</p>
<p>Input:</p>
<pre><code>const inputObject = {'a': [1, 2, 3], 'b': [2, 2, 2], 'c': [3,3,2,4]};
</code></pre>
<p>Output</p>
<pre><code>{'a': Set(3){1, 2... | <p>This code works, but not sure why it isn't working in StackOverflow's code editor.</p>
<p>You need to do the following</p>
<ol>
<li>get the keys of the object you are trying to modify</li>
<li>Update each of them as <code>Set</code>.</li>
</ol>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="t... | Convert each Array in a typescript object to a set | javascript|arrays|typescript|set | -2 | 40 | 2 | 72,995,795 | 72,995,795 | 1 | true | 2022-07-15T14:37:36.830Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Convert each Array in a typescript object to a set<p>I am a beginner in Typescript, and I am looking for a neat way to convert all the arrays in an object to... |
72,994,250 | Fail compilation if imports from Package B exist in a class in Package A<p>I am working on a Spring Boot project and am following the Onion Architecture, where each component is a different package. My build tool is gradle.</p>
<p><a href="https://www.codeguru.com/csharp/understanding-onion-architecture/" rel="nofollow... | <p>I think you should look at ArchUnit <a href="https://www.archunit.org/" rel="nofollow noreferrer">https://www.archunit.org/</a> it allows you to implement this kind of constraint in a unit test form, You can then hook that into your build/CI to block changes breaking your rules.</p> | Fail compilation if imports from Package B exist in a class in Package A | java|spring|gradle|onion-architecture | 0 | 40 | 1 | 72,996,719 | 72,996,719 | 1 | true | 2022-07-15T12:48:41.553Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Fail compilation if imports from Package B exist in a class in Package A<p>I am working on a Spring Boot project and am following the Onion Architecture, whe... |
72,997,390 | How to retrieve the value of a multi nested dictionary<pre><code>Data={
0:{
'country_two': "3",
'country_one': "5",
'med_dict':{
0: {
'endDate': "732",
'endTime': "89",
}
},
},
1: {
... | <p>Try to start with something like this: (skip last step on purpose, it's for you to get it, which is super straightforward) ;-)</p>
<pre><code>
for k in Data:
print(Data[k]['med_dict'][0]['endDate'])
</code></pre> | How to retrieve the value of a multi nested dictionary | python|dictionary | 1 | 40 | 2 | 72,997,482 | 72,997,482 | 1 | true | 2022-07-15T16:57:36.970Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to retrieve the value of a multi nested dictionary<pre><code>Data={
0:{
'country_two': "3",
'country_one': "5",
... |
72,998,797 | How best to pivot wider only selected rows<p>Below is the sample data</p>
<pre><code> indcode <- c(71,72,81,82,99,000000,71,72,81,82,99,000000)
year <- c(2020,2020,2020,2020,2020,2020,2021,2021,2021,2021,2021,2021)
employment <- c(3,5,7,9,2,26,4,6,8,10,3,31)
test <- data.frame(indcode, year, employ... | <p>We could do this by detecting one or more zeros (<code>+</code>) from the start (<code>^</code>) to the end (<code>$</code>) of the string in 'indcode' to subset the 'employment' for each 'year' (grouped) to create a new column and then <code>filter</code> out the 0 rows</p>
<pre><code>library(dplyr)
library(stringr... | How best to pivot wider only selected rows | r|dplyr|pivot | -2 | 40 | 1 | 72,999,050 | 72,999,050 | 1 | true | 2022-07-15T19:27:53.020Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How best to pivot wider only selected rows<p>Below is the sample data</p>
<pre><code> indcode <- c(71,72,81,82,99,000000,71,72,81,82,99,000000)
year &l... |
72,998,716 | Move "forwards" when KiematicBody is rotated with GDScript<p>I have a very basic third person controller:</p>
<pre><code>func _physics_process(delta):
vel.x = 0
if Input.is_action_pressed("move_forward"):
vel.x += SPEED * delta
if Input.is_action_pressed("turn_left"):
... | <p>Your <a href="https://docs.godotengine.org/en/stable/classes/class_kinematicbody.html" rel="nofollow noreferrer"><code>KinematicBody</code></a> is an <a href="https://docs.godotengine.org/en/stable/classes/class_spatial.html" rel="nofollow noreferrer"><code>Spatial</code></a>, and as such it is positioned by a <a hr... | Move "forwards" when KiematicBody is rotated with GDScript | vector|gdscript | 1 | 40 | 1 | 72,999,625 | 72,999,625 | 1 | true | 2022-07-15T19:18:23.220Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Move "forwards" when KiematicBody is rotated with GDScript<p>I have a very basic third person controller:</p>
<pre><code>func _physics_process(delta):
ve... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.