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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
71,217,704 | How often the TsFiles in Apache IoTDB be merged?<p>I'm currently inserting data into IoTDB and I see some small TsFiles is merging into the large files. I would like to know how often the TsFiles be merged and how the merge process is triggered. Thanks!</p> | <p>In the 0.12.x IoTDB <code>iotdb-engine.properties</code> file, there is a configuration <code>merge_fileSelection_time_budget=30000</code>, which means if there are enough amount of TsFiles of one level existed (seq_file_num_in_each_level=6 or unseq_file_num_in_each_level=10), the merge task will start. After <code>... | How often the TsFiles in Apache IoTDB be merged? | time-series|apache-iotdb | -1 | 17 | 1 | 71,218,572 | 71,218,572 | -1 | true | 2022-02-22T07:57:05.603Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How often the TsFiles in Apache IoTDB be merged?<p>I'm currently inserting data into IoTDB and I see some small TsFiles is merging into the large files. I wo... |
71,254,012 | Read a column from a table which its id is another table in mysql<p>Probably I dont ask the title well.</p>
<p>I have three tables as shown in the figure.</p>
<p>I want to get the column <code>x</code> in table <code>C</code> where <code>wid</code> is in table <code>B</code>. Some of the <code>wid</code> in table <code... | <p>Joining tables on primary key = other table's foreign key. There are inner/outer left and equi joins. Read on it.</p>
<pre><code>select A.Mid, C.X
from A
left join B on B.Mid = A.Mid
join C on C.Wid = B.Wid
</code></pre> | Read a column from a table which its id is another table in mysql | mysql|sql | -1 | 27 | 1 | 71,254,117 | 71,254,117 | -1 | true | 2022-02-24T15:02:25.007Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Read a column from a table which its id is another table in mysql<p>Probably I dont ask the title well.</p>
<p>I have three tables as shown in the figure.</p... |
71,209,393 | What are the names of the types of animations on this GIF?<p>What are the names of the types of animations on this GIF?
<a href="https://miro.medium.com/max/1400/1*EnfbAvsPg7d1OTorXugvmQ.gif" rel="nofollow noreferrer">https://miro.medium.com/max/1400/1*EnfbAvsPg7d1OTorXugvmQ.gif</a></p> | <p>I have found <a href="https://www.flinto.com/learn/create-a-full-screen-transition" rel="nofollow noreferrer">several</a> <a href="https://codemyui.com/ecommerce-grid-full-screen-product-click/" rel="nofollow noreferrer">examples</a> and most of them use the terminology <strong>“full-screen transition”</strong> to d... | What are the names of the types of animations on this GIF? | user-interface|user-experience | -1 | 20 | 1 | 71,209,654 | 71,209,654 | -1 | true | 2022-02-21T15:59:36.670Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What are the names of the types of animations on this GIF?<p>What are the names of the types of animations on this GIF?
<a href="https://miro.medium.com/max/... |
71,337,458 | Update nested dataclass values dynamically<p>I'm wondering if what I am trying to do is even possible or if perhaps my approach to this is just completely wrong.</p>
<p>Let's say we've got 3 <code>dataclasses</code>:</p>
<pre><code>@dataclass
class MyFirstClass:
my_int: int = 1
@dataclass
class MySecondClass:
... | <p>I changed my approach and I am not using <code>dataclasses</code> to manage the data injection for this particular use case.</p>
<p>Since I was anyway immediately converting the <code>dataclass</code> into a <code>JSON</code> object, I figured I would just use <code>JSON</code> files for storing and injecting the da... | Update nested dataclass values dynamically | python|python-3.x|python-dataclasses | -1 | 297 | 1 | 71,378,065 | 71,378,065 | -1 | true | 2022-03-03T12:46:43.093Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Update nested dataclass values dynamically<p>I'm wondering if what I am trying to do is even possible or if perhaps my approach to this is just completely wr... |
71,388,116 | How can I install a program, so that I can completely uninstall it later?<p>For university I need to install some programs for which I know, I will uninstall them after half a year.</p>
<p>From the past I know that simply uninstalling a program on Windows does not reset to the state before the installation. There are s... | <p>The short answer is that you can't. Even a "perfect" uninstaller will leave some registry entries behind. These are cache and tracking entries made by Explorer and their size is negligible.</p>
<p>If you want to attempt to cleanly uninstall you must keep track of the changes made to the system.</p>
<p>Stop... | How can I install a program, so that I can completely uninstall it later? | windows|memory | -1 | 43 | 1 | 71,390,323 | 71,390,323 | -1 | true | 2022-03-07T22:45:07.200Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I install a program, so that I can completely uninstall it later?<p>For university I need to install some programs for which I know, I will uninstall... |
71,288,031 | How to close a bootstrap Modal from a blazor webassembly component code?<p>I was trying to find a way to close a bootstrap modal from a C# method inside a blazor webassembly component.</p>
<p>Bellow is a solution I came up with.
It involves the use of IJSRuntime to call a javascript method to manipulate the bootstrap m... | <p>The bootstrap modal can be closed via javascript:</p>
<p>Create a javascript <strong>wwwroot/js/site.js</strong> file with the code:</p>
<pre><code>export function CloseModal(modalId) {
$(modalId).modal('hide');
}
</code></pre>
<p>Include the script in <strong>index.html</strong> at the end of the body:</p>
<pre... | How to close a bootstrap Modal from a blazor webassembly component code? | twitter-bootstrap|modal-dialog|blazor|webassembly | -1 | 1,028 | 1 | 71,288,032 | 71,288,032 | -1 | true | 2022-02-27T19:55:53.020Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to close a bootstrap Modal from a blazor webassembly component code?<p>I was trying to find a way to close a bootstrap modal from a C# method inside a bl... |
72,042,228 | Merge dataframes and complete indexes<p>I have 2 dataframes like:</p>
<pre><code>df1
(index)
start_time user class
10/20/1998 0.13 worker
10/21/1998 1341 worker
10/22/1998 1303 worker
df2
(index)
start_time user class
10/20/1998 192 empl
10/21/1998 12 emp... | <p>You can try reset the <code>start_time</code> index and then set the <code>class</code> and <code>start_time</code> columns as index.</p>
<pre class="lang-py prettyprint-override"><code>df = pd.concat([df1.reset_index().set_index(['class', 'start_time']),
df2.reset_index().set_index(['class', 'start_... | Merge dataframes and complete indexes | python|pandas | -1 | 25 | 2 | 72,042,303 | 72,042,303 | 0 | true | 2022-04-28T10:39:29.817Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Merge dataframes and complete indexes<p>I have 2 dataframes like:</p>
<pre><code>df1
(index)
start_time user class
10/20/1998 0.13 worker... |
72,059,610 | Column 'Csv.FolderId' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause<p>Table Csv has many columns including FirstName, Lastname, ProjectName, BuildingNumber etc. I want to find all the records have the same FirstName-LastName combinations.</p>
<p>However... | <p>The error message is correct. You can specify FirstName, LastName in the select list. All other columns need to be an aggregate. For example, MAX(Address) would be okay if address is a column in the table. (You won't know what record the MAX value came from if there is more then two records. Using MAX or MIN ca... | Column 'Csv.FolderId' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause | sql|sql-server|tsql | -1 | 28 | 1 | 72,060,005 | 72,060,005 | 0 | true | 2022-04-29T14:37:40.180Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Column 'Csv.FolderId' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause<p>Table Csv has many c... |
72,060,043 | HRef Not Using Stylesheets From New Folder?<p>I am having an issue with a an MVC ASP .Net project where i am attempting to add a new folder to hold all the css files I plan on using for the future however when testing the file in the folder is seems the project is not able to use them.
I have already done the following... | <p><em>Ok as is life in coding the problem i had been working on and trying to resolve for the past 2 days was solved straight after posting a question to stack overflow!</em></p>
<p>So after some research I found the the answer here relating to Static files within mvc asp .net <a href="https://docs.microsoft.com/en-us... | HRef Not Using Stylesheets From New Folder? | c#|html|css|asp.net-mvc|directory | -1 | 19 | 1 | 72,061,494 | 72,061,494 | 0 | true | 2022-04-29T15:09:16.503Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
HRef Not Using Stylesheets From New Folder?<p>I am having an issue with a an MVC ASP .Net project where i am attempting to add a new folder to hold all the c... |
72,058,358 | Name from other page included in other page is not displayed<p>In my application, I would like to include the name, entered by the user, at page one, to the second page. But when I paste the jinja print "{{ data }}" to the table, the name does not appear on the second page. It works flawlessly on the first o... | <p>You need to pass the variable to the the page here:</p>
<pre><code> return render_template("home.html", user=current_user)
</code></pre>
<p>I’m not sure where you get that variable though on that page, I can’t see it being sent. Additionally, it looks like you are validating the user input in the form tha... | Name from other page included in other page is not displayed | python|sqlite|flask|sqlalchemy|jinja2 | -1 | 17 | 1 | 72,062,661 | 72,062,661 | 0 | true | 2022-04-29T12:58:58.980Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Name from other page included in other page is not displayed<p>In my application, I would like to include the name, entered by the user, at page one, to the ... |
72,064,034 | Why is the function inside the dictionary executing before they're called<p>I'm trying to make simple code that reads names and put it on a list, what i am intending to do is a series of functions to add names to the list, remove name, find name position etc. so it will have a lot of <em>ifs</em>, to avoid that i tried... | <p>To store a function inside dictionary , you need to store the function name without the bracelet.</p>
<p>So in your case it should be like this :</p>
<pre><code>selection_dict = {1: addName, 2:searchName}
</code></pre>
<p>You should have looked more information on google on how to store a function inside a dict. Th... | Why is the function inside the dictionary executing before they're called | python|python-3.x | -1 | 33 | 1 | 72,064,139 | 72,064,139 | 0 | true | 2022-04-29T21:55:23.627Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why is the function inside the dictionary executing before they're called<p>I'm trying to make simple code that reads names and put it on a list, what i am i... |
72,064,889 | Sticking footer to bottom of page using flexbox and margin-top: auto; not working<p>I'm trying to get my footer to stick to the bottom of the page using <code>margin-top: auto;</code> but it doesn't have any effect.</p>
<p>I thought it might be because the parent has no height set but when setting <code>height: 100vh</... | <p>In your CodePen, the empty gap below the footer is taken up by the <code>padding: 700px</code> on <code>.testimonial-text</code>. Removing it (or lowering it to a reasonable value) fixes the issue.</p> | Sticking footer to bottom of page using flexbox and margin-top: auto; not working | html|css|flexbox | -1 | 258 | 2 | 72,064,915 | 72,064,915 | 0 | true | 2022-04-30T00:43:57.673Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Sticking footer to bottom of page using flexbox and margin-top: auto; not working<p>I'm trying to get my footer to stick to the bottom of the page using <cod... |
72,041,985 | npm install opensea-js failed<p>Git-2.36.0,node-v16.15.0</p>
<p>1297 error code 128
1298 error Command failed: git clone --depth=1 -q -b upgrade-wyvern-js <a href="https://github.com/ProjectOpenSea/wyvern-schemas.git" rel="nofollow noreferrer">https://github.com/ProjectOpenSea/wyvern-schemas.git</a> C:\Users\Administra... | <p>installed successfully
Git-2.36.0
node-v16.15.0
"opensea-js": "^1.2.8"
"web3":"^1.7.0"</p> | npm install opensea-js failed | node.js|npm | -1 | 291 | 1 | 72,066,163 | 72,066,163 | 0 | true | 2022-04-28T10:20:35.013Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
npm install opensea-js failed<p>Git-2.36.0,node-v16.15.0</p>
<p>1297 error code 128
1298 error Command failed: git clone --depth=1 -q -b upgrade-wyvern-js <a... |
72,068,227 | How to convert a bytearray in a tuple in a list to a string?<p>I am trying to fetch data from my mysql database using python:</p>
<pre><code>import mysql.connector
myDB = mysql.connector.connect(
host = "<host>",
port = "<port>",
user = "<user>",
password = "<pas... | <p>You can do it with list comprehension and <code>.decode()</code>:</p>
<pre><code>a = [(bytearray(b'0'),), (bytearray(b'0'),), (bytearray(b'1'),), (bytearray(b'0'),), (bytearray(b'0'),), (bytearray(b'1'),), (bytearray(b'0'),), (bytearray(b'0'),), (bytearray(b'0'),), (bytearray(b'1'),)]
[i[0].decode() for i in a]
</co... | How to convert a bytearray in a tuple in a list to a string? | python|mysql | -1 | 26 | 2 | 72,068,247 | 72,068,247 | 0 | true | 2022-04-30T11:44:20.887Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to convert a bytearray in a tuple in a list to a string?<p>I am trying to fetch data from my mysql database using python:</p>
<pre><code>import mysql.con... |
72,070,614 | How to allow two input values using an HTML pattern attribute<p>I'm looking to constrain user input using an HTML pattern attribute on a text input, I didn't want to use a select or radio buttons tag for design purposes. I tried many approaches but none of them allowed me to get to what I want.</p>
<p><div class="snipp... | <p>found the answer [L]{1}[1-3]|[M]{1}[1-2] using <a href="https://regex101.com" rel="nofollow noreferrer">https://regex101.com</a> and using logical or <a href="https://i.stack.imgur.com/6cxRt.png" rel="nofollow noreferrer">enter image description here</a></p> | How to allow two input values using an HTML pattern attribute | html|input | -1 | 35 | 2 | 72,073,304 | 72,073,304 | 0 | true | 2022-04-30T17:19:59.563Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to allow two input values using an HTML pattern attribute<p>I'm looking to constrain user input using an HTML pattern attribute on a text input, I didn't... |
72,078,974 | How do I adjust my function to display the correct value using the code that I am using. Is it possible this way? Thanks<p>How should I adjust this fun? When running the app the toast doesn't display the value, but as is. Hope that makes sense. For ex: "Option: @string/about_us" would be displayed instead... | <p>You need to use <code>Context#getString(stringResId)</code> to fetch the appropriate string from the ones you've defined (this also handles fetching the appropriate language version if you're using translations). You can't use the <code>@string/item_1</code> syntax here, that's an XML thing - you need to use <code>R... | How do I adjust my function to display the correct value using the code that I am using. Is it possible this way? Thanks | android|android-studio|kotlin | -1 | 29 | 1 | 72,079,080 | 72,079,080 | 0 | true | 2022-05-01T17:28:48.547Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I adjust my function to display the correct value using the code that I am using. Is it possible this way? Thanks<p>How should I adjust this fun? When... |
72,082,052 | Can I do Date calculation in React?<p>Say, I just retrieved an object called "food" from the database. "food" has an attribute called "created_at" and it is created automatically when food was created. "food" also has an attribute called "shelf_life" Now, in a react fro... | <p>you can use the library <code>moment</code>
<a href="https://momentjs.com/" rel="nofollow noreferrer">https://momentjs.com/</a></p>
<p>and declare your two dates</p>
<pre><code>let date1 = moment('2022-04-20T03:25:53.763+00:00');
let date2 = moment('2022-04-11T03:25:53.763+00:00');
</code></pre>
<p>then get the diff... | Can I do Date calculation in React? | reactjs|date | -1 | 24 | 1 | 72,082,085 | 72,082,085 | 0 | true | 2022-05-02T03:21:28.843Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Can I do Date calculation in React?<p>Say, I just retrieved an object called "food" from the database. "food" has an attribute called &qu... |
72,085,466 | python, randomly get keys from a dictionary based on values (with regex)<p>I have a dictionary like this,</p>
<pre><code>ex = {
'a': 'tf',
'b': 'tf',
'c': '0fft',
'd': '0tfff',
'e': '0fft',
'f': 'tft', ...
}
</code></pre>
<p>where there are many same values for different keys. The values are combinations of 't', 'f', ... | <p>IIUC you need to craft a regex for each dictionary value and use a loop to test all of them:</p>
<pre><code>def match(s, query):
import re
regex = re.sub(r'f+', 'f+', s)
regex = regex.replace('0', '(t|f+)')
return re.fullmatch(regex, query)
query = 'tft'
out = [k for k,s in ex.items() if match(s... | python, randomly get keys from a dictionary based on values (with regex) | python|dictionary|random|key-value | -1 | 34 | 1 | 72,085,930 | 72,085,930 | 0 | true | 2022-05-02T10:32:44.350Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
python, randomly get keys from a dictionary based on values (with regex)<p>I have a dictionary like this,</p>
<pre><code>ex = {
'a': 'tf',
'b': 'tf',
'c': '0... |
72,091,738 | how to search recycleview item like this<p>How to filter a recycleview.
I want to filter my recycleview but i want that initialy it should be empty but after adding or start searching in edittext it should visible the recycle view item and when the edit text will be empty so again the recycleview item visiablity should... | <p>Try this: <a href="https://developer.android.com/reference/android/widget/AutoCompleteTextView" rel="nofollow noreferrer">AutoCompleteTextView</a></p>
<p>Here is an <a href="https://droidbyme.medium.com/autocomplete-textview-in-android-a1bf5fc112f6" rel="nofollow noreferrer">example</a></p> | how to search recycleview item like this | android|android-studio|search|recycleview | -1 | 35 | 1 | 72,091,858 | 72,091,858 | 0 | true | 2022-05-02T19:56:17.237Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to search recycleview item like this<p>How to filter a recycleview.
I want to filter my recycleview but i want that initialy it should be empty but after... |
72,094,454 | Value passed from flask to JS works in html, not in static<p>I need to call a javascript function <code>say_hello</code> which exists in <code>static</code> folder and pass <code>Hello</code> as a message to be displayed as an alert. Here's what I do:</p>
<p><code>app.py</code></p>
<pre><code>from flask import Flask, r... | <p>When a <code><script></code> tag has a <code>src</code>, its contents are ignored. One or the other.</p>
<pre><code><script src="/js/hello.js">
</script>
<script>
const message = {{data.message|tojson|safe}}
say_hello(message);
</script>
</code></pre> | Value passed from flask to JS works in html, not in static | javascript|python|flask | -1 | 34 | 1 | 72,094,471 | 72,094,471 | 0 | true | 2022-05-03T03:09:05.107Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Value passed from flask to JS works in html, not in static<p>I need to call a javascript function <code>say_hello</code> which exists in <code>static</code> ... |
72,094,840 | why does it give this error when I run create-react-app<p>whenever i run create-react-app command it shows this thing.<a href="https://i.stack.imgur.com/6dg7y.png" rel="nofollow noreferrer">enter image description here</a></p>
<p>It was running fine earlier but it isn't working now</p> | <p>Did you try to uninstall any installs of React that you may have mistakenly installed globally? Try the commands that appear inside the warning message:
<code>npm uninstall -g create-react-app</code>
or for yarn: <code>yarn global remove create-react-app</code>.</p>
<p>After that you may use create-react-app, this t... | why does it give this error when I run create-react-app | reactjs | -1 | 35 | 3 | 72,094,864 | 72,094,864 | 0 | true | 2022-05-03T04:35:12.547Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
why does it give this error when I run create-react-app<p>whenever i run create-react-app command it shows this thing.<a href="https://i.stack.imgur.com/6dg7... |
72,079,569 | Why a path /dev(/|$)(.*) and a rewrite annotation aren't enough for a redirect in the Nginx ingress?<p>When I try to use a path different from / and a rewrite annotation in an ingress service I get an "error timeout" in browser. I need to be able to access my front with something like example.com/dev and the ... | <p>the problem was in the frontend vue application - I've added</p>
<pre><code>publicPath: '/dev/',
</code></pre>
<p>into the vue.config.js</p>
<p>ps I've skipped the echo service</p> | Why a path /dev(/|$)(.*) and a rewrite annotation aren't enough for a redirect in the Nginx ingress? | kubernetes|nginx-ingress | -1 | 18 | 1 | 72,111,541 | 72,111,541 | 0 | true | 2022-05-01T18:53:05.957Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why a path /dev(/|$)(.*) and a rewrite annotation aren't enough for a redirect in the Nginx ingress?<p>When I try to use a path different from / and a rewrit... |
72,125,752 | MySql: Order randomly when order is 0, but use numbers before<p>I have this table
<a href="https://i.stack.imgur.com/Ff9MD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ff9MD.png" alt="enter image description here" /></a></p>
<p>And I wanna retrieve all data but in a certain order. I want it to be ... | <p>The boolean expression <code>order = 0</code> is evaluated as <code>1</code> for <code>true</code> or <code>0</code> for <code>false</code> and can be used in the <code>ORDER BY</code> clause:</p>
<pre><code>SELECT *
FROM 10561_13581_tblOffers
WHERE isVisible = 1
ORDER BY `order` = 0, --this will send all 0s at th... | MySql: Order randomly when order is 0, but use numbers before | mysql | -1 | 31 | 2 | 72,130,838 | 72,130,838 | 0 | true | 2022-05-05T10:34:19.893Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
MySql: Order randomly when order is 0, but use numbers before<p>I have this table
<a href="https://i.stack.imgur.com/Ff9MD.png" rel="nofollow noreferrer"><im... |
72,132,811 | How to Read / Write / Edit Files with Javascript<p>I want to create a game that saves your progress using files. Is it possible to do something along the lines of this pseudo-code?</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class=... | <p>Are you using a framework like React or NextJS? If so, there are several options for flat-file storage.</p>
<p>If you're using vanilla JS, your only real option for client-side storage is the <code>localStorage()</code> method.</p>
<pre class="lang-js prettyprint-override"><code>/*game_data = The game's content*/
va... | How to Read / Write / Edit Files with Javascript | javascript|file|save|game-development | -1 | 19 | 1 | 72,133,019 | 72,133,019 | 0 | true | 2022-05-05T19:44:04.640Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to Read / Write / Edit Files with Javascript<p>I want to create a game that saves your progress using files. Is it possible to do something along the lin... |
72,139,250 | What does the .shape represent in Python?<p>I wanted to know what this represents, meaning, what does this tell me:</p>
<pre><code>len(array.shape)
</code></pre>
<p>the <em>array</em> being a random np.array</p>
<p>Thank you!</p> | <p>You're asking for the length of the shape of an array, meaning that you'll get the number of dimensions as a result. A 3D array will have a shape <code>(x, y, z)</code>, meaning that <code>len(array.shape)</code> will give you the result 3.</p> | What does the .shape represent in Python? | python | -1 | 48 | 2 | 72,139,317 | 72,139,317 | 0 | true | 2022-05-06T09:33:35.050Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What does the .shape represent in Python?<p>I wanted to know what this represents, meaning, what does this tell me:</p>
<pre><code>len(array.shape)
</code></... |
72,139,634 | Replacing characters in a returned Header Location in PHP<p>I'm trying to filter returned header location after POST using below PHP code. The returned header location is required for further processing of the payment status and saving the status in the db. The API provider seems not supportive since they don't reply o... | <p>Your <code>json_encode</code> call is causing the problem, by escaping the <code>/</code> values.</p>
<p>Demo: <a href="https://3v4l.org/S3VWD" rel="nofollow noreferrer">https://3v4l.org/S3VWD</a></p>
<p>There's no need to encode a single string like this. JSON is mainly useful when you have a more complex set of in... | Replacing characters in a returned Header Location in PHP | php | -1 | 20 | 1 | 72,139,761 | 72,139,761 | 0 | true | 2022-05-06T09:59:51.873Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Replacing characters in a returned Header Location in PHP<p>I'm trying to filter returned header location after POST using below PHP code. The returned heade... |
72,139,882 | Moment.js isAfter() is not a function<p>I'm using FullCalendar with jQuery timepicker to set the event.</p>
<p>I have 2 variables named timeDateInizio and timeDateFine.</p>
<p>Those two variables are string created by merging 2 other variables each, one for the YY:MM:dd and the other for hh:mm:ss</p>
<p>Then I have an ... | <p>Does casting your variables into Moment objects solve your issue?</p>
<pre><code>if (moment(timeDateInizio).isAfter(moment(timeDateFine))) {...}.
</code></pre> | Moment.js isAfter() is not a function | fullcalendar|momentjs|timepicker | -1 | 140 | 1 | 72,140,189 | 72,140,189 | 0 | true | 2022-05-06T10:18:14.133Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Moment.js isAfter() is not a function<p>I'm using FullCalendar with jQuery timepicker to set the event.</p>
<p>I have 2 variables named timeDateInizio and ti... |
72,140,062 | Symfony Test - Testing database with data to check Show($id) Feature<p>Could someone explain me how can I add some entities in to database for test purpose?
I want to test that endpoint /show/{id} show correct response, but to check that i need to have a entity in test database so i could download his data.</p>
<p>Im u... | <p>You are looking for Integration tests with symfony and you will face prerequisites (fixtures, test database, api call via <code>WebTestCase</code> class, ...).
It's a bit longer to explain in details, so all you want is in this page: <a href="https://symfony.com/doc/current/testing.html" rel="nofollow noreferrer">ht... | Symfony Test - Testing database with data to check Show($id) Feature | php|symfony|doctrine | -1 | 90 | 1 | 72,140,599 | 72,140,599 | 0 | true | 2022-05-06T10:31:17.807Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Symfony Test - Testing database with data to check Show($id) Feature<p>Could someone explain me how can I add some entities in to database for test purpose?
... |
72,140,512 | How to generate numbers in order from 1 to 10000 in groovy?<p>I need to parameterize the script so that the numbers are used in order</p> | <p>You can use the range syntax to generate an array of in order numbers.</p>
<pre><code>def countParam = 10000
def range = 1..countParam
=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ...]
</code></pre> | How to generate numbers in order from 1 to 10000 in groovy? | groovy|jmeter | -1 | 78 | 2 | 72,140,605 | 72,140,605 | 0 | true | 2022-05-06T11:08:17.630Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to generate numbers in order from 1 to 10000 in groovy?<p>I need to parameterize the script so that the numbers are used in order</p> |
72,140,645 | My decimal to hex conversion function only woks with positive nums<p>I'm having problems converting negative numbers, from decimal base to hexadecimal base, with the following function:</p>
<pre><code>#include <stdio.h>
int main()
{
int quotient, remainder;
int i, j = 0;
char hexadecimalnum[100];
... | <p>Some fixes:</p>
<ul>
<li><code>unsigned int quotient</code> - you need to convert <code>-50</code> to a large hex number in two's complement or you'll get the wrong number of iterations (2) in the loop, instead of 8 as required.</li>
<li>Removal of "magic numbers": <code>'0' + remainder</code> and <code>'A... | My decimal to hex conversion function only woks with positive nums | c | -1 | 94 | 2 | 72,141,062 | 72,141,062 | 0 | true | 2022-05-06T11:19:43.587Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
My decimal to hex conversion function only woks with positive nums<p>I'm having problems converting negative numbers, from decimal base to hexadecimal base, ... |
72,141,093 | get InputName of div element using js, no jquery please<p>I have a variable that consists of an HTML tag as below:</p>
<pre><code>let customDiv = '<div class="MuiAutocomplete-root" name="ApplyTo">Hello</div>';
</code></pre>
<p>I want to fetch the "name" which outputs --> <s... | <p>You can either use string manipulation techniques like <code>Regex</code>:</p>
<pre><code>customDiv.match('name="(.*?)"')[1]
</code></pre>
<p>Splitting or substrings:</p>
<pre><code>customDiv.split('name="')[1].split('"')[0]
</code></pre>
<p>Or get a full on DOM going by using the <code><templ... | get InputName of div element using js, no jquery please | javascript|html | -1 | 28 | 1 | 72,141,203 | 72,141,203 | 0 | true | 2022-05-06T11:56:34.117Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
get InputName of div element using js, no jquery please<p>I have a variable that consists of an HTML tag as below:</p>
<pre><code>let customDiv = '<div cl... |
72,139,950 | How to send messages to Webhook from Lua using io.read<p>I'm need it for Webhook so i not tired to type from editing</p>
<pre><code>local message = [[ {"username":"example","avatar_url": "example.com","content": (where io.read will be content)
</code></pre> | <p>Discord webhooks use JSON. You can use a JSON library such as <a href="https://github.com/grafi-tt/lunajson/" rel="nofollow noreferrer">lunajson</a> to properly escape your inputs. It is written in pure Lua and can therefore always be used when Lua is available (doesn't require any C libraries / compilation / comple... | How to send messages to Webhook from Lua using io.read | lua | -1 | 385 | 1 | 72,143,413 | 72,143,413 | 0 | true | 2022-05-06T10:23:02.490Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to send messages to Webhook from Lua using io.read<p>I'm need it for Webhook so i not tired to type from editing</p>
<pre><code>local message = [[ {"... |
72,143,435 | Is there a way of "extracting" communication protocol from an old software?<p>I have an obsolete hardware level/pressure transmitter that communicate with mcu using custom protocol (it appear to be similar to modbus RTU), that hardware comes along with an old commissioning software that works perfectly fine under lates... | <p>The best tool to analyze a protocol is Wireshark. Run it on the communication link between the Windows machine and the radar. First possibility: the protocol is actually something that Wireshark knows (some trials and errors with the "Decode as" menu may be necessary.) Second possibility, less funny: the p... | Is there a way of "extracting" communication protocol from an old software? | c | -1 | 101 | 2 | 72,143,583 | 72,143,583 | 0 | true | 2022-05-06T14:49:59.720Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is there a way of "extracting" communication protocol from an old software?<p>I have an obsolete hardware level/pressure transmitter that communicate with mc... |
72,142,280 | Can't parse out text that is behind </span>text</a> in Beautifulsoup<p>I think I have tried it all, read crummy, read documentation on Beautifulsoup4 website. I can't get this thing wrapped around my head.</p>
<p>So to the question:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-b... | <p><code>text behind /span> "text"</code> are text nodes of <code>a tag</code> . So You have to select [a class="ellipsis" ] then you can call <code>.get_text()</code> method to get text nodes value as text/string</p>
<pre><code>html='''
<html>
<body>
<a class="ellipsis&quo... | Can't parse out text that is behind </span>text</a> in Beautifulsoup | python|html|beautifulsoup | -1 | 41 | 1 | 72,144,308 | 72,144,308 | 0 | true | 2022-05-06T13:30:02.857Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Can't parse out text that is behind </span>text</a> in Beautifulsoup<p>I think I have tried it all, read crummy, read documentation on Beautifulsoup4 website... |
72,144,179 | Why am I getting .slice is not a function?<p>I know that <code>.slice()</code> can only work on arrays and strings. I'm calling <code>.slice()</code> on an array and I am still getting that error. Here is my code:</p>
<pre class="lang-js prettyprint-override"><code>var subsets = function(nums) {
let subsets = [];
... | <pre><code>let set1 = currentSubset.push(currentNumber);
subsets.push(set1)
</code></pre>
<p>Here <code>currentSubset.push()</code> will return lenth of new array and which you store in <code>subsets</code> array. And that you have declared array of array.
So in next iteration <code>subsets[1]</code> will be length of ... | Why am I getting .slice is not a function? | javascript | -1 | 64 | 2 | 72,144,418 | 72,144,418 | 0 | true | 2022-05-06T15:44:20.737Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why am I getting .slice is not a function?<p>I know that <code>.slice()</code> can only work on arrays and strings. I'm calling <code>.slice()</code> on an a... |
72,143,231 | "Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0" ERROR -- NodeJS, MongoDB, React Application<p>I'm trying to fetch an array from my user database from my react app. The response I'm getting is an HTML file, but I'm not sure why it's not working as I have the same code working perfectly for ... | <p>Express uses precedence when defining routes. I had the following code placed above all of my get routes, therefore overriding them.</p>
<pre><code>app.get("*", function (request, response) {
response.sendFile(path.resolve(__dirname, "../frontend/build", "index.html"));
});
</code></p... | "Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0" ERROR -- NodeJS, MongoDB, React Application | node.js|reactjs|express|mongoose|jwt | -1 | 121 | 1 | 72,144,623 | 72,144,623 | 0 | true | 2022-05-06T14:35:38.397Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
"Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0" ERROR -- NodeJS, MongoDB, React Application<p>I'm trying to fetch an array from... |
72,144,361 | Reverse Engineering a string in python<p>we have encoded strings that want to decryption it.
First, the first letter of the string, then the last letter. Then the rest of the letters are stored in the same way. For example, the string amir is first added to the new letter. Then the last letter is r. This process contin... | <p>You can use <code>replace</code> to make the character replacements.</p>
<p>For the encoding part: to apply the permutation of the characters, apply the logic with a variable <code>i</code> that you let run from 0 to the half of the string. Take the character at index <code>i</code> and the one that is <code>i</code... | Reverse Engineering a string in python | python | -1 | 62 | 1 | 72,145,004 | 72,145,004 | 0 | true | 2022-05-06T15:57:45.203Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Reverse Engineering a string in python<p>we have encoded strings that want to decryption it.
First, the first letter of the string, then the last letter. The... |
72,144,753 | C# SQL query with user input<p>I tried to make software that could be use as a database for libraries so I started to learn SQL I alredy did way to save a book into the database but I am stuck at searching in database I really dont know how to write query with user input I tried to google but cant find the answer I am ... | <p>From What i understood you're trying to search for something in your database</p>
<p>your query looks is :</p>
<pre><code> SELECT * FROM books WHERE name = @name OR name LIKE @name
</code></pre>
<ul>
<li><p>the <strong>=""</strong> sign means that the name must equal the parameter @name</p>
</li>
<li><p>th... | C# SQL query with user input | c#|sql | -1 | 171 | 2 | 72,145,025 | 72,145,025 | 0 | true | 2022-05-06T16:33:34.663Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
C# SQL query with user input<p>I tried to make software that could be use as a database for libraries so I started to learn SQL I alredy did way to save a bo... |
72,146,371 | How to avoid "ConcurrentModificationException" while add ArrayList elements?<p>I'm trying to add an item to the ArrayList in a certain order</p>
<pre><code>Iterator<Rating> it = arr.iterator();
while(it.hasNext()){
Rating o = it.next();
int index = arr.indexOf(o);
if(o.getRating() < this.getRating(... | <p>Perhaps one of the following collections will serve in place of the <code>ArrayList</code>?</p>
<p>A <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/concurrent/CopyOnWriteArrayList.html" rel="nofollow noreferrer">CopyOnWriteArrayList</a> will let you write without causing a <code>Conc... | How to avoid "ConcurrentModificationException" while add ArrayList elements? | java|concurrentmodificationexception | -1 | 45 | 1 | 72,146,584 | 72,146,584 | 0 | true | 2022-05-06T19:14:09.563Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to avoid "ConcurrentModificationException" while add ArrayList elements?<p>I'm trying to add an item to the ArrayList in a certain order</p>
<pre><code>I... |
72,142,842 | Unable to save and then load app settings via JSON - 'System.Text.Json.JsonElement' to type 'System.Collections.Generic.List`1[System.String]'.'<p>Using the below code, I'm trying to save app settings data in JSON format so it's easily readable and (in theory) easy to load back directly into data structures. Unfortunat... | <p>I tried the Newtonsoft method including the deserializing of the sub-element and it didn't work (at least not how I implemented it).</p>
<p>Instead I re-evaluated my data structures and got rid of the ListDictionary in favor of Dictionary<string,List> since that's what I was doing anyway.</p>
<p>From there, I ... | Unable to save and then load app settings via JSON - 'System.Text.Json.JsonElement' to type 'System.Collections.Generic.List`1[System.String]'.' | c#|json | -1 | 58 | 2 | 72,147,268 | 72,147,268 | 0 | true | 2022-05-06T14:08:25.640Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Unable to save and then load app settings via JSON - 'System.Text.Json.JsonElement' to type 'System.Collections.Generic.List`1[System.String]'.'<p>Using the ... |
72,147,167 | Add a comma after two words in pandas<p>I have the following texts in a df column:</p>
<pre><code>La Palma
La Palma Nueva
La Palma, Nueva Concepcion
El Estor
El Estor Nuevo
Nuevo Leon
San Jose
La Paz Colombia
Mexico Distrito Federal
El Estor, Nuevo Lugar
</code></pre>
<p>What I need is to add a comma at the end of each... | <p>Given:</p>
<pre><code> words
0 La Palma
1 La Palma Nueva
2 La Palma, Nueva Concepcion
3 El Estor
4 El Estor Nuevo
5 Nuevo Leon
6 San Jose
7 La Paz Colombia
8 Mexico Distrito Fed... | Add a comma after two words in pandas | python|pandas|conditional-statements | -1 | 44 | 1 | 72,147,641 | 72,147,641 | 0 | true | 2022-05-06T20:43:28.253Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Add a comma after two words in pandas<p>I have the following texts in a df column:</p>
<pre><code>La Palma
La Palma Nueva
La Palma, Nueva Concepcion
El Estor... |
72,147,485 | Python: extracting specific values out an numpy array of indices<p>I have a numpy array of indices. For example:</p>
<pre><code> indices = np.array([0, 1, 2, 6, 7, 9, 12, 13, 14])
</code></pre>
<p>I would like to make an array</p>
<pre><code>signals = np.zeros(np.amax(indices) + 1)
</code></pre>
<p>where I put a value ... | <p>This kind of issues, usually, can be handled by <code>np.diff</code>. We need to find starting and ending indices of each sequence; Also, the index of the value that is not in any sequences to be removed from indices that are found. At the end, the <code>signals</code> will be filled, in the specified <code>indices<... | Python: extracting specific values out an numpy array of indices | python|arrays|numpy|filter | -1 | 45 | 1 | 72,148,102 | 72,148,102 | 0 | true | 2022-05-06T21:21:12.853Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python: extracting specific values out an numpy array of indices<p>I have a numpy array of indices. For example:</p>
<pre><code> indices = np.array([0, 1, 2,... |
72,148,632 | AttributeError: 'str' object has no attribute 'tk' when click button<p>Here is my code:</p>
<pre><code>
window = tk.Tk()
version = tk.Label(text="hi",
fg="orange",
bg="black",
width=20,
height=10,
... | <p>Per the error statement, the origin of the problem is this line:</p>
<pre><code>File "/Users/name/Desktop/project/gui/main.py", line 19, in click
name = tk.Label("name")
</code></pre>
<p>The first expected argument of a Label is the "master", or parent window.</p> | AttributeError: 'str' object has no attribute 'tk' when click button | python|user-interface|tkinter | -1 | 98 | 1 | 72,148,659 | 72,148,659 | 0 | true | 2022-05-07T00:46:53.487Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
AttributeError: 'str' object has no attribute 'tk' when click button<p>Here is my code:</p>
<pre><code>
window = tk.Tk()
version = tk.Label(text="hi&q... |
72,138,961 | Scala Test: how to assert lenghty exception message securly and clean without hardcoding?<p>I have the following code, which is used to (sha) hash columns in a spark dataframe:</p>
<pre><code>import org.apache.spark.sql.DataFrame
import org.apache.spark.sql.functions.{sha2,lit, col}
object hashing {
def process(hashF... | <p>You should not be asserting exception messages (unless they are surfced to the user, or something downndstream relies on them).
If throwing an exception is a part of contract, then you should be throwing one of a specific type with a given error code, and tests should be asserting that. And if it isn't, then who car... | Scala Test: how to assert lenghty exception message securly and clean without hardcoding? | scala|unit-testing|apache-spark|exception|coding-style | -1 | 39 | 2 | 72,148,783 | 72,148,783 | 0 | true | 2022-05-06T09:08:52.857Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Scala Test: how to assert lenghty exception message securly and clean without hardcoding?<p>I have the following code, which is used to (sha) hash columns in... |
72,145,673 | Why does Bootsrap overwrite my local stylesheet?<p>Whenever I import bootstrap like this</p>
<pre><code><link rel="stylesheet" href="./css/style.css">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
</code></pre>
... | <p>The Bootstrap stylesheet sets styles for the <code>body</code> and many other elements (read <a href="https://getbootstrap.com/docs/5.1/content/reboot/" rel="nofollow noreferrer">https://getbootstrap.com/docs/5.1/content/reboot/</a>), that your stylesheet does not touch. Also, if you don't want your styles overridde... | Why does Bootsrap overwrite my local stylesheet? | css|twitter-bootstrap | -1 | 37 | 1 | 72,149,496 | 72,149,496 | 0 | true | 2022-05-06T18:00:41.203Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why does Bootsrap overwrite my local stylesheet?<p>Whenever I import bootstrap like this</p>
<pre><code><link rel="stylesheet" href="./css/... |
72,149,989 | how to change prettier format for react native<p>my code formatting prettier didn't works well for react native, i don't understand where to config it but it works well with flutter</p>
<p>from this code</p>
<pre><code> import { View, Text } from 'react-native'
import React from 'react'
export de... | <p>well i found the answer right away lol</p>
<ol>
<li>press f1 choose Format Document With</li>
</ol>
<p><a href="https://i.stack.imgur.com/Hewxt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Hewxt.png" alt="enter image description here" /></a></p>
<ol start="2">
<li>and select prettier for defaul... | how to change prettier format for react native | javascript|reactjs|flutter|react-native|dart | -1 | 85 | 2 | 72,150,016 | 72,150,016 | 0 | true | 2022-05-07T06:20:03.907Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to change prettier format for react native<p>my code formatting prettier didn't works well for react native, i don't understand where to config it but it... |
72,146,956 | Add values spreadsheet iterating over cells and values to append<p>I would like to add the following formulas to a spreadsheet</p>
<pre><code> sheet["D6"] = "=AVERAGE(D3:D5)"
sheet["E6"] = "=AVERAGE(E3:E5)"
sheet["F6"] = "=AVERAGE(F3:F5)"
sheet[&quo... | <p>...</p>
<pre><code>avg_row_start = 3 # row start of Averaging
avg_row_end = 5 # row end of Averaging
avg_totals_row = 6 # row where the Averaging formulas reside
start_col = 4 # col of first formula 'D' = 4
end_col = 16 # col of last formula 'P' = 16
for row in ws.iter_rows(min_row=avg_totals_row, max... | Add values spreadsheet iterating over cells and values to append | python|openpyxl | -1 | 31 | 1 | 72,150,218 | 72,150,218 | 0 | true | 2022-05-06T20:19:49.860Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Add values spreadsheet iterating over cells and values to append<p>I would like to add the following formulas to a spreadsheet</p>
<pre><code> sheet["... |
72,147,790 | ggplot facet different Y axis order based on value<p>I have a faceted plot wherein I'd like to have the Y-axis labels and the associated values appear in descending order of values (and thereby changing the order of the labels) for each facet. What I have is this, but the order of the labels (and the corresponding valu... | <p>The functions <code>reorder_within</code> and <code>scale_*_reordered</code> from the tidytext package might come in handy.</p>
<p><code>reorder_within</code> recodes the values into a factor with strings in the form of "VARIABLE___WITHIN". This factor is ordered by the values in each group of WITHIN.
<cod... | ggplot facet different Y axis order based on value | ggplot2|facet | -1 | 129 | 1 | 72,150,455 | 72,150,455 | 0 | true | 2022-05-06T22:02:21.063Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
ggplot facet different Y axis order based on value<p>I have a faceted plot wherein I'd like to have the Y-axis labels and the associated values appear in des... |
72,151,492 | Can't find specific single user email query in Mongodb database?<p>API response show all user data in database to website UI</p>
<pre class="lang-js prettyprint-override"><code>const [product, setProduct] = useState([]);
const [user] = useAuthState (auth)
useEffect(() => {
const email = user.email;
const url... | <p>try to use params here , i have also faced the same problem and solved it in the following way:(note i have used id as identifier whereas u used email)</p>
<p>const { id } = useParams();</p>
<p>const [item, setItem] = useState({});</p>
<p>useEffect(() => {
const url = <code>https://floating-atoll-94813.herokuapp.... | Can't find specific single user email query in Mongodb database? | javascript|node.js|reactjs | -1 | 25 | 1 | 72,151,602 | 72,151,602 | 0 | true | 2022-05-07T10:07:50.597Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Can't find specific single user email query in Mongodb database?<p>API response show all user data in database to website UI</p>
<pre class="lang-js prettypr... |
72,151,977 | Update one property in MongoDB and update UI without refresh the page<p>I am trying to update one property Like I have a few properties, product name, price, quantity, supplier, and description. I am sending all the updated quantities with all properties to MongoDb, in that case, I am able to update the database and UI... | <p>Firstly you can declare
const [isReload, setIsReload]= useState(true);</p>
<p>when you get response from database after uploading new quantity, add this</p>
<pre><code>.then(response => response.json())
.then(data => {
console.log('Success:', data);
setIsReload(!i... | Update one property in MongoDB and update UI without refresh the page | javascript|reactjs|mongodb|express | -1 | 108 | 1 | 72,152,283 | 72,152,283 | 0 | true | 2022-05-07T11:17:35.153Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Update one property in MongoDB and update UI without refresh the page<p>I am trying to update one property Like I have a few properties, product name, price,... |
72,148,901 | How to add role hierarchy in this command<p><strong>so basically i want to add role hierarchy in this command i am using discord.py 2.0 i checked docs but i am not able to figure out how to exactly do it, pls help me i know its kina dumb question</strong></p>
<pre><code>@app_commands.command(name="ban", descr... | <p>There exists a comparison to check role hierarchy. Members are ranked by their top role, which supports comparisons based on their index in the guild.</p>
<pre class="lang-py prettyprint-override"><code>if interaction.user.top_role <= user.top_role:
# the person issuing the command is less than or equal to th... | How to add role hierarchy in this command | python-3.x|discord|discord.py | -1 | 28 | 1 | 72,152,925 | 72,152,925 | 0 | true | 2022-05-07T01:57:55.480Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to add role hierarchy in this command<p><strong>so basically i want to add role hierarchy in this command i am using discord.py 2.0 i checked docs but i ... |
72,151,125 | Question concerning the transitivity axiom and 2NF<p>If I have a table {A, B, C} and the FDs: {A -> B, B -> C} is the table in 2NF ?</p>
<p>Im a little bit confused because of
the transitivity axiom which is if A -> B and B -> C then A -> C.</p>
<p>Is C FULL functional dependent from A or is C just norma... | <p>The relation is in 2NF, but not in 3NF. You are confusing full and partial dependencies with transitive and direct dependencies.</p>
<p>A dependency like A -> C is a transitive dependency when we have that A -> B and B -> C.</p>
<p>On the hand, a relation is not in 2NF if there are partial dependencies: tha... | Question concerning the transitivity axiom and 2NF | database-design|database-normalization|functional-dependencies | -1 | 45 | 1 | 72,153,162 | 72,153,162 | 0 | true | 2022-05-07T09:18:05.393Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Question concerning the transitivity axiom and 2NF<p>If I have a table {A, B, C} and the FDs: {A -> B, B -> C} is the table in 2NF ?</p>
<p>Im a little... |
72,152,958 | NOOBQ- Can't create a function with two variables<pre><code>w <- function(x,y) {
((2*x*y+y^4)/(x^2))
} #Function we need to solve
w(5)
</code></pre>
<p>Error in w(5) : argument "y" is missing, with no default</p>
<p>This error occurs but y is a function too and i created y befor... | <p>First of all, you need to set <code>*</code> to multiply in R like this:</p>
<pre><code>w <- function(x,y) {
(2*x*y+y^4)/(x^2)
}
</code></pre>
<p>The error says <code>y</code> is missing because you only give <code>x</code> a value. So if you want this function to work, you need to set a value for <code>y... | NOOBQ- Can't create a function with two variables | r | -1 | 30 | 1 | 72,153,217 | 72,153,217 | 0 | true | 2022-05-07T13:24:29.937Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
NOOBQ- Can't create a function with two variables<pre><code>w <- function(x,y) {
((2*x*y+y^4)/(x^2))
} #Function we need to so... |
72,153,226 | why do i get an unsupported operation exception when i want to remove an object from a treeset<p>i have this 3 class :</p>
<p><strong>first one</strong></p>
<pre><code>private List<Domino> pile = new ArrayList<Domino>();
public DominoPile(List<Domino> list) {
this.pile = list;
... | <blockquote>
<p><code>List.copyOf</code></p>
</blockquote>
<p>This makes an <strong>immutable</strong> (i.e.: Read Only) copy of whatever you pass to it. There is no further point in making copies of this (and, in fact, I believe if you pass an already-immutable list in there it just returns it verbatim; no point makin... | why do i get an unsupported operation exception when i want to remove an object from a treeset | java|exception|unsupportedoperation | -1 | 93 | 1 | 72,153,333 | 72,153,333 | 0 | true | 2022-05-07T14:02:26.683Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
why do i get an unsupported operation exception when i want to remove an object from a treeset<p>i have this 3 class :</p>
<p><strong>first one</strong></p>
... |
72,154,585 | using an Autoencoder for dimensionality reduction<p>i have a data set that contains a ton of vector where each vector has 21300 values, naturally i want to reduce the dimension of each vector i.e compress the vectors</p>
<p>my data set is not split into training and testing datasets because i want all the vectors to be... | <p>Build the autoencoder model using all the data not just the first vector.</p>
<p>Check <a href="https://www.analyticsvidhya.com/blog/2021/06/dimensionality-reduction-using-autoencoders-in-python/" rel="nofollow noreferrer">here</a> for an example in python.</p> | using an Autoencoder for dimensionality reduction | machine-learning|deep-learning|neural-network|autoencoder|dimensionality-reduction | -1 | 111 | 1 | 72,154,695 | 72,154,695 | 0 | true | 2022-05-07T16:47:50.873Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
using an Autoencoder for dimensionality reduction<p>i have a data set that contains a ton of vector where each vector has 21300 values, naturally i want to r... |
72,153,026 | c++ Cannot create magnifier window<p>Im trying to make a magnification program, but I cannot create the child window without the error 1407, The child window also makes the host windows gui disappear.</p>
<pre><code>hwnd = CreateWindowEx(WS_EX_TOPMOST | WS_EX_TRANSPARENT | WS_EX_LAYERED, wc.lpszClassName, skCrypt(_T(&q... | <p>Thank you to the people that helped me fix this.
I fixed this by changing the classname in wc2 to "Magnifier"</p> | c++ Cannot create magnifier window | c++|childwindow|createwindow | -1 | 39 | 1 | 72,154,762 | 72,154,762 | 0 | true | 2022-05-07T13:33:14.267Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
c++ Cannot create magnifier window<p>Im trying to make a magnification program, but I cannot create the child window without the error 1407, The child window... |
72,154,759 | The "break statement" is just not working like it should<p>This is the code but for some reason, when <code>(distancia<100)</code> the <code>("ALTO")</code> still appears, and the same with the other while loop</p>
<pre><code>while (distancia<200 && distancia>100)
{
lcd.print("ALTO&q... | <p>this is your while loop:</p>
<pre><code>while (distancia<200 && distancia>100)
</code></pre>
<p>and this is your if:</p>
<pre><code>if(distancia<100);
{
break;
}
</code></pre>
<p>a variable can't be greater and smaller than 100 at the same time so that if is basically useless</p> | The "break statement" is just not working like it should | c++|arduino|tinkercad | -1 | 71 | 2 | 72,154,847 | 72,154,847 | 0 | true | 2022-05-07T17:11:07.767Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
The "break statement" is just not working like it should<p>This is the code but for some reason, when <code>(distancia<100)</code> the <code>("ALTO&q... |
72,155,004 | JS sort array object by custom key and value<p>I am fresh JS student and I found a problem which I can't sole by my self. I've got an array of objects and one of the key of these objects is 'priority' and values for that key are: "low", "mid", "high". I would like to sort my objects in arr... | <p>You can place all the priorities in an array and sort the object's based on the index of their priority property in that array.</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"><co... | JS sort array object by custom key and value | javascript|sorting | -1 | 123 | 3 | 72,155,083 | 72,155,083 | 0 | true | 2022-05-07T17:41:04.787Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
JS sort array object by custom key and value<p>I am fresh JS student and I found a problem which I can't sole by my self. I've got an array of objects and on... |
72,156,097 | How to write dict in file with specific format and headers?<p>I have a dict:</p>
<pre><code>dictionary1 = {100: {num: 1, age: 2, line: 3}}
dictionary2 = {90: {num: 1, age: 50, line: 4}}
</code></pre>
<p>I need to write this data into file line by line in the following format:</p>
<pre><code># HEADER 100 #
1 1 2 3
# HEA... | <pre><code>for i in dictionary1:
print('HEADER ',i)
print('1 '+' '.join([str(x) for x in list(dictionary1[i].values())]))
</code></pre>
<p>You can change dictionary1 to dictionary2 for other values.</p> | How to write dict in file with specific format and headers? | python|python-3.x|dictionary|key | -1 | 35 | 1 | 72,156,240 | 72,156,240 | 0 | true | 2022-05-07T20:23:00.550Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to write dict in file with specific format and headers?<p>I have a dict:</p>
<pre><code>dictionary1 = {100: {num: 1, age: 2, line: 3}}
dictionary2 = {90:... |
72,156,521 | I'm trying provide uuidv4 as key prop in my header list item but it gives me warning and asking unique key as prop<pre><code>// This is my routes which I'm trying to map through
const Header = () => {
const routes = [
{ id: 1, name: 'Home', link: '/' },
{ id: 2, name: 'Blogs', link: '/blogs' },
{ id: ... | <p>Your routes have IDs, which look to be unique identifiers for a particular route (<code>link</code> would probably work too), so use that. Don't use uuid (or <a href="https://stackoverflow.com/questions/29808636/when-giving-unique-keys-to-components-is-it-okay-to-use-math-random-for-gener"><code>Math.random</code></... | I'm trying provide uuidv4 as key prop in my header list item but it gives me warning and asking unique key as prop | reactjs|tailwind-css|uuid|react-key-index | -1 | 55 | 1 | 72,156,531 | 72,156,531 | 0 | true | 2022-05-07T21:35:41.743Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I'm trying provide uuidv4 as key prop in my header list item but it gives me warning and asking unique key as prop<pre><code>// This is my routes which I'm t... |
72,151,809 | Make the high/low values in step wise from a range in google sheet<p>Need google app script to make stepwise to an array of numbers taken from a range cell values. Example suppose the taken cell values from A column are as:
A1 1
A2 4
A3 2
A4 1
A5 4
The result cell values in B column should as follows:
B1 1
B2 ... | <p><strong>Description</strong></p>
<p>I believe what you want is that between 2 values, increment between them either +1 or -1 depending on the difference between the 2 values.</p>
<p><strong>Script</strong></p>
<pre><code>function test() {
try {
let sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(&... | Make the high/low values in step wise from a range in google sheet | typescript|google-apps-script|numbers|step | -1 | 52 | 1 | 72,156,545 | 72,156,545 | 0 | true | 2022-05-07T10:51:50.763Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Make the high/low values in step wise from a range in google sheet<p>Need google app script to make stepwise to an array of numbers taken from a range cell ... |
72,156,086 | To create a calculated column based on its previous value in SQL<p>I have a very difficult problem to solve and I've been at it for days. Our data warehouse is Redshift. This is easy for python and such, but building it in SQL is driving me nuts.</p>
<p>Sample database with week number, total replenishment (additional ... | <p>To avoid going recursive which can be slow for large datasets you need to unroll the logic. Here's a solution that uses window functions to perform the query.</p>
<p>Set up:</p>
<pre><code>create table test as (
SELECT 'W1' AS weeknum, 0 AS replenish, 20 AS est_units_sold, 30 as inventory
UNION ALL (SELECT 'W2' A... | To create a calculated column based on its previous value in SQL | sql|amazon-web-services|amazon-redshift | -1 | 73 | 2 | 72,156,956 | 72,156,956 | 0 | true | 2022-05-07T20:21:45.873Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
To create a calculated column based on its previous value in SQL<p>I have a very difficult problem to solve and I've been at it for days. Our data warehouse ... |
72,157,208 | How to update an index inside an array with hooks without hitting "Error: Too many re-renders."<p>I have an array of cells that I need to update based on some user input from a socket server. But whenever I try to update an index using useState(), react complains about "Error: Too many re-renders.". I tried a... | <p>Every time you change a state provided from the <code>useState</code> hook, it re-renders your component. You are calling <code>handleChange</code> on every render, which is calling your <code>setGrid</code> state hook. Therefore, you are rendering your component infinitely.</p>
<p>When do you actually need to call ... | How to update an index inside an array with hooks without hitting "Error: Too many re-renders." | javascript|reactjs|react-hooks|use-state | -1 | 31 | 1 | 72,157,318 | 72,157,318 | 0 | true | 2022-05-08T00:08:44.103Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to update an index inside an array with hooks without hitting "Error: Too many re-renders."<p>I have an array of cells that I need to update based on som... |
72,157,457 | Appending a list to another list returns an empty list<p>I'm trying to create a list that stores user input to be later manipulated. However when the User inputs names into the temporary list, it updates showing that the nameList has been updated, but when i add the nameList to the concernList, it does not add anything... | <p><code>concernList.append(nameList)</code> doesn't create a second list - the newly added element is just a reference to the original list (<a href="https://stackoverflow.com/questions/2612802/how-do-i-clone-a-list-so-that-it-doesnt-change-unexpectedly-after-assignment">related</a>). This means that <code>nameList.cl... | Appending a list to another list returns an empty list | python|python-3.x | -1 | 47 | 1 | 72,157,503 | 72,157,503 | 0 | true | 2022-05-08T01:28:35.893Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Appending a list to another list returns an empty list<p>I'm trying to create a list that stores user input to be later manipulated. However when the User in... |
72,158,220 | I want to multiply between two arrays values in flutter<p>I have 2 Array called A and B, and I want to multiply 2 array values and create a new result array</p>
<pre><code> final a = <int>[2, 3, 4];
final b = <int>[1, 2, 3];
final result = <int>[2, 6, 12];
</code></pre>
<p>Please help ... | <p>Try this</p>
<pre><code>void main() {
final a = <int>[2, 3, 4];
final b = <int>[1, 2, 3];
final result = <int>[];
for (int i = 0; i < a.length; i++) {
result.add(a[i] * b[i]);
}
print(result);
}
</code></pre> | I want to multiply between two arrays values in flutter | flutter|dart | -1 | 46 | 1 | 72,158,247 | 72,158,247 | 0 | true | 2022-05-08T05:04:33.063Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I want to multiply between two arrays values in flutter<p>I have 2 Array called A and B, and I want to multiply 2 array values and create a new result array<... |
72,153,393 | How can I change my recyclerView items order?<p>I would like to sort my items in order to put at the beginning chosen elements, I created a small piece of code allowing it which works rather well, but when I update my array in the adapter, the recyclerview is unchanged. I tried to do it with an update function in my ad... | <p>First of all for storing data in shared preferences, I'd prefer you to use my library <a href="https://github.com/sambhav2358/TinyDB" rel="nofollow noreferrer">here</a>. You can refer the docs to see how it works. Also, I'd prefer you to use a <code>data class</code> instead of the File class. That won't give you wh... | How can I change my recyclerView items order? | java|android|kotlin|android-recyclerview|adapter | -1 | 184 | 1 | 72,158,455 | 72,158,455 | 0 | true | 2022-05-07T14:23:10.237Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I change my recyclerView items order?<p>I would like to sort my items in order to put at the beginning chosen elements, I created a small piece of co... |
72,158,111 | render doesn't apply to a str object<pre><code>import pygame
from pygame.locals import *
pygame.init()
surf = pygame.display.set_mode((400,400))
pygame.draw.rect(
surface = surf,
color = (0,255,255),
rect = (100,100,100,50)
)
clock = pygame.time.Clock()
t = pygame.font.Font.render("Change Color... | <p>I figured it out...</p>
<p>First of all, <code>render</code> does not take positional arguments, so we can't use those.</p>
<p>Link to documentation:
<a href="https://stackoverflow.com/questions/54139809/my-text-wont-blit-to-my-display-in-pygame">my text won't blit to my display in pygame</a></p>
<p>Second, you ... | render doesn't apply to a str object | python|python-3.x|pygame | -1 | 30 | 1 | 72,158,591 | 72,158,591 | 0 | true | 2022-05-08T04:40:05.617Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
render doesn't apply to a str object<pre><code>import pygame
from pygame.locals import *
pygame.init()
surf = pygame.display.set_mode((400,400))
pygame.dra... |
72,152,035 | Can't calculate g(x) as Derivative(f(x))<p><strong>Hello!</strong></p>
<h3>Problem: I can calculate <code>xp(t)</code> and <code>xh(t)</code> for any given <code>t</code> value, but not for <code>ġ(t)</code>.</h3>
<h4>Context:</h4>
<p>I'm calculating a general solution for a vibration system, using the Duhamel's integr... | <p>When you call <code>d_xg(t)</code> you are computing the symbolic derivative of <code>xg</code> with respect to <code>t</code>. If you call <code>d_xg(t)</code> multiple times you will always get the same expression because you are doing the same computation over and over again. Similarly, if you call <code>d_xg(A)<... | Can't calculate g(x) as Derivative(f(x)) | python|numpy|sympy|datalore | -1 | 53 | 1 | 72,158,791 | 72,158,791 | 0 | true | 2022-05-07T11:27:09.887Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Can't calculate g(x) as Derivative(f(x))<p><strong>Hello!</strong></p>
<h3>Problem: I can calculate <code>xp(t)</code> and <code>xh(t)</code> for any given <... |
72,159,124 | "AttributeError: 'float' object has no attribute 'reshape'."<pre><code># similarity matrix
sim_mat = np.zeros([len(cleaned_texts), len(cleaned_texts)])
for i in range(len(sentences)):
for j in range(len(sentences)):
if i != j:
sim_mat[i][j] = cosine_similarity(sentence_vectors[i].reshape(1, dim... | <p>This is almost impossible to answer definitely without knowing what 'sentence_vectors', 'cleaned_text' and 'sentences' are.</p>
<p>I can explain the error message though. It seems that you expect <em>sentence_vectors</em> to be a list of numpy arrays, but the error tells you that <em>sentence_vectors[j]</em> is a fl... | "AttributeError: 'float' object has no attribute 'reshape'." | python|numpy|attributeerror | -1 | 203 | 1 | 72,159,233 | 72,159,233 | 0 | true | 2022-05-08T08:02:05.467Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
"AttributeError: 'float' object has no attribute 'reshape'."<pre><code># similarity matrix
sim_mat = np.zeros([len(cleaned_texts), len(cleaned_texts)])
for ... |
72,159,387 | when myItems is an empty array, it is saying 'myItem.map() is not a function'. how to solve?<p>When items are present in myItems state, the website is ok. but if there is no item, the website breaks.</p>
<pre><code>const [myItems, setMyItems] = useState([]);
return (
<div className="container my-5">
... | <p>The issue is your <code>myItems</code> is actually receiving a value that is not an array type.</p>
<p>Doing</p>
<pre><code>const myItems = 'b';
myItems.map((a) => a)
</code></pre>
<p>will give the same error <code>Uncaught TypeError: myItems.map is not a function</code>.</p>
<p>It's telling you <code>.map</code>... | when myItems is an empty array, it is saying 'myItem.map() is not a function'. how to solve? | reactjs|typeerror|react-component | -1 | 37 | 1 | 72,159,450 | 72,159,450 | 0 | true | 2022-05-08T08:46:14.790Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
when myItems is an empty array, it is saying 'myItem.map() is not a function'. how to solve?<p>When items are present in myItems state, the website is ok. bu... |
72,155,580 | Django Python Invalid Syntax When Deployed on Digitalocean<p>I have a Django project on local machine running on Python 3.10.3
Now I deployed it to a DigitalOcean machine running Ubuntu 20 and Python 3.8.10</p>
<p>When I run the project on local machine there is no issue, but when I do run it on the DO instance, it giv... | <p>The solution according to @BoarGules is to migrate from Python 3.8 to 3.10 for the <code>match weekday</code> to work.</p> | Django Python Invalid Syntax When Deployed on Digitalocean | python|python-3.x|django | -1 | 36 | 1 | 72,159,628 | 72,159,628 | 0 | true | 2022-05-07T18:56:49.373Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Django Python Invalid Syntax When Deployed on Digitalocean<p>I have a Django project on local machine running on Python 3.10.3
Now I deployed it to a Digital... |
72,159,705 | NUMBERS TO WORDS using html and javascript<p>NUMBER TO WORDS
convert number to word in javaScript displayed take output from user using HTML page
easy and simple using for and switch statement</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><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compat... | NUMBERS TO WORDS using html and javascript | javascript|for-loop|type-conversion|switch-statement|string-conversion | -1 | 187 | 2 | 72,159,761 | 72,159,761 | 0 | true | 2022-05-08T09:32:39.243Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
NUMBERS TO WORDS using html and javascript<p>NUMBER TO WORDS
convert number to word in javaScript displayed take output from user using HTML page
easy and si... |
72,159,865 | Flutter image zoomed but how to change zoom position<p>Hello i have implemented double tap to zoom on flutter app but when the image is zoomed i can't navigate to other parts of image when it's in zoomed position.
Pinch to zoom working fine,
Double tap to zoom and reset to normal also working fine.
Only issue is not be... | <p>Remove this line or set to <code>true</code>, which is the default. This will enable panning.</p>
<pre><code>panEnabled: true,
</code></pre> | Flutter image zoomed but how to change zoom position | flutter|image | -1 | 124 | 1 | 72,159,886 | 72,159,886 | 0 | true | 2022-05-08T09:56:26.847Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Flutter image zoomed but how to change zoom position<p>Hello i have implemented double tap to zoom on flutter app but when the image is zoomed i can't naviga... |
72,160,282 | SMTPConnectError: (421, b'Server busy, too many connections')<p>I have watched videos and practice the same thing yet I keep getting smtp connect error</p>
<pre><code>EMAIL_BACKEND= 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_HOST_USER = 'captainleon04@gmail.com'
EMAIL_HOST_PASSWOR... | <p>Here is a sample code and it shows how the connection to the server is closed <code>server.quit()</code>.</p>
<pre><code>import smtplib
server = smtplib.SMTP_SSL('smtp.gmail.com', 465)
server.login("your username", "your password")
server.sendmail(
"from@address.com",
"to@add... | SMTPConnectError: (421, b'Server busy, too many connections') | python|django | -1 | 247 | 1 | 72,160,424 | 72,160,424 | 0 | true | 2022-05-08T10:54:33.023Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SMTPConnectError: (421, b'Server busy, too many connections')<p>I have watched videos and practice the same thing yet I keep getting smtp connect error</p>
<... |
72,160,400 | How to set data type in Google Colab Input?<p>I tried to sum this equation on Google Colab</p>
<pre><code>a=1
b=input("B:")
c=a+b
print(c)
</code></pre>
<p>I was googling, the offered solution is <code>c=a+int(b)</code> but an error happened <code>TypeError: 'str' object is not callable</code></p>
<p>Please h... | <p>I found no problem with the <code>c=a+int(b)</code> answer. Consider restarting your runtime.</p>
<p><a href="https://i.stack.imgur.com/oWWJC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oWWJC.png" alt="enter image description here" /></a></p> | How to set data type in Google Colab Input? | python|string|type-conversion|integer|google-colaboratory | -1 | 209 | 1 | 72,160,435 | 72,160,435 | 0 | true | 2022-05-08T11:08:35.917Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to set data type in Google Colab Input?<p>I tried to sum this equation on Google Colab</p>
<pre><code>a=1
b=input("B:")
c=a+b
print(c)
</code><... |
72,160,650 | I want to decrease my stock amount by the delivery button in MongoDb<p>How do i decrease stock in my react app by a delivery button which is connected in MongoDB</p> | <p>If you click on the Delivered button, you will reduce the quantity one by one, then you will send that value to the backend and update it in the database.
Increase in the same way.</p>
<p>as like...</p>
<p>const stockQuantity = parseInt(products?.quantity)
const newStockQuantity = stockQuantity - 1;</p>
<p>then</p>
... | I want to decrease my stock amount by the delivery button in MongoDb | reactjs|mongodb | -1 | 62 | 2 | 72,160,909 | 72,160,909 | 0 | true | 2022-05-08T11:43:04.630Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I want to decrease my stock amount by the delivery button in MongoDb<p>How do i decrease stock in my react app by a delivery button which is connected in Mon... |
72,156,948 | Registration notification over email in Node.js<p>I made an app (nextJS) that requires the user to register. The user opens the registration page and then enters username(email address) and password. When they click on the submit button this data is stored in a database and they are registered. However, I would also li... | <p>Thanks to everyone for their replies. In the end I used emailJS. It is possible in an emailjs template to parametrize the address to which you sent the email. Knowing this it is extremely simple to achieve what I wanted. This simple documentation explains how to use emailjs.</p>
<p><a href="https://www.emailjs.com/d... | Registration notification over email in Node.js | node.js|reactjs|email|next.js|registration | -1 | 83 | 2 | 72,161,439 | 72,161,439 | 0 | true | 2022-05-07T23:01:57.250Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Registration notification over email in Node.js<p>I made an app (nextJS) that requires the user to register. The user opens the registration page and then en... |
72,157,317 | Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0 when trying to pull data from s3 in an api route<p>I am trying to pull a JSON file from an S3 bucket. Below is my api route which pulls the json file:</p>
<pre><code>const {GetObjectCommand, S3Client} = require("@aws-sdk/client-s3");
... | <p>There was an issue with my access keys in my production environment. Essentially one of my lambdas was getting a permission denied error. After fixing that issue the problem was resolved. I could not have done it without the help of @Ermiya Eskandary</p> | Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0 when trying to pull data from s3 in an api route | javascript|amazon-s3|next.js|fetch-api | -1 | 167 | 2 | 72,161,467 | 72,161,467 | 0 | true | 2022-05-08T00:42:14.393Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0 when trying to pull data from s3 in an api route<p>I am trying to pull a JSON fil... |
72,161,287 | Why I keep getting error in CSS Code in visual studio code?<p>[VS code error<a href="https://i.stack.imgur.com/xXXIx.png" rel="nofollow noreferrer">1</a></p>
<p>Guys,</p>
<p>Can anyone advise why I keep seeing those errors in vs code?
Where is my mistake?</p>
<p>regards,
Emilia</p> | <p>Try this...</p>
<pre><code>.services .box-container {
display: -ms-grid;
display: grid;
-ms-grid-column: (minmax(32rem, 1fr)) [auto-fit];
grid-column: (minmax(32rem, 1fr)) [auto-fit];
grid-template-columns: repeat(auto-fit, minmax(32rem, ifr));
gap: 1.5rem;
}
</code></pre> | Why I keep getting error in CSS Code in visual studio code? | css | -1 | 46 | 1 | 72,161,777 | 72,161,777 | 0 | true | 2022-05-08T13:04:02.513Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why I keep getting error in CSS Code in visual studio code?<p>[VS code error<a href="https://i.stack.imgur.com/xXXIx.png" rel="nofollow noreferrer">1</a></p>... |
72,159,168 | Pass and Return 'Reference to a Pointer' for Binary Search Tree Insertion in C++<pre><code>/**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode() : val(0), left(nullptr), right(nullptr) {}
* TreeNode(int x) : val(x), left(null... | <p>If you change <code>find</code> to <code>TreeNode*& find(TreeNode* root, int& val)</code> then look at the first line of the function:</p>
<pre><code> if (root == nullptr) return root;
</code></pre>
<p>This would return a reference to a local variable. Changing it in <code>insertIntoBST</code> is undefine... | Pass and Return 'Reference to a Pointer' for Binary Search Tree Insertion in C++ | c++|pointers|reference|binary-search-tree | -1 | 72 | 1 | 72,161,798 | 72,161,798 | 0 | true | 2022-05-08T08:08:46.600Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pass and Return 'Reference to a Pointer' for Binary Search Tree Insertion in C++<pre><code>/**
* Definition for a binary tree node.
* struct TreeNode {
* ... |
72,160,379 | Cant understand Tkinter Grid System<p>I just started learning Tkinter and I'm trying to make a calculator but the buttons wont position as i want. I dont understand the grid concept, my rows are right but columns are messed up and have massive gaps between. I need help in fixing the columns, I just dont get it</p>
<pre... | <p>you can use sticky perimeter in grid
And you can also use rowconfigure and columncongifure</p>
<p>You can to create different frame for buttons</p>
<p>You should read this <a href="https://tkdocs.com/tutorial/grid.html" rel="nofollow noreferrer">https://tkdocs.com/tutorial/grid.html</a></p>
<p>You can try this:-</p>... | Cant understand Tkinter Grid System | python|tkinter | -1 | 26 | 1 | 72,161,825 | 72,161,825 | 0 | true | 2022-05-08T11:05:29.920Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Cant understand Tkinter Grid System<p>I just started learning Tkinter and I'm trying to make a calculator but the buttons wont position as i want. I dont und... |
72,161,853 | Filter items based on value in nested array<p>How do you filter the results using javascript so any <code>item</code> that includes the <code>tag</code> 'help' are excluded from the results?</p>
<p>Here is the object I get back and what I have so far, but obviously doesn't work:</p>
<p><div class="snippet" data-lang="j... | <p>You need to filter the data.items and use <code>!some</code> or <code>!includes</code></p>
<p>Here is the <code>data</code> without the help in the items using includes</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-... | Filter items based on value in nested array | javascript|api | -1 | 19 | 2 | 72,161,901 | 72,161,901 | 0 | true | 2022-05-08T14:14:24.057Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Filter items based on value in nested array<p>How do you filter the results using javascript so any <code>item</code> that includes the <code>tag</code> 'hel... |
72,162,122 | CORS policy: No 'Access-Control-Allow-Origin'<p>Im develop a react website with node js backend than react show some error link <a href="https://i.stack.imgur.com/9geld.png" rel="nofollow noreferrer">enter image description here</a></p> | <p>you are not useing cors or same url for frondend and backend thats why this error coming .For send data frontend to sarver you need use "cors" package.
install cors:</p>
<pre><code> npm install cors
</code></pre>
<p>then requre it index.js file</p>
<pre><code> const cors = require('cors')... | CORS policy: No 'Access-Control-Allow-Origin' | node.js|reactjs|mongodb|axios|backend | -1 | 94 | 2 | 72,162,287 | 72,162,287 | 0 | true | 2022-05-08T14:45:54.023Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
CORS policy: No 'Access-Control-Allow-Origin'<p>Im develop a react website with node js backend than react show some error link <a href="https://i.stack.imgu... |
72,162,308 | How to set minor locator<p>I am a beginner to matplotlib and came across a question about minor_locators. I tried looking it up but couldn't work out how to create them in my bar graph. Any help is greatly appreciated.</p> | <p>The easiest way to set minor_locators is to use the AutoMinorLocator(). It gives you the generally most appropriate minor ticks without any hassles of setting them manually.
Add all of this to the code of your regular graph and you should be good to go:</p>
<pre><code>import matplotlib.pyplot as plt
from matplotlib.... | How to set minor locator | python-3.x|matplotlib | -1 | 34 | 1 | 72,162,388 | 72,162,388 | 0 | true | 2022-05-08T15:04:56.547Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to set minor locator<p>I am a beginner to matplotlib and came across a question about minor_locators. I tried looking it up but couldn't work out how to ... |
72,143,781 | Where is the user data stored after decoding it from the token?<p>Where is the user data stored after decoding it from the token? I'm using react , and the Jwt token is stored in local-storage .</p> | <p>the data is stored in state and not in localstorage due to security issues.</p> | Where is the user data stored after decoding it from the token? | reactjs|authentication|jwt|local-storage | -1 | 150 | 1 | 72,162,714 | 72,162,714 | 0 | true | 2022-05-06T15:15:09.220Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Where is the user data stored after decoding it from the token?<p>Where is the user data stored after decoding it from the token? I'm using react , and the J... |
72,163,136 | Your requirements could not be resolved to an installable set of packages ,I get this error when I try to install livewire<p>Im using laravel 8 and my php version 8.0.12 for details check the photo</p>
<p><a href="https://i.stack.imgur.com/3IkNI.png" rel="nofollow noreferrer">the error image</a></p> | <p>Your software dependencies have an incompatible version conflict.</p>
<p>Try to Run this command:</p>
<blockquote>
<p>composer install --ignore-platform-reqs</p>
</blockquote>
<p>or</p>
<blockquote>
<p>composer update --ignore-platform-reqs</p>
</blockquote> | Your requirements could not be resolved to an installable set of packages ,I get this error when I try to install livewire | php|laravel|laravel-livewire | -1 | 114 | 1 | 72,163,174 | 72,163,174 | 0 | true | 2022-05-08T16:40:08.683Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Your requirements could not be resolved to an installable set of packages ,I get this error when I try to install livewire<p>Im using laravel 8 and my php ve... |
72,162,450 | Unable to set mode for google maps distance matrix<p>I'm following this guide: <a href="https://developers.google.com/maps/documentation/distance-matrix/distance-matrix" rel="nofollow noreferrer">https://developers.google.com/maps/documentation/distance-matrix/distance-matrix</a></p>
<p>And this request works fine for ... | <p>I get a different value for the result if I use the documented parameter <code>&mode=walking</code></p>
<pre><code>{
"destination_addresses" : [ "San Francisco, CA, USA" ],
"origin_addresses" : [ "Seattle, WA, USA" ],
"rows" : [
{
"el... | Unable to set mode for google maps distance matrix | google-maps|google-distancematrix-api | -1 | 120 | 1 | 72,163,405 | 72,163,405 | 0 | true | 2022-05-08T15:22:18.933Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Unable to set mode for google maps distance matrix<p>I'm following this guide: <a href="https://developers.google.com/maps/documentation/distance-matrix/dist... |
72,163,616 | how can i implement JWT token in my website?<p>I implemented JWT Token Authentication in React framework, It gets me token but the problem I am getting is I am not able to authenticate it on the pages which need authentication.</p>
<p>I tried "Authorization: Bearer " after that authenticated url,</p>
<p>I tri... | <p>Yo can do something like this :</p>
<pre><code>const response = await axios.get('http://example.com',{ headers: {Authorization: `Bearer ${token}`}});
</code></pre> | how can i implement JWT token in my website? | node.js|async-await | -1 | 19 | 1 | 72,163,715 | 72,163,715 | 0 | true | 2022-05-08T17:38:36.730Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how can i implement JWT token in my website?<p>I implemented JWT Token Authentication in React framework, It gets me token but the problem I am getting is I ... |
72,163,727 | Having problem while loading data from server<p>Access to fetch at 'https://nameless-mesa-03450.herokuapp.com/item' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request'... | <p>Without any code, it is a shot in the dark for us to answer this question. However, this is a common error. In your server side code, import the npm package cors then use it by passing it into the <code>app.use</code> method of express.</p>
<pre><code>const cors = require('cors')
app.use(cors())
</code></pre>
<p>T... | Having problem while loading data from server | node.js|reactjs | -1 | 20 | 1 | 72,163,754 | 72,163,754 | 0 | true | 2022-05-08T17:50:44.533Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Having problem while loading data from server<p>Access to fetch at 'https://nameless-mesa-03450.herokuapp.com/item' from origin 'http://localhost:3000' has b... |
72,163,858 | Automatically split the Iterm2 hotkey windows terminal<p>I am looking to find a way to automatically split the iterm terminal into two vertical splits. So that I have two terminal to work with. I want to do this with my Hotkey windows terminal. I know I can split them using <code>cmd + d</code> option. I could not find... | <p>This is well described in: <a href="https://apple.stackexchange.com/questions/22445/how-can-i-save-tabs-in-iterm-2-so-they-restore-the-next-time-the-app-is-run">https://apple.stackexchange.com/questions/22445/how-can-i-save-tabs-in-iterm-2-so-they-restore-the-next-time-the-app-is-run</a></p>
<hr />
<p>You can Save a... | Automatically split the Iterm2 hotkey windows terminal | macos|terminal|iterm2 | -1 | 113 | 1 | 72,164,132 | 72,164,132 | 0 | true | 2022-05-08T18:06:06.923Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Automatically split the Iterm2 hotkey windows terminal<p>I am looking to find a way to automatically split the iterm terminal into two vertical splits. So th... |
72,164,372 | how can I delete mysql with the root?<p>I forgot my mysql root password and tried everything I found on the internet to recover the password and nothing worked. I don't have any important databases. I want to remove it completely and reinstall it fresh so I can create a new root password.</p>
<p>Is it possible and how?... | <p><strong>1. First, connect to the MySQL database as the root user:</strong></p>
<pre><code>mysql -u root -p
</code></pre>
<p>If root does not have access to MySQL on your machine, you can use sudo mysql</p>
<p><strong>2. Enter the password when prompted and hit Enter. A MySQL shell loads.</strong></p>
<p><strong>3. F... | how can I delete mysql with the root? | mysql|macos|terminal | -1 | 31 | 1 | 72,164,467 | 72,164,467 | 0 | true | 2022-05-08T19:15:36.957Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how can I delete mysql with the root?<p>I forgot my mysql root password and tried everything I found on the internet to recover the password and nothing work... |
72,161,996 | Using Yacc and Lex to generate parse tree<p>I've spent 6 hours writing a compiler for the productions below with Lex and Yacc. The terminal report <code>warning: empty rule for typed nonterminal, and no action</code> but I still can't find out what's wrong with my code.</p>
<pre><code>P -> L | LP
L -> S
S -> I... | <p>The warning you get seems completely accurate:</p>
<pre><code>F: | …
</code></pre>
<p><code>F</code> is a non-terminal; it has a type, and the first alternative is empty with no action. If a non-terminal has a production with no action, bison will automatically add the action <code>$$ = $1</code>, but it can't ... | Using Yacc and Lex to generate parse tree | parsing|yacc|lex | -1 | 85 | 1 | 72,164,565 | 72,164,565 | 0 | true | 2022-05-08T14:30:23.570Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Using Yacc and Lex to generate parse tree<p>I've spent 6 hours writing a compiler for the productions below with Lex and Yacc. The terminal report <code>warn... |
72,166,948 | not able to append in a list in curses module?<p>I want to take a user input with python curses module but every time it is not adding any element in the list can any one please help me<a href="https://i.stack.imgur.com/40zUq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/40zUq.png" alt="here is the... | <p>You call <code>wrapper(main)</code> <strong>after</strong> you print the (empty) list. Change the order of the statements.</p> | not able to append in a list in curses module? | python-3.x|list|curses|python-curses | -1 | 24 | 1 | 72,167,127 | 72,167,127 | 0 | true | 2022-05-09T04:15:53.327Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
not able to append in a list in curses module?<p>I want to take a user input with python curses module but every time it is not adding any element in the lis... |
72,166,100 | How to return all value out the for loop in golang<p>In python I can return how value what I append in the array</p>
<pre><code>valuesinPy= []
for i range(len(value)) :
valuesinPy.append(value[i])
return valuesinPy
</code></pre>
<p>It's able to return all value I want to append in golang</p>
<pre><code>valueapp... | <p>You'll probably need to change the value of the map each time you go through the loop, or else every value from <code>value[i]</code> will keep writing to that same field in the map, leaving with the last value of i as your only value in the map</p> | How to return all value out the for loop in golang | list|go | -1 | 149 | 2 | 72,167,175 | 72,167,175 | 0 | true | 2022-05-09T01:09:48.940Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to return all value out the for loop in golang<p>In python I can return how value what I append in the array</p>
<pre><code>valuesinPy= []
for i range(le... |
72,159,944 | Angular is not receiving the status code set by HttpServletResponse.sendErro() method in spring boot<p>I am sending an unauthorized status code (401) with a message if the user is not logged in spring boot application, the process works fine if we test it with the postman, however, it does not work with angular.</p>
<p... | <p>Problem solved:</p>
<p>The problem was actually CORS problem, to solve the issue u can refer to <a href="https://stackoverflow.com/a/56133048/8985718">this answer.</a></p> | Angular is not receiving the status code set by HttpServletResponse.sendErro() method in spring boot | angular|spring-boot|api | -1 | 62 | 2 | 72,167,681 | 72,167,681 | 0 | true | 2022-05-08T10:07:57.193Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Angular is not receiving the status code set by HttpServletResponse.sendErro() method in spring boot<p>I am sending an unauthorized status code (401) with a ... |
72,169,023 | BUILD FAILED when trying to install Pyenv3 on OSX<p>So I've been trying to install Pyenv using Homebrew, but kept getting a failed build error and this message:</p>
<blockquote>
<p>Inspect or clean up the working tree at /var/folders/bb/n2w9d9210qzg_y3_c4cm92tr0000gn/T/python-build.20220507224423.63876</p>
</blockquote... | <p><strong>Install pyenv:</strong></p>
<pre><code>brew install pyenv
</code></pre>
<p>For Python 3, let's install 3.10.4.</p>
<pre><code>pyenv install 3.10.4
</code></pre>
<p>To see the list of the Python versions</p>
<pre><code>pyenv versions
#Python 3.10.4
</code></pre>
<p>You can update to new version, and optional... | BUILD FAILED when trying to install Pyenv3 on OSX | python|python-3.x|macos|homebrew|pyenv | -1 | 513 | 1 | 72,169,164 | 72,169,164 | 0 | true | 2022-05-09T08:28:02.740Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
BUILD FAILED when trying to install Pyenv3 on OSX<p>So I've been trying to install Pyenv using Homebrew, but kept getting a failed build error and this messa... |
72,153,450 | Wordpress+mysql helm deployment<p>Learning kubernetes, docker and helm;
I am diving into a Devops programm, and have been asked to deploy a wordpress+mysql with helm at my internship enterprises. Tried to do something but the wordpress is unable to connect to the database and i think the database is not able to write t... | <p>Check out your <strong>DB</strong> password and <strong>WordPress</strong> connection password that you are adding into for connection both are different, ideally, it should be the same.</p>
<p><code>MYSQL_ROOT_PASSWORD : root</code> but <code>WORDPRESS_DB_PASSWORD: test123</code> try with updating the password for ... | Wordpress+mysql helm deployment | mysql|wordpress|kubernetes-helm | -1 | 78 | 1 | 72,169,439 | 72,169,439 | 0 | true | 2022-05-07T14:29:57.223Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Wordpress+mysql helm deployment<p>Learning kubernetes, docker and helm;
I am diving into a Devops programm, and have been asked to deploy a wordpress+mysql w... |
72,169,782 | Python dictionaries of sets<p>I have a dictionary</p>
<pre><code>boxes {
'box 1' : 'apples',
'box 2' : 'mangoes',
'box 3' : 'oranges',
'box 4' : 'mangoes'
}
</code></pre>
<p>I need to regroup this dictionary as</p>
<pre><code>fruits {
'apples' : {'box 1' },
'mangoes' : {'box 2', 'box 4'},
... | <p>This is a good case for using setdefault as follows:</p>
<pre><code>boxes = {
'box 1' : 'apples',
'box 2' : 'mangoes',
'box 3' : 'oranges',
'box 4' : 'mangoes'
}
fruits = dict()
for k, v in boxes.items():
fruits.setdefault(v, set()).add(k)
print(fruits)
</code></pre>
<p><strong>Output:</strong... | Python dictionaries of sets | python|dictionary|set | -1 | 33 | 1 | 72,169,937 | 72,169,937 | 0 | true | 2022-05-09T09:31:19.497Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python dictionaries of sets<p>I have a dictionary</p>
<pre><code>boxes {
'box 1' : 'apples',
'box 2' : 'mangoes',
'box 3' : 'oranges',
'box 4... |
72,168,042 | I want to check the items in the list for any integers, and return each item's integers in the list like this? expected output: ['2', '12'] how to do?<h1>expected output is = ['2', '12']</h1>
<h1>current output is = ['2', '1', '2']</h1>
<p>#program</p>
<pre><code>def listToString(s):
str1 = " "
print(... | <p>Something like this.</p>
<pre><code>import re
def listToString(str_list):
print(s)
all_numbers = []
for str_ in str_list:
all_numbers = all_numbers + re.findall('[0-9]+', str_)
return all_numbers
s = ['abc2', 'is the', 'way12', 'for']
print(listToString(s))
</code></pre>
<p>Output:</... | I want to check the items in the list for any integers, and return each item's integers in the list like this? expected output: ['2', '12'] how to do? | arrays|python-3.x|list|arraylist | -1 | 41 | 1 | 72,170,056 | 72,170,056 | 0 | true | 2022-05-09T06:59:22.883Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I want to check the items in the list for any integers, and return each item's integers in the list like this? expected output: ['2', '12'] how to do?<h1>exp... |
72,168,755 | Mysql container password security<p>I have a couple of questions on password security in mysql container. I use <a href="https://hub.docker.com/layers/mysql-server/mysql/mysql-server/8.0/images/sha256-bcb56714933157b2bb203408b6b5e292559d8b8a42d4e3acb8514ae783225e13?context=explore" rel="nofollow noreferrer">mysql/mysql... | <p>If your security concerns include protecting your database against an attacker with legitimate login access to the host, then the most secure option is to pass the database credentials in a file. Both command-line options and environment variables, in principle, are visible via <code>ps</code>.</p>
<p>For the case ... | Mysql container password security | mysql|docker|security|passwords|docker-container | -1 | 216 | 1 | 72,171,337 | 72,171,337 | 0 | true | 2022-05-09T08:04:05.690Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Mysql container password security<p>I have a couple of questions on password security in mysql container. I use <a href="https://hub.docker.com/layers/mysql-... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.