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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
73,013,511 | JavaScript funcion isn't working, but I'm sure everything's fine<p>The last function won't work, I don't know why. Tried changing the removeAttribute to setAttribute still won't work. Any suggestions?</p>
<pre><code>
let mainEl = element.parentElement;
let price = parseInt(mainEl.querySelector('... | <p>It does not work because in your compression <code>if (vege.querySelector('.si-content h3').innerText === name){</code> it compares for example <code>Krompir</code> and <code>Krompir:</code> and since this has an extra <code>:</code> in the list , it cant find it.</p>
<p>I have changed your code and removed <code>:<... | JavaScript funcion isn't working, but I'm sure everything's fine | javascript|html | 0 | 49 | 1 | 73,013,728 | 73,013,728 | 0 | true | 2022-07-17T16:28:14.197Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
JavaScript funcion isn't working, but I'm sure everything's fine<p>The last function won't work, I don't know why. Tried changing the removeAttribute to setA... |
73,019,577 | Should I Render react components as an array of components<p>I have a simple react component that directly renders several children:</p>
<pre><code>
return (
<header>
<img src={logo}/>
<h1>My Site</h1>
<nav>...</nav>
</header>
);
</code></pre>
<p>Are there drawbacks/b... | <p>If you're thinking in terms of performance, there will probably be some slight drawbacks if you take into consideration the code used to generate the list of elements.</p>
<p>But I don't think that would be too much of a concern, what really bothers me, in this case, is the readability since you can write the same c... | Should I Render react components as an array of components | javascript|reactjs | 0 | 49 | 4 | 73,019,724 | 73,019,724 | 0 | true | 2022-07-18T08:46:22.583Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Should I Render react components as an array of components<p>I have a simple react component that directly renders several children:</p>
<pre><code>
return (... |
73,019,488 | Overwrite file if the name is same in Django<p>How do I overwrite the file if the name of the new file is similar to the one already uploaded. If I can take file.name and delete any file present with this name and then store this file that also works for any . Any method would work please help
This is my view.py</p>
<p... | <p>As you mentioned, removing an existed file with the current file name is ok for you, you can use this:</p>
<pre><code>import os
def upload_file(request):
if request.method == 'POST':
form = UploadFileForm(request.POST, request.FILES)
file = request.FILES['file']
name = str(file.name).r... | Overwrite file if the name is same in Django | python|django|filefield|file-system-storage | 0 | 49 | 1 | 73,020,410 | 73,020,410 | 0 | true | 2022-07-18T08:38:23.760Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Overwrite file if the name is same in Django<p>How do I overwrite the file if the name of the new file is similar to the one already uploaded. If I can take ... |
73,012,684 | Springboot hasAnyRole allow all/any roles<p>I have an endpoint that I have to expose to all roles, whoever has at least one of the roles should get access to the api.</p>
<pre><code> @PreAuthorize("hasAnyRole('ADMIN', 'USER')")
</code></pre>
<p>Now that the number of roles is increasing i have to add all t... | <p>Finally got a quite easy solution.</p>
<pre><code>@PreAuthorize("isAuthenticated()")
</code></pre> | Springboot hasAnyRole allow all/any roles | spring|spring-boot|api|spring-security | 1 | 49 | 2 | 73,020,799 | 73,020,799 | 0 | true | 2022-07-17T14:35:25.517Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Springboot hasAnyRole allow all/any roles<p>I have an endpoint that I have to expose to all roles, whoever has at least one of the roles should get access to... |
73,016,575 | How to set source encoding for 'list' command in GDB?<p>I have a project, Geki 2, which is written in C and uses a library called Kacchan X Library (libKXL for short) for graphics and sound. This library uses X11 API directly. When debugging Geki 2 under GDB in VirtualBox, GDB gives the following error when it tries to... | <p>I solved it. Turns out Konsole was using the wrong encoding; it was set to UTF-8 which caused the EUC-JP comments to show up as mostly U+FFFD replacement character. Setting the encoding in Konsole doesn't get rid of the GDB error but at least the comments display correctly now.</p>
<p>In Konsole,</p>
<ol>
<li>Click ... | How to set source encoding for 'list' command in GDB? | c|encoding|gdb|cjk | 0 | 49 | 1 | 73,028,624 | 73,028,624 | 0 | true | 2022-07-18T01:45:36.993Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to set source encoding for 'list' command in GDB?<p>I have a project, Geki 2, which is written in C and uses a library called Kacchan X Library (libKXL f... |
73,014,568 | How to manage profile of Powershell and make it faster to load?<p>While executing python file conda said</p>
<pre><code>CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
If using 'conda activate' from a batch script, change your
invocation to 'CALL conda.bat activate'.
To initi... | <p>Open powershell and type <code>$profile</code> it will give path of current using profile ,go to that place and open .ps1 file and replace the following code with code already present.</p>
<pre><code> if(($pwd.path -eq "PATH OF PYTHON PROJECT" )-or ($pwd.path -eq "PATH OF OTHER PYTHON PROJECT")){... | How to manage profile of Powershell and make it faster to load? | python|powershell|anaconda|conda | 0 | 49 | 1 | 73,032,871 | 73,032,871 | 0 | true | 2022-07-17T19:01:03.423Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to manage profile of Powershell and make it faster to load?<p>While executing python file conda said</p>
<pre><code>CommandNotFoundError: Your shell has ... |
72,869,782 | Is it possible that Revise outputs something when compilation is over and coding NFS?<p>I am using <a href="https://timholy.github.io/Revise.jl/stable/config/#Polling-and-NFS-mounted-code-directories:-JULIA_REVISE_POLL-1" rel="nofollow noreferrer">Revise with NFS</a> on my lab servers.</p>
<p>Currently, to know if my c... | <p>Even if it is not really a solution and rather a workaround. I just found a way to avoid coding on NFS as I finally find Revise very suitable for coding locally and also not convenient at all for coding NFS.</p> | Is it possible that Revise outputs something when compilation is over and coding NFS? | compilation|julia | 1 | 49 | 2 | 73,036,899 | 73,036,899 | 0 | true | 2022-07-05T12:53:31.780Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is it possible that Revise outputs something when compilation is over and coding NFS?<p>I am using <a href="https://timholy.github.io/Revise.jl/stable/config... |
73,015,271 | Explode string from database separated with comma<p>I have in database row <code>services</code> where have data <code>Live, Text, Video</code> separated with commas</p>
<p>This data is stored from checkboxes with implode function.</p>
<p>Now I need to explode <code>Live</code> <code>Text</code> <code>Video</code> indi... | <p>Selected everything with one query</p>
<pre><code>$stmt = $con->prepare('SELECT `id`, `title`, `text`, `main_image`, `tags`, `services` FROM `news` ORDER BY `id` DESC LIMIT 8');
// Retrieve query results
$stmt->execute();
$stmt->bind_result($id, $title, $text, $naslovna, $tags, $services);
while ($stmt->... | Explode string from database separated with comma | php|explode | 0 | 49 | 2 | 73,042,484 | 73,042,484 | 0 | true | 2022-07-17T20:50:24.920Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Explode string from database separated with comma<p>I have in database row <code>services</code> where have data <code>Live, Text, Video</code> separated wit... |
73,001,108 | Fetch Api is unable to post things to the server<p>I had created a chatroom in my website and I had used the default action of a form to post message's data into the server and store it in MongoDB. But, know I am trying to make it live by using fetch instead as the data will go the server without refreshing the page si... | <p>I fixed my problem with a simple line of code. Looks like the client-side code and the server code is all fine. We have also specified headers in the options of the fetch too. The problem was that the server didn't know in which format it could expect data from the client. Thus, adding the following code before the ... | Fetch Api is unable to post things to the server | node.js|post|backend|fetch-api | 0 | 49 | 2 | 73,053,871 | 73,053,871 | 0 | true | 2022-07-16T02:20:27.130Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Fetch Api is unable to post things to the server<p>I had created a chatroom in my website and I had used the default action of a form to post message's data ... |
72,999,101 | Slightly Different Angle Between Vectors Constraint<p>I'm working on constraining an IK program so that the normal vector in the end-effector frame is parallel to a known vector in the world-frame, when both are projected to the xy-plane. My initial thought was to use an <a href="https://drake.mit.edu/pydrake/pydrake.m... | <p>Turns out, you can do what I wanted to do using an <a href="https://drake.mit.edu/pydrake/pydrake.multibody.inverse_kinematics.html?highlight=addanglebetweenvectorsconstraint#pydrake.multibody.inverse_kinematics.InverseKinematics.AddAngleBetweenVectorsConstraint" rel="nofollow noreferrer">AddAnglesBetweenVectorsCons... | Slightly Different Angle Between Vectors Constraint | constraints|robotics|drake|inverse-kinematics | 0 | 49 | 2 | 73,056,409 | 73,056,409 | 0 | true | 2022-07-15T20:04:47.437Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Slightly Different Angle Between Vectors Constraint<p>I'm working on constraining an IK program so that the normal vector in the end-effector frame is parall... |
73,022,079 | Turning Python Keras Machine Learning model into repeatable function that can take as input multiple X and y data sets<p>I am currently building various machine learning models, each of the models takes in X and Y data that represent different stock prices e.g. there's an X and y data frame for each stock e.g. Apple, M... | <p>I was able to solve my problem by creating a new function that calls the LSTM model building function. Within the new function I included all the data processing functions needed and when calling the LSTM model building function I used "model=" rather than "build_fn" which allowed me to pass cust... | Turning Python Keras Machine Learning model into repeatable function that can take as input multiple X and y data sets | python|function|tensorflow|machine-learning|keras | 0 | 49 | 2 | 73,063,324 | 73,063,324 | 0 | true | 2022-07-18T12:07:18.813Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Turning Python Keras Machine Learning model into repeatable function that can take as input multiple X and y data sets<p>I am currently building various mach... |
72,941,253 | Resource timing doesn't add up in Chrome / Edge dev tools<p>What could be the reason that the timing of a resource loading doesn't add up?</p>
<p>As can be seen in the screenshot below, all steps are in the single digit ms, but total is 322.49.</p>
<p><a href="https://i.stack.imgur.com/rlAH7.png" rel="nofollow noreferr... | <p>This is a known issue from making queries to <code>localhost</code>. <a href="https://stackoverflow.com/questions/28762402/ajax-query-weird-delay-between-dns-lookup-and-initial-connection-on-chrome-but-n">Related SO question here</a></p> | Resource timing doesn't add up in Chrome / Edge dev tools | google-chrome|google-chrome-devtools|microsoft-edge|chromium | 0 | 49 | 1 | 73,067,565 | 73,067,565 | 0 | true | 2022-07-11T15:49:10.877Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Resource timing doesn't add up in Chrome / Edge dev tools<p>What could be the reason that the timing of a resource loading doesn't add up?</p>
<p>As can be s... |
73,025,240 | Nextjs - Unexpected token "export"<p>I started with NextJS, before that I used React a lot.
I run the app on docker (node:18-alpine) if it makes any difference.</p>
<p>I have API thing that I wrote before and published as NPM module. Now I install it with <code>yarn add sjiamnocna/renette-api</code>, it's ok, I can use... | <p>Ok, the solution is "workaround".
I changed the target of my package to ES5, now it exports the old style as NextJS expects it. BUT, if you guys have some trick to make the ES6 imports work, tell me</p>
<pre><code>// before
export default MyClass
// now
module.exports = default
</code></pre>
<p>Have a nice... | Nextjs - Unexpected token "export" | reactjs|typescript|next.js|node-modules | 0 | 49 | 1 | 73,089,765 | 73,089,765 | 0 | true | 2022-07-18T15:56:36.800Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Nextjs - Unexpected token "export"<p>I started with NextJS, before that I used React a lot.
I run the app on docker (node:18-alpine) if it makes any differen... |
72,938,167 | Create new dataframe from repeating data in dataframe<p>I am currently trying to prepare a data for training and it is in yaml format so i managed to convert into a dataframe. The useful information is in the format of a subsegment making it impossible to access. I would like to take the column with the 3 subsegments a... | <pre><code>frame3 = frame2.explode('annotations').reset_index(drop=True)
frame3 = pd.concat([frame3, frame3['annotations'].apply(pd.Series)], axis=1)
frame3 = frame3.drop(columns=['annotations'])
frame3 = frame3.loc[:,~frame3.columns.duplicated()].copy()
</code></pre>
<p>Using this solved my issue and opened the datas... | Create new dataframe from repeating data in dataframe | python|pandas|dataframe|machine-learning | 0 | 49 | 1 | 73,090,975 | 73,090,975 | 0 | true | 2022-07-11T11:54:11.447Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Create new dataframe from repeating data in dataframe<p>I am currently trying to prepare a data for training and it is in yaml format so i managed to convert... |
72,812,302 | How to close a layer folder on Photoshop using CEP/ExtendScript/JavaScript?<p>I'm developing an extension in Photoshop and I need to close a layers folder (containing a lot of information) to make the layers view cleaner.
I haven't found anything in the Photoshop documentation and nothing on the forums.</p>
<p>From :</... | <p>Thank you Ghoul Fool for finding this thread :</p>
<p><a href="https://community.adobe.com/t5/photoshop-ecosystem-discussions/expand-collapse-a-group-via-javascript/td-p/7286289" rel="nofollow noreferrer">https://community.adobe.com/t5/photoshop-ecosystem-discussions/expand-collapse-a-group-via-javascript/td-p/72862... | How to close a layer folder on Photoshop using CEP/ExtendScript/JavaScript? | javascript|photoshop|extendscript|photoshop-script|adobe-extension | 0 | 49 | 2 | 73,126,125 | 73,126,125 | 0 | true | 2022-06-30T08:06:14.667Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to close a layer folder on Photoshop using CEP/ExtendScript/JavaScript?<p>I'm developing an extension in Photoshop and I need to close a layers folder (c... |
72,772,329 | Delete rows based on group by<p>Let's say I have the following table:</p>
<pre><code>Id | QuestionId
----------------
1 | 'MyQuestionId'
1 | NULL
2 | NULL
2 | NULL
</code></pre>
<p>It should behave like so</p>
<ul>
<li>Find all the results of the same Id</li>
<li>If ANY of them has QuestionId IS NOT NULL, do not to... | <p>You can use an updatable CTE or derived table for this, and calculate the count using a window function.</p>
<pre><code>WITH cte AS (
SELECT t.*,
CountNonNulls = COUNT(t.QuestionId) OVER (PARTITION BY t.Id)
FROM YourTable t
)
DELETE cte
WHERE CountNonNulls = 0;
</code></pre>
<p><a href="https://dbfiddl... | Delete rows based on group by | sql|sql-server | -1 | 49 | 1 | 72,772,988 | 72,772,988 | 0 | true | 2022-06-27T12:45:15.627Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Delete rows based on group by<p>Let's say I have the following table:</p>
<pre><code>Id | QuestionId
----------------
1 | 'MyQuestionId'
1 | NULL
2 | NULL... |
72,998,571 | Randomized Strings + Digits [4 formats]<pre><code>for i in range(num):
code = "".join(random.choices(
string.ascii_uppercase + string.digits,
k = 16
))
file.write(f"{code}\n")
</code></pre>
<p>So this is a code I made which randomly generates 16 characters, I would like ... | <p>Try this:</p>
<pre class="lang-py prettyprint-override"><code>import random
from string import digits, ascii_uppercase
def get_random_template(filename: str, n: int) -> None:
"""Saves n randomly generated templates to filename."""
t1 = "{}{}-{}{}{}{}-{}{}{}{}-{}{}{}{}&q... | Randomized Strings + Digits [4 formats] | python|string|random | -1 | 49 | 2 | 72,998,768 | 72,998,768 | 0 | true | 2022-07-15T19:00:56.960Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Randomized Strings + Digits [4 formats]<pre><code>for i in range(num):
code = "".join(random.choices(
string.ascii_uppercase + string.d... |
72,783,616 | os.listdir() skips a file in a list<p>My program currently gets a list of files from a directory and is supposed to move and rename them to another directory. Instead, it does file0 and file2, skipping file1. Here's my code:</p>
<pre><code>files = glob.glob("oldfiles/*")
print("Length ==", len(files... | <p>Can't you just iterate through <code>os.listdir("oldfiles")</code> ?</p>
<pre><code>i=0
for file in os.listdit("oldfiles"):
i+=1
...
</code></pre>
<p>and then you use <code>i</code> instead of the <code>file</code> variable that you use now</p> | os.listdir() skips a file in a list | python|directory | 0 | 49 | 1 | 72,783,665 | 72,783,665 | 0 | true | 2022-06-28T09:04:11.273Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
os.listdir() skips a file in a list<p>My program currently gets a list of files from a directory and is supposed to move and rename them to another directory... |
72,883,502 | Python detects Vanity URL discord.py<p>I am making a Serverinfo command on my bot. So i want add the server info command show the guild's vanity too! But I read the whole discord documentation but can't find how can i make the bot detect the vanity url and sends it. Then I tried to test by making that command as a sing... | <p>Try this to get the vanity url:</p>
<pre><code>vanity = (await ctx.guild.vanity_invite()).url
</code></pre>
<p>Documentation reference: <a href="https://discordpy.readthedocs.io/en/stable/api.html#discord.Guild.vanity_invite" rel="nofollow noreferrer">https://discordpy.readthedocs.io/en/stable/api.html#discord.Guild... | Python detects Vanity URL discord.py | discord|discord.py|vanity-url | -1 | 49 | 1 | 72,884,283 | 72,884,283 | 0 | true | 2022-07-06T12:23:25.867Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python detects Vanity URL discord.py<p>I am making a Serverinfo command on my bot. So i want add the server info command show the guild's vanity too! But I r... |
72,774,026 | Plotting ternary graph with imported excel sheet<p>I have a number of excel sheets (example attached) which plot simple ternary plots.[![basic excel sheet layout][![1]][1]][1]</p>
<p>This currently is used to plot a simple ternary plot of shape [![generated simple ternary plot in excel][![2]][2]][2]</p>
<p>left scale i... | <p>Using the data you posted in the table.</p>
<pre class="lang-r prettyprint-override"><code># Read in the data
Tdata <- read.table(text = "a-axis b-axis c-axis lithology roundness
11.11 10.98 5.92 a-ig sa
8.57 8.27 6.2 met sa
9.25 6.25 4.14 ss r
8.21 7.23 5.03 b-ig s... | Plotting ternary graph with imported excel sheet | r|excel|ggplot2|ggtern | 0 | 49 | 2 | 72,774,184 | 72,774,184 | 0 | true | 2022-06-27T14:45:16.790Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Plotting ternary graph with imported excel sheet<p>I have a number of excel sheets (example attached) which plot simple ternary plots.[![basic excel sheet la... |
72,779,967 | Inserted record without option icon in a list can be selected in edit mode<p>I have a list to show some records. A weird issue will happen as follow steps:</p>
<p>--tap "insert" button for some times(eg. 3 times)</p>
<p>--swipe a record from right to left to delete it</p>
<p>--tap "edit" button to s... | <p>Here is possible workaround. Tested with Xcode 13.4 / iOS 15.5</p>
<pre><code>// explicit state to force refresh List that
// will drop cached cells
@State private var forceRefresh = false
var body: some View{
VStack{
Button {
if editMode.isEditing{
editMode = .inactive
... | Inserted record without option icon in a list can be selected in edit mode | swiftui|swiftui-list|editmode | 1 | 49 | 1 | 72,781,320 | 72,781,320 | 0 | true | 2022-06-28T02:00:03.120Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Inserted record without option icon in a list can be selected in edit mode<p>I have a list to show some records. A weird issue will happen as follow steps:</... |
73,003,315 | How to access datavalues using Map Function?<p>I have a "data" state which stores the values taken from my database.</p>
<pre><code>const [data, setData] = useState([]);
</code></pre>
<p>"data" contains an array of objects which was extracted from my database.</p>
<pre><code>// so data is essentiall... | <p>You don't need to add the <code>info.student</code> in an object.</p>
<pre><code>import Select from "react-select";
function myTable() {
const myOptions = data.map(info => ({
value: info.student,
label: info.student
}));
return (
<tr>
<td>
<... | How to access datavalues using Map Function? | javascript|reactjs|map-function | 0 | 49 | 2 | 73,003,360 | 73,003,360 | 0 | true | 2022-07-16T10:09:49.240Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to access datavalues using Map Function?<p>I have a "data" state which stores the values taken from my database.</p>
<pre><code>const [data, se... |
72,844,537 | How to redirect to another component's tab in angular 12?<p>I am trying to redirect to another component's tab using the <code>routerLink</code>.</p>
<p>for example:
Dashboard component:</p>
<pre><code><a class="hvr-icon-forward" [routerLink]="['/app/Snow']">
<span class="s... | <p>You are going in the right direction. Just add <code>history-tab</code> as query params:</p>
<pre><code><a class="hvr-icon-forward" [routerLink]="['/app/Snow']" [queryParams="show:history-tab"]</a>
</code></pre>
<p>In your component read like this:</p>
<pre><code>import {Route... | How to redirect to another component's tab in angular 12? | jquery|angular|typescript | 0 | 49 | 1 | 72,844,633 | 72,844,633 | 0 | true | 2022-07-03T07:04:02.140Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to redirect to another component's tab in angular 12?<p>I am trying to redirect to another component's tab using the <code>routerLink</code>.</p>
<p>for ... |
72,815,476 | Nodejs/c++ addon - getting error "undefined symbol: speech_config_from_subscription" from Microsoft speech SDK on ubuntu 18.4 server<p>Actually, I want to do speech transcription with passing MULAW (g711) audio format to microsoft-speech-sdk (Nodejs), but MULAW streaming audio format is not supported to microsoft-speec... | <p>I got the solution, Just coped this <code>libMicrosoft.CognitiveServices.Speech.core.so</code> library into <code>/usr/lib</code> folder and modified <code>binding.gyp</code> file. it is working fine.</p>
<pre class="lang-json prettyprint-override"><code>{
"targets": [
{
"target_name"... | Nodejs/c++ addon - getting error "undefined symbol: speech_config_from_subscription" from Microsoft speech SDK on ubuntu 18.4 server | c++|node.js|gstreamer|speech-to-text|mu-law | 0 | 49 | 1 | 72,838,168 | 72,838,168 | 0 | true | 2022-06-30T12:03:04.610Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Nodejs/c++ addon - getting error "undefined symbol: speech_config_from_subscription" from Microsoft speech SDK on ubuntu 18.4 server<p>Actually, I want to do... |
72,953,676 | How to use a variable inside a _T wrapper ? (MFC Dialog app C++)<p>I want to generate 17 service names in the List Control. How can i use a formatted string variable inside a _T wrapper ?</p>
<pre><code>// TODO: Add extra initialization here
#define MAX_VALUE 17
int numberOfService = 0;
CString StringServiceN... | <p>You can't - <code>_T</code> is just a macro to generate narrow or wide string <em>constants</em>, depending on whether you're compiling for Unicode or not.</p>
<p>I'm not over-familiar with <code>CString</code>, but perhaps you meant this:</p>
<pre><code>for (numberOfService; numberOfService < MAX_VALUE; numberOf... | How to use a variable inside a _T wrapper ? (MFC Dialog app C++) | c++|mfc | 0 | 49 | 1 | 72,953,744 | 72,953,744 | 0 | true | 2022-07-12T14:05:53.023Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to use a variable inside a _T wrapper ? (MFC Dialog app C++)<p>I want to generate 17 service names in the List Control. How can i use a formatted string ... |
73,004,412 | In Android, why 2 strings point to the same object if they are initialized by the same value, but not when the string goes through an intent?<p>Why two different <code>String</code> variables point to the same object if they are initialized by the same value, but they point to different object if the string is passed t... | <p>I ran into <a href="https://stackoverflow.com/a/17489410/11958566">this</a> answer and learned a bit.</p>
<p>It seems like the JVM handles <code>String</code> allocations differently.</p>
<p>Since it's probably the most widely allocated object, it requires immense optimization.</p>
<p>So the JVM tries to prevent <co... | In Android, why 2 strings point to the same object if they are initialized by the same value, but not when the string goes through an intent? | android|string|android-intent | 1 | 49 | 1 | 73,017,655 | 73,017,655 | 0 | true | 2022-07-16T12:57:17.727Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
In Android, why 2 strings point to the same object if they are initialized by the same value, but not when the string goes through an intent?<p>Why two diffe... |
72,978,093 | PostegrSQL with recursive query to get ordred parent-child pathname for project<p>As you will see I have a table with project parent and child.I wanted to write a script that orders the projects by returning its pathname (not the pathID ) by using the project's parent-child ID's,
I couldn't find this special case here,... | <p>Forming the path string is just adding the child name to the parent name within the recursion</p>
<pre><code>WITH RECURSIVE tree_view
AS (
SELECT id
, parentid
, "name"
, 0 AS LEVEL
, CAST(id AS VARCHAR(50)) AS order_sequence
, name::T... | PostegrSQL with recursive query to get ordred parent-child pathname for project | sql|postgresql|parent-child|recursive-query | 0 | 49 | 1 | 72,990,620 | 72,990,620 | 0 | true | 2022-07-14T09:16:53.100Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
PostegrSQL with recursive query to get ordred parent-child pathname for project<p>As you will see I have a table with project parent and child.I wanted to wr... |
72,887,559 | Access one function on other file<p>I would like connect the function of file home.html to file index.js. It's possible?</p>
<pre><code>const express = require('express');
const app = express();
const Port = 8080;
app.use(express.json());
app.listen(
Port,
() => console.log('its alive on http://localhost:'... | <p>Note: <strong>You cannot run client-side, DOM-manipulating JS on the server; it requires a browser with your page loaded to run.</strong></p>
<p>Nonetheless, here's what you'd need to do in more useful cases:</p>
<p>Move the script from the HTML to a file <code>test.js</code>:</p>
<pre class="lang-js prettyprint-ove... | Access one function on other file | javascript|es6-modules | 1 | 49 | 1 | 72,887,617 | 72,887,617 | 0 | true | 2022-07-06T17:15:58.440Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Access one function on other file<p>I would like connect the function of file home.html to file index.js. It's possible?</p>
<pre><code>const express = requi... |
72,903,345 | using a 'RETURNING' clause in Snowflake?<p>Is there an easy way to do a 'RETURNING' clause in snowflake?</p>
<p>For example in postgres I can do something like</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>COL 1</th>
<th>COL 2</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>xcvs</td>
</tr... | <p>Snowflake seems to lack <code>returning</code> or <code>last_insert_id</code>.</p>
<p>One option is to forego auto-incrementing primary keys and use a explicit <a href="https://docs.snowflake.com/en/user-guide/querying-sequences.html#" rel="nofollow noreferrer">sequence</a>.</p>
<pre><code>create sequence example_ta... | using a 'RETURNING' clause in Snowflake? | sql|snowflake-cloud-data-platform | 0 | 49 | 1 | 72,903,603 | 72,903,603 | 0 | true | 2022-07-07T19:36:10.783Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
using a 'RETURNING' clause in Snowflake?<p>Is there an easy way to do a 'RETURNING' clause in snowflake?</p>
<p>For example in postgres I can do something li... |
72,845,981 | Can't add element to List in flutter<p>how can I add the element <code>first</code> to my List <code>deckList</code>?</p>
<p><code>deckList.add(first);</code> is under lighted red with the note:
"The name of a constructor must match the name of the enclosing class."</p>
<pre><code>import 'dart:ui';
class _G... | <p>The warring is coming from null-safety. If you like to insert data firstly, you can use constructor or provide inside list.</p>
<p>It can be like</p>
<pre class="lang-dart prettyprint-override"><code> _DeckofCards() {
deckList.add(first);
}
</code></pre>
<p>Or just add while declaring list</p>
<pre class="lang... | Can't add element to List in flutter | flutter|list|dart|dart-null-safety | 0 | 49 | 1 | 72,846,047 | 72,846,047 | 0 | true | 2022-07-03T11:09:22.610Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Can't add element to List in flutter<p>how can I add the element <code>first</code> to my List <code>deckList</code>?</p>
<p><code>deckList.add(first);</code... |
72,948,659 | Keep image hover effect when hovering the text in front of it<p>When hovering over the text (inside an image), the scale property is not applyed (it scales back to original), but when I'm hovering only over the image it works.</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="... | <p>It happens because you hover the text instead of the image, you need to select the container and apply your style on the image. Try <code>.gallery-item:hover .gallery-img{}</code> instead of <code>.gallery-img:hover{}</code></p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel=... | Keep image hover effect when hovering the text in front of it | html|css | 0 | 49 | 2 | 72,948,694 | 72,948,694 | 0 | true | 2022-07-12T07:39:07.793Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Keep image hover effect when hovering the text in front of it<p>When hovering over the text (inside an image), the scale property is not applyed (it scales b... |
72,803,589 | R tidyverse - How can I create an age group from an excisting age group<p>I have this dataset:</p>
<p><a href="https://i.stack.imgur.com/sT0rR.png" rel="nofollow noreferrer">enter image description here</a></p>
<p>I need to make a new age range with the existing one and combine 25-39 with 40-59.
To make it simple to un... | <p>Another option (based in Tidyverse) is to use the fantastic <em>case_when()</em> function to specify a new column called new_age_range. The <em>case_when()</em> function tests to see whether age_range contains either "25-39" or "40-59" and if it does it recodes this as "25-59". If the a... | R tidyverse - How can I create an age group from an excisting age group | r|tidyverse | -1 | 49 | 1 | 72,818,975 | 72,818,975 | 0 | true | 2022-06-29T14:58:38.690Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
R tidyverse - How can I create an age group from an excisting age group<p>I have this dataset:</p>
<p><a href="https://i.stack.imgur.com/sT0rR.png" rel="nofo... |
72,875,469 | removeChild() works as intended but gives an error?<p>I made 'book' items using javascript in a div with the 'content' class and added an delete button on each of them dynamically so I can delete them. I'm trying to figure what what is wrong but I don't understand what I'm missing.</p>
<p>It seems to work as intended b... | <p>I was able to reproduce by adding two books, then deleting the first.</p>
<p>The problem is that you're adding an event listener again when the second form is submitted.</p>
<p>You need to assign a unique id to each delete button so that the listener is only added once, or better, don't use an ID at all.</p>
<p>The ... | removeChild() works as intended but gives an error? | javascript|html|css | 0 | 49 | 2 | 72,875,728 | 72,875,728 | 0 | true | 2022-07-05T20:59:34.100Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
removeChild() works as intended but gives an error?<p>I made 'book' items using javascript in a div with the 'content' class and added an delete button on ea... |
72,987,417 | Run command process as Admin<p>I have a Windows Forms Application with the app.manifest set to:</p>
<p>level="requireAdministrator" uiAccess="false".</p>
<p>Now I need to run a console application (Diskspd.exe) from my application and return the standard output. It almost works, though the part tha... | <p>Well - after all of this - in adding debugging, the issue is the <code>p.StartInfo.Arguments = DScmd;</code></p>
<p>The Argument is being interpreted as separate entries.</p>
<p>The <strong>solution/problem</strong>: DISKSPD requires ASCII and the string is UNICODE.
Changed the hyphens to <code>convert.ToChar(45)</... | Run command process as Admin | c#|process|redirectstandardoutput | 0 | 49 | 1 | 73,040,538 | 73,040,538 | 0 | true | 2022-07-14T22:52:13.290Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Run command process as Admin<p>I have a Windows Forms Application with the app.manifest set to:</p>
<p>level="requireAdministrator" uiAccess="... |
73,011,575 | Access data through an API with Python<p>I am a complete beginner in the use of API in python. I would like to access this data about Covid 19 vaccination : <a href="https://datavaccin-covid.ameli.fr/explore/dataset/donnees-de-vaccination-par-commune/api/" rel="nofollow noreferrer">https://datavaccin-covid.ameli.fr/ex... | <p>Thanks a lot @James for your help. This works</p>
<pre><code>url = 'https://datavaccin- covid.ameli.fr/api/records/1.0/search/'
query = {"dataset":"donnees-de-vaccination-par-commune",
"rows":100,
"start":0,
"facet":[
"semaine_injection",
"commune_r... | Access data through an API with Python | python|json|api|post|request | 0 | 49 | 2 | 73,047,257 | 73,047,257 | 0 | true | 2022-07-17T12:00:45.397Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Access data through an API with Python<p>I am a complete beginner in the use of API in python. I would like to access this data about Covid 19 vaccination :... |
72,946,632 | unstack 2 columns one with column names and the other with values into multiple columns-pandas<p>I have a dataframe where the "Name" column contains data that should make up column names and "Value" column has the corresponding values:</p>
<pre><code>Id set Name Value
6050 256 Mai... | <p>here is one way to do it</p>
<p>creating a temp column using assign to break the duplication error in pivot, and dropping the column afterwards</p>
<pre><code>df.assign(
dup=df.groupby(['Id', 'Name']).cumcount()
).pivot(
index=['Id','set','dup'],
columns='Name',
values='Value').reset_index().drop(c... | unstack 2 columns one with column names and the other with values into multiple columns-pandas | python|pandas | 0 | 49 | 1 | 72,946,891 | 72,946,891 | 0 | true | 2022-07-12T03:10:07.957Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
unstack 2 columns one with column names and the other with values into multiple columns-pandas<p>I have a dataframe where the "Name" column contain... |
72,929,216 | Use multiple Event Handlers for multiple elements in a forEach loop in Javascript<p>I want to add multiple event handlers on multiple HTML elements with the same class. I am using a forEach loop to achieve this. But for some reason it doesn't work as it should.
The first time I had a function to do this. I have multipl... | <p>The problem were :</p>
<ul>
<li>moveover instead of mouseover</li>
<li>this instead of gif in forech loop</li>
</ul>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>let gifs = d... | Use multiple Event Handlers for multiple elements in a forEach loop in Javascript | javascript|html|events | 0 | 49 | 3 | 72,929,298 | 72,929,298 | 0 | true | 2022-07-10T14:26:21.743Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Use multiple Event Handlers for multiple elements in a forEach loop in Javascript<p>I want to add multiple event handlers on multiple HTML elements with the ... |
72,893,952 | Spring Data not working for Gradle projects under Eclipse without @Param annotations for method parameters<p>So I'm using Gradle, Eclipse, Java 11, Spring Boot with some Spring Data JPA repositories.
In Eclipse, I've tested with 3 different JDK libraries configured in the build path and in the execution: OpenJDK, Oracl... | <p>It's a compiler argument.</p>
<p>Seems that when the code is compiled, depending on the project, it will run with or without the <code>-parameters</code> argument to the <code>javac</code> command. When you run <code>javac --help</code>, the following line explains:</p>
<pre><code>...
-parameters
Generate ... | Spring Data not working for Gradle projects under Eclipse without @Param annotations for method parameters | java|spring-boot|eclipse|gradle|spring-data-jpa | 0 | 49 | 1 | 72,911,476 | 72,911,476 | 0 | true | 2022-07-07T07:37:26.830Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Spring Data not working for Gradle projects under Eclipse without @Param annotations for method parameters<p>So I'm using Gradle, Eclipse, Java 11, Spring Bo... |
72,957,058 | PL/SQL: How to sum a set of values if they fall within a specific time frame?<p>I have a query (below) that shows the number of terminations since 1/1/17 in one column and the associated date of the terminations in the only other column. If there were no terminations on a specific date, then there is no record for that... | <p>I don't have your data and I don't want to spend time generating some test data to match that monster query but here is a simplified example explaining how to do this:</p>
<ul>
<li>Create a calendar table: 1 record per bucket (monthly) with start and end date.</li>
</ul>
<pre><code>CREATE TABLE last_60_months (start... | PL/SQL: How to sum a set of values if they fall within a specific time frame? | sql|plsql|sum | 0 | 49 | 1 | 72,958,424 | 72,958,424 | 0 | true | 2022-07-12T18:48:24.263Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
PL/SQL: How to sum a set of values if they fall within a specific time frame?<p>I have a query (below) that shows the number of terminations since 1/1/17 in ... |
72,855,312 | How to use the commands in Root after creating a new user in Linux?<p>I have created a new user using <code>useradd MyUsername</code> and have given him "sudo" privilege. However, I noticed that I couldn't use the commands I have installed in root with this user.</p>
<p>For example:</p>
<p><strong>In root :</... | <p><code>nvm</code> is intended as a PER-USER script, as stated <a href="https://github.com/nvm-sh/nvm#about" rel="nofollow noreferrer">here</a>.<br />
It is cloned and installed into the home-directory of each individual user.<br />
Therefore, you need to install it again by following the <a href="https://github.com/n... | How to use the commands in Root after creating a new user in Linux? | linux|command-line|centos|nvm | 0 | 49 | 2 | 72,855,434 | 72,855,434 | 0 | true | 2022-07-04T10:29:10.870Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to use the commands in Root after creating a new user in Linux?<p>I have created a new user using <code>useradd MyUsername</code> and have given him &quo... |
72,900,047 | Split a dictionary data into 2 parts and store into variable<p>So I have this cosine similarity metric dictionary data with me that is stored in the variable 'similarity'. <a href="https://i.stack.imgur.com/NfcMU.png" rel="nofollow noreferrer">PIC of the data </a>.
May I know how can I split this data into portion of 7... | <p>This should do it:</p>
<pre><code>split_rate = 0.7
split_idx = int(len(similarity)*split_rate)
train_r = np.array(similarity)[:split_idx]
test_r = np.array(similarity)[split_idx:]
</code></pre> | Split a dictionary data into 2 parts and store into variable | python|artificial-intelligence|data-mining|training-data | 0 | 49 | 1 | 72,900,243 | 72,900,243 | 0 | true | 2022-07-07T14:56:14.403Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Split a dictionary data into 2 parts and store into variable<p>So I have this cosine similarity metric dictionary data with me that is stored in the variable... |
72,941,612 | Cant center grid div<p>I have this in html</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-css lang-css prettyprint-override"><code>body {
margin: 10px;
text-align: center;
width: 380px;
}
.row {
display: g... | <p>Use the following CSS:</p>
<pre><code>body {
margin: 10px;
text-align: center;
width: 100%;
display: flex;
justify-content: center;
}
</code></pre> | Cant center grid div | html|css | 0 | 49 | 2 | 72,942,148 | 72,942,148 | 0 | true | 2022-07-11T16:16:17.497Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Cant center grid div<p>I have this in html</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="s... |
72,991,267 | Removing elements from three R vectors of the same length when one of the vectors meets a condition<p>Three vectors of the same length x, y and z.</p>
<pre><code>x <- c(3, 6, 12, 24, 23)
y <- c(34, 26, 33, 41, 54)
z <- c("A", "B", "C", "D", "E")
</code></pre>
... | <p>You can try this</p>
<pre><code>df <- data.frame(x,y,z) |> subset(x >= 10 & y >= 10)
x <- df$x
y <- df$y
z <- df$z
</code></pre> | Removing elements from three R vectors of the same length when one of the vectors meets a condition | r|vector|element | 0 | 49 | 2 | 72,991,984 | 72,991,984 | 0 | true | 2022-07-15T08:35:30.590Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Removing elements from three R vectors of the same length when one of the vectors meets a condition<p>Three vectors of the same length x, y and z.</p>
<pre><... |
72,973,743 | HTML Select Input Tag bringing error with "selected" attribute in React JS<p>Seeing this warning in React
Warning: Use the <code>defaultValue</code> or <code>value</code> props on instead of setting <code>selected</code> on .
What does it implies?</p> | <p>It's basically a warning that encourages you to change your code from doing <code><option selected></code> to doing <code><select defaultValue="theValue"></code> or using a controlled select.</p>
<p>It's probably because React wants to keep consistency between the Form components.</p>
<p>Edit: ... | HTML Select Input Tag bringing error with "selected" attribute in React JS | html|reactjs|select|input|jsx | 0 | 49 | 1 | 72,973,762 | 72,973,762 | 0 | true | 2022-07-13T23:40:23.280Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
HTML Select Input Tag bringing error with "selected" attribute in React JS<p>Seeing this warning in React
Warning: Use the <code>defaultValue</code> or <code... |
73,008,440 | Make Scaffold create a Drawer but not create the drawer related icon button in the app-bar<p>My app uses a <code>Drawer</code> to present an item properties inspector by means of <code>endDrawer:</code>.</p>
<p>The <code>Drawer</code> appears, then an item gets clicked. It disappears, when the properties inspector perf... | <p>Put <code>SizedBox.shrink()</code> in<code>leading</code> widget in <code>Appbar</code> .
and if you want to show back button instead of drawer button , you can simply use <code>BackButton</code> like this :</p>
<pre class="lang-dart prettyprint-override"><code>AppBar(
leading: Builder(
builder: (context) {
... | Make Scaffold create a Drawer but not create the drawer related icon button in the app-bar | flutter|flutter-layout | 0 | 49 | 2 | 73,008,480 | 73,008,480 | 0 | true | 2022-07-17T00:07:56.317Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Make Scaffold create a Drawer but not create the drawer related icon button in the app-bar<p>My app uses a <code>Drawer</code> to present an item properties ... |
72,837,714 | How to parse a value where the class name changes depending on the value?<p>I have the next html code:</p>
<pre><code> ...
<tr class="main">...</tr>
...
<tr class="main">
<td class="int">JJJ<... | <p>In my opinion there is no need to check for the <code>class</code> cause position of the value is always the same - So simply extract the values from the <code><td></code> and store it in your list of dicts:</p>
<pre><code>data.append(dict(zip(['Name','Amount','Percentage','Date'],row.stripped_strings)))
</cod... | How to parse a value where the class name changes depending on the value? | python|html|web-scraping|beautifulsoup|css-selectors | 0 | 49 | 1 | 72,838,067 | 72,838,067 | 0 | true | 2022-07-02T08:46:04.120Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to parse a value where the class name changes depending on the value?<p>I have the next html code:</p>
<pre><code> ...
<tr class=... |
72,850,364 | How to tell TypeScript that an error from a `try catch` statement is an object that contains a specific property without using the `any` type?<p>I get an error in the <code>console.log</code> statement below:</p>
<pre><code>try {
// ...
} catch(e) {
if (typeof e === "object" && e !== null &... | <p>You can use a <a href="https://www.typescriptlang.org/play?ssl=11&ssc=2&pln=1&pc=1#code/C4JwngBA3gsAUBRED0yIDpPwL4QMYCGweAFhABQCmAlNPEhAJYBmFJBAzgCJEFXW1YCBkjwB7AHYcxAG0roZYgOZV0AE17UA3PSTYc8eMwCuEvMEaSI7br3JiARgCtK5gFwRTAawliA7hLUHo4u5kwc0BAawAQe3r4BELhCDCCUwMYgEhTAYAAOlGKsIa7AEAC8lRAARCXm1RAAZI0QdcAA-O... | How to tell TypeScript that an error from a `try catch` statement is an object that contains a specific property without using the `any` type? | typescript|types|try-catch | 0 | 49 | 2 | 72,850,389 | 72,850,389 | 0 | true | 2022-07-03T22:38:11.593Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to tell TypeScript that an error from a `try catch` statement is an object that contains a specific property without using the `any` type?<p>I get an err... |
72,991,363 | Using python, how do you repeatedly extract regularly formated chunks of text from .txt file, and write them to multiple, separate files?<p>Suppose you have a text file with a bunch of contacts information, (e.g. name, phone, email etc. ) for multiple people.<br>
<br>Using the example information below and python (and ... | <p>If the file easily fits in memory, you can simply split on <code>\n\n</code>:</p>
<pre><code>with open('file.txt') as f:
for n, chunk in enumerate(f.read().split('\n\n'), start=1):
with open(f'chunk_{n}.txt', 'w') as f_out:
f_out.write(chunk)
</code></pre>
<p><code>file.txt</code>:</p>
<pre><... | Using python, how do you repeatedly extract regularly formated chunks of text from .txt file, and write them to multiple, separate files? | python|regex | -1 | 49 | 2 | 72,991,457 | 72,991,457 | 0 | true | 2022-07-15T08:44:44.937Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Using python, how do you repeatedly extract regularly formated chunks of text from .txt file, and write them to multiple, separate files?<p>Suppose you have ... |
73,001,544 | How do I get a value from a class table in C++<p>Basically, I have a class in C++</p>
<pre><code>class Commands { public: void help(); void userid(); void getCmd(std::string cmd) { } };
void Commands::help() {
WriteLine("\n \
--------------------------------\n \
[ userid, id ]: Get's the UserID... | <p>Use <a href="https://en.cppreference.com/w/cpp/container/map" rel="nofollow noreferrer"><code>std::map</code></a> or <a href="https://en.cppreference.com/w/cpp/container/unordered_map" rel="nofollow noreferrer"><code>std::unordered_map</code></a> to map <code>std::string</code>s to <a href="https://en.cppreference.c... | How do I get a value from a class table in C++ | c++|instant | 0 | 49 | 1 | 73,001,675 | 73,001,675 | 0 | true | 2022-07-16T04:35:07.013Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I get a value from a class table in C++<p>Basically, I have a class in C++</p>
<pre><code>class Commands { public: void help(); void userid(); void ge... |
72,883,295 | How to delete all files in a dir except ones with a certain pattern in their name?<p>I have a lot of kernel .deb files from my custom kerenls. I would like to write a bash that would delete all the old files except the ones associated with the currently installed kernel version. My script:</p>
<pre><code>#!/bin/bash
ve... | <p>This can be done as a one-liner, though I've preserved your variables:</p>
<pre class="lang-bash prettyprint-override"><code>#!/bin/bash
version="$(uname -r)"
dir="$HOME/Installed-kernels"
find "$dir" -maxdepth 1 -type f -not -name "*$version*" -print0 |xargs -0 rm
</code></p... | How to delete all files in a dir except ones with a certain pattern in their name? | bash|delete-file | 0 | 49 | 1 | 72,889,878 | 72,889,878 | 0 | true | 2022-07-06T12:06:45.063Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to delete all files in a dir except ones with a certain pattern in their name?<p>I have a lot of kernel .deb files from my custom kerenls. I would like t... |
72,910,539 | Continue program even after assert fails<p>I want to continue even after the <code>assert</code> statement fails. Instead of saying "File not found" I would like to ignore it and continue my program. I am unable to figure out the syntax.</p>
<p>Overview of the script and problem faced :
This script is used fo... | <pre><code> if os.path.exists(of):
move(of, fn)
fns.append(stripped_line[0])
ofns.append(stripped_line[3])
</code></pre> | Continue program even after assert fails | python | -2 | 49 | 2 | 72,910,779 | 72,910,779 | 0 | true | 2022-07-08T11:10:47.210Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Continue program even after assert fails<p>I want to continue even after the <code>assert</code> statement fails. Instead of saying "File not found"... |
72,953,464 | Adding source control to Azure Log Analytics Workspace Functions<p>Has anyone found a solution to adding source control to Azure Log Analytics Workspace Functions? (KQL queries saved on the Azure GUI)</p>
<p>I have a number complex queries and I would like to track changes over time. So far my searches have not come up... | <p>Azure has a vast support in REST API</p>
<p><a href="https://docs.microsoft.com/en-us/rest/api/loganalytics/saved-searches/create-or-update" rel="nofollow noreferrer">Docs / Log Analytics / Saved Searches / Saved Searches - Create Or Update</a></p> | Adding source control to Azure Log Analytics Workspace Functions | kql|azure-log-analytics | 0 | 49 | 1 | 72,953,708 | 72,953,708 | 0 | true | 2022-07-12T13:50:37.990Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Adding source control to Azure Log Analytics Workspace Functions<p>Has anyone found a solution to adding source control to Azure Log Analytics Workspace Func... |
72,792,920 | Why does reinstantiating an object delete any references other objects may have had to it?<p>I made a generic class that holds a simple object (PassedObject) which just contains an integer. To understand where my container loses its reference to my initial 'PassedObject' instance, i printed the data after simply changi... | <p>The code in the question has <strong>two <code>PassedObject</code> references</strong>: one in the <code>b</code> variable, and one in the <code>objectHolder.PassedObject</code> variable.</p>
<p>Initially, the code creates a new <code>PassedObject</code> instance and assigns it to the <code>b</code> reference. Then ... | Why does reinstantiating an object delete any references other objects may have had to it? | c#|generics|reference | -1 | 49 | 1 | 72,793,095 | 72,793,095 | 0 | true | 2022-06-28T20:41:04.730Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why does reinstantiating an object delete any references other objects may have had to it?<p>I made a generic class that holds a simple object (PassedObject)... |
73,012,349 | Golang ACMEv2 HTTP-01 challenge not challenging server<p>With <a href="https://github.com/danthegoodman1/acmeHTTP/blob/main/main.go" rel="nofollow noreferrer">this code</a> I am attempting a manual HTTP-01 challenge to better understand how the process works. All the requests return 201/200 responses with the expected ... | <p>I had to use a body of <code>[]byte("{}")</code> rather than <code>[]byte{}</code> for the challenge endpoint</p>
<p>Edit: For some reason this endpoint doesn't error out, but others will if you pass incorrect body</p> | Golang ACMEv2 HTTP-01 challenge not challenging server | go|ssl|ssl-certificate|lets-encrypt|acme | 2 | 49 | 1 | 73,013,412 | 73,013,412 | 0 | true | 2022-07-17T13:51:43.940Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Golang ACMEv2 HTTP-01 challenge not challenging server<p>With <a href="https://github.com/danthegoodman1/acmeHTTP/blob/main/main.go" rel="nofollow noreferrer... |
73,008,883 | Django Query with 3 tables<p>I'm hoping I can get a little guidance.</p>
<p>I'm trying to return data from 3 related tables in my template. In SQL, this is a simple approach, but the Django requirements have me stumbling.</p>
<p>I'd like to display information similar to this:</p>
<pre><code>WaiverAdult.first_name Ch... | <p>Firstly, for every Foreign key you are creating I suggest you to add a <code>related_name</code> this way you specify the name of reverse relation ship between the children model and parent model in your case for example, your code should be:</p>
<pre class="lang-py prettyprint-override"><code>class WaiverAdult(mode... | Django Query with 3 tables | python|django | 0 | 49 | 2 | 73,009,101 | 73,009,101 | 0 | true | 2022-07-17T02:29:49.167Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Django Query with 3 tables<p>I'm hoping I can get a little guidance.</p>
<p>I'm trying to return data from 3 related tables in my template. In SQL, this is ... |
72,943,086 | How to merge objects in array JavaScript<p>i have a array like here</p>
<pre><code> let array = [
{
yearBirth : 1995,
name : 'daniel',
},
{
yearBirth : 1995,
name : 'avi',
},
{
yearBirth : 1993,
name : 'john',
},
{
yearBirth : 1993,
name : 'david',
},
]
</code></pre>
<... | <p>You could use <code>reduce</code> to group by <code>yearBirth</code> property,<br />
then put it result in property <code>yearBirth</code> as an 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 p... | How to merge objects in array JavaScript | javascript|node.js|reactjs|arrays | -2 | 49 | 1 | 72,943,227 | 72,943,227 | 0 | true | 2022-07-11T18:29:40.847Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to merge objects in array JavaScript<p>i have a array like here</p>
<pre><code> let array = [
{
yearBirth : 1995,
name : 'daniel',
},
{
... |
72,858,398 | Change background-color/background-image of div on hover of each cards<p>I have three different cards, I want to change the background color respective the card I hover on. I have tried <code>.card-2:hover #landing {background-color: blue;}</code> but that doesn't work. I want the entire body's background-color changed... | <p>There's two issues here. The first problem is your selector. <code>.card-2:hover #landing</code> is looking for a <code>#landing</code> element inside <code>.card-2</code> - this should be the other way around.</p>
<p>The second problem is due to your use of <code>!important</code> the <code>:hover</code> rule isn't... | Change background-color/background-image of div on hover of each cards | html|jquery|css | 2 | 49 | 1 | 72,858,519 | 72,858,519 | 0 | true | 2022-07-04T14:35:03.133Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Change background-color/background-image of div on hover of each cards<p>I have three different cards, I want to change the background color respective the c... |
72,769,318 | Permission denied when attempting to create role despite having CREATEROLE<p>I have created a user with <strong>CREATEROLE</strong>, but I get the error "permission denied to create role".</p>
<p>Here is how I created a user with the <strong>CREATEROLE</strong> ability:</p>
<pre><code># Login
PGPASSWORD=$secr... | <p>In the documentation it says:</p>
<blockquote>
<p>The INHERIT attribute governs inheritance of grantable privileges (that is, access privileges for database objects and role memberships). It does not apply to the special role attributes set by CREATE ROLE and ALTER ROLE. For example, being a member of a role with CR... | Permission denied when attempting to create role despite having CREATEROLE | sql|postgresql|permissions|psql|roles | 0 | 49 | 1 | 72,769,841 | 72,769,841 | 1 | true | 2022-06-27T08:47:59.333Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Permission denied when attempting to create role despite having CREATEROLE<p>I have created a user with <strong>CREATEROLE</strong>, but I get the error &quo... |
72,771,057 | How to pass "self" or Page.id to a custom admin Panel in the Wagtail CMS?<p>More generally speaking I want add a custom admin <code>Panel</code> to list some related content. To lookup this related content I need to pass the current instance of the model or at least its ID to this panel. How can I do that within these ... | <p>The ArtistPage instance is passed to <code>BoundPanel.__init__</code> as the keyword argument <code>instance</code>. All code that deals with an individual ArtistPage needs to be written inside the <code>BoundPanel</code> class.</p>
<p>When you write <code>ListWorksPanel()</code> as part of a <code>content_panels</c... | How to pass "self" or Page.id to a custom admin Panel in the Wagtail CMS? | python|django|wagtail | 0 | 49 | 1 | 72,771,980 | 72,771,980 | 1 | true | 2022-06-27T11:05:06.003Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to pass "self" or Page.id to a custom admin Panel in the Wagtail CMS?<p>More generally speaking I want add a custom admin <code>Panel</code> to list some... |
72,773,088 | Delegate vs lambda in class member assigning<p>I was implementing a DatePickerFragment in Xamarin.Android and was following the offical docs. And noticed something strange.</p>
<p>The handler was declared like this</p>
<pre><code>Action<DateTime> _dateSelectedHandler = delegate { };
</code></pre>
<p>Having using ... | <p><code>(aux) => { };</code> is a lambda statement. Note that <code>aux</code> does not have a type yet. <code>Action<DateTime></code> on the other hand is a delegate, and has a specific type. The parameter type in the lambda statement is inferred from the type of the delegate it is assigned to. So lambda sta... | Delegate vs lambda in class member assigning | c#|.net|xamarin | 0 | 49 | 1 | 72,773,506 | 72,773,506 | 1 | true | 2022-06-27T13:40:53.180Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Delegate vs lambda in class member assigning<p>I was implementing a DatePickerFragment in Xamarin.Android and was following the offical docs. And noticed som... |
72,776,811 | Benford’s Law by group in R<p>I am attempting to implement Benford’s Law using the benford.analysis package in R across all vendors’ invoices. Over the entire dataset the data confirms. I’m trying to find a way to group by vendor to determine if any individual vendor is displaying fraud indicators by not conforming.... | <p>Here is a way to use <code>group_by</code> and <code>group_map</code> to create <code>benford.analysis</code> plots for each group. In this example, grouping Iris data by Species and performing analysis on Sepal Length variable.</p>
<p>In <code>group_map()</code>, <code>.x</code> means the grouped subset data, and <... | Benford’s Law by group in R | r|benfords-law|benford.analysis | 1 | 49 | 1 | 72,777,229 | 72,777,229 | 1 | true | 2022-06-27T18:27:32.930Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Benford’s Law by group in R<p>I am attempting to implement Benford’s Law using the benford.analysis package in R across all vendors’ invoices. Over the ent... |
72,784,559 | Using Git with an Open Source Project<p>I have to work on a project to develop a module for the platform MagicMirror² (<a href="https://github.com/MichMich/MagicMirror" rel="nofollow noreferrer">https://github.com/MichMich/MagicMirror</a>), and as I am a beginner with Git I don't know how to do to simply import the fil... | <p>For start, you need to have <code>Git</code> installed. After that, find the repository URL, in your case it's:</p>
<pre><code>https://github.com/MichMich/MagicMirror.git
</code></pre>
<p>and do</p>
<pre><code>git clone https://github.com/MichMich/MagicMirror.git
</code></pre>
<p>After that, you can simply checkout ... | Using Git with an Open Source Project | git|github | -1 | 49 | 1 | 72,784,642 | 72,784,642 | 1 | true | 2022-06-28T10:10:20.967Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Using Git with an Open Source Project<p>I have to work on a project to develop a module for the platform MagicMirror² (<a href="https://github.com/MichMich/M... |
72,774,349 | Handle a transaction with 2 signers and make one of them pay<p>I have this account:</p>
<pre><code>#[derive(Accounts)]
pub struct SignupEmployee<'info> {
#[account(init, payer = company_account, space = 8 + 32 + 32)]
pub employee_account: Account<'info, EmployeeState>,
#[account(mut)]
pub c... | <p>in your instruction you already assigning company_account as payer for the new account initialisation, so i'm assuming that you are wondering how to pay gas fee with the same account. You could use program.instruction.signupEmployee which will output transaction instruction that you could add to the custom transacti... | Handle a transaction with 2 signers and make one of them pay | blockchain|solana|anchor-solana | 0 | 49 | 2 | 72,784,693 | 72,784,693 | 1 | true | 2022-06-27T15:05:53.240Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Handle a transaction with 2 signers and make one of them pay<p>I have this account:</p>
<pre><code>#[derive(Accounts)]
pub struct SignupEmployee<'info>... |
72,771,412 | Layout fails to update when going back to view controller with different device orientation (UITabBarController)<p>My app has a main UITabBarController with 5 tabs (each one is a UINavigationController). The tabs contain various UI elements, such as UITableViews (with and without custom cells), UISegmentedControls, and... | <p>This is a "whoops" issue :(</p>
<p>First, we can reproduce it with a much simpler example (no need for any table views or cells)...</p>
<p>With a fresh <code>UITabBarController</code> -- and the default two view controllers -- assign the controllers to <code>FirstVC</code> and <code>SecondVC</code> and emb... | Layout fails to update when going back to view controller with different device orientation (UITabBarController) | ios|swift|autolayout|uitabbarcontroller|orientation | 0 | 49 | 1 | 72,786,749 | 72,786,749 | 1 | true | 2022-06-27T11:34:13.623Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Layout fails to update when going back to view controller with different device orientation (UITabBarController)<p>My app has a main UITabBarController with ... |
72,789,504 | I have a Shop menu in my 2D game and i want to use a drag and dropon the map after purchasing<p>I have a Shop menu in my 2D game and i want to use a drag and dropon the map after purchasing</p>
<p>I have the store script which is this one:</p>
<pre><code>using System.Collections;
using System.Collections.Generic;
using... | <p>having your items defined as an integer array seems like a bad idea. Instead create a base class item that contains the variables to describe it like price, quantity, name, texture and so on. I'm not sure what you mean by dragging items on the map, but there are many tutorials on drag&drop functionality: <a href... | I have a Shop menu in my 2D game and i want to use a drag and dropon the map after purchasing | c#|visual-studio|unity3d|script | 1 | 49 | 1 | 72,789,777 | 72,789,777 | 1 | true | 2022-06-28T15:43:12.323Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I have a Shop menu in my 2D game and i want to use a drag and dropon the map after purchasing<p>I have a Shop menu in my 2D game and i want to use a drag and... |
72,781,824 | Should an Event Sourcing entry contain what should update the view model or the payload of the event?<p>I have a situation where data is coming from a third party service. It is being passed through to a function that formats the data and then saves it to a view model in a way that I can visualize for my system.</p>
<p... | <p>The incoming data can be viewed as a command expressing the intent to ultimately update some state. In this case the command is from outside our system, but commands can also be internal to our system. Especially for external commands, one critical thing to remember is that a command can be rejected.</p>
<p>In eve... | Should an Event Sourcing entry contain what should update the view model or the payload of the event? | event-sourcing | 1 | 49 | 1 | 72,791,231 | 72,791,231 | 1 | true | 2022-06-28T06:46:27.823Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Should an Event Sourcing entry contain what should update the view model or the payload of the event?<p>I have a situation where data is coming from a third ... |
72,791,878 | Adjusting position of colorbar tick labels in ggplot2<p>I'm trying to slightly reposition the labels of a discrete colorbar so that they don't overlap, without changing the values of the breaks themselves. In the below plot, the two center labels (bracketing the near-zero data) are too close together, so that it looks ... | <p>Always a bit hacky and you get a warning but one option would be to pass a vector to <code>hjust</code> argument of <code>element_text</code> to align the <code>-1</code> to the right and the <code>1</code> to the left:</p>
<pre class="lang-r prettyprint-override"><code>library(ggplot2)
set.seed(123)
df <- data... | Adjusting position of colorbar tick labels in ggplot2 | r|ggplot2|axis-labels|colorbar | 0 | 49 | 1 | 72,791,996 | 72,791,996 | 1 | true | 2022-06-28T19:01:14.160Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Adjusting position of colorbar tick labels in ggplot2<p>I'm trying to slightly reposition the labels of a discrete colorbar so that they don't overlap, witho... |
72,967,777 | Exception of type 'Braintree.Exceptions.AuthenticationException' was thrown, even thought API key is valid - .Net Core 6<p>I'm trying to use the Sandbox Environment, but I can't seem to authenticate for some reason,</p>
<p>Here the method:</p>
<pre><code>public Customer CreateCustomer(
User user)
{
... | <p>AND THE ANSWER IS, RUN A TEST ON Environment.Developement First, than it will allow you to make Sandbox request, nowhere to be found on docs this one.</p> | Exception of type 'Braintree.Exceptions.AuthenticationException' was thrown, even thought API key is valid - .Net Core 6 | c#|asp.net-core|braintree|braintree-sandbox | 0 | 49 | 2 | 73,278,398 | 73,278,398 | 0 | true | 2022-07-13T14:12:17.380Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Exception of type 'Braintree.Exceptions.AuthenticationException' was thrown, even thought API key is valid - .Net Core 6<p>I'm trying to use the Sandbox Envi... |
72,942,441 | NextJS - How to fix "Properly defines charset - Error!"<p>I have a NextJS app with regular static and dynamically created static pages. Both clearly define the <code><meta charset="utf-8"></code> tag as you can see in the screenshot. The regular static pages work fine, but I am not sure why Lighthouse i... | <p>We discovered this was happening because it was fetching an API with too much data. When we took down the amount of data that was returned, it started reporting positive numbers.</p> | NextJS - How to fix "Properly defines charset - Error!" | next.js|meta-tags|lighthouse | 0 | 49 | 1 | 73,337,420 | 73,337,420 | 0 | true | 2022-07-11T17:26:10.140Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
NextJS - How to fix "Properly defines charset - Error!"<p>I have a NextJS app with regular static and dynamically created static pages. Both clearly define t... |
72,839,974 | Reading multiple csv files in R while specifying column type<p>I am using this code to read in muptiple csv files in r from a folder.</p>
<pre><code>temp = list.files(pattern="*.csv")
myfiles = lapply(temp, read.delim)
</code></pre>
<p>I want to specify the column types while doing this step. How is this poss... | <p>myfiles = lapply(temp, read.delim, colClasses = a_vector_of_col_classes)</p> | Reading multiple csv files in R while specifying column type | r|csv|dplyr|reader | 0 | 49 | 1 | 73,813,748 | 73,813,748 | 0 | true | 2022-07-02T14:46:24.530Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Reading multiple csv files in R while specifying column type<p>I am using this code to read in muptiple csv files in r from a folder.</p>
<pre><code>temp = l... |
72,912,973 | Performance problems using apache Solr 8.8 in AWS<p>My team are using Apache Solr for years, we have a plan to migrate the actual infrastructure to AWS and update our current version (6.6) to a newer one (8.8), but, in the transition, we are having performance problems not presented in the actual infrastructure.</p>
<p... | <p>That's because the use of some functions in the BF parameter can affect the performance, like <a href="https://solr.apache.org/guide/8_8/function-queries.html#scale-function" rel="nofollow noreferrer">scale</a> or <a href="https://solr.apache.org/guide/8_8/function-queries.html#map-function" rel="nofollow noreferrer... | Performance problems using apache Solr 8.8 in AWS | solr|lucidworks | 0 | 49 | 1 | 73,293,311 | 73,293,311 | 1 | true | 2022-07-08T14:32:56.177Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Performance problems using apache Solr 8.8 in AWS<p>My team are using Apache Solr for years, we have a plan to migrate the actual infrastructure to AWS and u... |
72,245,884 | Cannot get the flutter_markdown pub.dev to work as a widget<p>I want to create a widget that displays Markdown.</p>
<p>I am using the following reference code from here (<a href="https://pub.dev/packages/flutter_markdown/example" rel="nofollow noreferrer">https://pub.dev/packages/flutter_markdown/example</a>) :</p>
<pr... | <p>You can't directly put a widget inside any other widget
You have to put it inside Parent widget's child parameter/builder/children[]</p>
<p>Container has child parameter so define markdown widget as a child of Container.</p>
<p>Like this:</p>
<pre><code>Container(child: Markdown(data: markdownData))
</code></pre>
<p... | Cannot get the flutter_markdown pub.dev to work as a widget | flutter|dart | 0 | 49 | 1 | 72,245,948 | 72,245,948 | 0 | true | 2022-05-15T06:03:44.897Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Cannot get the flutter_markdown pub.dev to work as a widget<p>I want to create a widget that displays Markdown.</p>
<p>I am using the following reference cod... |
72,251,611 | How to extarct text from file with id?<p>i have two files. one contains id and the other contains sentences for each id but with little changes like this example</p>
<p>File1 :</p>
<pre><code>111_3232
111_ewe2
111_3434
222_3843h
222_39092
</code></pre>
<p>File2 :</p>
<pre><code>111 some_text_1 some_text_1
222 so... | <p>A basic approach</p>
<pre><code>with open('file1.txt', 'r') as fd1, open('file2.txt', 'r') as fd2:
lines1 = fd1.read().split() # remove \n
lines2 = fd2.readlines()
new_text = ''
for l1 in lines1:
for id_, t1, t2 in (l.split() for l in lines2):
if l1.startswith(id_):
new_text += f'{l1... | How to extarct text from file with id? | python|pandas|file | 0 | 49 | 2 | 72,252,049 | 72,252,049 | 0 | true | 2022-05-15T19:35:22.220Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to extarct text from file with id?<p>i have two files. one contains id and the other contains sentences for each id but with little changes like this ex... |
72,253,754 | useState of React function component<p>There are <code>n</code> items the user can vote on.
There are two React states:</p>
<ul>
<li><p><code>votes</code> is an array of the user's votes on every item.</p>
<p>const [votes, setVotes] = useState({});</p>
</li>
<li><p><code>voteChanges</code> indicates how many times the ... | <p>So, firstly, you need to make sure the <code>useEffect</code> here run only once as you dont need to register to the <code>databaseListener</code> every time. Secondly, you need to keep in mind the fact that state changes will result in re-renders, so its better to calculate <code>voteChange</code> in a variable and... | useState of React function component | reactjs | 0 | 49 | 1 | 72,253,812 | 72,253,812 | 0 | true | 2022-05-16T02:55:34.560Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
useState of React function component<p>There are <code>n</code> items the user can vote on.
There are two React states:</p>
<ul>
<li><p><code>votes</code> is... |
72,251,730 | How to properly catch fetch request in django<p>I started studying django.</p>
<p>I have js code that calls fetch when I click the button</p>
<pre><code>button = document.querySelector('.button')
button.addEventListener('click', function(){
fetch('http://127.0.0.1:8000/test_fetch/',
{
method: 'GET',
head... | <p>In get method of 'http://127.0.0.1:8000/test_fetch/', I think you defined a render function.</p>
<p>So, if you want to get data through get method, you should define new api.</p>
<p>For example</p>
<p>views.py</p>
<pre><code>from django.http import JsonResponse
class TestFetch(TemplateView):
...
def get_json_d... | How to properly catch fetch request in django | javascript|django|fetch | 0 | 49 | 1 | 72,255,323 | 72,255,323 | 0 | true | 2022-05-15T19:52:16.187Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to properly catch fetch request in django<p>I started studying django.</p>
<p>I have js code that calls fetch when I click the button</p>
<pre><code>butt... |
72,253,750 | cumulative problem if date is expired after 30 days<p>I still cannot find the solution for cumulative problem. Anyone can help or suggest any solution. Many thanks.</p>
<p>I have 2 tables: transactions (date, user_id, price, service group) and point (service group, point). The point user get is price * point.</p>
<p>I ... | <ol>
<li>Tested on <a href="https://dbfiddle.uk/?rdbms=mysql_8.0&fiddle=ddfacb74c48012384f4c74fdf32707b3" rel="nofollow noreferrer">dbfiddle</a></li>
<li>Please let me know if I have misunderstood your question.</li>
</ol>
<pre><code>WITH new_sum AS (
SELECT
t.user_id, t.date, t.price, p.point,
t.price+COALESC... | cumulative problem if date is expired after 30 days | mysql|pandas | -2 | 49 | 2 | 72,257,518 | 72,257,518 | 0 | true | 2022-05-16T02:53:40.743Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
cumulative problem if date is expired after 30 days<p>I still cannot find the solution for cumulative problem. Anyone can help or suggest any solution. Many ... |
72,267,560 | How to let color of svg and span text color same<p>Here is my Vue code:</p>
<pre><code> <icon
:color="itemDynamicColor"
:data="icon"
/>
<span v-bind:style="dynamicStyle">SpanText</span>
</code></pre>
<p>I want the icon and span text ke... | <p><em>The color of both will change when some data change.</em></p>
<p>To achieve this, you can update the <code>dynamicStyle</code> object in both <code><icon></code> and <code><span></code> based on the condition as per your requirement.</p>
<p>Demo <strong>:</strong></p>
<p><div class="snippet" data-lan... | How to let color of svg and span text color same | javascript|html|css|vue.js|svg | 0 | 49 | 2 | 72,269,949 | 72,269,949 | 0 | true | 2022-05-17T02:33:21.580Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to let color of svg and span text color same<p>Here is my Vue code:</p>
<pre><code> <icon
:color="itemDynamicColor"
... |
72,269,604 | DAX/PowerBI Rank taking a variable/parameter into account<p>I'm working on a ranking/scoring system and I'm missing the <code>PERCENTRANK.INC</code> function in powerBI. Instead I have worked out below formula which is the closest I can get.</p>
<pre><code>Score =
DIVIDE (
RANKX (
FILTER ( 'Table', NOT ( IS... | <p>This should work.</p>
<pre><code>Score =
VAR fruit = 'Table'[Fruit]
VAR filteredTable = FILTER ( 'Table', NOT ( ISBLANK ( [Sold amount] ) ) && 'Table'[Fruit] = fruit)
RETURN
DIVIDE (
RANKX (
filteredTable,
[Sold amount],
,
ASC
) - 1,
COUNTROWS ( filteredTable ) -... | DAX/PowerBI Rank taking a variable/parameter into account | dax | 0 | 49 | 1 | 72,271,631 | 72,271,631 | 0 | true | 2022-05-17T07:12:14.443Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
DAX/PowerBI Rank taking a variable/parameter into account<p>I'm working on a ranking/scoring system and I'm missing the <code>PERCENTRANK.INC</code> function... |
72,273,608 | Boolean in Racket<p>I run the test and there is always one test cannot pass. I tried every permutation. Is there an easier way like maybe try not returning a simple boolean, maybe the return depends on the input(s)?</p>
<p>Here are my codes:</p>
<pre><code>(check-expect (same? #true #true) #true)
(check-expect (same? #... | <p>That <code>same?</code> definition is wrong. To pass all test cases, you can use <a href="https://docs.racket-lang.org/reference/Equality.html#%28def._%28%28quote._%7E23%7E25kernel%29._equal%7E3f%29%29" rel="nofollow noreferrer"><code>equal?</code></a>:</p>
<pre><code>(define same? equal?) ; <-- some languages, e... | Boolean in Racket | racket | 0 | 49 | 1 | 72,273,892 | 72,273,892 | 0 | true | 2022-05-17T11:54:33.797Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Boolean in Racket<p>I run the test and there is always one test cannot pass. I tried every permutation. Is there an easier way like maybe try not returning a... |
72,274,004 | How do I add composite foreign key using Spring data JPA and Hibernate?<p>These are the tables I intend to have in my database.</p>
<p><a href="https://i.stack.imgur.com/BI8tO.png" rel="nofollow noreferrer">First Table</a></p>
<p><a href="https://i.stack.imgur.com/u83Pm.png" rel="nofollow noreferrer">Second Table</a></... | <pre><code>@Entity
@Table(name = "STATIONS")
public class Station {
@Id
private Long stnCode;
}
</code></pre>
<pre><code>@Entity
@Table(name = "TRAINS")
public class Train {
@Id
private String trainNo;
}
</code></pre>
<pre><code>@Entity
@Table(name = "STOPS")
public class S... | How do I add composite foreign key using Spring data JPA and Hibernate? | java|spring|spring-boot|hibernate|spring-data-jpa | -1 | 49 | 1 | 72,274,718 | 72,274,718 | 0 | true | 2022-05-17T12:23:08.993Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I add composite foreign key using Spring data JPA and Hibernate?<p>These are the tables I intend to have in my database.</p>
<p><a href="https://i.sta... |
72,265,984 | CloudSearch filtered query works in test dashboard but not on search endpoint<p>I need to filter my search by the host.
I was able to do this in the CloudSearch Dashboard under "Run a Test Search" (See picture)</p>
<p><a href="https://i.stack.imgur.com/Kz8Ro.png" rel="nofollow noreferrer"><img src="https://i.... | <p>I didn't make one thing super clear. I am using a custom domain instead of the default endpoint.</p>
<p>Turns out I only had a small handful of query string parameters set up in my API in API Gateway.</p>
<p>Once I added the additional query strings to the API I was able to make the queries.</p>
<p>I also learned th... | CloudSearch filtered query works in test dashboard but not on search endpoint | amazon-web-services|urlencode|amazon-cloudsearch | 0 | 49 | 1 | 72,277,921 | 72,277,921 | 0 | true | 2022-05-16T21:48:47.110Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
CloudSearch filtered query works in test dashboard but not on search endpoint<p>I need to filter my search by the host.
I was able to do this in the CloudSea... |
72,295,040 | Iteration using multiple named ranges<p>What I'm trying to do is create a journaling spreadsheet that records the time and date of the entry at the time its submitted from a UserForm then updates the calendar on a "Splash" worksheet to change the cell interior and font colors to show that a journal entry has ... | <p>This takes having named ranges that are the actual names of the month, e.g., "January" list of dates (1-31) are referenced by <code>Range("January")</code>.
<a href="https://i.stack.imgur.com/b9ASN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/b9ASN.png" alt="enter image desc... | Iteration using multiple named ranges | excel|vba | 0 | 49 | 2 | 72,295,614 | 72,295,614 | 0 | true | 2022-05-18T19:36:05.507Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Iteration using multiple named ranges<p>What I'm trying to do is create a journaling spreadsheet that records the time and date of the entry at the time its ... |
72,299,814 | Kubeclt exec issues with variable via php script<p>New to kubernetes and php, so I'm having some issues. Any and all help is greatly appreciated!</p>
<pre><code><?php
$postgres = 'kubectl get pods -n migrationnamespace | grep postgres | cut -d " " -f1 2>&1';
$postgres_pod = shell_exec($postgres);
e... | <p>There can sometimes be extra whitespace before or after strings, especially return characters which don't always show up when <code>echo</code>ing the result.</p>
<p>Using <code>trim($postgres_pod)</code> will ensure they are removed.</p> | Kubeclt exec issues with variable via php script | php|kubernetes|kubectl | 0 | 49 | 1 | 72,300,268 | 72,300,268 | 0 | true | 2022-05-19T06:46:14.760Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Kubeclt exec issues with variable via php script<p>New to kubernetes and php, so I'm having some issues. Any and all help is greatly appreciated!</p>
<pre><... |
72,302,998 | Managing Dates Query in ACCESS with SQL Server background<p>I am doing my project on ACCESS for the "front" part with the forms, and in SQL Server for the "back-end" part with the databases, everything works fine exect for one thing : I don't understand <strong>how to filter Access's forms with SQL ... | <p>First, if you use data type <em>DateTime2</em> in SQL Server, that will be read as text in Access.</p>
<p>So, change that to <em>DateTime</em>.</p>
<p>Next, use the universal format yyyy-mm-dd when filtering date values:</p>
<pre class="lang-vb prettyprint-override"><code>FilterDate = DateSerial(2022, 4, 11)
Me.Filt... | Managing Dates Query in ACCESS with SQL Server background | sql|sql-server|vba|date|ms-access | 1 | 49 | 1 | 72,303,508 | 72,303,508 | 0 | true | 2022-05-19T10:33:24.693Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Managing Dates Query in ACCESS with SQL Server background<p>I am doing my project on ACCESS for the "front" part with the forms, and in SQL Server ... |
72,297,566 | How to add css slide transition to sidenav menu?<p>I have a sidenav menu that appears and disappears when the button is clicked. Everything works fine, but I can't understand why the transition to css is not working. As you can see in the example below the menu appears and disappears sideways, but I would like to add a... | <p>I found a solution: I changed the Js and Css a bit for this, I leave the working code for anyone who has the same problem.</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>va... | How to add css slide transition to sidenav menu? | javascript|html|css|menu | 0 | 49 | 2 | 72,304,725 | 72,304,725 | 0 | true | 2022-05-19T01:08:05.143Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to add css slide transition to sidenav menu?<p>I have a sidenav menu that appears and disappears when the button is clicked. Everything works fine, but I... |
72,299,010 | Percentage Based on Same Field Value<p>I have a flat table like this:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>Date</th>
<th>UserID</th>
<th>Reason</th>
<th>Productive?</th>
<th>TotalDuration</th>
<th>Group</th>
<th>Channel</th>
</tr>
</thead>
<tbody>
<tr>
<td>2022-03-20</td>
<td>A</... | <p>Assuming your table is called <code>Table1</code> you can use the following <code>DAX</code></p>
<h2>Sum of Total Duration</h2>
<pre><code>Sum of Total Duration =
sum(Table1[TotalDuration])
</code></pre>
<h2>Sum of Total Duration</h2>
<pre><code>Percent Total Duration =
VAR ValueswithoutShift =
CALCULATE (
... | Percentage Based on Same Field Value | excel|pivot-table|dax|powerquery|powerpivot | 0 | 49 | 1 | 72,306,950 | 72,306,950 | 0 | true | 2022-05-19T05:23:01.237Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Percentage Based on Same Field Value<p>I have a flat table like this:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>Date</th>
... |
72,294,668 | DATEPART and DATEFIRST alternative for redshift<p>I'm trying to run</p>
<pre><code>SELECT DATEPART(week, date(date)), MIN(date)
</code></pre>
<p>in Redshift with the start day being Saturday. I tried using different syntax for <code>SET DATEFIRST</code> but it seems like it's not supported (or I just can't find the cor... | <p>The date_trunc() function will truncate a timestamp to any number of levels including “week”. If memory serves a date_trunc to a week will set the result to midnight of the Monday before the given timestamp.</p>
<p>Now you want it to truncate to Saturday, 2 days earlier, and this is doable by adding 2 days before t... | DATEPART and DATEFIRST alternative for redshift | sql|amazon-redshift|datepart | 0 | 49 | 1 | 72,308,029 | 72,308,029 | 0 | true | 2022-05-18T19:03:22.700Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
DATEPART and DATEFIRST alternative for redshift<p>I'm trying to run</p>
<pre><code>SELECT DATEPART(week, date(date)), MIN(date)
</code></pre>
<p>in Redshift ... |
72,309,586 | How do you position a set of buttons that don't move when text size changes?<p>I'm stuck on trying to make these buttons positions absolute so that when the counter text doesn't mess up the positioning of the buttons. Here's the source code and image of what I'm talking about:</p>
<pre><code>render() {
let classes ... | <p>you have to give a specific width to the span element</p> | How do you position a set of buttons that don't move when text size changes? | html|css|reactjs|button|position | 0 | 49 | 1 | 72,309,634 | 72,309,634 | 0 | true | 2022-05-19T18:39:13.677Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do you position a set of buttons that don't move when text size changes?<p>I'm stuck on trying to make these buttons positions absolute so that when the ... |
72,313,686 | Only adding elements to the right side of the tree<p>On Leetcode, I'm supposed to "flatten" a tree so that it becomes a "linked list."</p>
<pre><code>/**
* Definition for a binary tree node.
* public class TreeNode {
* int val;
* TreeNode left;
* TreeNode right;
* TreeNode() {}... | <p>Because of <code>result = result.right;</code> your <code>result</code> points to the last node you added.
So there's no pointer to your new root.
<code>root = result.right;</code> does effectively nothing because you re-assign the parameter and never use it (btw: you should avoid re-assigning parameters, create loc... | Only adding elements to the right side of the tree | java|binary-tree|postorder | 0 | 49 | 1 | 72,314,051 | 72,314,051 | 0 | true | 2022-05-20T04:46:48.303Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Only adding elements to the right side of the tree<p>On Leetcode, I'm supposed to "flatten" a tree so that it becomes a "linked list."</p... |
72,314,338 | ERROR: SET TRANSACTION ISOLATION LEVEL must not be called in a subtransaction in YugabyteDB<p>[Question posted by a user on <a href="https://www.yugabyte.com/slack" rel="nofollow noreferrer">YugabyteDB Community Slack</a>]</p>
<p>I am facing the following issue when I try to dump a database in YugabyteDB 2.13.0.1:</p>
... | <p>A similar error can be seen in <a href="https://github.com/yugabyte/yugabyte-db/issues/11630" rel="nofollow noreferrer">https://github.com/yugabyte/yugabyte-db/issues/11630</a> and is the same issue, there is a fix that will come in the immediate next 2.13.* release. The fix is already done, just not yet released.</... | ERROR: SET TRANSACTION ISOLATION LEVEL must not be called in a subtransaction in YugabyteDB | yugabytedb | 0 | 49 | 1 | 72,314,339 | 72,314,339 | 0 | true | 2022-05-20T06:16:05.047Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
ERROR: SET TRANSACTION ISOLATION LEVEL must not be called in a subtransaction in YugabyteDB<p>[Question posted by a user on <a href="https://www.yugabyte.com... |
72,315,281 | How to call multi variable array in JS function?<p>I'm using this function to select one item in drop down menu:</p>
<pre class="lang-js prettyprint-override"><code>async selectNode(nodeType, nodeName) {
await page.click(this.selectors.reset);
await this.toggleNode(nodeType, nodeName, true);
await this.sele... | <p>You can make a method take an arbitrary number of arguments using the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax" rel="nofollow noreferrer">spread syntax</a> <code>...</code></p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-... | How to call multi variable array in JS function? | javascript|jestjs | 0 | 49 | 1 | 72,315,502 | 72,315,502 | 0 | true | 2022-05-20T07:44:55.577Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to call multi variable array in JS function?<p>I'm using this function to select one item in drop down menu:</p>
<pre class="lang-js prettyprint-override... |
72,302,939 | Is there a VBA worksheet function that will allow me to do a two layer search?<p>Is there any formula that I can use to make a double-layer search?</p>
<p>I want to be able to gather whatever information on the third column that meets two criteria.</p>
<ol>
<li>It has to be one location (in this case, Indonesia)</li>
<... | <p><a href="https://i.stack.imgur.com/AZBOF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AZBOF.png" alt="enter image description here" /></a></p>
<p>If industry size is a numeric field, you got 2 options to get this. If not, then you can do it only with MATCH and INDEX</p>
<p>With MATCH/INDEX: <co... | Is there a VBA worksheet function that will allow me to do a two layer search? | excel|vba|formula|worksheet-function | 1 | 49 | 2 | 72,316,208 | 72,316,208 | 0 | true | 2022-05-19T10:29:24.677Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is there a VBA worksheet function that will allow me to do a two layer search?<p>Is there any formula that I can use to make a double-layer search?</p>
<p>I ... |
72,311,924 | How to filter item in RecyclervView connected to firebase with onclick listener android<p>I am creating an app where users can search items on the search view bar. Firebase Realtime Database, RecyclerView, and SearchView are already set up but I am having a problem. So when the app opens, the items on the firebase data... | <p>If you need to do some operation with the object on which the user has clicked, then you should <strong>not</strong> pass to the <code>onItemClick()</code> the position, but the object itself.</p>
<p>So inside your adapter class, instead of setting the values of <code>img</code>, <code>bmy</code>, <code>city</code> ... | How to filter item in RecyclervView connected to firebase with onclick listener android | java|android|firebase|google-cloud-platform|firebase-realtime-database | 0 | 49 | 1 | 72,316,280 | 72,316,280 | 0 | true | 2022-05-19T23:01:21.657Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to filter item in RecyclervView connected to firebase with onclick listener android<p>I am creating an app where users can search items on the search vie... |
72,312,151 | Vue2 composition API array property update not updating<p>I have this component that accepts an array as a property:</p>
<pre><code>import {
defineComponent,
getCurrentInstance,
toRefs,
watch,
} from "@vue/composition-api";
import { RecommendationAnswer, RecommendationQuestion } from "@models&qu... | <p>I figured a work around for this, by created a computed property instead of watching the products.
The entire code looks like this:</p>
<pre><code>import {
computed,
defineComponent,
getCurrentInstance,
toRefs,
watch,
} from "@vue/composition-api";
import { RecommendationAnswer, RecommendationQu... | Vue2 composition API array property update not updating | vuejs2|vue-composition-api | 0 | 49 | 2 | 72,318,037 | 72,318,037 | 0 | true | 2022-05-19T23:45:59.627Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Vue2 composition API array property update not updating<p>I have this component that accepts an array as a property:</p>
<pre><code>import {
defineComponen... |
72,325,081 | LINQ not evaluating check for null object<p>I'm wondering why my linq statement doesn't properly evaluate the null check on the Agency object which is a property of the Users model.</p>
<pre><code>var invalidUsers = this.DbContext.Users.Where(p => p.Agency != null).ToList();
var invalidUsersList = invalidUsers.W... | <p>Chances are since this appears to be a foreign key table you need to include it first in LINQ so it can query against it.</p>
<p>So something like.</p>
<pre><code>var invalidUsers = await this.DbContext.Users
.Include(p => p.Agency)
.Where(p => p.Agency != null)
.ToListAsync();
</code></pre>
<p>Give that a t... | LINQ not evaluating check for null object | c#|linq|entity-framework-core | 0 | 49 | 1 | 72,325,233 | 72,325,233 | 0 | true | 2022-05-20T21:49:08.333Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
LINQ not evaluating check for null object<p>I'm wondering why my linq statement doesn't properly evaluate the null check on the Agency object which is a prop... |
72,326,461 | How i can change UI on change redux-toolkit state?<p>I want to rerender my component when i'm dispatch from another component, how i can do it?</p>
<p>Component that need for rerender:</p>
<pre><code>const MessageComponent = (): JSX.Element => {
const [messages, setMessages] = useState<IMessageComponentState&... | <p><code>Dependency</code> in <code>useEffect</code> have to put inside <code>[ ]</code>. See more: <a href="https://reactjs.org/docs/hooks-reference.html#conditionally-firing-an-effect" rel="nofollow noreferrer">Conditionally firing an effect</a>.</p>
<p>And messages state is an array but you set a object, change from... | How i can change UI on change redux-toolkit state? | javascript|reactjs|typescript|redux-toolkit | 0 | 49 | 2 | 72,326,515 | 72,326,515 | 0 | true | 2022-05-21T03:35:11.220Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How i can change UI on change redux-toolkit state?<p>I want to rerender my component when i'm dispatch from another component, how i can do it?</p>
<p>Compon... |
72,328,445 | How do I solve error => "Cannot set properties of null (setting 'innerHTML')"?<p><a href="https://codepen.io/bSwastik6/pen/QWQgYPO?editors=1010" rel="nofollow noreferrer">https://codepen.io/bSwastik6/pen/QWQgYPO?editors=1010</a></p>
<p>There is some problem with the JAVASCRIPT code which I can't solve. Will be helpful ... | <p>Your class name for seconds div is "sec" but you're targeting ".second" inside JavaScript.</p> | How do I solve error => "Cannot set properties of null (setting 'innerHTML')"? | javascript|html|css|web | 1 | 49 | 1 | 72,328,485 | 72,328,485 | 0 | true | 2022-05-21T09:50:29.833Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I solve error => "Cannot set properties of null (setting 'innerHTML')"?<p><a href="https://codepen.io/bSwastik6/pen/QWQgYPO?editors=1010" rel="nofollo... |
72,328,666 | How to have multiple values inside a CSS tilde attribute selector?<p>I'm trying to select a list elements by using a tilde attribute selector with multiple values.</p>
<p>If I put only one value like this, it works fine:</p>
<pre><code>a[class~="logo1"] {
background: gold;
}
</code></pre>
<p>But, if I put... | <p>Is the new selector <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/:is" rel="nofollow noreferrer"><code>:is</code></a></p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-css lang-css prettyprint-override"... | How to have multiple values inside a CSS tilde attribute selector? | css|css-selectors | 0 | 49 | 2 | 72,328,797 | 72,328,797 | 0 | true | 2022-05-21T10:22:45.040Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to have multiple values inside a CSS tilde attribute selector?<p>I'm trying to select a list elements by using a tilde attribute selector with multiple v... |
72,332,076 | I cant figure out how to post angular's input form data in database (mongodb) using Django Rest API<p>I cant figure out how to post angular's input form data in database (mongodb) using Django Rest API. There are not enough tutorials and documentations on the internet regarding the set of django and angular along with ... | <p>As you didn't add logging showing an error, the following is based on assumptions....</p>
<p>In Django you expect the body to be in JSON format, the FormData that is used in the http.post call should also be in JSON format.
Probably it can be achieved by changing the post call to:</p>
<pre><code>this.http.post('http... | I cant figure out how to post angular's input form data in database (mongodb) using Django Rest API | django|angular|mongodb|rest|post | 0 | 49 | 1 | 72,332,483 | 72,332,483 | 0 | true | 2022-05-21T18:05:19.927Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I cant figure out how to post angular's input form data in database (mongodb) using Django Rest API<p>I cant figure out how to post angular's input form data... |
72,341,889 | Display images on the browser with map method using url's coming from an API<p>I'm trying to display two images on the browser based on url's I got from an API.
So,
<br></p>
<ol>
<li>I have fetched the data</li>
<li>run a map method that will run all over the array that I got, and whenever it running into an image it i... | <p>There are two issues:</p>
<ol>
<li>you are not submitting <code>deckId</code> during image fetch api call.</li>
<li>image <code>src</code> url must be enclosed into quotes, otherwise backslash is added to the end of the url:</li>
</ol>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data... | Display images on the browser with map method using url's coming from an API | javascript | 0 | 49 | 1 | 72,342,078 | 72,342,078 | 0 | true | 2022-05-22T23:14:18.290Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Display images on the browser with map method using url's coming from an API<p>I'm trying to display two images on the browser based on url's I got from an A... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.