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,152,858 | How do I disable caching in an Nginx reverse proxy?<p>Will it have caching behavior by default in the reverse proxy configuration below?</p>
<pre><code>location / {
proxy_pass http://12.23.45.78:8080;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_set_header Host $host;
prox... | <p>By default <a href="http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cache" rel="nofollow noreferrer">proxy_cache</a> is <code>off</code>, so you won't have any unwanted cache behavior. Also you may want to check logs to be completely sure, as far as I know, nginx tries to cache files if their size exc... | How do I disable caching in an Nginx reverse proxy? | nginx|caching|nginx-reverse-proxy | 0 | 310 | 1 | 72,158,918 | 72,158,918 | 1 | true | 2022-05-07T13:12:37.770Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I disable caching in an Nginx reverse proxy?<p>Will it have caching behavior by default in the reverse proxy configuration below?</p>
<pre><code>locat... |
72,158,928 | How to make PHP handeling my "WITH CTE as" SQL?<p>I added my SQL query into the PHP code, but it choose to echo "<strong>0 results</strong>".
I notice in Sublime Text editor that all the sql code shows in same color (not right), but when I remove the first words "<strong>WITH CTE as (</strong>" it b... | <p>You may inline the CTE into the main query, and use it as a subquery:</p>
<pre class="lang-sql prettyprint-override"><code>SELECT `_ID`, `weight_date`, `weight_start_week`, `weight_end_week`
total_weight, prev_total_weight, lowest_weight, highest_weight,
weight_week,
CASE ...
FROM
(
-- place... | How to make PHP handeling my "WITH CTE as" SQL? | php|mysql|sublimetext | 0 | 74 | 1 | 72,158,942 | 72,158,942 | 1 | true | 2022-05-08T07:27:22.267Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to make PHP handeling my "WITH CTE as" SQL?<p>I added my SQL query into the PHP code, but it choose to echo "<strong>0 results</strong>".
I not... |
72,154,851 | How can a PySpark shell with no worker nodes run jobs?<p>I have run the below lines in the pypsark shell (mac, 8 cores).</p>
<pre><code>import pandas as pd
df = spark.createDataFrame(pd.DataFrame(dict(a = list(range(1000)))
df.show()
</code></pre>
<p>I want to count my worker nodes (and see the number of cores on each)... | <p>It's not up to Spark to figure out the perfect cluster for the hardware you provide (although it's highly task-specific what is a <em>perfect</em> infrastructure anyway)</p>
<p>Actually, a behaviour you described is default for Spark to set up infrastructure like this if you run on YARN master (see spark.executor.co... | How can a PySpark shell with no worker nodes run jobs? | apache-spark|pyspark|parallel-processing | 0 | 61 | 1 | 72,159,091 | 72,159,091 | 1 | true | 2022-05-07T17:19:23.360Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can a PySpark shell with no worker nodes run jobs?<p>I have run the below lines in the pypsark shell (mac, 8 cores).</p>
<pre><code>import pandas as pd
d... |
72,159,036 | Sample geopandas data in networkx example<p>I am trying an example provided by <code>networkx</code> <a href="https://networkx.org/documentation/stable/auto_examples/geospatial/plot_points.html" rel="nofollow noreferrer">here</a>. This example uses a <code>geopandas</code> dataset in a filename <code>cholera_cases.pkdg... | <p>If you go to their GitHub, you can find it in their repo. Here: <a href="https://github.com/networkx/networkx/tree/main/examples/geospatial" rel="nofollow noreferrer">https://github.com/networkx/networkx/tree/main/examples/geospatial</a></p>
<p>Might be worth cloning the repo to play with the examples.</p>
<p>As gen... | Sample geopandas data in networkx example | networkx|geopandas|geopackage | 0 | 115 | 1 | 72,159,150 | 72,159,150 | 1 | true | 2022-05-08T07:46:52.223Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Sample geopandas data in networkx example<p>I am trying an example provided by <code>networkx</code> <a href="https://networkx.org/documentation/stable/auto_... |
72,158,823 | Transfer Data from from data workbook to destination workbook if sheet name matches<p>I am trying to transfer a range of data from one excel workbook to another workbook if sheet name of both the workbook matches. However, There seems to be some problem with my code. <a href="https://i.stack.imgur.com/QbW6R.jpg" rel="n... | <p>Couple of things missing/going wrong here. First, you are missing an <code>On Error Resume Next</code> inside the loop, just before the part that <a href="https://stackoverflow.com/questions/6688131/test-or-check-if-sheet-exists">checks if sheet exists</a>. Second, you are trying to <code>Set</code> a <code>Workshee... | Transfer Data from from data workbook to destination workbook if sheet name matches | excel|vba | 0 | 41 | 1 | 72,159,260 | 72,159,260 | 1 | true | 2022-05-08T07:07:49.937Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Transfer Data from from data workbook to destination workbook if sheet name matches<p>I am trying to transfer a range of data from one excel workbook to anot... |
72,145,285 | <B1-Motion> binding is unresponsive in Tkinter<p>I've been working on learning more about the <code>Canvas()</code> widget in tkinter, so I decided to build a simple paint app just for practice.</p>
<p>To achieve this, I created a canvas and binded it to <code>"<B1-Motion>"</code>, but it becomes unresp... | <p>For well-connected lines, set the set <code>capstyle</code> to <code>round</code> when creating lines.</p>
<p>Check out <a href="https://tkdocs.com/tutorial/canvas.html" rel="nofollow noreferrer">this canvas tutorial</a> for more details.</p>
<p>Almost all drawing libraries that I'm familiar with support different l... | <B1-Motion> binding is unresponsive in Tkinter | python|tkinter|tkinter-canvas | 0 | 111 | 1 | 72,159,275 | 72,159,275 | 1 | true | 2022-05-06T17:21:28.720Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
<B1-Motion> binding is unresponsive in Tkinter<p>I've been working on learning more about the <code>Canvas()</code> widget in tkinter, so I decided to build ... |
72,159,234 | If the first 3 characters are the same, delete the line in a text file?<p>Goal: Open the text file. Check whether the first 3 characters of each line are the same in subsequent lines. If yes, delete the bottom one.</p>
<p>The contents of the text file:</p>
<pre><code>cat1
dog4
cat3
fish
dog8
</code></pre>
<p>Desired ou... | <p>Open the file and read one line at a time. Note the first 3 characters (prefix). Check if the prefix has been previously observed. If not, keep that line and add the prefix to a set. For example:</p>
<pre><code>with open('text.txt') as infile:
out_lines = []
prefixes = set()
for line in map(str.strip, in... | If the first 3 characters are the same, delete the line in a text file? | python|python-3.x | 0 | 38 | 4 | 72,159,360 | 72,159,360 | 1 | true | 2022-05-08T08:21:06.030Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
If the first 3 characters are the same, delete the line in a text file?<p>Goal: Open the text file. Check whether the first 3 characters of each line are the... |
72,159,257 | How to restore the initial state of <ul>?<p>I have some list like this:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code><ul id='list'>
<li>First</li>
... | <p>The problem is that when you write:</p>
<pre><code>li_items.push(li.appendChild(text));
</code></pre>
<p>you are pushing to the array <code>li_items</code> the <strong>return value</strong> of the <code>appendChild(text)</code> function.</p>
<p>From the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Node/... | How to restore the initial state of <ul>? | javascript|html | 0 | 47 | 2 | 72,159,456 | 72,159,456 | 1 | true | 2022-05-08T08:25:51.580Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to restore the initial state of <ul>?<p>I have some list like this:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" dat... |
72,159,509 | In Unity can I allow the CharacterController.Move function to ignore collisions?<p>I'm using the <code>CharacterController.Move</code> function to move the player around the scene. I want the player to be able to pass through some objects under certain conditions. Is there a way to force the <code>Move</code> function ... | <pre><code>Physics.IgnoreCollision(SomeObject.collider, collider);
// collider is a CharacterController
</code></pre>
<p>Or by using layers:</p>
<pre><code>Physics.IgnoreLayerCollision(layer1, layer2);
</code></pre> | In Unity can I allow the CharacterController.Move function to ignore collisions? | c#|unity3d|collision-detection | 0 | 70 | 1 | 72,159,567 | 72,159,567 | 1 | true | 2022-05-08T09:06:08.067Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
In Unity can I allow the CharacterController.Move function to ignore collisions?<p>I'm using the <code>CharacterController.Move</code> function to move the p... |
72,159,603 | Prefix notation in ANTLR4<p>I am working with Antlr4 at the moment, and I have a confusion with one example. I have to calculate value of expressions in prefix notation which implies following notation:</p>
<ul>
<li>ADD expr expr OR</li>
<li>SUB expr expr OR</li>
<li>MUL expr expr OR</li>
<li>DIV expr expr OR</li>
<li>... | <p>If your expr rule is</p>
<pre><code>expr : 'ADD' expr expr
| 'SUB' expr expr
| 'MUL' expr expr
| 'DIV' expr expr
| Integer
| Double
;
</code></pre>
<p>then yes, <code>ADD 1 2 SUB 1</code> would not match it.</p> | Prefix notation in ANTLR4 | antlr4 | 0 | 24 | 1 | 72,159,647 | 72,159,647 | 1 | true | 2022-05-08T09:17:44.430Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Prefix notation in ANTLR4<p>I am working with Antlr4 at the moment, and I have a confusion with one example. I have to calculate value of expressions in pref... |
72,159,622 | How to loop through each item in chrome.storage, when key values are unknown?<p>Is it possible for me to loop through every item stored using <code>chrome.storage.sync.set</code>?
All the values stored have a URL and some CSS code, but the problem is, I don't know the URLs. I was thinking of something like this in my p... | <p>All <code>chrome</code> API that return a Promise or can accept a callback are <strong>asynchronous</strong>.</p>
<h3>ManifestV3: use <code>await</code> inside a function declared as <code>async</code></h3>
<pre class="lang-js prettyprint-override"><code>async function enumStorage() {
const all = await chrome.stor... | How to loop through each item in chrome.storage, when key values are unknown? | javascript|google-chrome-extension|chrome-extension-manifest-v3 | 0 | 157 | 1 | 72,159,687 | 72,159,687 | 1 | true | 2022-05-08T09:21:32.157Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to loop through each item in chrome.storage, when key values are unknown?<p>Is it possible for me to loop through every item stored using <code>chrome.st... |
72,159,631 | Why is my JavaScript code not accepted as the right answer?<p>I am trying to do this Javascript exercise: <a href="https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-javascript/counting-cards" rel="nofollow noreferrer">https://www.freecodecamp.org/learn/javascript-algorithms-and-data-str... | <p>Add a space between count and decision</p>
<pre><code> return count + " " + decision;
</code></pre> | Why is my JavaScript code not accepted as the right answer? | javascript | 0 | 37 | 2 | 72,159,697 | 72,159,697 | 1 | true | 2022-05-08T09:22:24.197Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why is my JavaScript code not accepted as the right answer?<p>I am trying to do this Javascript exercise: <a href="https://www.freecodecamp.org/learn/javascr... |
72,159,550 | Using a method inside another method<p>I'm not sure if this is bad code or would it be "better" to put the isPrime function in a method and then use that method inside the printSomething method?, if so how would it be possible how can i use one method inside another method?</p>
<pre><code>
class PrimeNumbers... | <p>Hopefully someone who can explain this better than me comes along. In case they don't ... you can add <code>isPrime</code> as a method on <code>PrimeNumbers</code> and then use it with <code>this.isPrime()</code>. Here, <code>this</code> refers to the current object that you're dealing with.</p>
<p>When you do <code... | Using a method inside another method | javascript|function|class|methods | 0 | 42 | 1 | 72,160,011 | 72,160,011 | 1 | true | 2022-05-08T09:11:05.187Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Using a method inside another method<p>I'm not sure if this is bad code or would it be "better" to put the isPrime function in a method and then us... |
72,159,750 | How to search through a pandas dataframe for a match?<p>I got the following pandas dataframe:</p>
<pre><code> paths tags
0 /home/onur/PycharmProjects/file-tagging/data/w... NaN
1 /home/onur/PycharmProjects/file-tagging/data/d... NaN
2 /home/onur/PycharmProj... | <h2>Advice</h2>
<ol>
<li>Use the <code>walk</code> function instead of a loop within a <code>isdir</code> judge.</li>
</ol>
<p>Example</p>
<pre class="lang-py prettyprint-override"><code>data_list = []
for root, dirs, files in os.walk(path):
data_list.extend([os.path.join(root, file) for file in files])
</code></pr... | How to search through a pandas dataframe for a match? | python|pandas|dataframe|csv | 0 | 39 | 1 | 72,160,049 | 72,160,049 | 1 | true | 2022-05-08T09:39:04.840Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to search through a pandas dataframe for a match?<p>I got the following pandas dataframe:</p>
<pre><code> ... |
72,160,078 | Procedure based trigger for audit table<p>I have 2 tables, one main table and one audit table.</p>
<pre><code>create sequence dbo.users_seq;
create table dbo.users
(
id bigint primary key default(next value for dbo.users_seq),
user_data nvarchar(max) not null check(isjson(user_data) = 1),
timestamp datetime2 not nu... | <p>I will preface by saying that Temporal Tables or SQL Audit are far better for this kind of thing, and you are basically reinventing the wheel.</p>
<hr />
<p>Be that as it may, the below should give you a good model for a trigger</p>
<pre class="lang-sql prettyprint-override"><code>CREATE OR ALTER TRIGGER TR_users ON... | Procedure based trigger for audit table | sql|sql-server|sql-server-2016 | 0 | 61 | 1 | 72,160,218 | 72,160,218 | 1 | true | 2022-05-08T10:24:48.480Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Procedure based trigger for audit table<p>I have 2 tables, one main table and one audit table.</p>
<pre><code>create sequence dbo.users_seq;
create table dbo... |
72,160,165 | How to conditionally change color of markers in Plotly?<p>I have a <code>dataframe</code> in <code>R</code> that has some continuous values in column <code>value</code> and a <code>signal</code> column which is either 0 or 1.</p>
<pre><code>db <- cbind(seq(1,5),rnorm(5,0,1), c(0,0,1,0,1))
colnames(db) <- c("... | <p>You can separate the line plot and dot plot and decide color for them separately. You could try this,</p>
<pre><code>plot_ly(db, x=~ID, y=~value, type='scatter',
mode='markers', color = db$signal,
colors = c("1" = "white", "0" = "black")) %>%
add_trace(x=... | How to conditionally change color of markers in Plotly? | r|plotly | 0 | 49 | 1 | 72,160,380 | 72,160,380 | 1 | true | 2022-05-08T10:36:17.963Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to conditionally change color of markers in Plotly?<p>I have a <code>dataframe</code> in <code>R</code> that has some continuous values in column <code>v... |
72,160,479 | Can failing to install an npm package result in a ENOTEMPTY error?<p>I've installed an npm package but my connection must have dropped in the meantime, the installation failed, and now I'm getting an error message. When I try to reinstall, my log file says the following:</p>
<pre><code>1256 error code ENOTEMPTY
1257 er... | <p>just delete package-lock.json file and then install package what you want all will works</p> | Can failing to install an npm package result in a ENOTEMPTY error? | npm|webpack | 0 | 42 | 1 | 72,160,513 | 72,160,513 | 1 | true | 2022-05-08T11:20:48.423Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Can failing to install an npm package result in a ENOTEMPTY error?<p>I've installed an npm package but my connection must have dropped in the meantime, the i... |
72,148,341 | How to use unpacked data msgpack-c<p>I know how to unpack data but don't know how to use specific data from array or map, Here's the code :</p>
<pre><code>#include <msgpack.h>
#include <stdio.h>
int main(void) {
/* msgpack::sbuffer is a simple buffer implementation. */
msgpack_sbuffer sbuf;
msgpack_s... | <p>msgpack-c (C version) document is here:
<a href="https://github.com/msgpack/msgpack-c/wiki/v2_0_c_overview#object" rel="nofollow noreferrer">https://github.com/msgpack/msgpack-c/wiki/v2_0_c_overview#object</a></p>
<p>In your case, the variable <code>obj</code>'s type is msgpack_object.</p>
<pre><code>typedef struct ... | How to use unpacked data msgpack-c | c|deserialization|msgpack | 0 | 79 | 1 | 72,160,519 | 72,160,519 | 1 | true | 2022-05-06T23:37:00.117Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to use unpacked data msgpack-c<p>I know how to unpack data but don't know how to use specific data from array or map, Here's the code :</p>
<pre><code>#i... |
72,160,318 | segmentation fault without standard libraries<p>I am trying to write a simple C program without including standard libraries and trying to compile and run with gcc. but I was getting segmentation fault( core dumped )</p>
<p>main.c:</p>
<pre><code>int main(){}
</code></pre>
<p>commands executed:</p>
<ol>
<li>gcc main.c ... | <p>Besides the problem mentioned in the comments, there is also a problem during the link time. If you run it with the flag <code>-nostdlib</code>, it will ignore the symbol <code>symbol _start</code>, which is part of a default library, <code>crt0.o</code>.</p> | segmentation fault without standard libraries | c|linux|gcc | 0 | 74 | 1 | 72,160,606 | 72,160,606 | 1 | true | 2022-05-08T10:58:01.713Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
segmentation fault without standard libraries<p>I am trying to write a simple C program without including standard libraries and trying to compile and run wi... |
72,154,579 | Nutch best option for persistent storage in EMR for raw data<p>I have to crawl around 30k to 50k domains with Nutch 1.x on EMR AWS service. It will be gradual i.e., first crawl all pages and later only new or updated pages for these websites.
For indexing, I am using Apache Solr. I have few queries for best practices w... | <ol>
<li>Nutch is able to read/write directly from S3, see <a href="https://stackoverflow.com/questions/60520126/using-s3-as-nutch-storage-system">using-s3-as-nutch-storage-system</a>.</li>
<li>Writing segments and CrawlDb directly to S3 makes sense. But to keep it on HDFS and then copying (distcp) to S3 is also possib... | Nutch best option for persistent storage in EMR for raw data | amazon-web-services|amazon-s3|amazon-emr|nutch | 0 | 33 | 1 | 72,160,737 | 72,160,737 | 1 | true | 2022-05-07T16:47:00.783Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Nutch best option for persistent storage in EMR for raw data<p>I have to crawl around 30k to 50k domains with Nutch 1.x on EMR AWS service. It will be gradua... |
72,155,102 | How to address a continuous series of event occurrences without addressing each of them? V5<p>Example code to workaround:</p>
<pre><code>BooleanThingy = TheEvent[n] or/and TheEvent[n+1] or/and . . . TheEvent[n+k]
</code></pre>
<p>Somehow…? E.g.:</p>
<pre><code>BooleanThingy = that.function(TheEvent[n], k, or/and)
</cod... | <p>Sounds like this could be solved with a <code>for</code>-loop:</p>
<pre><code>var BooleanThingy = true
for i = 0 to k
BooleanThingy := BooleanThingy and TheEvent[n+i]
</code></pre> | How to address a continuous series of event occurrences without addressing each of them? V5 | pine-script|pinescript-v5 | 0 | 20 | 1 | 72,160,806 | 72,160,806 | 1 | true | 2022-05-07T17:52:19.630Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to address a continuous series of event occurrences without addressing each of them? V5<p>Example code to workaround:</p>
<pre><code>BooleanThingy = TheE... |
72,160,645 | Join values in different dataframes<p>I am trying trying to join two dataframes in such a way that the resulting union contains info about both of them. My dataframes are similar to:</p>
<pre><code>>> df_1
user_id hashtag1 hashtag2 hashtag3
0000 '#breakfast' '#lunch' '#dinner'
0001 '#... | <p>You should try <code>pandas.merge</code>:</p>
<pre class="lang-py prettyprint-override"><code>pandas.merge(df_1, df_2, on='hashtag1', how='left')
</code></pre>
<p>If you want to use <code>.join</code>, you need to set the index of <code>df_2</code>.</p>
<pre class="lang-py prettyprint-override"><code>df_1.join(df_2.... | Join values in different dataframes | pandas|dataframe|join|merge | 0 | 23 | 1 | 72,160,852 | 72,160,852 | 1 | true | 2022-05-08T11:42:37.020Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Join values in different dataframes<p>I am trying trying to join two dataframes in such a way that the resulting union contains info about both of them. My d... |
72,160,734 | updating data in a table from another table<p>I have two tables:<br />
<code>cart_item</code></p>
<pre><code>id, session_id, product_id, quantity
1 1 2 5
2 1 3 5
</code></pre>
<p><code>product</code></p>
<pre><code>id, quantity
2 50
3 75
</code></pre>
<p>How to correctly ... | <p>You can try to use <code>UPDATE ... JOIN</code> to calculate the value.</p>
<pre><code>UPDATE product p
JOIN cart_item ci ON ci.product_id = p.id
SET p.quantity = p.quantity - ci.quantity
</code></pre>
<p><a href="https://dbfiddle.uk/?rdbms=mysql_8.0&fiddle=910001bfbedd865d6621e4ed519fead0" rel="nofollow norefe... | updating data in a table from another table | mysql|sql | 0 | 23 | 2 | 72,160,868 | 72,160,868 | 1 | true | 2022-05-08T11:54:14.253Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
updating data in a table from another table<p>I have two tables:<br />
<code>cart_item</code></p>
<pre><code>id, session_id, product_id, quantity
1 1 ... |
72,158,341 | Adjusting SeekBar length<p>I have an Android app with the following kotlin function:</p>
<pre><code>fun setAdjustBars() {
val clrSetBarR = SeekBar(this)
val clrSetBarG = SeekBar(this)
val clrSetBarB = SeekBar(this)
clrSetBarR.thumbTintList = ColorStateList.valueOf(Color.rgb(255,0,0))
clrSetBarG.thu... | <p>You've to change the <code>width</code> of the <code>SeekBar</code> to adjust its length. Change its width after adding it to the layout.</p>
<pre><code>seekBarsArray.map {
it.id = View.generateViewId()
constraintLayout?.addView(it)
val params = it.layoutParams
params.width = 350
it.layo... | Adjusting SeekBar length | android|kotlin|android-layout | 0 | 30 | 1 | 72,161,011 | 72,161,011 | 1 | true | 2022-05-08T05:29:10.277Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Adjusting SeekBar length<p>I have an Android app with the following kotlin function:</p>
<pre><code>fun setAdjustBars() {
val clrSetBarR = SeekBar(this)
... |
72,151,618 | Incorporating external regressor in a hierarchical/ grouped time series<p>Fellow contributors,</p>
<p>I have been working with a hierarchical time series, relating to a set of identical products in a number of stores. For this purpose when we aggregate the data set based on 2 attributes like "store" and "... | <p>The external regressor column (<code>external_reg</code>) has been dropped from your output because you have not specified how it should be aggregated. Given that it is a discrete variable, it might be tricky to aggregate the data in a way that keeps this information. How you choose to aggregate this is up to you, a... | Incorporating external regressor in a hierarchical/ grouped time series | r|time-series|fable-r | 0 | 228 | 1 | 72,161,032 | 72,161,032 | 1 | true | 2022-05-07T10:26:19.713Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Incorporating external regressor in a hierarchical/ grouped time series<p>Fellow contributors,</p>
<p>I have been working with a hierarchical time series, re... |
72,158,916 | How to limit the number of returned records using CloudKit framework?<p>Is there any way to limit the number of records returned from a query using CloudKit framework? E.g. only return the latest value by sorting it by date (already figured that out) but then limit the returned records to 1?</p> | <p>Yes, use a <a href="https://developer.apple.com/documentation/cloudkit/ckqueryoperation" rel="nofollow noreferrer"><code>CKQueryOperation</code></a> and it's <a href="https://developer.apple.com/documentation/cloudkit/ckqueryoperation/1515078-resultslimit" rel="nofollow noreferrer"><code>resultsLimit</code></a> prop... | How to limit the number of returned records using CloudKit framework? | database|swiftui|cloudkit | 0 | 21 | 1 | 72,161,169 | 72,161,169 | 1 | true | 2022-05-08T07:25:24.547Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to limit the number of returned records using CloudKit framework?<p>Is there any way to limit the number of records returned from a query using CloudKit ... |
72,147,968 | Can't group employees list without years<p>my issue is that when I want to group a set of employees according to the month of their birth date, Odoo separates the months by years, which I want to avoid because i wanna generate a list of people who have their birthday in the month.</p>
<p>This is code:</p>
<pre><code>&l... | <p>Create a birthday month computed field.</p>
<pre class="lang-py prettyprint-override"><code># i did not test the code, It can be selection as well
birthday_month = fields.Integer(string="Birthday Month", compute='_compute_bm', store=True, index=True, readonly=True)
@api.depends('birthday')
def _compute_bm... | Can't group employees list without years | xml|group-by|odoo|odoo-13 | 0 | 38 | 1 | 72,161,195 | 72,161,195 | 1 | true | 2022-05-06T22:27:48.777Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Can't group employees list without years<p>my issue is that when I want to group a set of employees according to the month of their birth date, Odoo separate... |
72,159,106 | Undo-Redo functionality using Command-Pattern in Qt for FitInView feature<p>I have <code>QGraphicsView</code> which contains some <code>QGraphicsItem</code>. This view has some feature like <code>zoom-in</code>, <code>zoom-out</code>, <code>fitIn</code>, <code>Undo-Redo</code>.<br />
My <code>fitIn</code> feature is no... | <p>Based on the many question you posted on the <a href="https://doc.qt.io/qt-5/qundo.html" rel="nofollow noreferrer">Qt's Undo Framework</a>, it seems to me you are missing an essential part of the Command pattern:</p>
<blockquote>
<p>The Command pattern is based on the idea that <strong>all editing</strong> in an
app... | Undo-Redo functionality using Command-Pattern in Qt for FitInView feature | c++|qt|qt5|qt4|command-pattern | 0 | 77 | 1 | 72,161,238 | 72,161,238 | 1 | true | 2022-05-08T07:59:11.687Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Undo-Redo functionality using Command-Pattern in Qt for FitInView feature<p>I have <code>QGraphicsView</code> which contains some <code>QGraphicsItem</code>.... |
72,160,831 | Convert size in bytes to unsigned integral type<p>I am developing a library that needs to auto deduce the type of size (in bytes).</p>
<p>How to convert size (in bytes) to unsigned integral type?</p>
<p>The type deduced must be big enough to store data in the size, but that does not mean to use <code>uint64_t</code> in... | <p>Immediately invoked lambda might help. You can also use <code>std::conditional_t</code>.</p>
<pre><code>template<std::size_t N>
using magic = decltype([] {
if constexpr (N <= 1)
return std::uint8_t{};
else if constexpr (N <= 2)
return std::uint16_t{};
else if constexpr (N <= 4)
retur... | Convert size in bytes to unsigned integral type | c++|types|c++20 | 0 | 80 | 1 | 72,161,270 | 72,161,270 | 1 | true | 2022-05-08T12:07:05.347Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Convert size in bytes to unsigned integral type<p>I am developing a library that needs to auto deduce the type of size (in bytes).</p>
<p>How to convert size... |
72,160,573 | How to give a query a list of objects or items?<p>my Question is that how can i give a list of objects or items to a query :
<br>
for example i have an objects which has 4 user id like this :
<br>
<code>list_of_user_id = [1 , 2 ,3 ,6] </code>
<br>
and now i want to set the <code>CreatorUserID</code> equal to <code>lis... | <p>You probably want to use <code>__in</code> - see <a href="https://docs.djangoproject.com/en/4.0/ref/models/querysets/#in" rel="nofollow noreferrer">https://docs.djangoproject.com/en/4.0/ref/models/querysets/#in</a></p>
<pre><code>Question_Users = TblAnswerQuestionRequest.objects.filter(CreatorUserID_id__in = list_of... | How to give a query a list of objects or items? | django|django-models|django-views | 0 | 34 | 1 | 72,161,322 | 72,161,322 | 1 | true | 2022-05-08T11:32:30.877Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to give a query a list of objects or items?<p>my Question is that how can i give a list of objects or items to a query :
<br>
for example i have an obje... |
72,161,038 | Could a callable cloud function that delete users be abused so it can delete users by only id?<p>I have a callable cloud function on the frontend, that gets a sub-user id from front-end pass it to the cloud function, and then the cloud function delete that user and also deletes his doc from the collection...</p>
<p>my ... | <p>It indeed sounds like you created a security risk, and is also precisely why Firebase Authentication only allows deleting the currently signed-in user in its client-side SDKs.</p>
<p>You'll have to implement some sort of authorization scheme in your Cloud Functions code. This takes a two step process:</p>
<ol>
<li>P... | Could a callable cloud function that delete users be abused so it can delete users by only id? | google-cloud-firestore|firebase-authentication|google-cloud-functions | 0 | 56 | 1 | 72,161,785 | 72,161,785 | 1 | true | 2022-05-08T12:35:28.743Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Could a callable cloud function that delete users be abused so it can delete users by only id?<p>I have a callable cloud function on the frontend, that gets ... |
72,161,752 | How can I fix has.js error in !my console?<p>I get this multiple error: <code>has.js</code></p>
<pre><code>has.js:1 Warning: React does not recognize the `oonChange` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `oonchange` instead. If you accident... | <p>In my opinion in your Detail component you have an oonChange of OnChange , also on Card component have pass boolean , but it required to get string</p> | How can I fix has.js error in !my console? | reactjs|react-native | 0 | 66 | 1 | 72,161,862 | 72,161,862 | 1 | true | 2022-05-08T14:01:50.487Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I fix has.js error in !my console?<p>I get this multiple error: <code>has.js</code></p>
<pre><code>has.js:1 Warning: React does not recognize the `oo... |
72,155,602 | ValueError: x and y must be equal-length 1D arrays<p>I run the following code to animate a moving sphere, in which the coordinates are in a text file:</p>
<pre><code>import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits import mplot3d
from matplotlib import cm
from matplotlib import animation
import pand... | <p>If the surface you are about to plot has a parametric equation (such as a sphere), use the meshgrid approach (<code>x, y, z</code> must be 2D arrays) and call <code>ax.plot_surface</code>. Instead, you used 1D arrays and later called <code>ax.plot_trisurf</code>: this function is better suited when it's not easy to ... | ValueError: x and y must be equal-length 1D arrays | python|arrays|pandas|matplotlib|animation | 0 | 109 | 1 | 72,161,916 | 72,161,916 | 1 | true | 2022-05-07T18:58:58.017Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
ValueError: x and y must be equal-length 1D arrays<p>I run the following code to animate a moving sphere, in which the coordinates are in a text file:</p>
<p... |
72,158,704 | Syntax error near 'unlock' - 'alter role warehouse_user unlock'<p>Trying to run - 'alter role warehouse_user unlock' on Sybase IQ</p>
<p>Failed due to
SQL Anywhere Error -131: Syntax error near 'unlock' on line 1</p>
<p>someone knows why?</p> | <p>The <code>alter role</code> statement doesn't appear to have anything to do with locked users (or roles):</p>
<ul>
<li><a href="https://help.sap.com/docs/SAP_IQ/a898e08b84f21015969fa437e89860c8/a440f8f584f21015a7799249d201ff8e.html?locale=en-US" rel="nofollow noreferrer">IQ - ALTER ROLE statement</a></li>
<li><a hre... | Syntax error near 'unlock' - 'alter role warehouse_user unlock' | sybase|sqlanywhere|sap-iq | 0 | 63 | 1 | 72,162,091 | 72,162,091 | 1 | true | 2022-05-08T06:42:26.283Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Syntax error near 'unlock' - 'alter role warehouse_user unlock'<p>Trying to run - 'alter role warehouse_user unlock' on Sybase IQ</p>
<p>Failed due to
SQL ... |
72,158,244 | Folder Navigation Tree in tkinter<p>I want to make a gui with an embedded folder navigation tree, much like the one shown <a href="https://i.stack.imgur.com/uILG7.png" rel="nofollow noreferrer">here</a>. Does tkinter provide any widget directly similar to this, or do I have to build it from scratch? If it's the later, ... | <p>you can add icons in treeview while using <strong>insert()</strong> use image perimeter</p>
<p>you should read this <a href="https://tkdocs.com/tutorial/tree.html" rel="nofollow noreferrer">https://tkdocs.com/tutorial/tree.html</a></p>
<p>you can try this:-</p>
<pre><code>import os
from tkinter import*
from tkinter ... | Folder Navigation Tree in tkinter | python|tkinter | 0 | 64 | 1 | 72,162,121 | 72,162,121 | 1 | true | 2022-05-08T05:09:49.470Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Folder Navigation Tree in tkinter<p>I want to make a gui with an embedded folder navigation tree, much like the one shown <a href="https://i.stack.imgur.com/... |
72,162,038 | GetVideos API, Cant get the key parameter inside the array<p>Im trying to use Angular.js to make a movie Website using the Api.
I've reached the part where I want to put the trailer of the movie in a button, but everytime I try and use the GetVideo Api it doesn't give me a proper response because it can't get to the <s... | <p>I think what you need is</p>
<pre><code> <div *ngIf="videos?.results.length > 0">
<-- Get first item -->
<a href="https://youtu.be/{{ videos.results[0].key }}">
<button>
<i class="fa fa-play"> Watch Video</i>
... | GetVideos API, Cant get the key parameter inside the array | angular|angularjs|api | 0 | 27 | 1 | 72,162,127 | 72,162,127 | 1 | true | 2022-05-08T14:35:26.120Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
GetVideos API, Cant get the key parameter inside the array<p>Im trying to use Angular.js to make a movie Website using the Api.
I've reached the part where I... |
72,155,795 | Twitter Bot: Get access token for another account without 3-legged OAuth flow?<p>I am in control of three twitter accounts: One is my main account, the other two are supposed to automatically post content via a bot. I created the bot logic and added it to Twitter's development tools and I can easily use it to post to m... | <p>There are some alternative ways to generate access token and access token secret for OAuth 1.0A via command line tools which allow you to use the “PIN-based” OAuth flow.</p>
<p>One example would be Twitter’s own <a href="https://github.com/twitter/twurl" rel="nofollow noreferrer"><code>twurl</code></a> tool for API ... | Twitter Bot: Get access token for another account without 3-legged OAuth flow? | api|rest|twitter|bots|twitter-oauth | 0 | 229 | 2 | 72,162,190 | 72,162,190 | 1 | true | 2022-05-07T19:28:59.680Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Twitter Bot: Get access token for another account without 3-legged OAuth flow?<p>I am in control of three twitter accounts: One is my main account, the other... |
72,161,937 | How to change an inside attributes<p>I want to do a header buttons type like :</p>
<p>If I call "HeaderFunction" than all selecteds will be false and only one I clicked will be true.
and watch selected attributes than=> if selected attributes are true than :class will be "selected" and all of oth... | <p>You will need an array and variable holding the currently active button:</p>
<pre class="lang-html prettyprint-override"><code><template>
<button v-for="(item,index) in headerList" :key="index" :class="currentButtonIndex === index ? selected : unselected" @click="chooseH... | How to change an inside attributes | vuejs3 | 0 | 30 | 1 | 72,162,221 | 72,162,221 | 1 | true | 2022-05-08T14:23:54.177Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to change an inside attributes<p>I want to do a header buttons type like :</p>
<p>If I call "HeaderFunction" than all selecteds will be false a... |
72,159,494 | Specifying resource sets in seize block based on agent variable<p>Agents being pushed through the model have a variable <code>isMorning</code> which is set to <code>false</code>, but is made <code>true</code> if they are injected before a certain time. When the agents enter a seize block, I would like to add a conditio... | <p>Best option is to create a new function e.g. <code> getResoruceSet(boolean isMorning</code> and then return <code>ResourcePool[][]</code></p>
<p>You can then use this function to replace the resource set parameter in the seize block</p>
<p><a href="https://i.stack.imgur.com/y8YnW.png" rel="nofollow noreferrer"><img ... | Specifying resource sets in seize block based on agent variable | anylogic | 0 | 37 | 1 | 72,162,253 | 72,162,253 | 1 | true | 2022-05-08T09:03:48.347Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Specifying resource sets in seize block based on agent variable<p>Agents being pushed through the model have a variable <code>isMorning</code> which is set t... |
72,162,077 | Powershell - Export array to Html<p>I need a script that fetches the information and generates an HTML document.
I'm looking for a way to make the columns of my report more friendly so I saw that it is possible to change them with [PSCustomObject] but after I go through this process the data. "System.Object[]"... | <p>Try this, it works for me :)</p>
<pre><code>$objects=@()
$processes = Get-Process | select "ProcessName","ID"
foreach ($proc in $processes) {
$objects+=[PSCustomObject]@{
'Process Name' = $proc.processname
'identification' = $proc.id
}
}
$out = $objec... | Powershell - Export array to Html | arrays|powershell|export-to-html | 0 | 36 | 1 | 72,162,344 | 72,162,344 | 1 | true | 2022-05-08T14:41:31.263Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Powershell - Export array to Html<p>I need a script that fetches the information and generates an HTML document.
I'm looking for a way to make the columns of... |
72,162,304 | Difference of the long integer python object between jupyter and pycharm?<p>I wrote 2 codeblocks as follow, and run them in different ways with same anaconda virtual environment:</p>
<p>The first is:</p>
<pre><code>a = 1431324 # just a long integer
b = 1431324 # same as a
print(a is b) # the result is 'False' running i... | <p>If you have this function:</p>
<pre class="lang-py prettyprint-override"><code>def f():
a = 1431324
b = 1431324
return a is b
</code></pre>
<p>It would probably return <code>True</code>.</p>
<p>When you write <code>a,b = 1431324,1431324</code> in to your REPL, it basically does "build the tuple with... | Difference of the long integer python object between jupyter and pycharm? | python | 0 | 25 | 1 | 72,162,430 | 72,162,430 | 1 | true | 2022-05-08T15:04:22.480Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Difference of the long integer python object between jupyter and pycharm?<p>I wrote 2 codeblocks as follow, and run them in different ways with same anaconda... |
72,162,431 | Finding a count of all duplicates with a different last colum<p>I have a table of insurance policies and i am trying to find all of the policies that have the exact same information except in a different zip code (last column).</p>
<p>if anyone has any suggestions on how to find this it would be greatly appreciated</p>... | <p>Just use group by all columns (except Zip) and count by Zip.</p>
<pre><code>SELECT policy,
expiry,
state,
region,
insuredvalue,
construction,
businesstype,
COUNT(distinct zip) AS dupcount
FROM my_table
GROUP BY policy,
expiry,
state,
... | Finding a count of all duplicates with a different last colum | mysql|sql|database | 0 | 29 | 2 | 72,162,471 | 72,162,471 | 1 | true | 2022-05-08T15:19:51.627Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Finding a count of all duplicates with a different last colum<p>I have a table of insurance policies and i am trying to find all of the policies that have th... |
72,154,617 | TensorFlow 2.8.0 installing error using pip and poetry with python 3.10.4<p><strong>Edit 2</strong>: Solved</p>
<p>I tried to install TensorFlow many times in different ways:</p>
<ul>
<li>Tried installing it in Windows(10 and 11), WSL2.0 , and Ubuntu OS.</li>
<li>Tried installing it on 4 different computers, one of the... | <p>When using poetry, in your <code>pyproject.toml</code> edit manually:</p>
<pre><code>[tool.poetry.dependencies]
python = ">=3.10,<3.11"
</code></pre> | TensorFlow 2.8.0 installing error using pip and poetry with python 3.10.4 | python|tensorflow|pip|python-poetry | 0 | 826 | 1 | 72,162,505 | 72,162,505 | 1 | true | 2022-05-07T16:51:42.190Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
TensorFlow 2.8.0 installing error using pip and poetry with python 3.10.4<p><strong>Edit 2</strong>: Solved</p>
<p>I tried to install TensorFlow many times i... |
72,150,160 | How can I add dependency configuration in gradle<p>So I'm trying to convert this maven configuration to gradle</p>
<pre><code> <plugin>
<groupId>io.axoniq</groupId>
<artifactId>axon-dataprotection-maven-plugin</artifactId>
<version>${datapro... | <p>Gradle can only migrate simple projects. Projects that are using plugins that require configuration, Gradle can not help here. Especially for plugins that are not <a href="https://docs.gradle.org/current/userguide/migrating_from_maven.html#migmvn:common_plugins" rel="nofollow noreferrer">common</a>.</p>
<p>There doe... | How can I add dependency configuration in gradle | maven|gradle | 0 | 79 | 1 | 72,162,559 | 72,162,559 | 1 | true | 2022-05-07T06:52:29.783Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I add dependency configuration in gradle<p>So I'm trying to convert this maven configuration to gradle</p>
<pre><code> <plugin>
... |
72,162,495 | Django: Reverse accessor clashed with reverse accessor<p>In the code below, I have a post, likes, comment models. When I try to migrate the models to activate it, I am getting a reverse accessor error. For likes, user_that_liked only like once, while user_liked_to can have many likes. For comments, both user_that_comm... | <p>You need to specify related name to differentiate between relations</p>
<pre><code>class Post(models.Model):
user = models.ForeignKey(User, on_delete=models.CASCADE)
post_question = models.CharField(max_length=200)
pub_date = models.DateTimeField()
class Likes(models.Model):
user_that_liked = model... | Django: Reverse accessor clashed with reverse accessor | python|django|django-models | 0 | 104 | 1 | 72,162,573 | 72,162,573 | 1 | true | 2022-05-08T15:28:08.623Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Django: Reverse accessor clashed with reverse accessor<p>In the code below, I have a post, likes, comment models. When I try to migrate the models to activat... |
72,157,482 | How to ignore structlog debug/info/etc generated during pytest on doctests?<p>I'm trying to figure out how to ignore logging output from structlog in my doctests. It seems that pytest is capable of ignoring logs from logging, but not from structlog (at least not natively).</p>
<p>An example follows:</p>
<pre class="lan... | <p>You can either configure structlog to not log to stdout, or configure it to log using standard library logging such that pytest's logging helpers work.</p>
<p>The autouse fixture in <a href="https://www.structlog.org/en/stable/testing.html" rel="nofollow noreferrer">https://www.structlog.org/en/stable/testing.html</... | How to ignore structlog debug/info/etc generated during pytest on doctests? | python|pytest|structlog | 0 | 60 | 1 | 72,162,582 | 72,162,582 | 1 | true | 2022-05-08T01:36:58.280Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to ignore structlog debug/info/etc generated during pytest on doctests?<p>I'm trying to figure out how to ignore logging output from structlog in my doct... |
72,161,340 | Replace ControllerLinkBuilder in latest Spring HateOAS<p>I have a old project with the following Spring hateoas import dependency:</p>
<pre><code>import org.springframework.hateoas.mvc.ControllerLinkBuilder;
</code></pre>
<p>Do you know into the latest version how I can replace this import?</p> | <p>There is a class WebMvcLinkBuilder.
It's used like</p>
<pre><code>linkTo(OrderController.class).slash(order.getOrderId()).withSelfRel();
</code></pre> | Replace ControllerLinkBuilder in latest Spring HateOAS | java|spring|spring-hateoas|hateoas | 0 | 42 | 1 | 72,162,603 | 72,162,603 | 1 | true | 2022-05-08T13:11:49.077Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Replace ControllerLinkBuilder in latest Spring HateOAS<p>I have a old project with the following Spring hateoas import dependency:</p>
<pre><code>import org.... |
72,162,477 | React state doesn't work, it doesn't rerender components<p>I have problem with react updating state. Well, I didn't touch react for a while and I want to remember some things so I've started from beginning. However, I faced a problem. The problem is that onClick event doesn't work or <code>useState</code> doesn't work.... | <p>I understand the issue , Put Navbar in the div or <React.Fragment> element</p>
<pre><code> <div onClick={onNavbarCartClcikHandler}>
<Navbar onClick={onNavbarCartClcikHandler}>
<h1>React meals</h1>
<NavbarCart onClick={onNavbarCartClcikHandler} />
... | React state doesn't work, it doesn't rerender components | reactjs|react-hooks | 0 | 42 | 2 | 72,162,665 | 72,162,665 | 1 | true | 2022-05-08T15:26:11.157Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
React state doesn't work, it doesn't rerender components<p>I have problem with react updating state. Well, I didn't touch react for a while and I want to rem... |
72,162,649 | how to detect if a key is pressed for a duration /python<pre><code>def kill_my_session():
while True:
if keyboard.is_pressed("Esc + ctrl"):
browser.quit()
os._exit(0)
time.sleep(1)
</code></pre>
<p>How to make this if condition works if the Esc+Ctrl keys are pre... | <pre class="lang-py prettyprint-override"><code>import time
import keyboard
def kill_my_session():
s = 0
while True:
if keyboard.is_pressed("Esc+ctrl"):
time.sleep(1)
s+=1
if s>=3:
print('Keys are pressed for more than 3 second.')
... | how to detect if a key is pressed for a duration /python | python | 0 | 21 | 1 | 72,162,719 | 72,162,719 | 1 | true | 2022-05-08T15:44:26.737Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to detect if a key is pressed for a duration /python<pre><code>def kill_my_session():
while True:
if keyboard.is_pressed("Esc + ctrl&quo... |
72,162,590 | How to convert an object into a JSON_TABLE in MariaDB?<p>I have a <code>products</code> table which contains a <code>JSON</code> column <code>product_logs</code>. Inside of this, it contains something similar to:</p>
<pre><code>{
"c8eebc99-d936-3245-bc8d-17694f4ecb58": {
"created_at": "20... | <p>You seem to have copied, from another database, there is no varchar8max) in mysql, to syntax is a bit complicated, and you need to undestand json pretty well.</p>
<p>a gui like workbench, at least can help you identify the error, but it will not help you</p>
<blockquote>
<pre><code>CREATE TABLE products (product_lo... | How to convert an object into a JSON_TABLE in MariaDB? | sql|json|phpmyadmin|mariadb|mariadb-10.4 | 0 | 99 | 1 | 72,162,750 | 72,162,750 | 1 | true | 2022-05-08T15:38:34.297Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to convert an object into a JSON_TABLE in MariaDB?<p>I have a <code>products</code> table which contains a <code>JSON</code> column <code>product_logs</c... |
72,162,589 | Radio Button Text Alignment to left in Flutter<p>I want to create a Radio Button using Flutter in VS Code. I've done the radio button with functionality but the requirement of my project is to align the radio button text to the left side. But I can't to do that. Here I attached my sample source code.</p>
<pre><code>imp... | <p>A simpler approach would be to use the <a href="https://api.flutter.dev/flutter/material/RadioListTile-class.html" rel="nofollow noreferrer">RadioListTile</a> widget and set controlAffinity = ListTileControlAffinity.trailing. This will move the text to the left and the radio button to the right:</p>
<pre><code> ... | Radio Button Text Alignment to left in Flutter | flutter|radio-button | 0 | 273 | 1 | 72,162,752 | 72,162,752 | 1 | true | 2022-05-08T15:38:22.363Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Radio Button Text Alignment to left in Flutter<p>I want to create a Radio Button using Flutter in VS Code. I've done the radio button with functionality but ... |
72,161,534 | Exception caught by image resource service(already added assets in pubspec.yaml file)<p>Having this error <strong>"Exception caught by image resource service".</strong>
I already have added assets in <strong>pubspec.yaml</strong> file but still getting this <strong>error</strong> does anyone know why?
all fil... | <p>Assuming you have a folder in the root of your project (same level as <code>lib</code> folder) called <code>img</code>, then the only issue I see is that you need to use forward slash, not back slash in your <code>pubspec.yaml</code></p>
<pre><code>// changing \ to /
assets:
- img/welcome-one.png
- img/we... | Exception caught by image resource service(already added assets in pubspec.yaml file) | flutter|exception|flutter-dependencies | 0 | 226 | 1 | 72,162,894 | 72,162,894 | 1 | true | 2022-05-08T13:35:02.063Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Exception caught by image resource service(already added assets in pubspec.yaml file)<p>Having this error <strong>"Exception caught by image resource se... |
72,151,514 | what is the best way to get target substring through regex in bash script<p>I am creating a script to automate and extract large amounts of text files; Currently, my problem is to get target id from .html files, example below:</p>
<pre><code> \ \ <body id="some_id" class="calibre2">
</code></p... | <p>This has been repeated here countless times already; it's a really bad idea to parse/edit HTML with regex! An HTML parser like <a href="/questions/tagged/xidel" class="post-tag" title="show questions tagged 'xidel'" rel="tag">xidel</a> would be better suited. In fact, with its integrated EXPath File module o... | what is the best way to get target substring through regex in bash script | html|linux|bash|sed | 0 | 88 | 2 | 72,162,942 | 72,162,942 | 1 | true | 2022-05-07T10:10:40.847Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
what is the best way to get target substring through regex in bash script<p>I am creating a script to automate and extract large amounts of text files; Curre... |
72,160,232 | Redshift - SELECT expression works, but that expression is not usable when comparing with table value<p>I am selecting a value on Redshift that gets me a valid value (the timestamp 7 days before now):</p>
<pre><code>SELECT cast(extract (epoch from (NOW() - INTERVAL '7 days') ) as integer) ;
1651401212
</code></pre>
<... | <p>Oh the "ERROR: Specified types or functions (one per INFO message) not supported on Redshift tables." error. This has to be one of the worst written error messages in existence. This error means that the query tried to moved data from the leader node to the compute nodes which is an unsupported path. I... | Redshift - SELECT expression works, but that expression is not usable when comparing with table value | amazon-redshift | 0 | 52 | 1 | 72,163,158 | 72,163,158 | 1 | true | 2022-05-08T10:47:17.603Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Redshift - SELECT expression works, but that expression is not usable when comparing with table value<p>I am selecting a value on Redshift that gets me a val... |
72,163,040 | How to have 2 overlapping elements fill their parent<p>I need 2 elements (in the demo marked #a and #b) to both fill their parent entirely. I need element #a filling it's parent (this is easy, I just set flex to 1), and I need element #b to be atop of #a and have exactly same size as #a. How to make #b have the same si... | <p>If you set the parent (main) to position: relative while #b is position: absolute then you should be able to size it in relation to main (100% width and height in this case) and position it to top and left 0.</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div cl... | How to have 2 overlapping elements fill their parent | css|flexbox | 0 | 30 | 1 | 72,163,208 | 72,163,208 | 1 | true | 2022-05-08T16:28:13.110Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to have 2 overlapping elements fill their parent<p>I need 2 elements (in the demo marked #a and #b) to both fill their parent entirely. I need element #a... |
72,162,644 | How is not using Firebase Security Rules a security risk?<p>I have a nextjs application and I'm using firebase databse. I have not added security rules as I'm not using authentication.</p>
<p>I'm hosting on vercel and my firebase config is stored in environment variables. I heard that not using firease is a security ri... | <p>If your client app is not using the provided web or mobile APIs to directly access the database, then security rules are not ever being used. They only apply to web and mobile access. Backend access bypasses rules completely.</p>
<p>If you have no direct client access, then security rules are meaningless. Hackers... | How is not using Firebase Security Rules a security risk? | firebase|next.js|firebase-security | 0 | 92 | 1 | 72,163,378 | 72,163,378 | 1 | true | 2022-05-08T15:44:20.963Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How is not using Firebase Security Rules a security risk?<p>I have a nextjs application and I'm using firebase databse. I have not added security rules as I'... |
72,163,365 | what is the best way to get data inside a cloud-function in case you don't want to send a response?<p>I Have the following function and I want to do a conditional inside of the snapshot and then do some actions,
the current issue is I a can see the first console.log in the logs but the the function is not proceeding in... | <p>If you do not want to return anything from the function, you can simply return <code>null</code>. Also you should log any errors in the catch block so you'll know if something is wrong. Try refactoring the code using <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function... | what is the best way to get data inside a cloud-function in case you don't want to send a response? | node.js|google-cloud-functions | 0 | 17 | 1 | 72,163,422 | 72,163,422 | 1 | true | 2022-05-08T17:07:16.700Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
what is the best way to get data inside a cloud-function in case you don't want to send a response?<p>I Have the following function and I want to do a condit... |
72,163,417 | how to transfrom two separate queries into one long subselect<p>So I have this kind of problem. I have already the output what I wanted, but I want to get a better way to solve it.
I want to calculate number of products sold with the number of attributes of this product.</p>
<p>First I have created a new table for stat... | <p>Using simple CTE instead of temporary table should work (not tested):</p>
<pre><code>with stat1(products, numberOfAtributes) as (
select k.product_id as pp, count( ap.atribut_id) as numberOfAtributes from productAtributes as ap
JOIN cart k ON k.product_id = ap.product_id
GROUP BY k.product_id )
select c... | how to transfrom two separate queries into one long subselect | postgresql|select|subquery | 0 | 18 | 1 | 72,163,480 | 72,163,480 | 1 | true | 2022-05-08T17:15:16.007Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to transfrom two separate queries into one long subselect<p>So I have this kind of problem. I have already the output what I wanted, but I want to get a ... |
72,163,395 | After click on button prevent reloading the page<p>So, my page automatically reloads after 20 seconds:</p>
<pre><code>window.setInterval('refresh()', 20000);
function refresh() {
window.location.reload();
}
</code></pre>
<p>So I've added a button and contidion, if its true, page will reload.</p>
<pre><code>if(... | <p>You could check your condition inside the <code>refresh</code> function.</p>
<pre><code>var siteRefreshButton = true
function refresh() {
if (siteRefreshButton) {
window.location.reload()
}
}
function siteRefresh() {
siteRefreshButton = !siteRefreshButton
console.log(siteRefreshButton)
}
window.setInt... | After click on button prevent reloading the page | javascript|button|refresh|intervals | 0 | 18 | 1 | 72,163,505 | 72,163,505 | 1 | true | 2022-05-08T17:11:52.447Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
After click on button prevent reloading the page<p>So, my page automatically reloads after 20 seconds:</p>
<pre><code>window.setInterval('refresh()', 20000);... |
72,163,389 | Error upgrading spring boot version to 2.6.6<p>I am upgrading my spring boot application to latest stable version 2.6.6, The Build is successful, but getting below errors on runtime. How can i look why this class PropertySourceLocator is missing, and what steps can someone generally take to solve such issues related to... | <p>Do you have dependency for that class?</p>
<pre><code><!-- https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-context -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-context</artifactId>
<version>3.1.0... | Error upgrading spring boot version to 2.6.6 | java|spring|spring-boot|maven|dependency-management | 0 | 1,390 | 1 | 72,163,582 | 72,163,582 | 1 | true | 2022-05-08T17:11:24.507Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Error upgrading spring boot version to 2.6.6<p>I am upgrading my spring boot application to latest stable version 2.6.6, The Build is successful, but getting... |
72,162,142 | How to programatically set Shortcuts TargetPath to a website?<p>I want to use powershell to modify the TargetPath of a shortcut to open a website
I found the below script that almost works</p>
<pre><code>function Set-Shortcut {
param(
[Parameter(ValueFromPipelineByPropertyName=$true)]
$LinkPath,
$Hotkey,
$Ico... | <p>have you tried to change the properties of the shortcut object directly?</p>
<p>Try this and let me know:</p>
<pre><code>function Set-Shortcut {
[CmdletBinding()]
param (
[Parameter(Mandatory, Position = 0, ValueFromPipeline)]
[System.String]$FilePath,
[Parameter(Mandatory, Position = 1)]
[System.S... | How to programatically set Shortcuts TargetPath to a website? | powershell|object|shortcut | 0 | 41 | 1 | 72,163,594 | 72,163,594 | 1 | true | 2022-05-08T14:47:31.317Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to programatically set Shortcuts TargetPath to a website?<p>I want to use powershell to modify the TargetPath of a shortcut to open a website
I found the... |
72,163,313 | Swift & Codable: how to "bypass" some JSON levels?<p>I would like to use <a href="https://pokeapi.co/docs/v2#pokemon-section" rel="nofollow noreferrer">this Pokémon API</a> to fetch some data and convert it into a Swift <code>Pokemon</code> struct.</p>
<p>Here is an extract of the response I get when fetching Pokemon #... | <p>You can do custom encoding for <code>PokemonTypeNameContent</code>, and traverse through the levels of JSON using <code>nestedContainer</code></p>
<pre><code>enum PokemonTypeNameContent: String, Decodable {
case flying = "flying"
case rock = "rock"
// ...
enum OuterCodingKeys... | Swift & Codable: how to "bypass" some JSON levels? | json|swift|codable | 0 | 56 | 1 | 72,163,634 | 72,163,634 | 1 | true | 2022-05-08T17:00:49.273Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Swift & Codable: how to "bypass" some JSON levels?<p>I would like to use <a href="https://pokeapi.co/docs/v2#pokemon-section" rel="nofollow noreferrer">this ... |
72,163,511 | Scala overload constructor with mutable List of different type<p>I am trying to overload a constructor with mutable list of Int and Long , it mentions that the method is already defined.
I need <code>updateList</code> to be either <code>mutable.MutableList[Int]</code> or <code>mutable.MutableList[Long]</code></p>
<pre>... | <p>The error clearly refers to the upcasting that is happening in your code.
An <code>Int</code> can be represented as a <code>Long</code> hence you have essentially written the same method with one methods parameter being the upcasted version of the parameter of the other apply method.</p>
<p>You can simply use the ap... | Scala overload constructor with mutable List of different type | scala | 0 | 32 | 2 | 72,163,644 | 72,163,644 | 1 | true | 2022-05-08T17:25:44.407Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Scala overload constructor with mutable List of different type<p>I am trying to overload a constructor with mutable list of Int and Long , it mentions that t... |
72,162,084 | Cannot import Recoil to nextjs app using tsx - getting ReferenceError<p>I am learning nextjs and I am trying to add Recoil for state management.
My nextjs app is using tsx. I have no idea on how to resolve this issue and all suggestions/help will be greatly appreciated.</p>
<p>Please let me know if I need to provide an... | <p>Change the recoil version to "0.7.2"
Your new package.json file should look like this</p>
<pre><code> "private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start"
},
"de... | Cannot import Recoil to nextjs app using tsx - getting ReferenceError | reactjs|next.js|recoiljs | 0 | 217 | 1 | 72,163,746 | 72,163,746 | 1 | true | 2022-05-08T14:42:09.590Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Cannot import Recoil to nextjs app using tsx - getting ReferenceError<p>I am learning nextjs and I am trying to add Recoil for state management.
My nextjs ap... |
72,163,692 | Tkinter | TypeError: __init__() takes from 1 to 2 positional arguments but 3 were given<p>Code is meant to take the input from the tkinter entry widget, cam1, and assign to cam1_name, to then be appended to a list with its associated callback function. Obviously, it does not and throws the error above. Any help would b... | <p>To fix the error, you need to use the text keyword for the second argument of <code>Checkbutton</code>. All the options for <code>Checkbutton</code> need to be listed as <code>key=value</code> after the parent window argument.</p>
<pre><code>import tkinter as tk
from tkinter import ttk
root = tk.Tk() # my main w... | Tkinter | TypeError: __init__() takes from 1 to 2 positional arguments but 3 were given | python|tkinter|typeerror|init | 0 | 781 | 1 | 72,163,762 | 72,163,762 | 1 | true | 2022-05-08T17:46:55.243Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Tkinter | TypeError: __init__() takes from 1 to 2 positional arguments but 3 were given<p>Code is meant to take the input from the tkinter entry widget, cam1... |
72,158,230 | 'GlobalKey().currentContext' in ListWheelScrollView is null in flutter<p>I'm trying to select/scroll automatically to a particular element in ListWheelScrollView on a button click. It is working fine for the elements which are displayed in the current page. But I've been facing the issue when the list exceeds the scree... | <p>After doing a bit of ground work, I've figured out that it can be done through <code>FixedExtentScrollController</code>.</p>
<p>Here is the complete example if someone is facing the same issue.</p>
<pre><code>
void main() {
runApp(
const MaterialApp(home: StatefulWidgetsExample()), // use MaterialApp
);
}
c... | 'GlobalKey().currentContext' in ListWheelScrollView is null in flutter | android|flutter|dart|mobile-application | 0 | 523 | 1 | 72,163,781 | 72,163,781 | 1 | true | 2022-05-08T05:06:20.947Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
'GlobalKey().currentContext' in ListWheelScrollView is null in flutter<p>I'm trying to select/scroll automatically to a particular element in ListWheelScroll... |
72,163,544 | Grant all privs of a user to another user in Oracle<p>I have a user named A having some privileges. How can I grant all privileges which A is having and grant to user B?
Thanks in advance</p> | <p>Get all privileges from user A</p>
<pre><code> SELECT DBMS_METADATA.GET_GRANTED_DDL('ROLE_GRANT','A') FROM DUAL;
SELECT DBMS_METADATA.GET_GRANTED_DDL('SYSTEM_GRANT','A') FROM DUAL;
SELECT DBMS_METADATA.GET_GRANTED_DDL('OBJECT_GRANT','A') FROM DUAL;
</code></pre>
<p>Change the DDL commands with the user 'B' and ... | Grant all privs of a user to another user in Oracle | oracle | 0 | 62 | 1 | 72,163,808 | 72,163,808 | 1 | true | 2022-05-08T17:30:41.650Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Grant all privs of a user to another user in Oracle<p>I have a user named A having some privileges. How can I grant all privileges which A is having and gran... |
72,163,330 | Chrome debugger breaks at launch even without a breakpoint when started from Node.js VS Code project<p>Every time I launch my application, the Chrome Debugger immediately stops. I don't have any breakpoints. This is a really annoying behavior.</p>
<p>I launch my app with <code>node --inspect-brk</code> and launch the d... | <p>Found out. The <code>--inspect-brk</code> switch breaks when the debugger attaches. There's a regular <code>--inspect</code> flag instead.</p> | Chrome debugger breaks at launch even without a breakpoint when started from Node.js VS Code project | node.js|visual-studio-code|google-chrome-devtools | 0 | 29 | 1 | 72,163,856 | 72,163,856 | 1 | true | 2022-05-08T17:02:51.020Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Chrome debugger breaks at launch even without a breakpoint when started from Node.js VS Code project<p>Every time I launch my application, the Chrome Debugge... |
72,163,787 | Flutter/Dart Parsing JSON to model with a Map attribute<p>My API returns me this kind of json object where zones keys are dynamic</p>
<pre class="lang-json prettyprint-override"><code>{
"workspaces": [
{
"id": "1154237e8b6-7270-4c99-81e9-9d752e0c295c",
&... | <p>You can also try it on <a href="https://app.quicktype.io/" rel="nofollow noreferrer">https://app.quicktype.io/</a>. This site easily converts your JSON to the dart model class. there are many different languages supported</p>
<pre><code>import 'dart:convert';
SiteHierarchyModel siteHierarchyModelFromJson(String str... | Flutter/Dart Parsing JSON to model with a Map attribute | json|flutter|dart | 0 | 79 | 1 | 72,163,923 | 72,163,923 | 1 | true | 2022-05-08T17:56:52.483Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Flutter/Dart Parsing JSON to model with a Map attribute<p>My API returns me this kind of json object where zones keys are dynamic</p>
<pre class="lang-json p... |
72,163,822 | Q: remaining 0 printed after using "\r" in C++ code<p>I created a program that works like a countdown and I ran into an error:
Everything is printed fine until the seconds fall (counter.second) bellow 10, then it prints 90 instead of 9 ( or 09 ), 80 instead of 8 and so on.</p>
<p>If I remove "\r" the "Ti... | <p>Well, take a look:
If you write</p>
<pre><code>I like cats.
</code></pre>
<p>And then cover it with</p>
<pre><code>I like dogs.
</code></pre>
<p>Everything's fine.
But if you cover it with</p>
<pre><code>I like.
</code></pre>
<p>Then cats. remain uncovered.</p>
<pre><code>I like.cats.
</code></pre>
<p>This is what h... | Q: remaining 0 printed after using "\r" in C++ code | c++|countdown | 0 | 41 | 1 | 72,163,939 | 72,163,939 | 1 | true | 2022-05-08T18:01:15.400Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Q: remaining 0 printed after using "\r" in C++ code<p>I created a program that works like a countdown and I ran into an error:
Everything is printed fine unt... |
72,163,600 | GoogleSignIn iOS SDK doesn't match YouTube's Quickstart manual<p>I'm trying to integrate my app with YouTube's data API. I found <a href="https://developers.google.com/youtube/v3/quickstart/ios?ver=swift" rel="nofollow noreferrer">YouTube's manual</a> for doing so.</p>
<h1>The Problem</h1>
<p>When I tried to use the <e... | <p>After some more searching, I found the up-to-date manual for <code>GoogleSignIn</code> integration <a href="https://developers.google.com/identity/sign-in/ios/start-integrating" rel="nofollow noreferrer">here</a>.</p>
<p>The YouTube manual isn't relevant anymore.</p> | GoogleSignIn iOS SDK doesn't match YouTube's Quickstart manual | ios|google-signin|youtube-data-api|swift-package-manager | 0 | 48 | 1 | 72,163,978 | 72,163,978 | 1 | true | 2022-05-08T17:36:50.737Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
GoogleSignIn iOS SDK doesn't match YouTube's Quickstart manual<p>I'm trying to integrate my app with YouTube's data API. I found <a href="https://developers.... |
72,161,836 | Error when deleting GenericArguments[0], 'PX.Data.Current`1[PX.Objects.PO.POReceipt+receiptNbr]<p><a href="https://i.stack.imgur.com/TalJu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TalJu.png" alt="enter image description here" /></a></p>
<p>When I delete, I have this error :</p>
<pre><code>Gene... | <p>You aren't providing table names, so I will start with and explain an example from my code. Your use of PXParent is incorrect as you are telling it the parent is "where the receipt number of the parent record matches the parent's current receipt number".</p>
<p>Instead, consider this example. I have 2 tab... | Error when deleting GenericArguments[0], 'PX.Data.Current`1[PX.Objects.PO.POReceipt+receiptNbr] | acumatica | 0 | 28 | 1 | 72,164,013 | 72,164,013 | 1 | true | 2022-05-08T14:12:09.580Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Error when deleting GenericArguments[0], 'PX.Data.Current`1[PX.Objects.PO.POReceipt+receiptNbr]<p><a href="https://i.stack.imgur.com/TalJu.png" rel="nofollow... |
72,163,739 | want the app to save the passing screen after a user has passed the test even when the app exits in react native<p>I am trying to build a learning app where the user will learn a skill and then give a certain test about it. The problem I am having is that once the user has passed the test, I want the app to always show... | <p>Things like this should usually be handled on the server. However, you could make this persistent on the phone using the <a href="https://github.com/react-native-async-storage/async-storage" rel="nofollow noreferrer">AsyncStorage</a>.</p>
<p><strong>Storage functionality</strong></p>
<pre class="lang-js prettyprint-... | want the app to save the passing screen after a user has passed the test even when the app exits in react native | javascript|react-native|state | 0 | 60 | 1 | 72,164,064 | 72,164,064 | 1 | true | 2022-05-08T17:51:41.770Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
want the app to save the passing screen after a user has passed the test even when the app exits in react native<p>I am trying to build a learning app where ... |
72,163,997 | Tkinter entry is empty but if program says it is not<p>I'm writing a music related GUI in Python and a part of my script concerning tracks is not working properly.</p>
<p>I have some entry boxes for release dates and recording dates of tracks, and I want to check whether they are empty or not.</p>
<p>My code is as foll... | <p>It looks like you are just missing the check to see if it is the empty string, <code>self.dateReleaseEntry.get() == ''</code>. The empty string is considered <code>False</code> in Python. That is why the original code will not work.</p>
<pre><code>if self.active_tab == 'Tracks':
print(f'Release = {self.dateRelea... | Tkinter entry is empty but if program says it is not | python|user-interface|tkinter | 0 | 36 | 1 | 72,164,109 | 72,164,109 | 1 | true | 2022-05-08T18:25:21.320Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Tkinter entry is empty but if program says it is not<p>I'm writing a music related GUI in Python and a part of my script concerning tracks is not working pro... |
72,160,071 | make class static property observable in mobx-6<p>here's my code:</p>
<pre><code>export default class ViewStore {
templateName = '';
static views = [];
constructor(mainStore: MainStore) {
makeObservable(this, {
templateName: observable,
ViewStore.views: observable,
})... | <p>Basically the same way as you did with MobX@5, but without decorator api:</p>
<pre><code>import { observable } from "mobx";
export default class ViewStore {
templateName = '';
// Call observable as a function
static views = observable([]);
constructor(mainStore: MainStore) {
makeO... | make class static property observable in mobx-6 | javascript|mobx|mobx-react|state-management | 0 | 114 | 1 | 72,164,227 | 72,164,227 | 1 | true | 2022-05-08T10:24:09.837Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
make class static property observable in mobx-6<p>here's my code:</p>
<pre><code>export default class ViewStore {
templateName = '';
static views = [... |
72,164,113 | GET API calls to pull PDF in R<p>This code was working perfectly fine until 2021. After a long time ran this for some other project. The cals are successful with 200 status, but Not sure what is the reason the saved pdf or png file does not open. The error I get when trying to open the pdf file is "Adobe Acrobat c... | <p>You are getting a 200 because the request successfully returns html. It doesn't link directly to a pdf. A little snooping in the developer tools reveals the correct url for the actual pdf:</p>
<pre class="lang-r prettyprint-override"><code>url <- paste0("https://public.tableau.com/views/Book3_16512272064090/... | GET API calls to pull PDF in R | r|api|pdf|httr | 0 | 40 | 1 | 72,164,237 | 72,164,237 | 1 | true | 2022-05-08T18:42:27.203Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
GET API calls to pull PDF in R<p>This code was working perfectly fine until 2021. After a long time ran this for some other project. The cals are successful ... |
72,164,146 | Is there a way to use logical operations as templates in C++?<p>For example, I want to control the operator between <code>A</code> and <code>B</code> to something depending on the template I'm assigning it to (in <code>main</code>).</p>
<pre class="lang-cpp prettyprint-override"><code>// Theoretical operation template ... | <p>You could template <code>Example</code> on the operation, and pass the operation as a third parameter. An easy way to pass the operation is as a lambda or, as @Yksisarvinen commented above, as one of the function objects available in <code>std::functional</code>.</p>
<p>The example below works with arithmetic operat... | Is there a way to use logical operations as templates in C++? | c++|templates | 0 | 43 | 1 | 72,164,275 | 72,164,275 | 1 | true | 2022-05-08T18:46:47.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 use logical operations as templates in C++?<p>For example, I want to control the operator between <code>A</code> and <code>B</code> to some... |
72,164,148 | Uncaught Error: 'node' must be a RefObject when passing a React.RefObject<p>I'm trying to pass in a reference to the <code>exportComponentAsPNG</code> function.</p>
<pre><code>return (
<div id="grid">
<div id="pixels" ref={this.gridRef}>{rows}</div>
{(() => ... | <p>The <code>girdRef.current</code> is <code>null</code> in the first render. Even if you make it works with null checks, it is not a good practice to use a function like that.</p>
<p>You should use <code>componentDidMount</code> or <code>componentDidUpdate</code> to write your action based on your needs.</p>
<p><div c... | Uncaught Error: 'node' must be a RefObject when passing a React.RefObject | javascript|reactjs|ref | 0 | 132 | 1 | 72,164,307 | 72,164,307 | 1 | true | 2022-05-08T18:47:30.877Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Uncaught Error: 'node' must be a RefObject when passing a React.RefObject<p>I'm trying to pass in a reference to the <code>exportComponentAsPNG</code> functi... |
72,164,073 | Terraform Convert map output from module to list to use in other module<p>I managed to use <code>for_each</code> to create resources in regions based on a given array. Now I want to use the output URNs to assign the resources to a project in Digital Ocean. The problem is that the way I output the URNs for the resources... | <p>You can use the <a href="https://www.terraform.io/language/functions/keys" rel="nofollow noreferrer"><code>keys</code></a> function to get list with all they keys from the <code>map</code>. Also, you can use the <a href="https://www.terraform.io/language/functions/values" rel="nofollow noreferrer"><code>values</code... | Terraform Convert map output from module to list to use in other module | terraform | 0 | 308 | 1 | 72,164,353 | 72,164,353 | 1 | true | 2022-05-08T18:37:38.790Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Terraform Convert map output from module to list to use in other module<p>I managed to use <code>for_each</code> to create resources in regions based on a gi... |
72,164,374 | How to disable back screen scrolling when popup is displayed<p>I am using this popup modal from <a href="https://www.w3schools.com/bootstrap/bootstrap_modal.asp" rel="nofollow noreferrer">https://www.w3schools.com/bootstrap/bootstrap_modal.asp</a>, and it works pretty well, the issue is that when the popup appears, the... | <p>When the modal is open you can set some CSS class for your html and body elements. For example: <code>.modal-open</code>.</p>
<pre><code>.modal-open {
overflow: hidden;
}
</code></pre>
<p>More here: <a href="https://stackoverflow.com/a/53932629/8890700">https://stackoverflow.com/a/53932629/8890700</a></p> | How to disable back screen scrolling when popup is displayed | html|jquery|css | 0 | 38 | 1 | 72,164,406 | 72,164,406 | 1 | true | 2022-05-08T19:15:47.300Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to disable back screen scrolling when popup is displayed<p>I am using this popup modal from <a href="https://www.w3schools.com/bootstrap/bootstrap_modal.... |
72,161,964 | Validate date using Joi without convert it to utc format<p>Is there is a way to validate a date using @joi/date but without changing the date to UTC format.</p>
<p>I'm trying to validate the date before I send it to the DB</p>
<p>What I tried</p>
<pre><code>const Joi = require('joi').extend(require('@joi/date'));
...
... | <p>A possible workaround is to initiate a new date object from the date the user has sent, and next, you can get the full year, month, and day... also if you use this way, you will get the date in this format no matter what browser the user is using.</p>
<pre><code>const Joi = require('joi').extend(require('@joi/date')... | Validate date using Joi without convert it to utc format | javascript|node.js|typescript|joi | 0 | 537 | 1 | 72,164,437 | 72,164,437 | 1 | true | 2022-05-08T14:27:18.900Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Validate date using Joi without convert it to utc format<p>Is there is a way to validate a date using @joi/date but without changing the date to UTC format.<... |
72,163,905 | Update the color of current rectangle in matplot animation<p>I want to animate the Bubble Sort algorithm with <code>FuncAnimation</code>from matplotlib. My idea is to generate a random list of integers and initialize a bar chart plot with the values. Then I apply the <code>update_fig</code> function with the generator ... | <p>An approach could be to store the current value into a global variable, which can be checked during coloring. And, while we're at it, also make iteration a global variable.</p>
<pre class="lang-py prettyprint-override"><code>import random
from matplotlib import pyplot as plt
from matplotlib import animation
iterati... | Update the color of current rectangle in matplot animation | python|matplotlib|matplotlib-animation | 0 | 34 | 1 | 72,164,504 | 72,164,504 | 1 | true | 2022-05-08T18:12:36.963Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Update the color of current rectangle in matplot animation<p>I want to animate the Bubble Sort algorithm with <code>FuncAnimation</code>from matplotlib. My i... |
72,164,426 | How to make leaflet responsive?<p>I am using leaflet and I try to make the cart responsive. But if I am on mobile. The cart is not responsive.</p>
<p>So I have this piece of code:</p>
<pre><code>
<!DOCTYPE html>
<html>
<html lang="en-us">
<head>
<title>GeoVerdeling<... | <p>Seems like you need to add <code>max-width: 100%</code> in the css to <code>#peMap</code>. Otherwise it’s always 850px wide.</p> | How to make leaflet responsive? | javascript|html|css|leaflet | 0 | 68 | 1 | 72,164,521 | 72,164,521 | 1 | true | 2022-05-08T19:24:59Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to make leaflet responsive?<p>I am using leaflet and I try to make the cart responsive. But if I am on mobile. The cart is not responsive.</p>
<p>So I ha... |
72,160,471 | Different methods of copying dicts and lists<p>In Python there are various ways to create a shallow copy of a <code>dict</code>: there's the <code>dict</code> constructor, the <code>dict.copy</code> method, and the function <code>copy</code> from the <code>copy</code> module:</p>
<pre><code>>>> a = {'a':3, 'b'... | <p>Short answer: they are functionally equivalent.</p>
<p>No differences between the functions are described in the documentation. Examining the source, each will use the same function (<code>dict_merge</code>) in many cases.</p>
<p>Looking at the source of the <code>copy</code> module, <a href="https://github.com/pyth... | Different methods of copying dicts and lists | python|python-3.x|list|dictionary|copy | 0 | 41 | 2 | 72,164,590 | 72,164,590 | 1 | true | 2022-05-08T11:19:31.240Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Different methods of copying dicts and lists<p>In Python there are various ways to create a shallow copy of a <code>dict</code>: there's the <code>dict</code... |
72,164,340 | Compress multiple directories but exclude directory - Python zipfile(or anything native to Windows 2012+)<p>I'm looking to find a way to compress multiple directories while excluding a certain directory on several versions of Windows. Unfortunately tar is only available by default on Win 10+ and Compress-Archive doesn'... | <p>Try pairing the python command with Get-ChildItem. something like this:</p>
<pre><code>$fileInfo = Get-ChildItem -Path 'C:\Path\To\Some\Files\*.*' -Exclude '*Exclude*'
python3 -m zipfile -c zipName.zip $fileInfo.FullName
</code></pre>
<p>Or use the System.IO.Compression.GzipStream class (.NET 2.0) for something more... | Compress multiple directories but exclude directory - Python zipfile(or anything native to Windows 2012+) | python|windows|compress-archive | 0 | 21 | 1 | 72,164,604 | 72,164,604 | 1 | true | 2022-05-08T19:11:12.923Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Compress multiple directories but exclude directory - Python zipfile(or anything native to Windows 2012+)<p>I'm looking to find a way to compress multiple di... |
72,164,383 | My dropdown is displayed but the content/filter is not printed out<p>How can I display the content of my dropdown. Because for now, the dropdown is displayed but the options <code>Good</code>, <code>Medium</code>, <code>Bad</code>, <code>Critical</code> are not printed out.</p>
<pre><code>export default function Info({... | <p>change below code From:</p>
<pre><code>export default function Info({ onValidation, display }) {
const LEVEL = [
{ name: "Good", value: "Good" },
{ name: "Medium", value: "Medium" },
{ name: "Bad", value: "Bad" },
{ name: "Critical&qu... | My dropdown is displayed but the content/filter is not printed out | reactjs|react-hooks|tailwind-css | 0 | 32 | 1 | 72,164,632 | 72,164,632 | 1 | true | 2022-05-08T19:17:04.733Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
My dropdown is displayed but the content/filter is not printed out<p>How can I display the content of my dropdown. Because for now, the dropdown is displayed... |
72,159,713 | create and delete file linux<p>I am trying to create and delete file from the same pod and get error that the file not found, any idea?</p>
<p>one container creates the file and the second should delete it...</p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
name: mypod
spec:
volumes:
- name: shared
empty... | <p>Yes, the error was linked to the debian image (there is few solutions here:<a href="https://stackoverflow.com/questions/8501163/error-while-loading-shared-libraries-libpcre-so-0-cannot-open-shared-object-f">Error while loading shared libraries: 'libpcre.so.0: cannot open shared object file: No such file or direc... | create and delete file linux | linux|bash|amazon-web-services|shell|kubernetes | 0 | 64 | 1 | 72,164,741 | 72,164,741 | 1 | true | 2022-05-08T09:34:08.507Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
create and delete file linux<p>I am trying to create and delete file from the same pod and get error that the file not found, any idea?</p>
<p>one container ... |
72,164,354 | Read XML using pandas parsing to csv<p>I have the following code to extract data from XML to CSV file, but there is an error and I don't know how to solve it.</p>
<p>if anyone can help, please.</p>
<pre><code>url = "http://90.161.233.78:65519/services/user/records.xml?begin=04052022?end=06052022?var=EDSLINEEMBEDDE... | <p>Consider reading URL without <code>requests</code> or escaping content directly into <a href="https://pandas.pydata.org/docs/reference/api/pandas.read_xml.html" rel="nofollow noreferrer"><strong><code>pandas.read_xml()</code></strong></a>. Per docs, emphasis added:</p>
<blockquote>
<p>path_or_buffer: <em>str, path o... | Read XML using pandas parsing to csv | python|pandas|xml | 0 | 56 | 1 | 72,164,792 | 72,164,792 | 1 | true | 2022-05-08T19:13:17.493Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Read XML using pandas parsing to csv<p>I have the following code to extract data from XML to CSV file, but there is an error and I don't know how to solve it... |
72,142,402 | Reduce Duplications in Github Actions<p>I have read and tested different things but didn't found a solution. Maybe I have to live with the boilerplate, but I am not yet done trying it.</p>
<p>I have the follow github actions workflow:</p>
<pre class="lang-yaml prettyprint-override"><code>---
name: Code Quality Checks
... | <p>You could use a composite action that takes the cache key as an input; something like this (with updated action versions as of today):</p>
<pre class="lang-yaml prettyprint-override"><code>name: Install Python and Poetry
inputs:
python-version:
description: Python version
required: false
default: 3.7
... | Reduce Duplications in Github Actions | python|github-actions | 0 | 180 | 2 | 72,164,838 | 72,164,838 | 1 | true | 2022-05-06T13:38:02.833Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Reduce Duplications in Github Actions<p>I have read and tested different things but didn't found a solution. Maybe I have to live with the boilerplate, but I... |
72,164,714 | How to merge two column of a dataframe<p>I have this kind of dataframe :</p>
<pre><code>data = {'geom1': [17.45, np.nan, 17.445, np.nan], 'geom2': [np.nan,17.45,np.nan,17.455]}
df = pd.DataFrame(data)
</code></pre>
<p>I would like to merge the two column of the dataframe</p>
<p>Result expected :</p>
<pre><code>data2 = ... | <p>if you expect there always to be exactly one column that is non-nullish, you can do:</p>
<pre><code>df.geom1.fillna(df.geom2).to_frame(name='geom')
</code></pre> | How to merge two column of a dataframe | python|dataframe | 0 | 135 | 5 | 72,164,894 | 72,164,894 | 1 | true | 2022-05-08T20:06:05.590Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to merge two column of a dataframe<p>I have this kind of dataframe :</p>
<pre><code>data = {'geom1': [17.45, np.nan, 17.445, np.nan], 'geom2': [np.nan,17... |
72,164,348 | Tkinter widget displacement with pack()<p>I want to pack two buttons (left and right) and a label (in the middle) in a frame. I want the label to fill the remaining space on the frame to both sides, but the widgets get displaced vertically with this code. What's the best way to do this? The widgets don't necessarily ha... | <p>You can solve this problem a couple of ways. One solution is to pack the label to one side or the other rather than the top.</p>
<pre><code>btn1.pack(side='left')
lbl.pack(side='left', fill='x', expand=True)
btn2.pack(side='right')
</code></pre>
<p>Another is to pack the buttons first, and then pack the label. With ... | Tkinter widget displacement with pack() | python|tkinter|tkinter-layout | 0 | 63 | 1 | 72,164,924 | 72,164,924 | 1 | true | 2022-05-08T19:12:30.130Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Tkinter widget displacement with pack()<p>I want to pack two buttons (left and right) and a label (in the middle) in a frame. I want the label to fill the re... |
72,164,789 | function returning a 'none' type instead of string?<p>I have this function:</p>
<pre><code>def sentiment_review(query, maxresults):
.
.
.
positive_tweets = pds.sqldf("select count(sentiment)as n from df where sentiment =
'POSITIVE'")['n'].iloc[0]
negative_tweets = pds.sqldf("select cou... | <p><code>print()</code> itself is a function, which doesn't return anything. If you want to return a string, do just that without the print:</p>
<pre><code>def sentiment_review(query, maxresults):
...
# return a string, without printing to standard out
return "there were {} negative tweets and {} positive... | function returning a 'none' type instead of string? | python|pandas|string|function|pandasql | 0 | 98 | 1 | 72,164,940 | 72,164,940 | 1 | true | 2022-05-08T20:17:17.243Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
function returning a 'none' type instead of string?<p>I have this function:</p>
<pre><code>def sentiment_review(query, maxresults):
.
.
.
positiv... |
72,164,772 | log4j exclusion from the pom.xml file<p>I am trying to fix log4j vulnerabilities and I have updated the existing log4j to the latest log4j-core version.</p>
<p>I tried adding exclusion in the googlecode.owasp dependency but the old version of log4j-1.2.12 is added in the war file. As of now, there is no change in the ... | <p>It looks like Bookings:Miscellaneous:jar depends on log4j.</p>
<p>Change the bookings:miscellaneous dependency to something like this:</p>
<pre><code> <dependency>
<groupId>Bookings</groupId>
<artifactId>Miscellaneous</artifactId>
<version>0.0.1-SNAPSHOT... | log4j exclusion from the pom.xml file | java|maven|log4j | 0 | 155 | 1 | 72,164,967 | 72,164,967 | 1 | true | 2022-05-08T20:13:33.100Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
log4j exclusion from the pom.xml file<p>I am trying to fix log4j vulnerabilities and I have updated the existing log4j to the latest log4j-core version.</p>
... |
72,165,149 | ReactJS conditional dispatch reducer action<p>I am dispatching actions with a dispatch function from within child components available via context api.</p>
<pre><code>const NotificationProvider = (props) => {
const [state, dispatch] = useReducer((state, action) => {
switch (action.type) {
case "A... | <p>Add the payload to the front of the notifications and then slice off the rest (this way you also have latest notifications upfront.</p>
<pre><code> case "ADD_NOTIFICATION":
return [{...action.payload}, ...(state.slice(0,2))];
}
</code></pre> | ReactJS conditional dispatch reducer action | javascript|reactjs | 0 | 32 | 1 | 72,165,221 | 72,165,221 | 1 | true | 2022-05-08T21:16:43.130Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
ReactJS conditional dispatch reducer action<p>I am dispatching actions with a dispatch function from within child components available via context api.</p>
<... |
72,163,329 | Ramda: group by nested object<p>I have this data:</p>
<pre><code>const entities = [
{ id: 'view_1', group: { id: 'g_1', name: 'Group 1' } },
{ id: 'view_2', group: { id: 'g_2', name: 'Group 2' } },
{ id: 'view_3', group: { id: 'g_2', name: 'Group 2' } },
];
</code></pre>
<p>And I need to get this as output:</p>
<... | <p>Ramda's <a href="https://ramdajs.com/docs/#groupBy" rel="nofollow noreferrer"><code>groupBy</code></a> can help you here:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>con... | Ramda: group by nested object | javascript|functional-programming|ramda.js | 0 | 97 | 1 | 72,165,268 | 72,165,268 | 1 | true | 2022-05-08T17:02:49.903Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Ramda: group by nested object<p>I have this data:</p>
<pre><code>const entities = [
{ id: 'view_1', group: { id: 'g_1', name: 'Group 1' } },
{ id: 'view_... |
72,165,017 | Calling canvas.scale() doesn't scale the click listener area of the views<p>I have a bunch of Buttons in a LinearLayout. In the LinearLayout, I override onDraw() to call canvas.scale(scale, scale) where scale is some number. The buttons in the LinearLayout scales visually but the click area doesn't move and scale with ... | <p>One way to fix this is to scale your touch events, I've done this in a custom view I created that has scaling and panning.</p>
<p>In your <code>MyLinearLayout</code> override <code>dispatchTouchEvent</code></p>
<p>Create a <code>Matrix</code> that applies the scale factor then transform the <code>MotionEvent</code> ... | Calling canvas.scale() doesn't scale the click listener area of the views | android|kotlin|canvas|onclick | 0 | 110 | 1 | 72,165,313 | 72,165,313 | 1 | true | 2022-05-08T20:52:43.360Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Calling canvas.scale() doesn't scale the click listener area of the views<p>I have a bunch of Buttons in a LinearLayout. In the LinearLayout, I override onDr... |
72,164,536 | C Multiple Input in One Line<p>I am solving Problem 'Red Light Green Light' with code 'DOLL' on Code chef.</p>
<p><a href="https://www.codechef.com/problems/DOLL" rel="nofollow noreferrer">Code Chef: Red Light Green Light</a></p>
<p>In this Problem, I need to take N inputs in one line. I tried using scanf() but to no a... | <p>You need to ask yourself a couple of questions:</p>
<ul>
<li>do you need to check for "invalid" input, and reject cases where the input is split over multiple lines.</li>
<li>do you need to read all the numbers on a line of input WITHOUT knowing before hand how many there are supposed to be.</li>
</ul>
<p>... | C Multiple Input in One Line | c | 0 | 64 | 2 | 72,165,356 | 72,165,356 | 1 | true | 2022-05-08T19:39:01.787Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
C Multiple Input in One Line<p>I am solving Problem 'Red Light Green Light' with code 'DOLL' on Code chef.</p>
<p><a href="https://www.codechef.com/problems/... |
72,165,365 | All instances of a class share the same values<p>I've got a class called Data, whenever I declare a new instance of this class and change something in it, it changes all instances of that class. I'm not sure how to fix this, or why it is even happening.</p>
<p>(Note, I've stripped back a lot of what was in my data clas... | <p>data is not defined in the class, so you create a global variable. Create a member variable.</p>
<pre class="lang-cpp prettyprint-override"><code>class Data{
public:
struct Ts{
volatile int64_t unixTimestamp;
} data;
int ReturnTimestamp() volatile;
void SetTimestamp(i... | All instances of a class share the same values | c++|class | 0 | 56 | 1 | 72,165,416 | 72,165,416 | 1 | true | 2022-05-08T21:57:23.910Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
All instances of a class share the same values<p>I've got a class called Data, whenever I declare a new instance of this class and change something in it, it... |
72,148,117 | Redux Toolkit: How can I store a serialized action creator in state?<h1>Question</h1>
<p>I am using Redux Toolkit and I want to store an action creator in state. When I do this, I receive an error regarding non-serializable values in my action as well as my state. Using the code below as an example of my issue, how can... | <p>To be honest, this is a bad idea, and really not at all how Redux should be used.</p>
<p>Based on the examples, it <em>looks</em> like you're trying to create a modal and pass in a callback as a prop. There are other ways to do this that will work better with Redux, and in fact a few years ago I wrote a post on <a ... | Redux Toolkit: How can I store a serialized action creator in state? | javascript|reactjs|redux|react-redux|redux-toolkit | 0 | 114 | 2 | 72,165,437 | 72,165,437 | 1 | true | 2022-05-06T22:52:22.420Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Redux Toolkit: How can I store a serialized action creator in state?<h1>Question</h1>
<p>I am using Redux Toolkit and I want to store an action creator in st... |
72,165,340 | Calling a suspend function from inside Runnable.run()<p>I think conceptually this should work. But there is an error:</p>
<blockquote>
<p>Suspend function 'dueWorkingHours' should be called only from a coroutine or another suspend function</p>
</blockquote>
<p>Is Java and Kotlin parallelization not compatible? Is there... | <p>It’s not just a matter of Java and Kotlin parallelism being compatible or not. Even in pure Kotlin projects, you can never call suspend functions from outside a coroutine or other suspend function. There has to be some coroutine entry point for the suspend function to have a CoroutineContext, CoroutineScope, and Con... | Calling a suspend function from inside Runnable.run() | kotlin|parallel-processing|kotlin-coroutines|runnable | 0 | 269 | 1 | 72,165,478 | 72,165,478 | 1 | true | 2022-05-08T21:53:03.990Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Calling a suspend function from inside Runnable.run()<p>I think conceptually this should work. But there is an error:</p>
<blockquote>
<p>Suspend function 'd... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.