question_id int64 37.6M 73.2M | input_text stringlengths 88 52.4k | output_text stringlengths 37 35.6k | title stringlengths 15 150 | tags stringlengths 1 107 | q_score int64 -19 397 | view_count int64 3 879k | answer_count int64 1 21 | accepted_answer_id int64 37.6M 73.8M | answer_id int64 37.6M 73.8M | a_score int64 -5 1.29k | is_accepted bool 1
class | creation_date stringlengths 20 24 | input_text_instruct stringlengths 251 52.6k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
71,929,721 | How to replace <span class="italic"> with <i> with BeautifulSoup?<p>I have some HTML like this:</p>
<pre><code><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin ultricies nec erat ut ornare. <span class="it">Duis vel ante finibus</span>, vestibulum felis non, venenatis mi. In... | <p>You could simply rename the tags <code>name</code> and delete its <code>class</code> attribute:</p>
<pre><code>for e in soup.select('span.it'):
e.name = 'i'
del e['class']
</code></pre>
<p>or in case that there are more attributes:</p>
<pre><code>for e in soup.select('span.it'):
e.name = 'i'
for attr... | How to replace <span class="italic"> with <i> with BeautifulSoup? | beautifulsoup | 0 | 17 | 1 | 71,929,844 | 71,929,844 | 0 | true | 2022-04-19T18:34:55.103Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to replace <span class="italic"> with <i> with BeautifulSoup?<p>I have some HTML like this:</p>
<pre><code><p>Lorem ipsum dolor sit amet, consectet... |
71,435,530 | I cant click on item inside my menu. My menu opens and everything is displayed normally, but nothing happens when I click<p>I cant click on item inside my menu. My menu opens and everything is displayed normally, but nothing happens when I click. I don't know why and searched for information but it doesn't help me.
Thi... | <p>The thing which I feel is wrong is your menu XML file. For some reason you have a menu tag inside a menu tag. So there is sort of a sub menu if you get my point? But you're not inflating that actually.</p>
<p>Modify the XML as follows</p>
<pre class="lang-xml prettyprint-override"><code><menu xmlns:android="... | I cant click on item inside my menu. My menu opens and everything is displayed normally, but nothing happens when I click | java|android|menu | 0 | 30 | 1 | 71,435,602 | 71,435,602 | 0 | true | 2022-03-11T08:19:42.037Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I cant click on item inside my menu. My menu opens and everything is displayed normally, but nothing happens when I click<p>I cant click on item inside my me... |
71,959,732 | Broadcasting with two arrays of different lengths in a function (energy and time axis) to build a 2D array<p>I have a function that takes two axes as an input - a time axis and an energy axis - and I'm trying to figure out if there's a way to generate the resulting 2D array through broadcasting, rather than in a for lo... | <p>First, a comment on <a href="https://numpy.org/doc/stable/reference/generated/numpy.logspace.html" rel="nofollow noreferrer"><code>np.logspace</code></a>: I believe you may want to use <code>tau = np.logspace(1, 9, 200)</code> rather than <code>tau = np.logspace(1e1, 1e9, 200)</code>. The docs say:</p>
<blockquote... | Broadcasting with two arrays of different lengths in a function (energy and time axis) to build a 2D array | python|multidimensional-array|axes|array-broadcasting | 0 | 23 | 1 | 71,960,207 | 71,960,207 | 0 | true | 2022-04-21T19:06:36.773Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Broadcasting with two arrays of different lengths in a function (energy and time axis) to build a 2D array<p>I have a function that takes two axes as an inpu... |
71,918,564 | ValueError: `logits` and `labels` must have the same shape<p>I'm trying to use Imagenet V2 with transfer-learning for multiclass classification (6 classes), but getting the following error. Can anyone please help?</p>
<pre><code>ValueError: `logits` and `labels` must have the same shape, received ((None, 6) vs (None, 1... | <p>Found the bug:</p>
<p>I had to redefine loss in the model compiler as <code>loss='sparse_categorical_crossentropy'</code> which was initially defined as <code>loss=tf.keras.losses.BinaryCrossentropy(from_logits=True)</code>.</p>
<p>Refer to the SO thread <a href="https://stackoverflow.com/questions/62903698/changing... | ValueError: `logits` and `labels` must have the same shape | python|tensorflow|keras|conv-neural-network|mobilenet | 0 | 1,045 | 3 | 71,920,028 | 71,920,028 | 0 | true | 2022-04-19T01:01:58.623Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
ValueError: `logits` and `labels` must have the same shape<p>I'm trying to use Imagenet V2 with transfer-learning for multiclass classification (6 classes), ... |
71,964,517 | How to check whether my app has the permission in always or when in use in Android using xamarin.forms<p>I am using xamarin.forms for my app and i am using Android device. I want to check whether my app is using "Always" or "While Using the App" for location in Android.</p>
<p>For iOS I can able to ... | <p>It seems that there is no api which can return the clear status of the location permission in android. But the user need to request two permissions, <code>android.permission.ACCESS_FINE_LOCATION</code> and <code>android.permission.ACCESS_BACKGROUND_LOCATION</code> in the android.</p>
<p>Furthermore, the different re... | How to check whether my app has the permission in always or when in use in Android using xamarin.forms | xamarin.forms|xamarin.android|permissions|geolocation|android-permissions | 0 | 283 | 1 | 71,965,555 | 71,965,555 | 0 | true | 2022-04-22T06:48:30.257Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to check whether my app has the permission in always or when in use in Android using xamarin.forms<p>I am using xamarin.forms for my app and i am using A... |
71,973,924 | Azure Synapse, design questions of External tables or Internal tables<p>I'm designing a Dataware house in Azure Synapse using SQL Pool, but I'm facing some design questions.</p>
<p>Context: My plan is to load Partitioned Parquet files using Azure Data Lake Storage (ADLS), then, with SQL pool create External Tables to q... | <blockquote>
<p>Is it better in terms of performance to provide the solution just with the external tables?</p>
</blockquote>
<p>No. Internal Tables are distributed columnstores, with multiple levels of caching, and typically out-perform external parquet tables. Internal tables additionally support batch-mode scannin... | Azure Synapse, design questions of External tables or Internal tables | database|parquet|data-warehouse|azure-synapse | 0 | 514 | 1 | 71,974,907 | 71,974,907 | 0 | true | 2022-04-22T19:49:23.123Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Azure Synapse, design questions of External tables or Internal tables<p>I'm designing a Dataware house in Azure Synapse using SQL Pool, but I'm facing some d... |
71,112,734 | Why do MUI Linear Progress doesn't accept absolute positioning?<p>My MUI Linear Progress bar disappears when I set absolute positioning to it</p>
<pre><code>export default function LinearDeterminate() {
const [ progress, setProgress ] = React.useState(0);
React.useEffect(() => {
const timer = setInt... | <p>Because you aren't specifying a horizontal position, the element's width goes to 0. Specify a <code>left</code> and <code>right</code> value on the <code>LinearProgress</code> component to ensure that the element has a width and is visible.</p>
<p>Link to Code SandBox with a couple examples:
<a href="https://codesan... | Why do MUI Linear Progress doesn't accept absolute positioning? | reactjs|material-ui|absolute | 0 | 262 | 1 | 72,007,894 | 72,007,894 | 0 | true | 2022-02-14T13:32:08.937Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why do MUI Linear Progress doesn't accept absolute positioning?<p>My MUI Linear Progress bar disappears when I set absolute positioning to it</p>
<pre><code>... |
71,905,194 | listing all the values inside a matrix into a 1 whole list<p>How can I put all the values of my matrix <code>ckpot_p_shell_matrix</code> into just 1 whole list? I want the values in a list so I can do a histogram plot of the values.</p>
<p><code>ckpot_p_shell_matrix</code> is a numpy.ndarray 2D matrix that has a shape ... | <p>Use numpy .flatten()</p>
<pre><code>import numpy as np
ckpot_p_shell_matrix = np.array([[0.2407545, 0.3681921, 0.5176657, ..., 2.9999998, 1.5 ,
2.9316723],
[0. , 0. , 0. , ..., 0. , 0. ,
0. ],
[0. , 0. , 0. , ..., 0. , 0.... | listing all the values inside a matrix into a 1 whole list | python|list|loops|matrix | 0 | 22 | 3 | 71,905,241 | 71,905,241 | 0 | true | 2022-04-17T20:23:40.480Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
listing all the values inside a matrix into a 1 whole list<p>How can I put all the values of my matrix <code>ckpot_p_shell_matrix</code> into just 1 whole li... |
71,907,817 | Need an incrementor / iterable as a variable in another generator fn<p>Two attempts failed.</p>
<p>Method 1</p>
<pre><code>Desired Output
coords are (20, 0, 0)
coords are (40, 0, 0)
coords are (60, 0, 0)
coords are (80, 0, 0)
Actual output
coords are (1, 0, 0)
coords are (20, 0, 0)
coords are (2, 0, 0)
coords are (60,... | <p>Just using <code>next</code>, you don't want to <code>yield count</code> as this isn't one of your coordinates, also with using <code>+=</code> you shouldn't increase count at each iteration. The use of <code>global</code> is unnecessary here. <a href="https://stackoverflow.com/questions/11867359/when-do-i-need-to-u... | Need an incrementor / iterable as a variable in another generator fn | python | 0 | 34 | 1 | 71,907,915 | 71,907,915 | 0 | true | 2022-04-18T05:17:05.027Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Need an incrementor / iterable as a variable in another generator fn<p>Two attempts failed.</p>
<p>Method 1</p>
<pre><code>Desired Output
coords are (20, 0, ... |
71,804,122 | NestJS: Enforce implementation of a service at *compile-time*<p>To keep it brief:</p>
<p>I have a service - let's call it CatsService...</p>
<pre><code>import { Injectable } from '@nestjs/common';
@Injectable()
export class CatsService {
GetCat(id: number){
return id + 12345;
}
}
</code></pre>
<p>Later... | <p>I have solved my own issue. It was very simple.</p>
<pre><code>import { Module } from '@nestjs/common';
import { CatsController } from './cats.controller';
import { CatsService } from './cats.service';
import * as ProductionCatsService from "./production"
import * as DevelopmentCatsService from "./dev... | NestJS: Enforce implementation of a service at *compile-time* | javascript|typescript|nestjs | 0 | 33 | 1 | 71,804,224 | 71,804,224 | 0 | true | 2022-04-08T23:41:37.990Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
NestJS: Enforce implementation of a service at *compile-time*<p>To keep it brief:</p>
<p>I have a service - let's call it CatsService...</p>
<pre><code>impor... |
72,021,427 | SwiftUI List row color inconsistent while scrolling in a NavigationView<p>The background color of row views within a List inside a NavigationView inconsistently switch from transparent to white as I scroll.</p>
<p><a href="https://i.stack.imgur.com/N4jZw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.co... | <p>Use</p>
<pre><code>@Environment(\.colorScheme) var colorScheme
struct YourView: View {
var body: some View {
Text("Your views")
.listRowBackground(
colorScheme == .light ? Color.white : Color(white: 0.09, opacity: 1)
)
}
}
</code></pre>
<p><code>colorScheme</co... | SwiftUI List row color inconsistent while scrolling in a NavigationView | swift|list|swiftui|navigationview | 0 | 27 | 1 | 72,021,428 | 72,021,428 | 0 | true | 2022-04-26T22:56:01.420Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SwiftUI List row color inconsistent while scrolling in a NavigationView<p>The background color of row views within a List inside a NavigationView inconsisten... |
71,971,998 | Loading multiples data with WebAPI and requests function<p>I am trying to load the data from WEBAPI in multiple years, months. Say I need to load from Jan-Dec 2010-2020, how to I write a function to execute that? Below is the url:</p>
<p><strong>api.census.gov/data/2020/cps/basic/jan?get=PEMLR,PWSSWGT,PEMARITL&for=... | <p>Using list comprehension with 2 loops and f-string formating (Python >= 3.6):</p>
<pre class="lang-py prettyprint-override"><code>KEY = "my_key"
url = "https://api.census.gov/data/"
years = range(2010, 2021)
months = ["jan", "feb", "mar", "apr"] # needs... | Loading multiples data with WebAPI and requests function | python|list|for-loop|python-requests|webapi | 0 | 34 | 1 | 71,973,966 | 71,973,966 | 0 | true | 2022-04-22T16:34:05.337Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Loading multiples data with WebAPI and requests function<p>I am trying to load the data from WEBAPI in multiple years, months. Say I need to load from Jan-De... |
71,987,444 | How to use v-if to to return true if route ends in number<p>How do I replace <code>*</code> so that this v-if only matches a route ending in a number.</p>
<pre><code><div v-if="route().current('reporter.*')">
</code></pre>
<p>It should be true for <code>/reporter/18</code> and be false for <code>/report... | <p>You could use regex match:</p>
<pre><code><div v-if="$router.currentRoute.path.match(/reporter\/\d+/)">
</code></pre>
<p>(depending on how you get the current route as a string)</p> | How to use v-if to to return true if route ends in number | vue.js | 0 | 25 | 2 | 71,987,566 | 71,987,566 | 0 | true | 2022-04-24T10:16:45.197Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to use v-if to to return true if route ends in number<p>How do I replace <code>*</code> so that this v-if only matches a route ending in a number.</p>
<p... |
72,006,455 | npm installing nonexistent node-sass<p>We have a project that we're upgrading from node-sass to sass. We've removed the dependency on node-sass from package.json.</p>
<p><code>npm install</code> works under node v15 (npm v7.7.6), but fails under node v16 (npm v8.7.0).</p>
<p>It's failing with</p>
<blockquote>
<p>npm in... | <p>I found the issue (it was a private corporate package that used an old version of node-sass and was being imported using git+ssh).</p>
<p>Technique:</p>
<ol>
<li>In a new folder, run <code>npm init -y</code></li>
<li>Copy over dependencies/devDependencies from the project in question a chunk at a time (you could als... | npm installing nonexistent node-sass | npm|npm-install|node-sass | 0 | 521 | 1 | 72,021,440 | 72,021,440 | 0 | true | 2022-04-25T22:44:07.530Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
npm installing nonexistent node-sass<p>We have a project that we're upgrading from node-sass to sass. We've removed the dependency on node-sass from package.... |
71,981,392 | Allow insecure networks for Delphi Edge Browser component<p>I am using Edge browser component of Delphi 11.1 in order to automate a navigation process. The problem is that at the start of the navigation process I get the Message "Your connection isn't private" & the whole process stops until I press the b... | <p>Insecure connection warning can be bypassed by clicking on the Proceed link.</p>
<p>Below there is a code sample:</p>
<pre><code>procedure TForm1.EdgeBrowserNavigationCompleted(Sender: TCustomEdgeBrowser;
IsSuccess: Boolean; WebErrorStatus: TOleEnum);
resourcestring
scProceed =
'function run() { ' +
' v... | Allow insecure networks for Delphi Edge Browser component | delphi|microsoft-edge|webview2 | 0 | 273 | 1 | 71,982,037 | 71,982,037 | 0 | true | 2022-04-23T16:05:52.753Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Allow insecure networks for Delphi Edge Browser component<p>I am using Edge browser component of Delphi 11.1 in order to automate a navigation process. The p... |
71,899,538 | How can I detect a touch event in an Android ActionBar?<p>My app creates an ActionBar (androidx.appcompat.app.ActionBar) like so:</p>
<pre><code> mActionBar = getSupportActionBar();
</code></pre>
<p>I need to detect touch events in the ActionBar and use dispatchTouchEvent() to do so:</p>
<pre><code> public bo... | <p>I changed the dispatchTouchEvent() as follows:</p>
<pre><code> public boolean dispatchTouchEvent(MotionEvent ev) {
// TODO Auto-generated method stub
super.dispatchTouchEvent(ev);
if (ev.getAction() == MotionEvent.ACTION_DOWN && ev.getY() <= mActionBar.getHeight() + actionbar_start) {
... | How can I detect a touch event in an Android ActionBar? | android|touch-event|android-actionbar-compat | 0 | 30 | 1 | 71,901,715 | 71,901,715 | 0 | true | 2022-04-17T05:33:10.260Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I detect a touch event in an Android ActionBar?<p>My app creates an ActionBar (androidx.appcompat.app.ActionBar) like so:</p>
<pre><code> mAct... |
71,801,138 | proto3: Why setting java_multiple_files = true not creating separate java classes for each proto message?<p>I have a proto definition with nested classes</p>
<pre class="lang-proto prettyprint-override"><code>syntax = "proto3";
option java_package = "com.spot.proto.v1.config";
package v1config;
/... | <p>With only Nested classes, the <code>java_multiple_files</code> will not do anything, and this is on purpose. You are explicitly giving a context for <code>Kafka</code>, <code>Network</code>, etc... They are relevant only in their parent object.</p>
<p>Now, if you really wanted to generate multiple files, you would h... | proto3: Why setting java_multiple_files = true not creating separate java classes for each proto message? | java|protocol-buffers|java-11|proto|protoc | 0 | 276 | 1 | 71,879,157 | 71,879,157 | 0 | true | 2022-04-08T17:35:07.583Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
proto3: Why setting java_multiple_files = true not creating separate java classes for each proto message?<p>I have a proto definition with nested classes</p>... |
71,898,872 | What python data structure can easily add new variables on the fly?<p>I'm trying to iteratively capture data on a fixed list of items but the data fields/attributes are not fixed at the start. As I iterate over each item new attributes may crop up which need to be added to the database. What is a good way to do this?... | <p>Try using a multi-dimensional dictionary. These are formatted as</p>
<pre><code>dict2d = {
"Person1":{"Height": "168cm", "Eyes": "Brown"}
"Person2":{"Height": "155cm", "Occupation": "Teacher"}
"Person3":{&qu... | What python data structure can easily add new variables on the fly? | python|dataframe|dictionary | 0 | 28 | 1 | 71,898,928 | 71,898,928 | 0 | true | 2022-04-17T02:34:33.537Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What python data structure can easily add new variables on the fly?<p>I'm trying to iteratively capture data on a fixed list of items but the data fields/att... |
71,893,203 | Added aditional part of url after search form<p>I found form for search button overhere but I need added in url aditional text after search form input.
For example url is <a href="http://www.111.com/search/static/" rel="nofollow noreferrer">www.111.com/search/static/</a></p>
<p>We need to replase "search" fro... | <p>(Answer edited after clarification from vasya vasya.)</p>
<p>If I got it right this time, you have a "template" URL like <code>https://111.com/search/static/</code>. And you want the term <code>search</code> to be replaced by the actual search string, like the example in your comment.</p>
<p>To do so, you ... | Added aditional part of url after search form | javascript|html | 0 | 24 | 1 | 71,893,237 | 71,893,237 | 0 | true | 2022-04-16T10:45:51.613Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Added aditional part of url after search form<p>I found form for search button overhere but I need added in url aditional text after search form input.
For e... |
71,962,274 | calculate day of the year from 15minute timeseries data<p>I want a column with day of year. How do I calculate day of the year with 15-minute interval data which are resampled to daily entries. The following code produces day of year for each 15-minute interval but I only want day of year for each day.</p>
<p>I also tr... | <p>Typing this in the blind as I don't have your data file:</p>
<pre class="lang-py prettyprint-override"><code>df = pd.read_csv("D:/time-series.csv", parse_dates=["Time"], index_col="Time")
pp = df["precip"].resample("24H").sum()
day_of_year = pp.index.dayofyear
</code... | calculate day of the year from 15minute timeseries data | python|pandas|datetime | 0 | 34 | 1 | 71,962,731 | 71,962,731 | 0 | true | 2022-04-22T00:43:23.153Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
calculate day of the year from 15minute timeseries data<p>I want a column with day of year. How do I calculate day of the year with 15-minute interval data w... |
71,992,615 | I have a ffmpeg command to concatenate 300+ videos of different formats. What is the proper syntax for the concat complex filter?<p>I plan to concatenate a large amount of video files of different formats and resolution, some without sound, and add a short black screen "pause" of about 0.5s between each.</p>
... | <p>While theoretically doable, I don't recommend calling FFmpeg with so many input files. This will increase the memory footprint of the runtime and likely to bog down the speed (if not throwing an out-of-memory error). Instead, my suggestion is to approach this in 2 steps:</p>
<ul>
<li>Step 1: Transcode each video fil... | I have a ffmpeg command to concatenate 300+ videos of different formats. What is the proper syntax for the concat complex filter? | python|powershell|video|ffmpeg | 0 | 284 | 1 | 71,993,396 | 71,993,396 | 0 | true | 2022-04-24T21:48:29.843Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I have a ffmpeg command to concatenate 300+ videos of different formats. What is the proper syntax for the concat complex filter?<p>I plan to concatenate a l... |
71,907,447 | Is there a procedure for migrating azure logic app from one account to another account<p>Have two Azure accounts with different subscription, I wants to migrate azure logic app from old account to new account. Please help with the steps for migration</p> | <p>Navigate to your logic app, In overview pane beside subscription you can find <code>move</code> from where you can migrate to another account from present.</p>
<p><img src="https://i.imgur.com/nUSPTT5.png" alt="enter image description here" /></p>
<p>Now you can select the destination subscription and Resource group... | Is there a procedure for migrating azure logic app from one account to another account | azure-logic-apps | 0 | 262 | 2 | 71,907,488 | 71,907,488 | 0 | true | 2022-04-18T03:54:05.153Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is there a procedure for migrating azure logic app from one account to another account<p>Have two Azure accounts with different subscription, I wants to migr... |
71,440,867 | How to sort JSON in rust?<p>Is it possible to sort JSON in rust language? If it is possible then how?</p>
<p>Like this one:</p>
<pre class="lang-js prettyprint-override"><code>
const headers = {
'checkout-account': '1234',
'checkout-algorithm': 'sha256',
'checkout-method': 'POST',
'checkout-nonce': '56463520857... | <p>More or less the same code in Rust:</p>
<pre class="lang-rust prettyprint-override"><code>use itertools::Itertools;
use std::collections::HashMap;
fn main() {
let headers = HashMap::from([
("checkout-account", "1234"),
("checkout-algorithm", "sha256"),
... | How to sort JSON in rust? | javascript|json|rust|reqwest|serde-json | 0 | 278 | 1 | 71,441,011 | 71,441,011 | 0 | true | 2022-03-11T15:27:41.263Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to sort JSON in rust?<p>Is it possible to sort JSON in rust language? If it is possible then how?</p>
<p>Like this one:</p>
<pre class="lang-js prettypri... |
71,846,897 | How to use a Spring WebClient to parse specific data from an external API?<p>I'm attempting to use the Spring WebFlux WebClient to retrieve data from the openweathermap API. I've done this using a RestTemplate no problem, but want to understand the proper way to do this. Essentially, I'm receiving JSON from the openwea... | <p>If you're using Spring Boot, you should <a href="https://docs.spring.io/spring-boot/docs/current/reference/html/io.html#io.rest-client.webclient" rel="nofollow noreferrer">use the <code>WebClient.Builder</code> component that's pre-configured for you</a>. But the real problem is, calling <code>subscribe</code> on a ... | How to use a Spring WebClient to parse specific data from an external API? | java|spring-boot|spring-webclient | 0 | 259 | 1 | 71,887,981 | 71,887,981 | 0 | true | 2022-04-12T17:29:08.900Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to use a Spring WebClient to parse specific data from an external API?<p>I'm attempting to use the Spring WebFlux WebClient to retrieve data from the ope... |
71,854,119 | display selected row of json data in reactjs<p>guys I want to show any of the records in JSON data one by one without using map but when I start using [] the react app stop working what is my problem, i used {news[0].title} but i dont know whats wrong about it, the code is:</p>
<pre><code>function News() {
const [n... | <p>Check If the data is available or not in every place.</p>
<pre><code>function News() {
const [news, fetchnews] = useState([]);
const getData = () => {
fetch('https://example.com/v1/news/list/fa/1')
.then((res) => res.json())
.then((res) => {
console.log(res)... | display selected row of json data in reactjs | reactjs|json|jsonpath | 0 | 30 | 1 | 71,854,236 | 71,854,236 | 0 | true | 2022-04-13T08:16:37.977Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
display selected row of json data in reactjs<p>guys I want to show any of the records in JSON data one by one without using map but when I start using [] the... |
71,960,499 | How do I clone a mouseevent for $emit in vue<p>I am trying to</p>
<ul>
<li>emit an event from a vue2 component</li>
<li>have the event reflect exactly the native mouse event happening in the component</li>
<li>and have two fields added - canvasX and canvasX</li>
</ul>
<p>I tried adding the fields like this:</p>
<pre><c... | <p>You could try creating a new event data object which inherits properties from the original event.</p>
<pre class="lang-js prettyprint-override"><code>this.$emit('mouseup', { ...evt, canvasX: x, canvasY: y })
</code></pre> | How do I clone a mouseevent for $emit in vue | javascript|events | 0 | 28 | 1 | 71,961,471 | 71,961,471 | 0 | true | 2022-04-21T20:24:49.250Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I clone a mouseevent for $emit in vue<p>I am trying to</p>
<ul>
<li>emit an event from a vue2 component</li>
<li>have the event reflect exactly the na... |
71,885,268 | Appending a string to a variable within subprocess in Python<p>I am trying to build a Python script wrapper to loop and run another python script called <a href="https://github.com/drego85/meioc" rel="nofollow noreferrer">meioc</a> against every file in a directory.</p>
<p>Essentially I have some old .eml / MIME encode... | <p>If you are using python 3, you can use f-strings like <code>f"{f}"</code>. This will interpolate the variable into your string.</p>
<p>If you are using python 2, you can do <code>"{}".format(f)</code>.</p>
<pre class="lang-py prettyprint-override"><code>meioc_cmd = ['python', 'meioc.py', '-o', f&... | Appending a string to a variable within subprocess in Python | python|variables|subprocess | 0 | 26 | 1 | 71,885,565 | 71,885,565 | 0 | true | 2022-04-15T14:26:51.997Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Appending a string to a variable within subprocess in Python<p>I am trying to build a Python script wrapper to loop and run another python script called <a h... |
71,836,307 | "SyntaxError: Cannot use import statement outside a module" error in ts-node while modules are CommonJS<p>The main cause of "SyntaxError: Cannot use import statement outside a module" error is non-CommonJS modules (<code>compilerOptions.module</code> in <strong>tsconfig.json</strong>), but I got same error wi... | <p>In this case, the cause was not installed <strong>ts-node</strong>.
I executed my <strong>.ts</strong> file by <strong>nodemon</strong> which delgates the executing of <strong>ts-node</strong> when target file is <strong>.ts</strong>, but <strong>ts-node</strong> must be installed.</p> | "SyntaxError: Cannot use import statement outside a module" error in ts-node while modules are CommonJS | typescript|ts-node | 0 | 1,567 | 1 | 71,856,076 | 71,856,076 | 0 | true | 2022-04-12T02:22:40.370Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
"SyntaxError: Cannot use import statement outside a module" error in ts-node while modules are CommonJS<p>The main cause of "SyntaxError: Cannot use imp... |
71,819,596 | NoReverseMatch at /blog/redirect2<p>I'm new to django and I've been trying to test the URLs redirection methods I've tried two options but the return render() keeps giving me this error of no reverse match</p>
<p>this is my urls.py code :</p>
<pre><code>
app_name = 'blog'
urlpatterns = [
# path('about', views.abou... | <p>Is this the <code>urls.py</code> on your app? How do you include it on your project <code>urls.py</code>, if you have a namespace for it, then you probably need something like:</p>
<pre><code>def redirect_view1(request):
return redirect('blog:redir_fct')
</code></pre>
<p>You can try running from a django shell:... | NoReverseMatch at /blog/redirect2 | python|django|django-views|django-urls | 0 | 35 | 1 | 71,819,670 | 71,819,670 | 0 | true | 2022-04-10T18:47:54.297Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
NoReverseMatch at /blog/redirect2<p>I'm new to django and I've been trying to test the URLs redirection methods I've tried two options but the return render(... |
71,801,965 | How to pause a program for the actionPerformed method<p>I'm trying to write a class that allows a user to enter his user-name and password. I'm using the Swing class to create a JFrame- which includes a JButton that will be pressed after the user has entered his information. I want to return the information the user ha... | <p>Another idea which might be useful for you: if you want some code to be executed, you can add a windowListener to be called on close, like this:</p>
<pre><code>public class LoginTester{
public static void main(String[] args){
LoginPage login = new LoginPage();
login.addWindowListener(new Win... | How to pause a program for the actionPerformed method | java | 0 | 35 | 3 | 71,803,750 | 71,803,750 | 0 | true | 2022-04-08T18:57:34.043Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to pause a program for the actionPerformed method<p>I'm trying to write a class that allows a user to enter his user-name and password. I'm using the Swi... |
71,903,328 | REACT.JS how to detect only one of the cards is clicked from a component<p>I tried to add click handler on my code, the idea is when i click on my first card, the first card add new class "selected" nad when i click on my third card or else the third card or else will add new class "selected". There... | <h3>Allow multiple selections</h3>
<pre class="lang-js prettyprint-override"><code>function CardBus(props) {
const [isSelected, setIsSelected] = useState(false);
let { eachBus, buses, setBuses } = props;
return (
<div key={eachBus.key} className={`card ${isSelected ? 'selected' : ''}`} onClick={() => s... | REACT.JS how to detect only one of the cards is clicked from a component | reactjs|onclick|components | 0 | 288 | 1 | 71,903,605 | 71,903,605 | 0 | true | 2022-04-17T15:52:56.913Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
REACT.JS how to detect only one of the cards is clicked from a component<p>I tried to add click handler on my code, the idea is when i click on my first card... |
71,859,785 | Having issue when there are identical keys in nodeset formed<p>My input xml is as below, I am facing issue when there are multiple identical keys present in a nodeset, its not forming proper output structure. I am using keys to form the nodeset by using ref attribute. I am making use of these <code><SL id="L1S1... | <p>AFAICT, you could do:</p>
<p><strong>XSLT 1.0</strong></p>
<pre><code><xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:strip-space ele... | Having issue when there are identical keys in nodeset formed | xslt-1.0 | 0 | 28 | 1 | 71,859,989 | 71,859,989 | 0 | true | 2022-04-13T15:08:10.760Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Having issue when there are identical keys in nodeset formed<p>My input xml is as below, I am facing issue when there are multiple identical keys present in ... |
71,886,559 | Assistance/tutorial with Shazam API in PowerShell<p>I'm trying to use PowerShell to interact with the Shazam API but their documentation is mainly in PHP. I found this snippet from another forum on here in Python that supposedly works:</p>
<pre class="lang-py prettyprint-override"><code>from pydub import AudioSegment
i... | <p>They do have powershell examples for that in their <a href="https://rapidapi.com/apidojo/api/shazam" rel="nofollow noreferrer">API Documentation</a>, click Songs > Detectv2 on the left, then select powershell from the dropdown on the right</p>
<pre><code>$Bytes = [System.IO.File]::ReadAllBytes("C:\Users\User... | Assistance/tutorial with Shazam API in PowerShell | powershell|shazam | 0 | 272 | 1 | 71,899,414 | 71,899,414 | 0 | true | 2022-04-15T16:31:26.960Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Assistance/tutorial with Shazam API in PowerShell<p>I'm trying to use PowerShell to interact with the Shazam API but their documentation is mainly in PHP. I ... |
71,833,932 | ERROR TypeError: I cannot read the propertie .The console says that is undefined when i try to cast the tostring method<p>I don t know why i am having this error.I have looked for some time on the code and i can t see where the error is.</p>
<p>My member service.ts from where i see that the error is happening</p>
<pre>... | <p>The issue is these two lines:</p>
<pre class="lang-js prettyprint-override"><code>minAge: 14;
maxAge: 100;
</code></pre>
<p>You're setting the type of minAge and maxAge to literals, but they are undefined. Try changing them to:</p>
<pre class="lang-js prettyprint-override"><code>minAge = 14;
maxAge = 100;
</code></p... | ERROR TypeError: I cannot read the propertie .The console says that is undefined when i try to cast the tostring method | typescript | 0 | 23 | 1 | 71,834,030 | 71,834,030 | 0 | true | 2022-04-11T20:29:08.587Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
ERROR TypeError: I cannot read the propertie .The console says that is undefined when i try to cast the tostring method<p>I don t know why i am having this e... |
71,864,368 | Getting a e11000 duplicate key error when trying to create new user with mongodb<p>I am getting this error when i try to create a user E11000 duplicate key error collection: rajTech.users index: isAdmin_1 dup key: { isAdmin: false }</p>
<p>My user Schema is</p>
<pre><code>import mongoose from 'mongoose'
const userSche... | <p>Remove <code>unique: true</code> from <code>isAdmin</code> field. Then you need to drop the index from the database <code>db.user.dropIndexes()</code></p> | Getting a e11000 duplicate key error when trying to create new user with mongodb | mongodb | 0 | 30 | 1 | 71,865,298 | 71,865,298 | 0 | true | 2022-04-13T22:15:13.943Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Getting a e11000 duplicate key error when trying to create new user with mongodb<p>I am getting this error when i try to create a user E11000 duplicate key e... |
71,906,525 | Django DRF - Entire Other User Profile return in API call<p><strong>I have a UserSerializer (I used a CustomUser model)</strong></p>
<pre><code>class UserSerializer(serializers.ModelSerializer):
class Meta:
model = CustomUser
fields = ['id', 'first_name', 'last_name', 'email', 'is_typeA', 'is_typeB']
... | <p>You can write:</p>
<pre class="lang-py prettyprint-override"><code>class TypeASerializer(serializers.ModelSerializer):
user = UserSerializer()
favourites = serializers.SerializerMethodField()
def get_favourites(self, obj):
return TypeBSerializer([favourite.typeB for favourite in obj.favourites.all()], ma... | Django DRF - Entire Other User Profile return in API call | django|django-rest-framework | 0 | 34 | 1 | 71,907,068 | 71,907,068 | 0 | true | 2022-04-18T00:34:54.087Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Django DRF - Entire Other User Profile return in API call<p><strong>I have a UserSerializer (I used a CustomUser model)</strong></p>
<pre><code>class UserSer... |
71,978,549 | How to calculate the average R square of the company data<p><a href="https://i.stack.imgur.com/VNKpD.png" rel="nofollow noreferrer">STOCK RETURN </a></p>
<p>I don't know how to compute the average r squared with individual stock return and market return</p>
<pre><code>import numpy as np
import pandas as pd
from sklearn... | <p>Formula of R squared:
<code>1-unexplained_variation/total_variation</code></p>
<p><code>Unexplained variation</code> is the sum of difference for each datapoint between the prediction using the line of best fit and the actual values. You can compute the coefficients of the line of best fit with <code>numpy.polyfit()... | How to calculate the average R square of the company data | python|pandas|dataframe | 0 | 29 | 1 | 71,978,622 | 71,978,622 | 0 | true | 2022-04-23T09:42:36.277Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to calculate the average R square of the company data<p><a href="https://i.stack.imgur.com/VNKpD.png" rel="nofollow noreferrer">STOCK RETURN </a></p>
<p>... |
71,799,260 | How to update a SQLiteDatabase for a specific argument?<p>I'm VERY new to programming, and my teacher doesn't really teach. I've been trying to learn from her example code but I have no idea what I'm doing and I probably worded the question wrong because she never once explained what an argument/variable/object/anythin... | <p>I noticed you had "where arguments" set incorrectly.</p>
<p>Try the code below.</p>
<pre><code>public int updateName(String oldName , String newName , String newPhone, String newRating)
{
if(newName.isNotEmpty()){
SQLiteDatabase db = myhelper.getWritableDatabase();
ContentValues content... | How to update a SQLiteDatabase for a specific argument? | java|android|sql|arrays|database | 0 | 34 | 1 | 71,801,407 | 71,801,407 | 0 | true | 2022-04-08T15:03:28.590Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to update a SQLiteDatabase for a specific argument?<p>I'm VERY new to programming, and my teacher doesn't really teach. I've been trying to learn from he... |
71,878,156 | Does bc not limit a variable's scope?<p>Define the function in <a href="https://www.gnu.org/software/bc/manual/html_mono/bc.html" rel="nofollow noreferrer">basic calculator bc</a> as</p>
<pre><code>define void f () { test=42; print "all done\n"; }
</code></pre>
<p>I'd have thought the value of <code>test</cod... | <p>You need to specify an <code>AUTO_LIST</code> in your function definition. From the <a href="https://www.gnu.org/software/bc/manual/text/bc.txt" rel="nofollow noreferrer">bc manual</a>,</p>
<blockquote>
<pre><code>`define' NAME `(' PARAMETERS `)' `{' NEWLINE
AUTO_LIST STATEMENT_LIST `}'
[...]
The AUTO_LIST ... | Does bc not limit a variable's scope? | scope|global-variables|bc | 0 | 21 | 1 | 71,879,129 | 71,879,129 | 0 | true | 2022-04-14T22:16:06.533Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Does bc not limit a variable's scope?<p>Define the function in <a href="https://www.gnu.org/software/bc/manual/html_mono/bc.html" rel="nofollow noreferrer">b... |
71,884,294 | Move parent id attribute to it's first child if id matches the given filter XSLT 1<p>I need to move the id attribute of ol/ul tag to it's first li tag child only if value of the id has correct objectId pattern like [0-9a-fA-F]{24} which means id should only contain <code>0123456789ABCDEFabcdef</code> and length should ... | <p>This should help. Let me know, if you have questions.</p>
<pre><code><xsl:template match="ul">
<xsl:choose>
<xsl:when test="translate(@id, '0123456789ABCDEFabcdef', '') = ''
and string-length(@id) = 24">
<xsl:copy>
<xsl:apply-tem... | Move parent id attribute to it's first child if id matches the given filter XSLT 1 | xslt|xslt-1.0 | 0 | 31 | 2 | 71,885,060 | 71,885,060 | 0 | true | 2022-04-15T12:54:40.237Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Move parent id attribute to it's first child if id matches the given filter XSLT 1<p>I need to move the id attribute of ol/ul tag to it's first li tag child ... |
71,440,021 | Flutter Focus is focussing multiple nodes instead of a single node<p>I am building an app that is going to be controlled by a D-pad keyboard events. So I dug into the flutter Focus system. I want to give it special directions because in my app I want to work with multiple "control zones" in my example I added... | <p>With my first attempt (See Update 1) it seems that I was more close to the solution than I thought... My mistake is that I used <code>List.filled()</code> in stead of <code>List.generate()</code>
The difference? This is perfectly explained by <a href="https://stackoverflow.com/a/59103846/10169071">danypata</a>.</p>
... | Flutter Focus is focussing multiple nodes instead of a single node | flutter|dart|focus | 0 | 298 | 1 | 71,472,727 | 71,472,727 | 0 | true | 2022-03-11T14:28:00.820Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Flutter Focus is focussing multiple nodes instead of a single node<p>I am building an app that is going to be controlled by a D-pad keyboard events. So I dug... |
71,983,726 | Multiple calculations on a dataframe based on certain reference points<p>Hi I am a bit new to this, but I am looking to figure out how I can do this on R.</p>
<p>I am trying to divide a bunch of datasets by certain benchmark values, then taking the log() of it, but the data is very large and I am not sure how else to a... | <p>Here's an approach using <code>dplyr::group_by</code> to do the calculation separately for each <code>Name</code>, and <code>dplyr::across</code> to apply the calculation to all the columns that start with "lap." The funny bit at the end <code>~log(.x/first(.x))</code> means that for every column we specif... | Multiple calculations on a dataframe based on certain reference points | r|data-wrangling | 0 | 29 | 1 | 71,984,154 | 71,984,154 | 0 | true | 2022-04-23T21:23:55.543Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Multiple calculations on a dataframe based on certain reference points<p>Hi I am a bit new to this, but I am looking to figure out how I can do this on R.</p... |
71,803,460 | Flutter @Freezed() vs @freezed annotation<p>What are the differences between <code>@Freezed()</code> and <code>@freezed</code> annotations ?</p>
<p>In official <a href="https://pub.dev/packages/freezed#the-syntax" rel="nofollow noreferrer">freezed documentation</a> the <code>@freezed</code> annotation used.
But there a... | <p>You can customize key and value with something different using <code>@Freezed</code> and <code>@FreezedUnionValue</code> decorators.</p>
<p>Whereas with the lowercase <code>@freezed</code> you cannot customise.</p>
<p>So essentially the <code>@Freezed(...)</code> allows you to customise the value and key.</p>
<p><a ... | Flutter @Freezed() vs @freezed annotation | flutter|dart|annotations|freezed|flutter-freezed | 0 | 519 | 1 | 71,803,886 | 71,803,886 | 0 | true | 2022-04-08T21:47:36.033Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Flutter @Freezed() vs @freezed annotation<p>What are the differences between <code>@Freezed()</code> and <code>@freezed</code> annotations ?</p>
<p>In offici... |
71,814,820 | Trying to write to csv from input , csv output file shows each name with colons between letters and emtpy line in 1 row<pre><code>import csv
n = int(input("How many records ?"))
b = 0
for i in range(n):
s = input("what is the name of the student ")
g = input(" grade ?")
k.appe... | <p><code>csv.writerow()</code> takes a list of values for that row - you are supplying single values. Strings are iterables - if you give one string to <code>csv.writerow()</code> it will use every single letter as 1 column. You could fix that supplying it as 1 element list:</p>
<pre><code> thewriter.writerow( [ k[b] ]... | Trying to write to csv from input , csv output file shows each name with colons between letters and emtpy line in 1 row | python|csv | 0 | 25 | 1 | 71,814,857 | 71,814,857 | 0 | true | 2022-04-10T08:07:48.447Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Trying to write to csv from input , csv output file shows each name with colons between letters and emtpy line in 1 row<pre><code>import csv
n = int(input(&... |
71,871,549 | If I run my code it works well but I want it to show me a different output when I input start for the second time in the terminal<p><strong>At run time</strong></p>
<p>The code behaves in an unusual way .when I say start it shows me car started ready to go
But when I say start again it till shows the same output
I want... | <p>You will need some state that stores in which state the car currently is in order to make this happen. In your case you could simply use a flag <code>car_running</code> which you set accordingly.</p>
<pre class="lang-py prettyprint-override"><code>car_running = False
command = ""
while command != "qu... | If I run my code it works well but I want it to show me a different output when I input start for the second time in the terminal | python|if-statement | 0 | 32 | 1 | 71,871,729 | 71,871,729 | 0 | true | 2022-04-14T12:23:37.753Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
If I run my code it works well but I want it to show me a different output when I input start for the second time in the terminal<p><strong>At run time</stro... |
71,823,389 | I can't figure out how to transpose unique values based on specific critera in Google Sheets<p>I'm trying to create an inventory system for my business. For example, our SKU codes start with "LMS" "RSP" and "CON" for specific locations where we're working.</p>
<p>I'm trying to take all uni... | <p>Try below formula-</p>
<pre><code>=UNIQUE(FILTER(Raw!B2:B,REGEXMATCH(Raw!B2:B,"LMS")))
</code></pre>
<p>Or <code>QUERY()</code> function with wild card match-</p>
<pre><code>=UNIQUE(QUERY(Raw!B2:B,"select B where B like 'LMS%'"))
</code></pre> | I can't figure out how to transpose unique values based on specific critera in Google Sheets | google-sheets|google-sheets-formula|unique|spreadsheet|inventory-management | 0 | 22 | 1 | 71,823,464 | 71,823,464 | 0 | true | 2022-04-11T06:18:08.877Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I can't figure out how to transpose unique values based on specific critera in Google Sheets<p>I'm trying to create an inventory system for my business. For ... |
71,986,423 | Fastest way of updating a Python list based on indices<p>I have a Python dictionary like this -</p>
<pre><code>my_dict = {'Names':['Tom', 'Mariam', 'Lata', 'Tina', 'Abin'],
'Attendance':[False, False, False, False, False]}
</code></pre>
<p>I also have a Python list of flags for which indices need to changed... | <h2>Using a loop</h2>
<pre><code>for index in flag_list:
my_dict['Attendance'][index] = True
</code></pre>
<p>A micro optimization would be to fetch the list from the dict only once:</p>
<pre><code>attendance_list = my_dict['Attendance']
for index in flag_list:
attendance_list[index] = True
</code></pre>
<p>But... | Fastest way of updating a Python list based on indices | python-3.x|list|dictionary|vectorization | 0 | 29 | 1 | 71,986,460 | 71,986,460 | 0 | true | 2022-04-24T07:41:07.243Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Fastest way of updating a Python list based on indices<p>I have a Python dictionary like this -</p>
<pre><code>my_dict = {'Names':['Tom', 'Mariam', 'Lata', '... |
71,842,178 | how to make two primary keys for a collection in firebase?<p>hello I have 2 collection <code>skills</code> and <code>Providers</code> and the relation is many to many</p>
<p>in order to define a skill to provider I need make a new collection named</p>
<p><code>ProviderSkills</code> which has <code>providerID</code> pk ... | <p>Your question is not clear. But as far as I can understand, You need to use</p>
<pre><code>final provider=FirebaseFirestore.instance.collection('providerCollection').doc().id;
final skill = FirebaseFirestore.instance.collection('skillCollection').doc().id;
FirebaseFirestore.instance.collection('providerSkillsCol... | how to make two primary keys for a collection in firebase? | flutter | 0 | 27 | 1 | 71,842,371 | 71,842,371 | 0 | true | 2022-04-12T11:51:41.183Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to make two primary keys for a collection in firebase?<p>hello I have 2 collection <code>skills</code> and <code>Providers</code> and the relation is man... |
71,424,948 | Calculate length of night in data frame<p>I have a some test data with two columns. The column "hour" shows hourly values (p.m.). The column "day" indicates the corresponding day, i.e. on day 1 there are hourly values from 7 to 11 o'clock.</p>
<p>I now want to calculate how big the time span is for ... | <pre><code>library(dplyr)
df %>%
group_by(day) %>%
summarise(time_span = max(hour) - min(hour) + 1)
## A tibble: 3 x 2
# day time_span
# <dbl> <dbl>
# 1 1 5
# 2 2 7
# 3 3 3
</code></pre> | Calculate length of night in data frame | r|dataframe|loops | 0 | 31 | 1 | 71,427,082 | 71,427,082 | 1 | true | 2022-03-10T13:30:14.363Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Calculate length of night in data frame<p>I have a some test data with two columns. The column "hour" shows hourly values (p.m.). The column "... |
71,426,505 | Pivot mixed data<p>I have the below table:</p>
<pre><code> PART ATTR VAL
-------------------
A ATTR1 VAL1
A ATTR2 VAL2
A ATTR3 VAL3
A ATTR4 VAL4
A ATTR5 VAL5
B ATTR1 VAL6
B ATTR2 VAL7
B ATTR3 VAL8
B ATTR4 VAL9
B ATTR5 VAL10
</code></p... | <p>By using a <code>CASE</code> statement and grouping in the base of your pivot, you can then use those grouped values to <code>PIVOT</code> your results. If you are truly looking for the <code>MIN</code> to be displayed in the results, your example output will not match your sample data since <strong>VAL10</strong> w... | Pivot mixed data | sql|oracle | 0 | 25 | 1 | 71,427,528 | 71,427,528 | 1 | true | 2022-03-10T15:15:25.310Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pivot mixed data<p>I have the below table:</p>
<pre><code> PART ATTR VAL
-------------------
A ATTR1 VAL1
A ATTR2 VAL2
A ATTR3 ... |
71,427,230 | How to create a gap of values in a gradient scale in R<p>I am currently creating a map of the U.S. with a gradient of counts of a variable ('totalvisits') within each state.</p>
<p>There is one state that has really high count (i.e., MA - over 8000) while every other state are <500. Would it be possible for me to cr... | <p>I am not going to answer your question, but make a suggestion in another direction. If your values are all strictly positive, I'm going to recommend that you use a log-transformation instead. (You could use a pseudo-log transform if your values include negative values or 0)</p>
<p>Here is a brief mock-up of your pro... | How to create a gap of values in a gradient scale in R | r|ggplot2|gradient | 0 | 37 | 1 | 71,427,646 | 71,427,646 | 1 | true | 2022-03-10T16:04:49.167Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to create a gap of values in a gradient scale in R<p>I am currently creating a map of the U.S. with a gradient of counts of a variable ('totalvisits') wi... |
71,427,907 | React app renders in browser but goes blank if page is refreshed<p>Okay, so I have a React app that loads JSON data using axios. The app uses useContext() for state management. themeContext.js houses the get request to the JSON file and context provider etc. App.js has the header section, therefore, useContext is being... | <p>Since the <code>ThemeContext</code> is defining <code>data</code> as an empty object as its initial state, accessing <code>data.homearticle1.body</code> will break due to <code>data.homearticle1</code> being <code>undefined</code> (there's probably an error message in the DevTools Console itself).
I suggest you to c... | React app renders in browser but goes blank if page is refreshed | reactjs|axios|render|use-context | 0 | 37 | 1 | 71,428,082 | 71,428,082 | 1 | true | 2022-03-10T16:54:39.257Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
React app renders in browser but goes blank if page is refreshed<p>Okay, so I have a React app that loads JSON data using axios. The app uses useContext() fo... |
71,428,452 | Remove Duplicates from Activerecord has_many Call<p>I have the following database schema model for a Jukebox:</p>
<pre><code>Artist
has_many :albums
has_many :tracks, through: :albums
Album
belongs_to :artist
has_many :tracks
Track
belongs_to :album
has_one :artist, through: :album
belongs_to :genre
Genre... | <p><a href="https://api.rubyonrails.org/v7.0/classes/ActiveRecord/QueryMethods.html#method-i-distinct" rel="nofollow noreferrer"><code>distinct</code></a> should work for you:</p>
<pre><code>genre = Genre.first
genre.albums.distinct
</code></pre> | Remove Duplicates from Activerecord has_many Call | ruby-on-rails|ruby|activerecord | 0 | 38 | 2 | 71,428,525 | 71,428,525 | 1 | true | 2022-03-10T17:34:37.063Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Remove Duplicates from Activerecord has_many Call<p>I have the following database schema model for a Jukebox:</p>
<pre><code>Artist
has_many :albums
has_... |
71,429,934 | My while function that is in foreach isn't initializing? Unity<p>Know this code is supposed find me a few positions that are within the given range and place my objects to those places. But it somehow fails to run a simple while function that will find those positions</p>
<pre><code> void SortCharacters()
{
int... | <p>It is because in your while loop you are checking:</p>
<p><code>0 * 0 + 0 * 0 > 0.4f * 0.4f</code> which is not correct so it is not going inside of while loop. You set <code>float x = 0</code> and <code>float y = 0</code> so it is correctly following the code.</p> | My while function that is in foreach isn't initializing? Unity | c#|unity3d | 0 | 25 | 1 | 71,429,981 | 71,429,981 | 1 | true | 2022-03-10T19:45:48.827Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
My while function that is in foreach isn't initializing? Unity<p>Know this code is supposed find me a few positions that are within the given range and place... |
71,427,718 | Springcloud data flow 2.9.3 delete the TriggerProperties<p>REcently upgraded my springcloud data flow version and I cant configure the trigger sources.</p>
<p>2.1.0 version
<a href="https://i.stack.imgur.com/hWpAi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hWpAi.png" alt="enter image description... | <p>The application properties were removed in favor of common spring integration properties. We will look into adding these to the property dialog. Meanwhile, you should be able to manually type them into the stream definition or set as deployment properties. <a href="https://github.com/spring-projects/spring-boot/blo... | Springcloud data flow 2.9.3 delete the TriggerProperties | stream|spring-cloud-dataflow | 0 | 21 | 1 | 71,430,128 | 71,430,128 | 1 | true | 2022-03-10T16:39:37.773Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Springcloud data flow 2.9.3 delete the TriggerProperties<p>REcently upgraded my springcloud data flow version and I cant configure the trigger sources.</p>
<... |
71,428,180 | Snowflake masking policy with external function support on GCP<p>I want to externally tokenize some columns before loading to snowflake. Later I want to use a masking policy to de-tokenize the column using an external function. Is this possible to be done in snowflake on gcp or is this currently supported only on aws?<... | <p>Yes, external functions are supported on both platforms</p> | Snowflake masking policy with external function support on GCP | snowflake-cloud-data-platform | 0 | 30 | 1 | 71,430,657 | 71,430,657 | 1 | true | 2022-03-10T17:13:45.750Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Snowflake masking policy with external function support on GCP<p>I want to externally tokenize some columns before loading to snowflake. Later I want to use ... |
71,428,245 | MongoDB Group by Multiple and DIFFERENT Fields<p>I know this question has been asked a lot of times, but I can't seem to find what i'm looking for. I am using $project to get a collection of documents in MongoDB with 3 fields (Month, Week, Value), so I can then group them to sum the value by grouping each Month, or wee... | <p>The magic operator is <a href="https://docs.mongodb.com/manual/reference/operator/aggregation/facet/" rel="nofollow noreferrer">$facet</a></p>
<p>Instead of grouping by format I prefer <a href="https://docs.mongodb.com/manual/reference/operator/aggregation/dateTrunc/" rel="nofollow noreferrer">$dateTrunc</a> and dat... | MongoDB Group by Multiple and DIFFERENT Fields | javascript|node.js|mongodb|mongodb-query | 0 | 20 | 1 | 71,430,688 | 71,430,688 | 1 | true | 2022-03-10T17:18:48.947Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
MongoDB Group by Multiple and DIFFERENT Fields<p>I know this question has been asked a lot of times, but I can't seem to find what i'm looking for. I am usin... |
71,430,473 | node js sequelize Getting child and subchild in one association<p>I have categories table that has many products and that products table has many images</p>
<p>I am able to get them separately but i want them together in one go</p>
<pre><code> const categoriesList = await Categories.findAll({
include:['myProduc... | <p>You can use nested <code>include</code> option inside the first <code>include</code> option:</p>
<pre class="lang-js prettyprint-override"><code> const categoriesList = await Categories.findAll({
include:[{
model: Products,
as: 'myProducts',
include: [{
model: Produc... | node js sequelize Getting child and subchild in one association | node.js|sequelize.js | 0 | 32 | 1 | 71,430,766 | 71,430,766 | 1 | true | 2022-03-10T20:33:41.460Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
node js sequelize Getting child and subchild in one association<p>I have categories table that has many products and that products table has many images</p>
... |
71,430,605 | Change color of plotly label<p>So I have a pretty basic Sankey plot pretty similar to the one in the documentation:</p>
<pre><code>import plotly.graph_objects as go
fig = go.Figure(data=[go.Sankey(
node = dict(
pad = 15,
thickness = 20,
line = dict(color = "black", width = 0.5),
l... | <p>Read the <a href="https://plotly.com/python/reference/sankey/" rel="nofollow noreferrer">reference documentation</a> carefully :)</p>
<pre><code>fig.update_traces(textfont_color=<VALUE>, selector=dict(type='sankey'))
</code></pre>
<p>this should set the fontcolor of your node labels</p> | Change color of plotly label | python|plotly|sankey-diagram | 0 | 535 | 1 | 71,430,805 | 71,430,805 | 1 | true | 2022-03-10T20:46:16.720Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Change color of plotly label<p>So I have a pretty basic Sankey plot pretty similar to the one in the documentation:</p>
<pre><code>import plotly.graph_object... |
71,431,004 | i cant clear one of two inputs<p>i cant clear name input
when i go into strict mode console say: "Cannot create property 'value' on string ''"</p>
<pre><code> const number = document.getElementById("number").value;
const name = document.getElementById("name").value;
console.log... | <p>Your "name" and "number" is not DOM elements. There's their values like: "Hello, World" and other. String is primitive type and you can't define properties in prototype in strict mode.</p>
<pre><code>const numberInput = document.getElementById("number")
const nameInput = docum... | i cant clear one of two inputs | javascript|html|input | 0 | 27 | 1 | 71,431,078 | 71,431,078 | 1 | true | 2022-03-10T21:28:51.113Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
i cant clear one of two inputs<p>i cant clear name input
when i go into strict mode console say: "Cannot create property 'value' on string ''"</p>
... |
71,431,092 | Array of Objects -> filter keys or values by startsWith -> merge result to object<p>I have an array of objects:</p>
<pre class="lang-js prettyprint-override"><code>let cars = [
{
"color_1": "purple",
"color_2": "red",
"type": "minivan",
"... | <p>You can do it like this:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>let cars = [
{ "color_1": "purple", "color_2": "red", "type": "minivan" ,"capacity": 7, "all_color... | Array of Objects -> filter keys or values by startsWith -> merge result to object | javascript | 0 | 29 | 2 | 71,431,151 | 71,431,151 | 1 | true | 2022-03-10T21:37:08.297Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Array of Objects -> filter keys or values by startsWith -> merge result to object<p>I have an array of objects:</p>
<pre class="lang-js prettyprint-override"... |
71,431,477 | Echo separate array results as part of a MySql query PHP foreach loop<p>I'm sure this is simple but I can't figure it out. I'm running a php foreach loop to echo out results from a MySQL query into individual DIV containers. The Divs are various sizes determined by CSS classes. I'm trying to put the order of classes in... | <pre><code>foreach($result as $key=>$row){
...your code,
echo '<div class="'. $flex[$key] .'">
...rest of your code
}
</code></pre> | Echo separate array results as part of a MySql query PHP foreach loop | php|foreach | 0 | 32 | 1 | 71,431,545 | 71,431,545 | 1 | true | 2022-03-10T22:22:18.453Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Echo separate array results as part of a MySql query PHP foreach loop<p>I'm sure this is simple but I can't figure it out. I'm running a php foreach loop to ... |
71,419,495 | Difference between branch forcing and hard resetting<p>The title is pretty explicit. Say I'm on main with a few commits and I want to go back one commit on main. Both these commands work :</p>
<pre><code>$ git branch -f main HEAD^
$ git reset --hard HEAD^
</code></pre>
<p>What differences will there be when using one o... | <p>In terms of <em>branch name movement</em>, these would be the same, if <code>git branch -f main HEAD^</code> were allowed while on branch <code>main</code>. But it's not:</p>
<pre><code>$ cd ~/tmp && mkdir ttt && git init
Initialized empty Git repository in ...
$ echo test branch -f > README &... | Difference between branch forcing and hard resetting | git | 0 | 43 | 1 | 71,431,789 | 71,431,789 | 1 | true | 2022-03-10T06:03:37.843Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Difference between branch forcing and hard resetting<p>The title is pretty explicit. Say I'm on main with a few commits and I want to go back one commit on m... |
71,431,532 | How to create a record from request GET data (form does not pass the validation)<p>I am confused when I try to insert record from a "GET" request</p>
<p>I will try to explain what I want to do.</p>
<p>I am creating an application to take inventory of assets.</p>
<p>I have 3 tables in my database.</p>
<p>I hav... | <p>I believe you don't see any validation errors on the form because for the GET request, you are not passing in anything. The only thing you're passing into the form is the model instance and you're running form.is_valid on it which does not make sense. You dont need to use the form at all. Use this instead.</p>
<pre>... | How to create a record from request GET data (form does not pass the validation) | django|django-models|django-forms|orm | 0 | 32 | 1 | 71,432,135 | 71,432,135 | 1 | true | 2022-03-10T22:29:30.120Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to create a record from request GET data (form does not pass the validation)<p>I am confused when I try to insert record from a "GET" request</... |
71,432,044 | If list of values of first dictionary match values of second, replace list with keys of second<p>I have a list of dictionaries with a list of values</p>
<pre><code>[{'name': ['TO_MATCH_1', 'TO_MATCH_2'], 'amount': ['2', '1']},
{'name': ['TO_MATCH_3', 'TO_MATCH_2'], 'amount': ['3', '4']}]
</code></pre>
<p>If the list o... | <pre><code># DATA
d1 = [{'name': ['TO_MATCH_1', 'TO_MATCH_2'], 'amount': ['2', '1']},
{'name': ['TO_MATCH_3', 'TO_MATCH_2'], 'amount': ['3', '4']}]
d2 = {'ONE': 'TO_MATCH_1',
'TWO': 'TO_MATCH_2',
'THREE': 'TO_MATCH_3',
'FOUR': 'TO_MATCH_4'}
</code></pre>
<pre><code>d3 = {v: k for k, v, in d2.items()}
[{k: [d3.get(... | If list of values of first dictionary match values of second, replace list with keys of second | python|list|dictionary | 0 | 36 | 2 | 71,432,167 | 71,432,167 | 1 | true | 2022-03-10T23:37:44.440Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
If list of values of first dictionary match values of second, replace list with keys of second<p>I have a list of dictionaries with a list of values</p>
<pre... |
71,431,919 | Spark sql get collect_set ignore null on other columns<p>I need union result and collect set but want to ignore null</p>
<pre><code>val df1 = Seq(
("1","Adam","Angra", "Anastasia")
).toDF("id","fname", "mname", "lname")
df1.createOrReplac... | <p>You can group by <code>id</code> and use the <code>first</code> function (ignoring <code>null</code> values) to get <code>fname</code>, <code>mname</code>.</p>
<pre><code>val sql = """
select id,first(fname, true) as fname,first(mname, true) as mname,collect_set(lname) as lname from
(selec... | Spark sql get collect_set ignore null on other columns | sql|scala|apache-spark|apache-spark-sql | 0 | 275 | 1 | 71,432,522 | 71,432,522 | 1 | true | 2022-03-10T23:20:59.623Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Spark sql get collect_set ignore null on other columns<p>I need union result and collect set but want to ignore null</p>
<pre><code>val df1 = Seq(
("1... |
71,433,704 | Change Typescript Variable DataType After Initialisation using Or<p>Consider this function,</p>
<pre><code>sampleFunction(val :string | Node){
if(typeof(val) === 'string'){
val = this.getNode(val) as Node;
}
const innerFunction = () => {
...
still the type of val is string | Node
...
}
}
</code></pre... | <p>The type of val is still <code>string | Node</code>, even though you assigned a <code>Node</code> to it since val can contain <code>string</code> or <code>Node</code> . Assign the value to a new const (<code>nodeVal</code> perhaps) and you will be sorted.</p> | Change Typescript Variable DataType After Initialisation using Or | typescript | 0 | 17 | 1 | 71,433,739 | 71,433,739 | 1 | true | 2022-03-11T04:38:13.453Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Change Typescript Variable DataType After Initialisation using Or<p>Consider this function,</p>
<pre><code>sampleFunction(val :string | Node){
if(typeof(val)... |
71,427,964 | Replicating bootstrap column structure on site that can't use bootstrap<p>I have perfectly working bootstrap code, however, I just realized that part of my issue is that our forum is having problems with bootstrap in general so it messes up a lot of other styling as well.</p>
<p>Is there an easy way to replicate this e... | <p>Try the below code. This is without bootstrap. This will help to solve your 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-css lang-css prettyprint-override"><code>.row {
display: flex;
flex-wrap: w... | Replicating bootstrap column structure on site that can't use bootstrap | html|css|bootstrap-4|css-grid | 0 | 23 | 1 | 71,434,128 | 71,434,128 | 1 | true | 2022-03-10T16:58:10.730Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Replicating bootstrap column structure on site that can't use bootstrap<p>I have perfectly working bootstrap code, however, I just realized that part of my i... |
71,434,215 | How to fill in existing column in table-A with values pulled out from table-B after doing left join on two tables(A,B) in pandas?<p>I have two DataFrame A and B as-</p>
<pre><code>table_a = pd.DataFrame({
'unique_id':[3823762,3976695,4199277,4201777,4202712],
'full_name':['A','B','C','D','E'],
'freq_match_i... | <p>Replace missing values by mapping Series from second DataFrame by <a href="http://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.fillna.html" rel="nofollow noreferrer"><code>Series.fillna</code></a> and <a href="http://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.map.html" rel="... | How to fill in existing column in table-A with values pulled out from table-B after doing left join on two tables(A,B) in pandas? | python|pandas|dataframe | 0 | 37 | 3 | 71,434,270 | 71,434,270 | 1 | true | 2022-03-11T06:00:24.740Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to fill in existing column in table-A with values pulled out from table-B after doing left join on two tables(A,B) in pandas?<p>I have two DataFrame A an... |
71,432,193 | BitmapIconSource in a ResourceDictionary.ThemeDictionaries (UWP)<p>I would like to change the BitmapIcon of a NavigationViewItem depending on the current Windows theme.</p>
<p>I've added a <code>ResourceDictionary.ThemeDictionaries</code> to the MainPage like that:</p>
<pre><code><Page.Resources>
<Resource... | <p>The issue is that you can't set the value of the <code>UriSource</code> property of the <strong>BitmapIcon</strong> in such a way. You could directly store the string value of the path of the image in the <strong>ResourceDictionary</strong>. Then using <code>ThemeResource</code> to get the string value.</p>
<p>Like ... | BitmapIconSource in a ResourceDictionary.ThemeDictionaries (UWP) | c#|uwp|uwp-xaml|resourcedictionary | 0 | 45 | 1 | 71,434,538 | 71,434,538 | 1 | true | 2022-03-11T00:01:01.187Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
BitmapIconSource in a ResourceDictionary.ThemeDictionaries (UWP)<p>I would like to change the BitmapIcon of a NavigationViewItem depending on the current Win... |
71,369,654 | Where i can add redirect page in php?<p>Hi in the below code I want to add a redirect page in both cases failed or success. Where do I need to put the code?</p>
<pre><code> <?php
// (A) PROCESS ORDER FORM
if (isset($_POST["name"])) {
require "process.php";
echo $result == ""
? ... | <p>Here is an example of how someone can redirect to page.</p>
<pre><code> <?php
// (A) PROCESS ORDER FORM
if (isset($_POST["name"])) {
require "process.php";
echo $result == ""
? header ("Location: success.php") // SUCCESS PAGE GOES HERE
: header ("Location:... | Where i can add redirect page in php? | php | 0 | 45 | 1 | 71,435,810 | 71,435,810 | 1 | true | 2022-03-06T11:01:18.240Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Where i can add redirect page in php?<p>Hi in the below code I want to add a redirect page in both cases failed or success. Where do I need to put the code?<... |
71,435,869 | IF statement being inconsistent<p>I have a google sheets file that has A Lot of sheets, most of them have data that's pulled from other sheets.</p>
<p>Let's say I have a sheet called <code>Team 1</code> that has the data for Player 1, Player 2, Player 3 etc. <br>
Now I want to pull the data for each Player into a diffe... | <p>To avoid the N/A error in case of an empty output, wrap the FILTER() in an IFERROR() or IFNA()</p>
<pre><code>=IFERROR(FILTER('Team 1'!A:CC, 'Team 1'!B:B="Player 1"), "This Player has no data")
</code></pre>
<p>and see if that works?</p> | IF statement being inconsistent | google-sheets|google-sheets-formula | 0 | 32 | 1 | 71,435,961 | 71,435,961 | 1 | true | 2022-03-11T08:48:18.533Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
IF statement being inconsistent<p>I have a google sheets file that has A Lot of sheets, most of them have data that's pulled from other sheets.</p>
<p>Let's ... |
71,435,962 | How to get heroku websites IP Addresss?<p>I will integrate a rest api for my website. Integrator company wants an IP address for restrictions. I will send my computer ip for development and website (provider: heroku) ip for production. But i cant figure how the obtain these informations. Can anybody help or send an doc... | <p>Heroku <a href="https://help.heroku.com/4WADH6LX/can-you-provide-me-with-the-ip-address-for-my-application" rel="nofollow noreferrer">does not provide a static IP</a>.</p>
<p>Yet, here are 3 ways to make it work :</p>
<ol>
<li>Give the domain address instead of an IP address to the integrator.</li>
</ol>
<p>As Herok... | How to get heroku websites IP Addresss? | api|rest|networking | 0 | 45 | 1 | 71,436,343 | 71,436,343 | 1 | true | 2022-03-11T08:55:10.590Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to get heroku websites IP Addresss?<p>I will integrate a rest api for my website. Integrator company wants an IP address for restrictions. I will send my... |
71,436,680 | Get two string from a multilines data in javascript<p>I tried to get 2 string from multilines data. I used Reguler Expression to match the string that I want. First string is just one line, but the second is multipleline. This is my RegEx function</p>
<pre><code>const RegExp = /\/Data first:(.*) second:(.*\n.*)/
const ... | <p>You can try this <code>\/Data first:(.*) second:(.*[\s\S]*)</code>. I tested with your data and it's working as your requirement. You can try this playground.</p>
<p><a href="https://regex101.com/r/a4bJIH/1" rel="nofollow noreferrer">https://regex101.com/r/a4bJIH/1</a></p> | Get two string from a multilines data in javascript | javascript|regex | 0 | 45 | 1 | 71,436,888 | 71,436,888 | 1 | true | 2022-03-11T09:55:10.007Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Get two string from a multilines data in javascript<p>I tried to get 2 string from multilines data. I used Reguler Expression to match the string that I want... |
71,438,100 | Pandas, Python - Assembling a Data Frame with multiple lists from loop<p>Using loop to collect target data into lists from JSON file. These lists are organized as columns and their values are organized; thus, no manipulation/reorganization is required. Only attaching them horizontally.</p>
<pre><code>#Selecting Data in... | <p>The problem is that you are overwriting the <code>number</code> variable in the loop, so is no longer available at the end of each iteration, I add a solution adding the column Index in each iteration.</p>
<pre><code># create an empty dataframe
df = pd.DataFrame()
#Selecting Data into List
i=1
target = f'{pathway}\... | Pandas, Python - Assembling a Data Frame with multiple lists from loop | python|python-3.x|pandas|dataframe | 0 | 288 | 2 | 71,438,231 | 71,438,231 | 1 | true | 2022-03-11T11:50:53.067Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pandas, Python - Assembling a Data Frame with multiple lists from loop<p>Using loop to collect target data into lists from JSON file. These lists are organiz... |
71,436,196 | Flutter: A problem when using FilePicker to pick files<p>Some of my codes is as following:</p>
<pre><code>File? _file;
PlatformFile? _platformFile;
selectFile() async {
final file = await FilePicker.platform.pickFiles(
type: FileType.custom,
allowedExtensions: ['mp3', 'm4a']
);
if (fil... | <p>According to <a href="https://pub.dev/packages/file_picker" rel="nofollow noreferrer">File Picker</a> your code seems to be okay but I don't know why your gallery showing empty.</p>
<p>As alternative solution is that you can remove <code>allowedExtensions</code> option and use <strong>FileType.any</strong> so that a... | Flutter: A problem when using FilePicker to pick files | flutter|dart|filepicker | 0 | 1,318 | 1 | 71,438,557 | 71,438,557 | 1 | true | 2022-03-11T09:15:07.797Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Flutter: A problem when using FilePicker to pick files<p>Some of my codes is as following:</p>
<pre><code>File? _file;
PlatformFile? _platformFile;
sele... |
71,401,068 | draw with react-konva a rectangle when clicking a button<p>I'm trying to draw with <code>Konva</code> a rectangle <code>when</code> clicking a button</p>
<p>This is the code:</p>
<pre><code>import * as React from 'react'
import Konva from 'konva'
import { Stage, Layer, Line, Text, Rect, Group} from 'react-konva'
import... | <p>Your example doesn't work because the inner Stage has no width/height. So, it is <code>0</code> by default.</p>
<pre class="lang-js prettyprint-override"><code> <Stage width={window.innerWidth} height={window.innerHeight}>
<Layer>
<Html>
<button onClick={toggleShown}&g... | draw with react-konva a rectangle when clicking a button | react-konva|konva | 0 | 266 | 1 | 71,438,574 | 71,438,574 | 1 | true | 2022-03-08T20:26:35.020Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
draw with react-konva a rectangle when clicking a button<p>I'm trying to draw with <code>Konva</code> a rectangle <code>when</code> clicking a button</p>
<p>... |
71,438,622 | Shiny: Interactively add plots based on mouse xy input, and report them and do operations on them separately<p>I have</p>
<pre><code>ui <- fluidPage(
# App title ----
titlePanel("Interactive CLicks"),
br(),
fluidRow(
br(),
verbatimTextOutput("info_hover"),
plotOutput(out... | <p>I think you had a typo in your second <code>observeEvent</code> (again <code>input$plot_click</code> instead of <code>input$plot_db_click</code>) . That explains your error. Secondly, for your <code>verbatimTextOutput</code> I think you should refer to the reactive values. Does this work for you, or am I missing you... | Shiny: Interactively add plots based on mouse xy input, and report them and do operations on them separately | r|plot|shiny | 0 | 31 | 1 | 71,439,600 | 71,439,600 | 1 | true | 2022-03-11T12:36:07.503Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Shiny: Interactively add plots based on mouse xy input, and report them and do operations on them separately<p>I have</p>
<pre><code>ui <- fluidPage(
... |
71,425,038 | SPARQL query answers for Punned Entities in Ontology<p>I have built a small ontology in Protege to test punning with a SPARQL query. The Ontology is:</p>
<pre><code><?xml version="1.0"?>
<Ontology xmlns="http://www.w3.org/2002/07/owl#"
xml:base="http://www.semanticweb.org/usr/onto... | <p>Harry is a GE, from your assertions. GE is both a class and an individual; so GE appears in other statements as well, and that's multiplying the answers you're seeing. It's analogous as joining across tables where the join value matches multiple rows in one of the tables involved.</p> | SPARQL query answers for Punned Entities in Ontology | ontology|protege | 0 | 32 | 1 | 71,439,761 | 71,439,761 | 1 | true | 2022-03-10T13:37:05.833Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SPARQL query answers for Punned Entities in Ontology<p>I have built a small ontology in Protege to test punning with a SPARQL query. The Ontology is:</p>
<pr... |
71,438,869 | How to log and display partial data with RTK query?<p>I'm creating an mobile App with <code>react native typescript</code> and <code>expo</code> with help of <code>rtk-query</code>. I'm trying to get partial data from API <code>https://pokeapi.co/api/v2/pokemon/snorlax/</code>.
For example from API I'm only trying to g... | <p>You are probably accessing data properties without checking if data is fetched yet.</p>
<pre><code>if (data && data.species) {
console.log(data.species.name)
}
</code></pre>
<p>or</p>
<pre><code>console.log(data?.species?.name)
</code></pre> | How to log and display partial data with RTK query? | react-native|react-redux|react-hooks|expo|rtk-query | 0 | 283 | 1 | 71,439,855 | 71,439,855 | 1 | true | 2022-03-11T12:57:01.663Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to log and display partial data with RTK query?<p>I'm creating an mobile App with <code>react native typescript</code> and <code>expo</code> with help of... |
71,438,908 | Generate table only when updating numericInput in a shiny app<p>Can you help me with the following problem: I made an app that uses <code>Weighted Sum Method</code> (WSM) method in a given database. I can generate the final dataset normally, which is the <code>scaled</code> variable. Now I'm using this code together wi... | <p>You can simply wrap your data munging in <code>reactive</code> - I've disabled the second input to avoid <a href="https://mastering-shiny.org/action-dynamic.html#updating-inputs" rel="nofollow noreferrer">circular references</a>:</p>
<pre><code>library(shiny)
library(DT)
library(dplyr)
library(shinyjs)
df1 <- st... | Generate table only when updating numericInput in a shiny app | r|shiny | 0 | 41 | 1 | 71,439,869 | 71,439,869 | 1 | true | 2022-03-11T13:00:04.140Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Generate table only when updating numericInput in a shiny app<p>Can you help me with the following problem: I made an app that uses <code>Weighted Sum Method... |
71,439,355 | PostgreSQL finding durations<p>I'm trying to find the duration of an event in high (1) state. The states are logged into a table as the following</p>
<pre><code>time |state|
------- +-----+
01:00:00| 0|
01:01:00| 1|
01:02:35| 1|
01:03:20| 0|
01:04:00| 0|
01:05:00| 0|
01:06:00| 1|
01:07:00| 1|... | <p>try this :</p>
<pre><code>WITH list AS
( SELECT time AS starttime
, state
, CASE
WHEN state = 0
THEN min(time) FILTER (WHERE state = 1) OVER (ORDER BY time ASC ROWS BETWEEN 1 FOLLOWING AND UNBOUNDED FOLLOWING)
ELSE min(time) FILTER (WHERE state = 0) OVER (ORDER BY time... | PostgreSQL finding durations | sql|postgresql | 0 | 42 | 3 | 71,440,260 | 71,440,260 | 1 | true | 2022-03-11T13:34:40.700Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
PostgreSQL finding durations<p>I'm trying to find the duration of an event in high (1) state. The states are logged into a table as the following</p>
<pre><c... |
71,439,237 | interface fields inside other interface<p>I have typescript interface:</p>
<pre><code>interface SupplierSettings {
id_supplier_settings?: number;
is_auto_order: boolean;
order_cron: string;
email: string;
get_next_run_date?: string;
dont_wait_for_mail_response: boolean;
}
</code></pre>
<p>In sec... | <p>This should answer your question</p>
<pre><code>interface UpsertSupplierSettingsInterface extends SupplierSettings {
suppliers: {
connect: number;
}
}
interface SupplierSettings {
id_supplier_settings?: number;
is_auto_order: boolean;
order_cron: string;
email: string;
get_next_run_date?: strin... | interface fields inside other interface | typescript | 0 | 29 | 1 | 71,440,385 | 71,440,385 | 1 | true | 2022-03-11T13:25:43.250Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
interface fields inside other interface<p>I have typescript interface:</p>
<pre><code>interface SupplierSettings {
id_supplier_settings?: number;
is_... |
71,440,076 | The simple django model for selectbox<p>Django model with models.Choices</p>
<pre><code>class Special(models.Choices):
SPECIAL = (("welcome","My Welcome!"),
("privacy","my Privacy list"),
("happy","How happy you are"),
('',"-------------... | <pre><code>key_selector = forms.fields.ChoiceField(
choices = Special.SPECIAL.choices
required=False,
widget=forms.widgets.Select
)
</code></pre>
<p>should work</p> | The simple django model for selectbox | python|django | 0 | 32 | 1 | 71,440,469 | 71,440,469 | 1 | true | 2022-03-11T14:32:06.857Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
The simple django model for selectbox<p>Django model with models.Choices</p>
<pre><code>class Special(models.Choices):
SPECIAL = (("welcome",&q... |
71,440,177 | Populate a new column in a data frame with a vector of other columns in that row? R<p>So I have a data frame with columns "A", "B", "C", "D".</p>
<p>I want a column df$Vector which would have c(A,B,C,D).</p>
<p>For example if the data was like</p>
<pre><code>Name A B C D
... | <p>With <code>transpose()</code> from <code>data.table</code>:</p>
<pre><code>df$vector = as.list(data.table::transpose(df[-1]))
df[2:5] <- NULL
name vector
1 1 1.0, 0.5, 0.7, 0.6, 0.9
2 2 2.0, 0.4, 0.8, 0.3, 0.1
3 3 3.0, 0.5, 0.9, 0.1, 0.2
</code></pre>
<p><a href="https://i.stack.imgur... | Populate a new column in a data frame with a vector of other columns in that row? R | r|dataframe|vector | 0 | 27 | 3 | 71,440,473 | 71,440,473 | 1 | true | 2022-03-11T14:40:22.500Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Populate a new column in a data frame with a vector of other columns in that row? R<p>So I have a data frame with columns "A", "B", "... |
71,412,750 | How to enable view full location of class (file) in info menu? IntelliJ IDEA<p><a href="https://i.stack.imgur.com/X4TH3.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/X4TH3.jpg" alt="enter image description here" /></a></p>
<p>IntelliJ IDEA. It is info menu (when you stop cursor on class name). <str... | <p>It's not possible afaik. But you can create a feature request for it in <a href="https://youtrack.jetbrains.com/issues/IDEA" rel="nofollow noreferrer">https://youtrack.jetbrains.com/issues/IDEA</a></p> | How to enable view full location of class (file) in info menu? IntelliJ IDEA | java|intellij-idea|ide | 0 | 42 | 1 | 71,440,872 | 71,440,872 | 1 | true | 2022-03-09T16:29:56.077Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to enable view full location of class (file) in info menu? IntelliJ IDEA<p><a href="https://i.stack.imgur.com/X4TH3.jpg" rel="nofollow noreferrer"><img s... |
71,440,925 | Need a formula to delete after comparison in Excel<p>I have two Excel sheets.</p>
<p>First Excel has list of 89000+ user names and their storage space which I generated.</p>
<p>Second Excel has list of 2700+ user names whose storage I have to fill.</p>
<p>I have tried online solutions like formulas of if is error
and s... | <p>Assuming the usernames are unique, and the column layout is the same as described above in a single sheet, in cell D1 enter <code>=VLOOKUP(C:C, A:B, 2, FALSE)</code> (and press ctrl+shift+enter if not in Office365).</p> | Need a formula to delete after comparison in Excel | excel|excel-formula|comparison | 0 | 27 | 1 | 71,441,234 | 71,441,234 | 1 | true | 2022-03-11T15:31:49.140Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Need a formula to delete after comparison in Excel<p>I have two Excel sheets.</p>
<p>First Excel has list of 89000+ user names and their storage space which ... |
71,441,405 | concatenate datframes iteratively on dataframe names that ends with '*'<p>For example, say I have several dataframes in current instance:</p>
<pre><code>alldfs = [var for var in dir() if isinstance(eval(var), pd.core.frame.DataFrame)]
</code></pre>
<p>Out:
['df',
'df_01_W',
'df_01_W_pvt',
'df_01_X',
'df_01_X_pvt',
'df_... | <p>How about something like this?</p>
<pre><code>new_df = pd.concat([globals()[x] for x in alldfs if x.endswith('_pvt')])
</code></pre> | concatenate datframes iteratively on dataframe names that ends with '*' | python|pandas|dataframe|iteration|concatenation | 0 | 40 | 1 | 71,441,482 | 71,441,482 | 1 | true | 2022-03-11T16:10:29.487Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
concatenate datframes iteratively on dataframe names that ends with '*'<p>For example, say I have several dataframes in current instance:</p>
<pre><code>alld... |
71,440,781 | How to find NavigationViewItem from list of menuItems<p>With the help of the following codes, I can find the NavigationViewItem I want</p>
<pre><code>var item = navigationView.MenuItems
.OfType<NavigationViewItem>()
.FirstOrDefault(menuItem => (string)men... | <p>Assuming that <code>NavigationViewItem</code> also has a collection of <code>MenuItems</code>, you could use some self referencing method like this:</p>
<pre><code>(bool, NavigationViewItem?) SearchItems(List<NavigationViewItems> itemsToSearch, string argsInvokedItem) {
foreach (var item in itemsToSearch)... | How to find NavigationViewItem from list of menuItems | c#|xaml|uwp|winui | 0 | 45 | 1 | 71,441,757 | 71,441,757 | 1 | true | 2022-03-11T15:20:45.773Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to find NavigationViewItem from list of menuItems<p>With the help of the following codes, I can find the NavigationViewItem I want</p>
<pre><code>var ite... |
71,441,061 | Set condition when numbers are chosen in radioButtons<p>I would like to show the condition only when values are chosen for the three <code>radioButtons</code>, no matter the options. As it is, I choose an option just and this condition already appears, but that's not what I want. And I left it as <code>'2'</code> em ... | <p>With this <code>condition = "input.radio1 && input.radio2 && input.radio3"</code>, the conditionalPanel should appear only if the user has selected a choice for all 3 radio buttons.</p> | Set condition when numbers are chosen in radioButtons | r|shiny | 0 | 20 | 1 | 71,443,604 | 71,443,604 | 1 | true | 2022-03-11T15:43:00.583Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Set condition when numbers are chosen in radioButtons<p>I would like to show the condition only when values are chosen for the three <code>radioButtons</co... |
71,441,027 | How to replace rows starting with a certain character with emptly lines in text file with Linux/Unix?<p>I'm using Ubuntu and have a large text file where certain rows start with <code><</code> character what I'd like to replace each of these to an empty row. So from this:</p>
<pre><code>eeeeee
<
<
aaaa
bbbb
cc... | <p>This Perl one-liner should do what you're asking for:</p>
<pre class="lang-perl prettyprint-override"><code>perl -ne 'if (/^</) {print "\n" if !$f; $f=1} else {$f=0; print}' tmp.txt
</code></pre>
<p>Here it is in action:</p>
<pre class="lang-sh prettyprint-override"><code># cat tmp.txt
eeeeee
<
<
... | How to replace rows starting with a certain character with emptly lines in text file with Linux/Unix? | linux|unix|text | 0 | 37 | 2 | 71,443,680 | 71,443,680 | 1 | true | 2022-03-11T15:40:31.050Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to replace rows starting with a certain character with emptly lines in text file with Linux/Unix?<p>I'm using Ubuntu and have a large text file where cer... |
71,438,937 | Deleting all datalabels except the last two in i time series<p>I need a macro for deleting all datalabels in a linechart except the last two.
I've managed to delete one column of labels, any help on how i can delete the rest.</p>
<p>Here is the code im using currently:</p>
<pre><code>Option Explicit
Sub Format_linechar... | <p>For each each series, you can loop through each point and delete the data label for the desired points . . .</p>
<pre><code>Option Explicit
Sub Format_linechart()
Dim sld As Slide
Dim shp As Shape
Dim chart As chart
Dim sr As Series
Dim i As Long
Dim j As Long
Dim Cnt As Integer
Se... | Deleting all datalabels except the last two in i time series | vba|powerpoint | 0 | 40 | 1 | 71,445,185 | 71,445,185 | 1 | true | 2022-03-11T13:01:45.787Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Deleting all datalabels except the last two in i time series<p>I need a macro for deleting all datalabels in a linechart except the last two.
I've managed to... |
71,210,257 | Using a graph database to store and retrieve sorted users by personality scores<p>I am interested in storing a set of users that have personality scores.
I would like to get them to be more connected (closer?) to each other based on formulas that are applied to their scores. The more similar the users are, the more con... | <p>You could consider modeling it like this:</p>
<p>Where a vertex type/label named Score_range was introduced, together with the label User(with property score).</p>
<p>User vertices are connected to Score_range vertex like User with score: 101 is connected to Score_range(vertexID=100) which stands for [100, 110).</p>... | Using a graph database to store and retrieve sorted users by personality scores | database|graph-databases | 0 | 36 | 1 | 71,454,604 | 71,454,604 | 1 | true | 2022-02-21T17:04:29.090Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Using a graph database to store and retrieve sorted users by personality scores<p>I am interested in storing a set of users that have personality scores.
I w... |
71,435,677 | org/springframework/boot/autoconfigure/web/ServerPropertiesAutoConfiguration.class cannot be opened because it does not exist<p>I have this gradle configuration with the following dependencies:</p>
<pre><code>plugins {
id 'org.springframework.boot' version '2.6.4'
id 'io.spring.dependency-management' version '1... | <p>I think you question has been already answered; please, consider review this <a href="https://stackoverflow.com/questions/57289444/class-path-resource-org-springframework-boot-autoconfigure-web-serverproperties">SO question</a>.</p>
<p>You need to include the <a href="https://search.maven.org/artifact/org.springfram... | org/springframework/boot/autoconfigure/web/ServerPropertiesAutoConfiguration.class cannot be opened because it does not exist | spring|spring-boot|gradle | 0 | 1,047 | 1 | 71,458,079 | 71,458,079 | 1 | true | 2022-03-11T08:31:59.553Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
org/springframework/boot/autoconfigure/web/ServerPropertiesAutoConfiguration.class cannot be opened because it does not exist<p>I have this gradle configurat... |
71,440,652 | FTP FileUpload Error: An exception occurred during a WebClient request. InnerException: This method is not supported. (Parameter 'value')<p>I'm trying to upload a file from IFormFile to FTPS using WebClient.</p>
<pre class="lang-cs prettyprint-override"><code>private async Task SaveFileToFtp(IFormFile file)
{
WebRe... | <p>I've changed to use WinSCP instead of WebClient, and it works successfully.</p>
<p><a href="https://winscp.net/eng/docs/ui_generateurl#code" rel="nofollow noreferrer">https://winscp.net/eng/docs/ui_generateurl#code</a></p> | FTP FileUpload Error: An exception occurred during a WebClient request. InnerException: This method is not supported. (Parameter 'value') | azure|ftp|webclient|ftps|iformfile | 0 | 45 | 1 | 71,470,957 | 71,470,957 | 1 | true | 2022-03-11T15:11:39.083Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
FTP FileUpload Error: An exception occurred during a WebClient request. InnerException: This method is not supported. (Parameter 'value')<p>I'm trying to upl... |
71,425,304 | How to insert conditional text in a p tag on a cshtml page<p>I Have this portion of cshtml page part of my Razor application:</p>
<pre><code><p style="text-align: justify">
thank you for confirming your reservation for the <b>@{ @Model.HotelChoiceDescription.Substring(@Model.HotelChoiceDescrip... | <p>You can try to only use a <code><p></p></code>:</p>
<pre><code><p style="text-align: justify">
thank you for confirming your reservation for the <b>@{ @Model.HotelChoiceDescription.Substring(@Model.HotelChoiceDescription.IndexOf("_") + 1) }</b>
@if (!strin... | How to insert conditional text in a p tag on a cshtml page | asp.net-core|razor | 0 | 32 | 1 | 71,477,828 | 71,477,828 | 1 | true | 2022-03-10T13:54:54.657Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to insert conditional text in a p tag on a cshtml page<p>I Have this portion of cshtml page part of my Razor application:</p>
<pre><code><p style=&quo... |
71,439,340 | Load JQuery from DNN in 2sxc13<p>Is there a way to load JQuery library from the DNN install in a razor template without loading external links or relative paths to the file?
Something like @include(jquery). Even better if it checks if it is already loaded.</p> | <p>This can be done in 2sxc ;)</p>
<pre><code>var page = GetService<ToSic.Sxc.Services.IPageService>();
page.Activate("jQuery");
</code></pre>
<p>See also <a href="https://docs.2sxc.org/net-code/razor/services/page-service-activate.html" rel="nofollow noreferrer">https://docs.2sxc.org/net-code/razor... | Load JQuery from DNN in 2sxc13 | jquery|dotnetnuke|2sxc | 0 | 40 | 2 | 71,481,763 | 71,481,763 | 1 | true | 2022-03-11T13:33:13.400Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Load JQuery from DNN in 2sxc13<p>Is there a way to load JQuery library from the DNN install in a razor template without loading external links or relative pa... |
71,263,642 | Nimbus JOSE JWT expected audience claim to be any of a multiple<p>When validating a JWT I have the scenario that I have a list of allowed client-ids. I put the client-id as audience claim into the JWT but then when verifying I need need to compare against the list.</p>
<p>I tried the following:</p>
<pre><code>val allow... | <p>You can define the accepted audience in the verifier. (doc is from nimbus-jose-jwt v9.20)</p>
<pre><code>/**
* Creates new default JWT claims verifier. The expiration ("exp") and
* not-before ("nbf") claims will be checked only if they are present
* and parsed successfully; add them to the req... | Nimbus JOSE JWT expected audience claim to be any of a multiple | kotlin|jwt|nimbus-jose-jwt | 0 | 281 | 1 | 71,498,408 | 71,498,408 | 1 | true | 2022-02-25T09:23:02.097Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Nimbus JOSE JWT expected audience claim to be any of a multiple<p>When validating a JWT I have the scenario that I have a list of allowed client-ids. I put t... |
71,374,246 | How to setup specific headers in Nuxt?<p>I am currently trying to setup specific response header attributes such as X-Frame-Options, X-Content-Type-Options, Cache-Control, and Set-Cookie SameSite on my Nuxt project.
Is there an easy way to explicitly declare those headers in nuxt.config.js file ?</p>
<p>I know external... | <p>You can use a server middleware for this, create an <strong>headers.js</strong> (can have any name) file with the code bellow</p>
<pre class="lang-js prettyprint-override"><code>import express from 'express';
const app = express();
app.use((req, res, next) => {
res.set({
"X-Frame-Options&q... | How to setup specific headers in Nuxt? | typescript|http-headers|nuxt.js | 0 | 552 | 1 | 71,502,901 | 71,502,901 | 1 | true | 2022-03-06T21:15:01.990Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to setup specific headers in Nuxt?<p>I am currently trying to setup specific response header attributes such as X-Frame-Options, X-Content-Type-Options, ... |
71,397,048 | In the Azure Pipelines PublishSymbols task, how can I use a variable as the searchPattern parameter?<p>Following up on my <a href="https://stackoverflow.com/questions/71325906/in-the-azure-pipelines-publishsymbols-task-how-to-specify-multiple-search-patte">previous question</a>:</p>
<p>@leo-liu-msft's solution worked w... | <p>This issue probably occurs because Azure DevOps does not support multi-line variables, so when you output a multi-line variable from PowerShell to Azure DevOps variable, the multi-line data is eliminated.</p>
<p>To avoid this, <strong>you can use <code>%0D%0A</code> as a delimiter to separate multiple lines of data<... | In the Azure Pipelines PublishSymbols task, how can I use a variable as the searchPattern parameter? | azure-devops|azure-pipelines|symbols|debug-symbols|symbol-server | 0 | 45 | 1 | 71,508,420 | 71,508,420 | 1 | true | 2022-03-08T14:56:28.503Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
In the Azure Pipelines PublishSymbols task, how can I use a variable as the searchPattern parameter?<p>Following up on my <a href="https://stackoverflow.com/... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.