question_id int64 37.6M 73.2M | input_text stringlengths 88 52.4k | output_text stringlengths 37 35.6k | title stringlengths 15 150 | tags stringlengths 1 107 | q_score int64 -19 397 | view_count int64 3 879k | answer_count int64 1 21 | accepted_answer_id int64 37.6M 73.8M | answer_id int64 37.6M 73.8M | a_score int64 -5 1.29k | is_accepted bool 1
class | creation_date stringlengths 20 24 | input_text_instruct stringlengths 251 52.6k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
72,833,735 | Read Text file to worksheet<p>I have a Text file which looks like this</p>
<pre class="lang-txt prettyprint-override"><code>'52132205501000655 ... | <p>Please, test the next code. It uses arrays and should be very fast, processing only in memory. It assumes that all text file contains groups of four lines, separate by an empty line. It will return in separate cells for each file line. The processing result will be dropped in the active sheet, starting from "A1... | Read Text file to worksheet | excel|vba | 0 | 64 | 1 | 72,834,520 | 72,834,520 | 1 | true | 2022-07-01T19:13:57.070Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Read Text file to worksheet<p>I have a Text file which looks like this</p>
<pre class="lang-txt prettyprint-override"><code>'52132205501000655 ... |
73,026,294 | FlutterError (setState() called after dispose(): _welcomeScreen_1State#a1185(lifecycle state: defunct, not mounted) Error<p>I have an application. I added an introductory screen to this application that only appears at the entrance. This screen will appear when the user first opens the application. The next time they o... | <p>There could be a race condition so that <code>isSkipped</code> is <code>false</code> long enough for the timers to start, then it switches to <code>true</code> and the widget is rebuilt but the timers are still running.</p>
<p>You could add this before <code>setState</code> in your timer callbacks:</p>
<pre class="l... | FlutterError (setState() called after dispose(): _welcomeScreen_1State#a1185(lifecycle state: defunct, not mounted) Error | android|flutter|flutter-getx|flutter-secure-storage | 0 | 64 | 1 | 73,027,766 | 73,027,766 | 1 | true | 2022-07-18T17:28:25.637Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
FlutterError (setState() called after dispose(): _welcomeScreen_1State#a1185(lifecycle state: defunct, not mounted) Error<p>I have an application. I added an... |
72,882,933 | How to display html tag with css using esc_html?<p>I am editing the woocommerce orders.php template and ran into a problem. The template shows to user the orders he has placed. There are now several variables that I think need to be coded for security, such as $date_created or $view_order which contains the order link.... | <p>You can use <code>wp_kses_post</code>, it filters text content and strips out disallowed HTML.</p>
<pre><code>echo wp_kses_post( $date_created );
</code></pre> | How to display html tag with css using esc_html? | php|html|css|wordpress|escaping | 0 | 64 | 1 | 72,883,073 | 72,883,073 | 1 | true | 2022-07-06T11:36:29.503Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to display html tag with css using esc_html?<p>I am editing the woocommerce orders.php template and ran into a problem. The template shows to user the or... |
72,778,328 | Set a daily limit or a permanent limit for reading and writing operations in the Firestore<p>The first question is, when I exceed the free limit, additional fees are applied, or does the application stop working, if additional fees are calculated without my knowledge, tell me how to determine the reading and writing op... | <p>When you create new project on firebase, your billing plan is set to "spark", whitch is a start plan. That means, you will not be billed anything, unless you change your billing plan. In this plan, you have 50k reads/writes per day (it was like this a year ago, i am not sure if it wasn't changed). If you e... | Set a daily limit or a permanent limit for reading and writing operations in the Firestore | flutter|firebase|google-cloud-firestore|firebase-security | 0 | 64 | 1 | 72,778,649 | 72,778,649 | 1 | true | 2022-06-27T21:08:25.887Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Set a daily limit or a permanent limit for reading and writing operations in the Firestore<p>The first question is, when I exceed the free limit, additional ... |
72,991,521 | Generic function for sorting a nested array of objects<p>I want to sort a nested array using a generic function. It should be sorted by the values of the items from the nested array.</p>
<h3>My array:</h3>
<pre><code>type Person = {
id: number,
name: string,
childs: Child[]
}
type Child = {
id: number... | <p>To your first question: <em>"Why doesn't the compiler recognize that <code>member[keyOfSubArray]</code> must be an array?"</em>. Because it has no reason to assume so. You specified that the <code>array</code> parameter passed to the function is of type <code>A</code>. You did not further constrain this ge... | Generic function for sorting a nested array of objects | typescript | 1 | 64 | 2 | 72,991,680 | 72,991,680 | 1 | true | 2022-07-15T08:58:10.437Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Generic function for sorting a nested array of objects<p>I want to sort a nested array using a generic function. It should be sorted by the values of the ite... |
72,778,365 | How can I pass a List to another class<p>I have a list in this file called check_symptoms.dart which the list is called _chosenItems
i want it to pass it to another file which is a stateful widget
here's my code for Check_symptoms.dart</p>
<pre><code>import 'package:diagnose_app/results.dart';
import 'package:flutter/m... | <p>First of all, an instance of <code>State</code> can access the members of its parent <code>StatefulWidget</code> via the <code>widget</code> property.</p>
<p>So your particular problem can be solved simply by accessing <code>widget.list</code>, you don't need to pass the list explicitly to <code>_ResultsState</code>... | How can I pass a List to another class | flutter|dart|flutter-layout | 0 | 64 | 1 | 72,778,477 | 72,778,477 | 2 | true | 2022-06-27T21:13:40.517Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I pass a List to another class<p>I have a list in this file called check_symptoms.dart which the list is called _chosenItems
i want it to pass it to ... |
72,792,751 | JQ string cannot be csv-formatted<p>I am working with JSON output from the AWS cmd <code>aws elbv2 describe-load-balancers --output json</code> to retrieve info about my Load Balancers - partial json below</p>
<p>I am using the following to extract DNS Name, LB Name and Scheme for each LB</p>
<p><code>jq -r ' .LoadBala... | <p><code>@csv</code> expects an array, so construct one with your desired fields in it:</p>
<pre class="lang-bash prettyprint-override"><code>jq -r '.LoadBalancers[] | [.DNSName, .LoadBalancerName, .Scheme] | @csv'
</code></pre>
<p>Alternatively, construct each output line yourself by formatting a string to your liking... | JQ string cannot be csv-formatted | json|jq|aws-cli|aws-elb | 0 | 64 | 1 | 72,792,861 | 72,792,861 | 2 | true | 2022-06-28T20:24:59.420Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
JQ string cannot be csv-formatted<p>I am working with JSON output from the AWS cmd <code>aws elbv2 describe-load-balancers --output json</code> to retrieve i... |
72,807,954 | Variable out of scope error with (I assume) the correct scope declaration - C#<p>The use-case is a GUI with a checkbox, where I only want to run the compliance check (an external python script) if the checkbox is marked. If the compliance check runs, I want to save the output string from the processing.</p>
<p>Here is ... | <p>The rules of reachability and definite assignment do not know that <code>compliance</code> is the same value at both <code>if</code> statements. Thus, the compiler considers it possible that it is <code>false</code> at the first <code>if</code>, and <code>true</code> at the second <code>if</code>. <code>comp_python<... | Variable out of scope error with (I assume) the correct scope declaration - C# | c#|async-await|scope | -2 | 64 | 1 | 72,808,070 | 72,808,070 | 2 | true | 2022-06-29T21:15:00.337Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Variable out of scope error with (I assume) the correct scope declaration - C#<p>The use-case is a GUI with a checkbox, where I only want to run the complian... |
72,835,944 | Printing with reversed range<p>I want to print the following:</p>
<pre><code>
*
**
***
****
</code></pre>
<p>But both</p>
<pre><code>for i in range(5):
for j in reversed(range(5)):
if j < i:
print('*', end='')
print()
</code></pre>
<p>and</p>
<pre><code>for i in range(5):
for j in ran... | <p>You need to understand what is happening when you run those codes.</p>
<pre><code>for i in range(5): # 0,1,2,3,4
for j in range(5): # 0,1,2,3,4
if j < i:
# when i = 0, no stars printed. j is never less than 0:
# when i = 1, one star printed. when j is 0, print a star.
... | Printing with reversed range | python | 0 | 64 | 3 | 72,836,050 | 72,836,050 | 2 | true | 2022-07-02T01:57:25.380Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Printing with reversed range<p>I want to print the following:</p>
<pre><code>
*
**
***
****
</code></pre>
<p>But both</p>
<pre><code>for i in range(5):
f... |
72,856,624 | How to draw a figure on mouse click in qtapplication<p>I'm new to Pyqt5 and writing applications with it in Python so forgive me if this is a very simple question but I'm having trouble drawing ellipses in my program. I want to draw one by wherever a click occurs. Here is my code:</p>
<pre><code>from PyQt5.QtGui import... | <p>You should not override the mousePressEvent as you remove the default behavior such as sending the event to the button. On the other hand you have to convert the coordinates of the view to the coordinates of the scene.</p>
<pre class="lang-py prettyprint-override"><code>self.proxy_widget = self.scene.addWidget(self.... | How to draw a figure on mouse click in qtapplication | python|pyqt5 | 0 | 64 | 1 | 72,858,871 | 72,858,871 | 2 | true | 2022-07-04T12:17:40.570Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to draw a figure on mouse click in qtapplication<p>I'm new to Pyqt5 and writing applications with it in Python so forgive me if this is a very simple que... |
72,884,065 | Vertx Webclient pool<p>I am using vertx WebClient to consume 3 different(host) APIs, below is how I use Webclient,</p>
<pre><code>WebClientOptions options = new WebClientOptions();
options.setSsl(true);
options.setMaxPoolSize(50);
client = WebClient.create(vertx, options);
client.postAbs(url)
.timeout... | <p>The max pool size is per destination.</p>
<p>It is fine to use a single <code>WebClient</code> for different destinations.
You would create a client per destination if you needed to tune the options differently for each of them.</p>
<p>The pool implementation lies in the underlying <code>HttpClient</code>.</p> | Vertx Webclient pool | vert.x|vertx-verticle|vertx-httpclient | 1 | 64 | 1 | 72,884,966 | 72,884,966 | 2 | true | 2022-07-06T13:03:20.387Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Vertx Webclient pool<p>I am using vertx WebClient to consume 3 different(host) APIs, below is how I use Webclient,</p>
<pre><code>WebClientOptions options = ... |
72,894,062 | Find the average length of all words in a sentence<p>Given a string consisting of words separated by spaces (one or more).
Find the average length of all words.
Average word length = total number of characters in words (excluding spaces) divided by the number of words.
My attempt:
But input is incorrect, can you help m... | <p>When you're stuck, one nice trick is to use very verbose variable names that match the task description as closely as possible, for example:</p>
<pre><code>words = sentence.split()
total_number_of_characters = 0
number_of_words = 0
for word in words:
total_number_of_characters += WHAT?
number_of_words += W... | Find the average length of all words in a sentence | python|string | 0 | 64 | 4 | 72,894,142 | 72,894,142 | 2 | true | 2022-07-07T07:46:25.633Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Find the average length of all words in a sentence<p>Given a string consisting of words separated by spaces (one or more).
Find the average length of all wor... |
72,908,738 | How to take date through google voice input in dd/mm/yyyy format?<p>I want to take the date as a text from the user through google voice input.
So when user says:</p>
<blockquote>
<p>8 July 2022</p>
</blockquote>
<p>Then it will splits that string in <code>dd-mm-yyyy</code> format. How to get it?
Should I use any other... | <p>If you can use <code>java.time</code>, you can have the conversion without manipulating <code>String</code>s.</p>
<p>You will be needing</p>
<ul>
<li>two <code>DateTimeFormatter</code>s
<ul>
<li>one that handles the input <code>String</code> and</li>
<li>a second one that handles the format of the desired output/res... | How to take date through google voice input in dd/mm/yyyy format? | java|android | 1 | 64 | 1 | 72,908,960 | 72,908,960 | 2 | true | 2022-07-08T08:32:40.223Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to take date through google voice input in dd/mm/yyyy format?<p>I want to take the date as a text from the user through google voice input.
So when user ... |
72,908,893 | How to validate that array of strings is sorted alphabetically or by date in javascript?<p>I have array of strings</p>
<pre><code>const array = [
' | 7/9, 5:00 AM',
' | 7/10, 5:00 AM',
' | 7/10, 11:00 PM',
' | 7/13, 2:30 AM'
]
</code></pre>
<p>and wrote a function</p>
<pre><code>functi... | <p>The tricky part will be to parse the dates. Once you have that in place, your function to check for an ascending order will be fine. Although you should allow two consecutive values to be equal as well (as that is still "sorted").</p>
<p>The date format you have there is quite unusual, and it would be bett... | How to validate that array of strings is sorted alphabetically or by date in javascript? | javascript|arrays | 0 | 64 | 1 | 72,909,335 | 72,909,335 | 2 | true | 2022-07-08T08:47:37.097Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to validate that array of strings is sorted alphabetically or by date in javascript?<p>I have array of strings</p>
<pre><code>const array = [
' |... |
72,915,346 | What would be the space complexity of an ArrayList of ArrayLists in Java?<p>I have a method that returns <strong><code>List<List<Integer>></code></strong> in <strong>Java</strong>. What would be the <strong>Space Complexity</strong> of this data structure? Would it be <strong>O(N*M)</strong>, due to nested ... | <p>You have the right idea, but may need to refine it a bit.</p>
<p>For the "outer" <code>ArrayList</code>, the space complexity is O(n), n being the number of elements in it.<br />
Following your instinct, you should multiply that by the space complexity of the inner <code>ArrayList</code>s, which is also th... | What would be the space complexity of an ArrayList of ArrayLists in Java? | java|list|arraylist|nested-lists|space-complexity | 1 | 64 | 2 | 72,915,390 | 72,915,390 | 2 | true | 2022-07-08T18:04:45.903Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What would be the space complexity of an ArrayList of ArrayLists in Java?<p>I have a method that returns <strong><code>List<List<Integer>></code>... |
72,919,452 | How to write dictionary to a text file properly<p>I am trying to create a text file with dictionary storing some value so that I can retrieve it later but the write creates multiple dictionary how can I create only a single dictionary also the type of data is returned is as string how can I use it as dictionary, kindl... | <p>You are adding the string conversion of your dictionary onto the file. Each time you run your program, the <code>a+</code> flag tells it to append as a string.</p>
<p>You can fix this by using a json format–like you imported:</p>
<pre><code>import json
mydic = {}
# Read existing data
with open('cd.json', 'r') as j... | How to write dictionary to a text file properly | python|python-3.x | 1 | 64 | 3 | 72,919,519 | 72,919,519 | 2 | true | 2022-07-09T06:35:08.290Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to write dictionary to a text file properly<p>I am trying to create a text file with dictionary storing some value so that I can retrieve it later but t... |
72,924,062 | Calculate the percentile each of columns<p>For example, I want to calculate perentile for this columns :</p>
<pre><code>list_of_col <- total[ -c(2:8,16:21) ]
</code></pre>
<p>I know how I can calculate the percentile on one column (the B is the column by which it groups, for example B have index 1, and A is the co... | <p>Try something like this (I did not run it)</p>
<pre><code>total<- total %>%
group_by(B) %>%
mutate_at(list_of_col, function(x) rank(x)/length(x))
</code></pre> | Calculate the percentile each of columns | r|dplyr | 2 | 64 | 2 | 72,924,231 | 72,924,231 | 2 | true | 2022-07-09T19:27:36.383Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Calculate the percentile each of columns<p>For example, I want to calculate perentile for this columns :</p>
<pre><code>list_of_col <- total[ -c(2:8,16:2... |
72,948,860 | SwiftUI toolbar multiple items compression resistance<p>I have a toolbar with user info (leading alignment) and some buttons (trailing):</p>
<pre><code>view
.toolbar {
ToolbarItem(placement: .navigationBarLeading) {
VStack {
Text("...")
Text("...&qu... | <p>It looks like a bug of <code>.navigationBarLeading</code> placement, as a workaround it is possible to use <code>.principal</code> with spacer to align to the left of text is short</p>
<p>Tested with Xcode 13.4 / iOS 15.5</p>
<p><a href="https://i.stack.imgur.com/Fwjdx.png" rel="nofollow noreferrer"><img src="https:... | SwiftUI toolbar multiple items compression resistance | swiftui|layout|toolbar | 2 | 64 | 1 | 72,949,325 | 72,949,325 | 2 | true | 2022-07-12T07:57:58.590Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SwiftUI toolbar multiple items compression resistance<p>I have a toolbar with user info (leading alignment) and some buttons (trailing):</p>
<pre><code>view
... |
72,962,266 | Making use of Google Map in an Android<p>I am trying to use Google Map in an Android app for the first time.
For that I found a couple of tutorials and documents on the net to get started.
I already have an API key that I got from Google.</p>
<p>Here is the kind of code I have:</p>
<pre><code>package me.myapp
import .... | <p><strong>Please Provide your Google Map Api Key</strong></p>
<ol>
<li>Create google api key <a href="https://www.youtube.com/watch?v=OGTG1l7yin4" rel="nofollow noreferrer">enter link description here</a></li>
<li>Enter the Key you got in the value field</li>
</ol>
<pre><code><meta-data
android:name="com.g... | Making use of Google Map in an Android | android|google-maps | 0 | 64 | 2 | 72,964,777 | 72,964,777 | 2 | true | 2022-07-13T07:13:20.483Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Making use of Google Map in an Android<p>I am trying to use Google Map in an Android app for the first time.
For that I found a couple of tutorials and docum... |
72,984,378 | How to iterate through objects in a class?<p>For a script I'm writing I would like to be able to something like this.</p>
<pre><code>class foo:
__init__(self):
self.a = 'path1'
self.b = f'{self.a}path2'
bar = foo()
for i in bar:
if not os.path.isdir(i):
os.mkdir(i)
</code></pre>
<p>But... | <p>Is this what you need?</p>
<pre><code>class foo:
def __init__(self):
self.a = 'string1'
self.b = f'{self.a}string2'
bar = foo()
for attr, value in bar.__dict__.items():
print(attr, value)
</code></pre>
<p><a href="https://i.stack.imgur.com/yic9o.png" rel="nofollow noreferrer"><img src="... | How to iterate through objects in a class? | python|class|object|iterable | 0 | 64 | 2 | 72,984,450 | 72,984,450 | 2 | true | 2022-07-14T17:20:17.550Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to iterate through objects in a class?<p>For a script I'm writing I would like to be able to something like this.</p>
<pre><code>class foo:
__init__(... |
72,985,916 | How to use regex to select rows where the column has more than two words in oracle<p>for example:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th style="text-align: left;">id</th>
<th style="text-align: center;">center</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">1</td>
<t... | <p>You can use <code>REGEXP_COUNT</code> to look for more than 2 sets of words</p>
<pre class="lang-sql prettyprint-override"><code>WITH
some_table (id, center)
AS
(SELECT 1, 'man' FROM DUAL
UNION ALL
SELECT 2, 'some men here' FROM DUAL)
SELECT *
FROM some_table
WHERE REGEXP_COUNT (... | How to use regex to select rows where the column has more than two words in oracle | sql|regex|oracle | 1 | 64 | 3 | 72,985,983 | 72,985,983 | 2 | true | 2022-07-14T19:47:01.720Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to use regex to select rows where the column has more than two words in oracle<p>for example:</p>
<div class="s-table-container">
<table class="s-table">... |
72,982,995 | How do you change the style of ValidationMessages in Blazor Server Side EditForms?<p>I have an <code>EditForm</code> as follows:</p>
<pre><code><EditForm class="container-fluid" Context="formContext" Model="@_inputModel" OnValidSubmit="() => OnSubmitInput()">
<Dat... | <p>Either:</p>
<ol>
<li>Modify <code>validation-message</code> in your CSS</li>
<li>Wrap <code>ValidationMessage</code> in a <code>div</code> and set whatever CSS you want on the div .</li>
</ol>
<pre class="lang-html prettyprint-override"><code><div class="fs-6">
<ValidationMessage For="() ... | How do you change the style of ValidationMessages in Blazor Server Side EditForms? | asp.net-core|blazor|blazor-server-side | 0 | 64 | 2 | 72,987,355 | 72,987,355 | 2 | true | 2022-07-14T15:25:45.210Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do you change the style of ValidationMessages in Blazor Server Side EditForms?<p>I have an <code>EditForm</code> as follows:</p>
<pre><code><EditForm ... |
72,990,297 | how to make a cardview with a icon in the center with the text below it?<p>I want to make 2 rows and 3 columns card view with text below it (not inside the card view) and an image in the center of the card view.</p>
<p><a href="https://i.stack.imgur.com/1YgF0.png" rel="nofollow noreferrer"><img src="https://i.stack.img... | <p><strong>try this</strong></p>
<blockquote>
<p>Just Copy and Paste your xml layout</p>
</blockquote>
<pre><code><LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
>
<LinearLayout
andro... | how to make a cardview with a icon in the center with the text below it? | java|android|layout|android-cardview|screen-orientation | 0 | 64 | 4 | 72,990,708 | 72,990,708 | 2 | true | 2022-07-15T07:14:27.917Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to make a cardview with a icon in the center with the text below it?<p>I want to make 2 rows and 3 columns card view with text below it (not inside the c... |
72,976,442 | Why Clang copies the constant arrays in LLVM IR?<p>I have this piece of code to demonstrate:</p>
<pre><code>int
main(int argc, char** argv)
{
char a[8] = {65, 66, 67, 68, 69, 70, 71, 72};
printf("a %s", a);
}
</code></pre>
<p>What i expect would be that this array will be place as constant one in some pla... | <p>You declared a local variable and Clang always produces an <code>alloca</code> for that. Then you filled it with data, and the data is an aggregate, so Clang emits the aggregate data to a global variable and a memcpy to copy the bytes. Note that <code>char a[8]</code> is mutable, if your code had <code>a[5]++;</code... | Why Clang copies the constant arrays in LLVM IR? | c|optimization|clang|llvm|llvm-ir | 0 | 64 | 1 | 73,009,884 | 73,009,884 | 2 | true | 2022-07-14T06:59:06.350Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why Clang copies the constant arrays in LLVM IR?<p>I have this piece of code to demonstrate:</p>
<pre><code>int
main(int argc, char** argv)
{
char a[8] = {... |
73,020,490 | What is an immutable value class in Java? (Effective Java by Joshua Bloch)<p>I'm currently diving deep (at least relative to my limited knowledge as a programmer) into Java using Joshua Bloch's <a href="https://www.amazon.com.au/Effective-Java-Joshua-Bloch/dp/0134685997" rel="nofollow noreferrer">Effective Java</a>.</p... | <p>When you provide a constructor then the <em>caller</em> decides if a new object is created:</p>
<p>If the constructor for my <code>FooBar</code> class is publicly accessible then any code can run <code>new FooBar()</code> and it will create a new <code>FooBar</code> object (it could fail during construction, but it ... | What is an immutable value class in Java? (Effective Java by Joshua Bloch) | java|design-patterns|static|immutability|effective-java | 0 | 64 | 1 | 73,020,710 | 73,020,710 | 2 | true | 2022-07-18T10:03:01.560Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What is an immutable value class in Java? (Effective Java by Joshua Bloch)<p>I'm currently diving deep (at least relative to my limited knowledge as a progra... |
73,021,279 | API Decoding Struct Swift<p><a href="https://i.stack.imgur.com/oBrp2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oBrp2.png" alt="enter image description here" /></a><a href="https://i.stack.imgur.com/4IhZU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4IhZU.png" alt="enter im... | <p><a href="https://app.quicktype.io" rel="nofollow noreferrer">Quicktype.io</a> is your friend. Post the JSON to it and get the struct back automatically.</p>
<pre><code>// This file was generated from JSON Schema using quicktype, do not modify it directly.
// To parse the JSON, add this file to your project and do:
/... | API Decoding Struct Swift | json|swift|struct|decodable|jsondecoder | 1 | 64 | 1 | 73,021,450 | 73,021,450 | 2 | true | 2022-07-18T11:00:38.750Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
API Decoding Struct Swift<p><a href="https://i.stack.imgur.com/oBrp2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oBrp2.png" alt="enter... |
73,029,082 | Question about VirtualQueryEx() lpAdress variable<p>I am building a Memory Scanner to find malware strings in a process.
Btw, when I was searching about the VirtualQueryEx dll, I saw that people starts its variable lpAdress ( which is supposed to be the Base Address of the process) with a NULL/0 value</p>
<pre><code> ... | <p>Each process has it's own virtual address space that starts at 0. The various executable files (.exe / .dll / whatever) are loaded either at addresses specified in the file or more recently at random addresses for security purposes.</p>
<p>A process can easily have mapped memory regions at addresses lower than where... | Question about VirtualQueryEx() lpAdress variable | winapi|virtual-memory|virtualquery | 0 | 64 | 1 | 73,029,571 | 73,029,571 | 2 | true | 2022-07-18T22:02:35.100Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Question about VirtualQueryEx() lpAdress variable<p>I am building a Memory Scanner to find malware strings in a process.
Btw, when I was searching about the ... |
73,030,940 | Generate rows to fill in gaps between years, carry over a value from previous year<p>I have a table of road condition ratings (roads are rated from 1-20; 20 being good).</p>
<pre><code>with road_inspections
(road_id, year, cond) as (
select 1, 2009, 17 from dual union all
select 1, 2011, 16 from dual union all
se... | <p>You can use the <code>LEAD</code> analytic function with a <code>LATERAL</code> joined hierarchical query to generate the missing rows from each row until the next row:</p>
<pre class="lang-sql prettyprint-override"><code>SELECT r.road_id,
y.year,
r.cond
FROM ( SELECT r.*,
LEAD(year, ... | Generate rows to fill in gaps between years, carry over a value from previous year | sql|oracle|time-series|oracle18c | 1 | 64 | 3 | 73,033,489 | 73,033,489 | 2 | true | 2022-07-19T03:54:23.893Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Generate rows to fill in gaps between years, carry over a value from previous year<p>I have a table of road condition ratings (roads are rated from 1-20; 20 ... |
72,831,244 | How to fix a URL colon error that changes colon to %3a<p>I have a URL as below</p>
<blockquote>
<p>components.host = "37.143.66.25:9875"</p>
</blockquote>
<p>This URL contains a colon <code>:</code>, but when I try to make a request I get this error message</p>
<blockquote>
<p>NSLocalizedDescription=A server ... | <p>Add host and port separately, like (assuming <code>components</code> is <code>URLComponents</code>)</p>
<pre><code>components.host = "37.143.66.25"
components.port = 9875
</code></pre>
<p>otherwise it thinks that your port is part of host name</p> | How to fix a URL colon error that changes colon to %3a | swift|url | 0 | 64 | 1 | 72,831,305 | 72,831,305 | 2 | true | 2022-07-01T15:06:45.330Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to fix a URL colon error that changes colon to %3a<p>I have a URL as below</p>
<blockquote>
<p>components.host = "37.143.66.25:9875"</p>
</bloc... |
73,010,908 | Progress Circle after pressing button till a request to an API is done<p>I have a button in my flutter application that I want to send a request to an API after pressing it. I should wait for the process, and I want to have a progress circle that shows from the time I pressed the button until I get a response from the ... | <p>Just use like this.</p>
<p>Additionally if you want more <code>CircularProgressIndicator</code> customization and functions I bring here docs url
<a href="https://api.flutter.dev/flutter/material/CircularProgressIndicator-class.html" rel="nofollow noreferrer">https://api.flutter.dev/flutter/material/CircularProgress... | Progress Circle after pressing button till a request to an API is done | flutter|dart | 1 | 64 | 1 | 73,011,058 | 73,011,058 | 2 | true | 2022-07-17T10:11:16.970Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Progress Circle after pressing button till a request to an API is done<p>I have a button in my flutter application that I want to send a request to an API af... |
72,969,769 | C# Parameterized Snowflake Query where value can be null not working as expected<p>When using parameterized queries in C# in the WHERE statement how do you handle values that can be null?</p>
<p>Let's say we have a table:</p>
<pre><code>ID|NAME|TITLE
1|'Bob'|"Boss'
2|'Bobbet'|NULL
</code></pre>
<p>Let's say that I... | <p>One way of handling it is to use <a href="https://docs.snowflake.com/en/sql-reference/functions/is-distinct-from.html" rel="nofollow noreferrer">IS NOT DISTINCT FROM</a>(predicate is part of SQL Standard) or <a href="https://docs.snowflake.com/en/sql-reference/functions/equal_null.html" rel="nofollow noreferrer">EQU... | C# Parameterized Snowflake Query where value can be null not working as expected | c#|snowflake-cloud-data-platform | 1 | 64 | 1 | 72,970,379 | 72,970,379 | 2 | true | 2022-07-13T16:39:29.583Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
C# Parameterized Snowflake Query where value can be null not working as expected<p>When using parameterized queries in C# in the WHERE statement how do you h... |
72,849,916 | Will intel -03 convert pairs of __m256d instructions into __m512d<p>Will a code written for a 256 vectorization register will be compiled to use 512 instructions using the (2019) intel compiler with O3 level of optimization?</p>
<p>e.g. will operations on two __m256d objects be either converted to the same amount of op... | <p>Unfortunately, <strong>no</strong>: a code written to use AVX/AVX-2 intrinsics is not rewritten by ICC so to use AVX-512 yet (with both ICC 2019 and ICC 2021). There is no instruction fusing. Here is an example (see on <a href="https://godbolt.org/z/8f93Mfv6r" rel="nofollow noreferrer">GodBolt</a>).</p>
<pre class="... | Will intel -03 convert pairs of __m256d instructions into __m512d | performance|compiler-optimization|intrinsics|icc|avx512 | 2 | 64 | 1 | 72,850,176 | 72,850,176 | 2 | true | 2022-07-03T21:08:04.923Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Will intel -03 convert pairs of __m256d instructions into __m512d<p>Will a code written for a 256 vectorization register will be compiled to use 512 instruct... |
72,983,007 | How to make a line in svg vibrate (oscillation move)<p>Let's suppose we do have a simple svg file like this:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code><svg height... | <p>As a starting point you may need to</p>
<ol>
<li><p>transform the line in a path with a line written as a cubic bezier</p>
</li>
<li><p>calculate 2 other paths as the position and shape of the bented curve up and down</p>
</li>
<li><p>In this case I'm adding a simple SMIL animation betwin the 3 variants of the curve... | How to make a line in svg vibrate (oscillation move) | html|css|svg | 2 | 64 | 1 | 72,984,242 | 72,984,242 | 2 | true | 2022-07-14T15:26:17.457Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to make a line in svg vibrate (oscillation move)<p>Let's suppose we do have a simple svg file like this:</p>
<p><div class="snippet" data-lang="js" data... |
72,993,106 | cglib proxy and null instance variable internals<p>My query is why is an instance variable null when cglib proxy with spring tries to access it inside a final method. This would mean that even if I had declared the variable directly like in the class below -</p>
<pre class="lang-java prettyprint-override"><code>class A... | <p>The way Spring uses CGLIB proxies is by a <strong>delegation pattern,</strong> see <a href="https://stackoverflow.com/a/56616248/1082681">this answer</a> for a schematic code sample about how this is implemented.</p>
<p>Please understand that when creating the proxy, only method delegation is being considered. The p... | cglib proxy and null instance variable internals | aop|spring-aop|cglib|dynamic-proxy | 1 | 64 | 1 | 73,057,499 | 73,057,499 | 2 | true | 2022-07-15T11:11:59.143Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
cglib proxy and null instance variable internals<p>My query is why is an instance variable null when cglib proxy with spring tries to access it inside a fina... |
72,995,081 | 3 Horizontal Box - CSS<p>What i would like to achieve is that i want to change the way my boxes appear only on the mobile version of the website. I experimented with <code>display:</code> and <code>flex:</code> rules but had no luck. I want them stick to each other but Couldn't find the right CSS rule. Help.</p>
<p>Tha... | <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>.m-image {
border: 5px dashed black;
width: 100%;
height: 70px;
margin: 10px 0;
position: relative;
display: inline-bl... | 3 Horizontal Box - CSS | html|css | 0 | 64 | 4 | 72,995,261 | 72,995,261 | 2 | true | 2022-07-15T13:52:09.377Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
3 Horizontal Box - CSS<p>What i would like to achieve is that i want to change the way my boxes appear only on the mobile version of the website. I experimen... |
72,907,146 | How to select and update specific columns by Entity Framework Core?<p>I'm trying to convert raw SQL to EF core now.
my table has many columns, such as column1 to 10, and I need to select and update specific columns. original code like this :</p>
<pre><code>SELECT column1, column2 FROM table WHERE key = "someKey&qu... | <p>You can use <code>Attach</code> and <code>Entry</code> methods to track the changes to a entity model. To identify the model you would need all the keys (here I'm considering only one primary key: <code>Id</code>)</p>
<pre><code>var query =
from model in context
where key == "someKey"
select new myD... | How to select and update specific columns by Entity Framework Core? | c#|entity-framework-core | 0 | 64 | 1 | 72,907,333 | 72,907,333 | 2 | true | 2022-07-08T05:48:41.077Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to select and update specific columns by Entity Framework Core?<p>I'm trying to convert raw SQL to EF core now.
my table has many columns, such as column... |
72,857,037 | XML transformation using XSLT doesn't work<p>I am in phase of learning XSLT,</p>
<p>Following is my XML</p>
<pre><code> <?xml version="1.0" encoding="UTF-8"?>
<catalog>
<cd>
<title>xyz</title>
<artist>pqr</artist>
<country&g... | <p>It is important to know that there are <a href="https://www.w3.org/TR/2017/REC-xslt-30-20170608/#built-in-rule" rel="nofollow noreferrer">built-in template rules</a> that will be applied to the content. Unless you provide your own that override the default behavior, XSLT will match on any <code>node()</code> apply-t... | XML transformation using XSLT doesn't work | xml|xslt|xslt-1.0|xslt-2.0 | 1 | 64 | 1 | 72,857,333 | 72,857,333 | 2 | true | 2022-07-04T12:47:57.963Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
XML transformation using XSLT doesn't work<p>I am in phase of learning XSLT,</p>
<p>Following is my XML</p>
<pre><code> <?xml version="1.0" e... |
72,904,817 | Calculating Pareto Table for long-type data in Power BI<p>Hello lovely people of SO,</p>
<p>I have a dataset that looks like so:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th style="text-align: center;">ID SALE</th>
<th style="text-align: center;">PRODUCT</th>
<th style="text-align: cente... | <p>You can do this in a report visualisation with a few measures, to calculate number of sales, percentage of sales, product rank by sales (then product name), and cumulative sales percentage:</p>
<h5># Sales:</h5>
<pre><code># Sales = COUNT ( Sales[ID SALE] )
</code></pre>
<h5>% Sales:</h5>
<pre><code>% Sales =
D... | Calculating Pareto Table for long-type data in Power BI | powerbi|dax | 1 | 64 | 3 | 72,909,344 | 72,909,344 | 2 | true | 2022-07-07T22:20:06.980Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Calculating Pareto Table for long-type data in Power BI<p>Hello lovely people of SO,</p>
<p>I have a dataset that looks like so:</p>
<div class="s-table-cont... |
73,016,363 | Combining Polly policies and accessing handled exception in Polly policy Fallback<p>Given the following F# snippets</p>
<pre><code>//User Code
.. code that can throw exceptions
"Success"
</code></pre>
<h3>P1 policy</h3>
<pre><code>Policy
.Handle<CosmosException>(fun cx -> cx.StatusCode = HttpStat... | <h3>Answer to question 1</h3>
<p>In order to be able to chain policies you need to define them as compatible policies. Your <code>p2</code> returns a <code>string</code> whereas your <code>p1</code> returns nothing. So, you need to change <code>p1</code> to return with <code>string</code> as well. Then you can use <a h... | Combining Polly policies and accessing handled exception in Polly policy Fallback | f#|polly | 1 | 64 | 1 | 73,023,179 | 73,023,179 | 2 | true | 2022-07-18T00:49:39.043Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Combining Polly policies and accessing handled exception in Polly policy Fallback<p>Given the following F# snippets</p>
<pre><code>//User Code
.. code that c... |
72,853,471 | How can I find out how an annotation is implemented?<p>I want to see how <strong>Lock</strong> annotation is implemented in spring-data-jpa.
I believe they use aop-alliance and intercept the annotationed methods and add some logic but I have no idea where to look for the implementation?</p>
<pre><code> // https://mvnre... | <p><code>Lock</code> is an annotation and as such doesn't have any code directly attached to it.</p>
<p>The code "implementing it" will have to find the annotation usages and the work with that information. In order to find those places you'll search for usages of that annotation in your source code. With <c... | How can I find out how an annotation is implemented? | java|spring|spring-data-jpa | 2 | 64 | 1 | 72,864,917 | 72,864,917 | 2 | true | 2022-07-04T08:01:33.507Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I find out how an annotation is implemented?<p>I want to see how <strong>Lock</strong> annotation is implemented in spring-data-jpa.
I believe they u... |
73,019,921 | Is there any way to transpose a HTML table using VBA?<p>I have a macro allows me send emails of monthly performance to each manager. Codes are as follow:</p>
<pre><code>Sub OutlookEmailsSend()
Dim objOutlook As Outlook.Application
Dim objMail As Outlook.MailItem
Dim lCounter As Long
Dim endColumnNo... | <p>For the sake of better readibility it might be helpful to organize the html creation in a function and to assign the function result to <code>objMail.HTMLBody</code> omitting the loops.</p>
<p><em>Btw you forgot the closing table tag <code></table></code> which wouldn't result in a valid html structure. - Of c... | Is there any way to transpose a HTML table using VBA? | html|excel|vba | 2 | 64 | 1 | 73,026,123 | 73,026,123 | 2 | true | 2022-07-18T09:16:21.323Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is there any way to transpose a HTML table using VBA?<p>I have a macro allows me send emails of monthly performance to each manager. Codes are as follow:</p>... |
72,859,581 | ':selected' is not a valid selector<p>i was trying to make a button onclick check so that lists' option classes weren't same:</p>
<pre><code><select name="names1" id="names1">
<option value="1" class="1">option 1</option>
<option value="2" cla... | <p><a href="https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector" rel="nofollow noreferrer">.querySelector()</a> is <em>pure</em> JavaScript and it doesn't have any <code>.attr()</code> chainable Method.<br />
<a href="https://api.jquery.com/attr/" rel="nofollow noreferrer"><code>.attr()</code> is a ... | ':selected' is not a valid selector | javascript|html|jquery | 0 | 64 | 1 | 72,859,776 | 72,859,776 | 2 | true | 2022-07-04T16:15:30.107Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
':selected' is not a valid selector<p>i was trying to make a button onclick check so that lists' option classes weren't same:</p>
<pre><code><select name=... |
72,777,726 | Pandas: How to select the entry with the lowest mean per group?<p>Suppose I have the following dataframe</p>
<pre><code>df = pd.DataFrame([
(2, 2, 'A', .5),
(2, 2, 'A', .6),
(2, 2, 'B', .75),
(2, 2, 'B', .7),
(2, 2, 'C', .6),
(2, 3, 'A', .65),
(2, 3, 'A', .6),
(2, 3, 'B', .75),
(2, ... | <p>You can use a double <code>groupby</code>:</p>
<pre><code>cols = ['out_size', 'problem_size', 'algo']
out = (df
.groupby(cols, as_index=False)['time'].mean()
.sort_values(by='time')
.groupby(cols[:-1], as_index=False).first()
)
</code></pre>
<p>Slightly more efficient alternative that doesn't require to sort the... | Pandas: How to select the entry with the lowest mean per group? | python|pandas | 1 | 64 | 5 | 72,777,827 | 72,777,827 | 2 | true | 2022-06-27T20:02:43.037Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pandas: How to select the entry with the lowest mean per group?<p>Suppose I have the following dataframe</p>
<pre><code>df = pd.DataFrame([
(2, 2, 'A', .... |
72,782,538 | Alternate way to call method<p>I have a generic method that accepts two parameters string and object. It is supposed to invoke a method based on string name. The other parameter is received as object which is basically object parameter of the target method.</p>
<p>I am currently maintaining a dictionary that keeps dict... | <p>If all the methods return <code>string</code> and take no parameters, you can solve this by using a <code>Dictionary<string, Func<string>></code> like so:</p>
<pre><code>Patient patient = new Patient();
// Also instantiate or obtain other classes needed for the dictionary.
Dictionary<string, Func<... | Alternate way to call method | c#|design-patterns|reflection | 1 | 64 | 1 | 72,783,073 | 72,783,073 | 2 | true | 2022-06-28T07:46:10.273Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Alternate way to call method<p>I have a generic method that accepts two parameters string and object. It is supposed to invoke a method based on string name.... |
72,948,090 | How avoid code duplication in visitor and const visitor base classes<p>I have 2 classes <code>ConstVisitorBase</code> and <code>VisitorBase</code> which contain some code to visit objects. for example:</p>
<pre class="lang-cpp prettyprint-override"><code>struct Node
{
enum class Type { ... };
Type type;
}
clas... | <p>Since <code>VisitType1</code> are public and the two classes are unrelated, you can use a template function:</p>
<pre><code>template<typename Visitor, typename T>
void dispatch_visits(Visitor& visitor, T&& node){
switch( node.type )
{
case Node::Type::type1: visitor.VisitType1( node... | How avoid code duplication in visitor and const visitor base classes | c++|software-design|code-duplication | 2 | 64 | 1 | 72,948,176 | 72,948,176 | 2 | true | 2022-07-12T06:47:18.847Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How avoid code duplication in visitor and const visitor base classes<p>I have 2 classes <code>ConstVisitorBase</code> and <code>VisitorBase</code> which cont... |
72,913,010 | How do I establish the Academic Year, when I only have a string date<p>I have a list of dates, in string format, ranging from "01/01/2000" to "31/12/2022". If I assume the academic year runs from 1st September to 31st August, how can I return the academic year, in the format "2018-19"?</... | <p>you could do it in the following way just playing with the year and the formats from the datetime function of the same library.</p>
<pre><code>from datetime import datetime
def give_academic_year(theDate):
if theDate.month > 8:
return '{0}-{1}'.format(theDate.year, int(theDate.strftime('%y'))+1)
... | How do I establish the Academic Year, when I only have a string date | python|datetime | 0 | 64 | 2 | 72,913,806 | 72,913,806 | 2 | true | 2022-07-08T14:35:31.033Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I establish the Academic Year, when I only have a string date<p>I have a list of dates, in string format, ranging from "01/01/2000" to &quo... |
72,869,725 | Response.forEach is not a function Typescript<p>I'm new in programming specially in angular and I'd appreciate it if someone help me with my code, please.</p>
<p>I'm trying to get some images from a web api in angular project.</p>
<ul>
<li>ASP.NET Framework Web API 4.7</li>
<li>Angular CLI: 13.3.7</li>
<li>Angular: 13.... | <p>As you can see in your own swagger screenshot, your response in not an array, it's a list of objects <code>streetBikes</code>, <code>sportBikes</code>.... Each of those objects are list of arrays.</p>
<p>To loop through each property and to create one single array of all bike images, you need something like this:</p... | Response.forEach is not a function Typescript | c#|angular|typescript|asp.net-web-api | 0 | 64 | 2 | 72,869,838 | 72,869,838 | 2 | true | 2022-07-05T12:48:33.957Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Response.forEach is not a function Typescript<p>I'm new in programming specially in angular and I'd appreciate it if someone help me with my code, please.</p... |
73,003,682 | Odoo: How to rename "New" label, in odoo module, in new object form?<p><a href="https://i.stack.imgur.com/rIqrc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rIqrc.png" alt="enter image description here" /></a></p>
<p>when i create a new meeting in calendar module, it shows like "New"
i w... | <p>The <code>New</code> value is defined in the basic model of the form view. To change it you can override the <a href="https://github.com/odoo/odoo/blob/9c19460ce7fb1a16cfeed607e474e273f5ce690b/addons/web/static/src/legacy/js/views/basic/basic_model.js#L716-L726" rel="nofollow noreferrer">getName</a> function like th... | Odoo: How to rename "New" label, in odoo module, in new object form? | odoo|odoo-15 | 1 | 64 | 2 | 73,010,739 | 73,010,739 | 2 | true | 2022-07-16T11:10:28.580Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Odoo: How to rename "New" label, in odoo module, in new object form?<p><a href="https://i.stack.imgur.com/rIqrc.png" rel="nofollow noreferrer"><img src="http... |
72,816,656 | Nullable value types & type safety with 'if not null checking' in c#. Does C# have 'Type promotion'?<p>In other languages (eg Dart), if you do an <code>if (x != null)</code> check then the x will be promoted to a non nullable type. Does c# have type promotion? What are the limitations in C#? eg <code>if (x is Y)</cod... | <p>While the variables being tested aren't promoted themselves, you can expand your use of the <code>is</code> operator slightly to achieve what you're after:</p>
<pre><code>if (result is eColours nonNullResult) {
var description1 = obj.describeColour(nonNullResult);
}
</code></pre>
<p>This syntax combines both the t... | Nullable value types & type safety with 'if not null checking' in c#. Does C# have 'Type promotion'? | c# | 0 | 64 | 1 | 72,816,865 | 72,816,865 | 2 | true | 2022-06-30T13:25:37.877Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Nullable value types & type safety with 'if not null checking' in c#. Does C# have 'Type promotion'?<p>In other languages (eg Dart), if you do an <code>if (x... |
72,890,307 | How to extract webpage data with a node and class in rvest<p>I am performing webscraping on a site and have been able to get basic data, but I now need to collect data from a more complicated part of the page.</p>
<p>I am using rvest to pull data from the AAA gas prices website:</p>
<p><a href="https://gasprices.aaa.co... | <p>It looks like the information you are looking for is store in the "index.php" file that gets downloaded when the web page loads.
The current link for Maine is "https://gasprices.aaa.com/index.php?premiumhtml5map_js_data=true&map_id=21&r=89346&ver=5.9.3".<br />
I am not sure what the r... | How to extract webpage data with a node and class in rvest | css|r|web-scraping|rvest | 3 | 64 | 2 | 72,891,217 | 72,891,217 | 2 | true | 2022-07-06T22:00:02.487Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to extract webpage data with a node and class in rvest<p>I am performing webscraping on a site and have been able to get basic data, but I now need to co... |
72,842,140 | Reading a file - where does '(#<void> ... #<void>) come from?<p>The following code is meant to display read text line-by-line:</p>
<pre><code>#!/usr/bin/env racket
#lang racket/base
(require racket/string)
(require racket/file)
(require racket/file)
(display "Line by line with for loop:\n\n")
(define f &qu... | <p><code>#<void></code> is return value for <code>display</code> function, so <code>'(#<void> #<void> #<void> #<void> #<void> #<void> #<void>)</code> is result of <code>map</code> <code>display</code> over <code>content</code> (<code>map</code> and <code>for</code> both p... | Reading a file - where does '(#<void> ... #<void>) come from? | scheme|racket|void|map-function | 1 | 64 | 2 | 72,842,240 | 72,842,240 | 2 | true | 2022-07-02T20:11:23.097Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Reading a file - where does '(#<void> ... #<void>) come from?<p>The following code is meant to display read text line-by-line:</p>
<pre><code>#!/usr/bin/env ... |
72,770,170 | How to specify a preferred column for items in grid<p>I want to have my <code>blue</code> items prefer to be placed on the left side and all my <code>red</code> items prefer to be placed the right side. All items should start from the first row and if there are more one type, they should be able to use the other column... | <p>Specify the position of the red only and use <code>grid-auto-flow: dense</code>. Then the trick is to consider <code>order</code> as well</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-o... | How to specify a preferred column for items in grid | css|css-grid | 1 | 64 | 1 | 72,771,258 | 72,771,258 | 3 | true | 2022-06-27T09:57:21.707Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to specify a preferred column for items in grid<p>I want to have my <code>blue</code> items prefer to be placed on the left side and all my <code>red</co... |
72,775,443 | Is there a purpose for using a macro that does nothing over an empty macro in c++?<p>Learning c++ and reading through a project, I found this.</p>
<pre><code>#define EMPTY_MACRO do {} while (0)
...
#if ASSERTS_ENABLED
#define ASSERTCORE(expr) assert(expr)
#else
#define ASSERTCORE(expr) EMPTY_MACRO
#endif
</code></pre... | <p>It's there so</p>
<pre><code>ASSERTCORE(expr);
</code></pre>
<p>behaves the same with or without ASSERTS_ENABLED. A plain <code>#define ASSERTCORE(expr)</code> would leave behind a lone <code>;</code> and that would behave differently in some cases.</p> | Is there a purpose for using a macro that does nothing over an empty macro in c++? | c++|c-preprocessor | 2 | 64 | 1 | 72,775,511 | 72,775,511 | 3 | true | 2022-06-27T16:28:27.857Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is there a purpose for using a macro that does nothing over an empty macro in c++?<p>Learning c++ and reading through a project, I found this.</p>
<pre><code... |
72,921,092 | How to wait for x seconds before clicking the next button using Javascript<p>I have this code that clicks on the elements. The purpose of these buttons is to open accordions. It works but I need to modify it a little bit so as to reduce the load on the server. At the moment, all the buttons are clicked at once which ca... | <p>You can change your implementation something 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>const matchBtns = document.querySelectorAll('.classname')
let nextCli... | How to wait for x seconds before clicking the next button using Javascript | javascript | 2 | 64 | 2 | 72,921,219 | 72,921,219 | 3 | true | 2022-07-09T11:47:05.057Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to wait for x seconds before clicking the next button using Javascript<p>I have this code that clicks on the elements. The purpose of these buttons is to... |
72,969,591 | C# Syntax for discard variable and syntax for chaining<p>I have came across the following code:</p>
<pre><code> EnsureGraphForAppOnlyAuth();
_ = _appClient ??
throw new System.NullReferenceException("Graph has not been initialized for app-only auth");
</code></pre>
<p>I understand if _appClient... | <ol>
<li><p><code>_</code> is a valid variable name in C#. Usually, developers use it as a placeholder to denote that 'this is required for the syntax to be valid, but I don't intend to use it'</p>
</li>
<li><p>Apparently it is called a <a href="https://docs.microsoft.com/en-us/dotnet/csharp/fundamentals/functional/di... | C# Syntax for discard variable and syntax for chaining | c# | 0 | 64 | 1 | 72,969,694 | 72,969,694 | 3 | true | 2022-07-13T16:23:49.450Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
C# Syntax for discard variable and syntax for chaining<p>I have came across the following code:</p>
<pre><code> EnsureGraphForAppOnlyAuth();
_ = _appC... |
72,977,800 | What's wrong with this multiplication table printing code (it's working, this is job interview question)?<pre><code>public static void Main()
{
int i, j;
Console.Write(" ");
for (i = 1; i < 10; i++)
Console.Write(String.Format("{0,3:d}", i));
Console.WriteLine();
... | <p>This question might be better asked here: <a href="https://codereview.stackexchange.com/">Code review</a></p>
<ul>
<li>Correctness: it behaves correctly</li>
<li>Readability: simple program, not too bad</li>
<li>Efficiency: not too bad either</li>
<li>Flexibility: poor - I suggest implementing a more generalized met... | What's wrong with this multiplication table printing code (it's working, this is job interview question)? | c#|.net|performance | -2 | 64 | 2 | 72,978,418 | 72,978,418 | 3 | true | 2022-07-14T08:52:12.833Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What's wrong with this multiplication table printing code (it's working, this is job interview question)?<pre><code>public static void Main()
{
int i, j;... |
72,977,135 | In MFC, how to add Buttons according to the user input<p>What I want to achieve is that user can input a number in the Edit Control, and according to that number the exact same number of buttons will be created (in the same dialog would be the best).</p>
<p>How will I be able to achieve that?</p> | <p>Dynamically creating controls with MFC is a two-step process:</p>
<ul>
<li>Construct a C++ class instance that will represent the control by invoking the c'tor (<a href="https://docs.microsoft.com/en-us/cpp/mfc/reference/cbutton-class#cbutton" rel="nofollow noreferrer"><code>CButton::CButton</code></a>)</li>
<li>Con... | In MFC, how to add Buttons according to the user input | c++|mfc | -1 | 64 | 1 | 72,978,419 | 72,978,419 | 3 | true | 2022-07-14T08:00:09.653Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
In MFC, how to add Buttons according to the user input<p>What I want to achieve is that user can input a number in the Edit Control, and according to that nu... |
72,959,509 | Regex match for colon separated string with double quotes and GUID using C#<p>I am trying to find a regex match for possible app IDs such as:</p>
<pre><code>"AppId": "12764ddf-2746-4293-8f63-b79fdc913dca"
"appid": "12764ddf-2746-4293-8f63-b79fdc913dca"
</code></pre>
<p>Currently,... | <p>using @ string, you need to escape " using "".</p>
<pre><code>Regex appIdRegex = new Regex(@"\""appid\""\s*:\s*\""([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\""$", RegexOptions.IgnoreCase);
</code></pre> | Regex match for colon separated string with double quotes and GUID using C# | c#|.net|regex | 0 | 64 | 1 | 72,959,611 | 72,959,611 | 3 | true | 2022-07-12T23:58:16.877Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Regex match for colon separated string with double quotes and GUID using C#<p>I am trying to find a regex match for possible app IDs such as:</p>
<pre><code>... |
72,787,570 | When does a Vec reallocate if no default size is provided?<p>I'm currently learning Rust, and there are some aspects I would like to understand in order to be able to create more efficient code, so the question is, whats the default size of a <code>Vec::new()</code> and when does it reallocate if it exceeds the default... | <blockquote>
<p>whats the default size of a <code>Vec::new()</code></p>
</blockquote>
<p><a href="https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.new" rel="nofollow noreferrer">Zero</a>:</p>
<blockquote>
<p>The vector will not allocate until elements are pushed onto it.</p>
</blockquote>
<blockquote>
<p... | When does a Vec reallocate if no default size is provided? | rust|vec | 0 | 64 | 2 | 72,787,776 | 72,787,776 | 4 | true | 2022-06-28T13:44:06.543Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
When does a Vec reallocate if no default size is provided?<p>I'm currently learning Rust, and there are some aspects I would like to understand in order to b... |
72,867,798 | Bluetooth still active after app killed using react native<p>I have a problem with the lifecycle of Bluetooth on iOS.<br />
We are using React Native and the following library (<a href="https://github.com/innoveit/react-native-ble-manager" rel="nofollow noreferrer">https://github.com/innoveit/react-native-ble-manager</... | <blockquote>
<p>Is this a normal behaviour on iOS ? (the fact that the ble stays open for some time after the app is killed, and no errors are sent through ble ?)</p>
</blockquote>
<p>Yes, this is normal. The OS holds open the connection and shares it with apps. The apps do not hold connections directly. It can take so... | Bluetooth still active after app killed using react native | react-native|bluetooth|bluetooth-lowenergy|ios-bluetooth | 2 | 64 | 1 | 72,871,080 | 72,871,080 | 4 | true | 2022-07-05T10:23:09.870Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Bluetooth still active after app killed using react native<p>I have a problem with the lifecycle of Bluetooth on iOS.<br />
We are using React Native and the... |
72,924,671 | Bash prompt display username starting with $<p>I have registered some linux machines intro AD with sssd and it works great, but I have an issue with the bash prompt. Some AD usernames start with $ and the prompt refuses to display it, so now I'm left with the string similar to <code>@servername:~$</code></p>
<p>If I do... | <p>This is more of a Linux configuration question and would work better in <a href="https://unix.stackexchange.com">unix.stackexchange.com</a> or <a href="https://askubuntu.com">askubuntu</a>, but generally to change default user configuration you'd want to edit the files in <code>/etc/skel</code>.</p> | Bash prompt display username starting with $ | linux|bash | 0 | 64 | 1 | 72,941,562 | 72,941,562 | 4 | true | 2022-07-09T21:13:29.627Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Bash prompt display username starting with $<p>I have registered some linux machines intro AD with sssd and it works great, but I have an issue with the bash... |
72,883,240 | Cleaner Way to Write This jQuery?<p>I have a full-page menu that opens on a button click with two different sections. The content in #terms doesn't change, but the content in #links does, based on which button you click. The code itself works fine, but the jQuery feels incredibly bulky and I was wondering if anyone cou... | <p>Using a data attribute and a common selector, you can replace all the clicks into one.</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>$("button[data-toggles]").on("click", ... | Cleaner Way to Write This jQuery? | javascript|html|jquery | 0 | 64 | 2 | 72,883,339 | 72,883,339 | 5 | true | 2022-07-06T12:01:32.510Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Cleaner Way to Write This jQuery?<p>I have a full-page menu that opens on a button click with two different sections. The content in #terms doesn't change, b... |
72,856,542 | What is the best way to send data using an API to a springboot server using flutter?<p>I'm working on a flutter mobile app and I'm wondering about the cleanest way to send data to a springboot server.</p> | <pre><code>**you can use dio packge for any kind of apis its easy and best and you do not need any kind maping it will be by dio package own its own **
import 'package:flutter/material.dart';
import 'package:fluttertoast/fluttertoast.dart';
import 'package:dio/dio.dart';
import 'package:shared_preferences/shared_prefer... | What is the best way to send data using an API to a springboot server using flutter? | spring|flutter|spring-boot | -1 | 64 | 3 | 72,857,178 | 72,857,178 | -1 | true | 2022-07-04T12:11:32.283Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What is the best way to send data using an API to a springboot server using flutter?<p>I'm working on a flutter mobile app and I'm wondering about the cleane... |
72,923,002 | Dot in SQL Server query<p>I don't understand what's the difference between table name / schema name? Because I have connected to AdventureWorks database and then I wrote this query. So in this does this <code>HR.Employee</code> mean a table or something else?</p>
<pre><code>select * from HR.Employee
</code></pre> | <p>I think the question is valid and far from trivial. Here's a big picture perspective.</p>
<p>In general, a database object is identified by a 4 part name. The "servername" is really an instance name. Brackets are optional if the naming follows the rules for naming identifiers. If a named instance, brac... | Dot in SQL Server query | sql-server|schema | -3 | 64 | 1 | 72,923,784 | 72,923,784 | -1 | true | 2022-07-09T16:24:25.037Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Dot in SQL Server query<p>I don't understand what's the difference between table name / schema name? Because I have connected to AdventureWorks database and ... |
72,771,688 | Get list of SHIR from cloud shell<p>We create multiple SHIR’s in our organization for different purposes. I would like to know, how to get list of all SHIR’s created by X user. E.g., I want to get list of all Self Hosted IR’s created by me from Azure cloud shell?</p> | <p>There is no direct command, but you can try below command to get list of IR’s created by particular User.</p>
<p>When creating Self hosted IR, add the name of user in description. Then find the list of SHIR’s from Azure cloud shell using below command</p>
<pre><code>Get-AzDataFactoryV2IntegrationRuntime -ResourceGro... | Get list of SHIR from cloud shell | azure|azure-data-factory | 0 | 65 | 1 | 72,772,114 | 72,772,114 | 0 | true | 2022-06-27T11:56:36.060Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Get list of SHIR from cloud shell<p>We create multiple SHIR’s in our organization for different purposes. I would like to know, how to get list of all SHIR’s... |
72,783,526 | SwiftUI : Is there a way to force a Shape to rotate with the phone?<p>SwiftUI : Is there a way to force a Shape (a View of type "Shape") to rotate with the phone (as opposed to rotate automatically) so that it keeps its original orientation with respect to the screen of the phone?</p>
<pre><code>
// Symbol Ho... | <p>First, you need the current orientation...</p>
<pre><code>struct DeviceRotationViewModifier: ViewModifier {
let action: (UIDeviceOrientation) -> Void
func body(content: Content) -> some View {
content
.onAppear()
.onReceive(NotificationCenter.default.publisher(for: UIDevice.orientation... | SwiftUI : Is there a way to force a Shape to rotate with the phone? | swiftui|shapes | 1 | 65 | 1 | 72,784,591 | 72,784,591 | 0 | true | 2022-06-28T08:57:30.550Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SwiftUI : Is there a way to force a Shape to rotate with the phone?<p>SwiftUI : Is there a way to force a Shape (a View of type "Shape") to rotate ... |
72,775,420 | Update java version in Camunda Platform<p>I would like to upgrade Java JDK from 1.8.0_212 to 1.11.0 in Camunda Platform. I am using Camunda 7.11.0 and deploying it as container. Kindly help me on this.</p> | <p>As this is Official Docker image from Camunda you can try this</p>
<ol>
<li>Clone the camunda repo <a href="https://github.com/camunda/docker-camunda-bpm-platform" rel="nofollow noreferrer">https://github.com/camunda/docker-camunda-bpm-platform</a></li>
<li>Switch/checkout to specific version branch/tag 7.11.0</li>
... | Update java version in Camunda Platform | java|camunda | 0 | 65 | 1 | 72,790,816 | 72,790,816 | 0 | true | 2022-06-27T16:26:51.870Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Update java version in Camunda Platform<p>I would like to upgrade Java JDK from 1.8.0_212 to 1.11.0 in Camunda Platform. I am using Camunda 7.11.0 and deploy... |
72,790,768 | Changing variables, maps and lists in another class<p>I'm supposed to implement twistPlot.</p>
<p>I tried:</p>
<ol>
<li><p>_friends.getMembers().put("Philip", teacher);</p>
</li>
<li><p>_friends.getMembers().remove("Tommy");</p>
</li>
<li><p>_pippi.getPets().remove(0);</p>
</li>
<li><p>_pippi.getPet... | <p>Your step 1, 2, 3 looks correct. There's something wrong with the index in step 4.</p>
<p>Initially, Pippi has two pets: Herr Nilsson and Kleiner Onkel. After <code>_pippi.getPets().remove(0);</code>, Pippi has only one pets now (<code>_pippi.getPets().size() == 1</code>), and "Kleiner Onkel" becomes the f... | Changing variables, maps and lists in another class | java | -1 | 65 | 1 | 72,794,593 | 72,794,593 | 0 | true | 2022-06-28T17:22:47.297Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Changing variables, maps and lists in another class<p>I'm supposed to implement twistPlot.</p>
<p>I tried:</p>
<ol>
<li><p>_friends.getMembers().put("Ph... |
72,808,278 | Flutter - something in pageController is null inside a Consumer widget<p>I am using <code>hooks_riverpod</code> package and am experiencing an error while trying to access <code>pageController</code>'s methods from inside a <code>Consumer</code> widget.<br />
The same method calls work from anywhere else in the file.</... | <p>You should not call animate method inside the build method of the Consumer. This may be triggering unwanted rebuilds and throwing some abnormal states and resulting in error.</p>
<p>Try calling the <code>pageController.animateToPage</code> method in the place where you call <code>TestProvider.setPageIndex</code>.</p... | Flutter - something in pageController is null inside a Consumer widget | flutter|dart|riverpod|flutter-pageview | 0 | 65 | 1 | 72,809,154 | 72,809,154 | 0 | true | 2022-06-29T21:56:11.820Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Flutter - something in pageController is null inside a Consumer widget<p>I am using <code>hooks_riverpod</code> package and am experiencing an error while tr... |
72,811,304 | Connecting on-premise to AWS<p>Can anyone tell the difference between AWS DataSync, database migration service (DMS), storage gateway, direct connect and site-to-site VPN connect? As all these are used to connect with on-premises servers.</p> | <p><a href="https://docs.aws.amazon.com/datasync/latest/userguide/how-datasync-works.html" rel="nofollow noreferrer">AWS DataSync</a> is responsible for <strong>copying files</strong> and ensuring that they were copied correctly. Think of it as a robust <code>robocopy</code> command.</p>
<blockquote>
<p>AWS DataSync is... | Connecting on-premise to AWS | amazon-web-services|aws-dms|aws-direct-connect|aws-storage-gateway|aws-site-to-site | -3 | 65 | 1 | 72,812,007 | 72,812,007 | 0 | true | 2022-06-30T06:42:18.057Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Connecting on-premise to AWS<p>Can anyone tell the difference between AWS DataSync, database migration service (DMS), storage gateway, direct connect and sit... |
72,807,093 | How to handle invalid XML response with utf-16 header over a utf-8 stream<p>I'm getting the following error in when trying to read some XML.</p>
<pre><code>Exception has occurred: CLR/System.Xml.XmlException
Exception thrown: 'System.Xml.XmlException' in System.Private.Xml.dll: 'There is no Unicode byte order mark. Can... | <p>Thank you for the comments. Using them I have been able to test that simply instantiating and passing a StreamReader is all that is required to stop the XmlReader interpreting the encoding meta in the document type definition.</p>
<pre><code>var mockBytes = System.Text.Encoding.UTF8.GetBytes("<?xml version=... | How to handle invalid XML response with utf-16 header over a utf-8 stream | c#|xmlreader | 0 | 65 | 1 | 72,812,203 | 72,812,203 | 0 | true | 2022-06-29T19:51:05.270Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to handle invalid XML response with utf-16 header over a utf-8 stream<p>I'm getting the following error in when trying to read some XML.</p>
<pre><code>E... |
72,789,284 | PHP Curl array post fields including a file upload<p>I need to do the following using PHP curl:</p>
<pre><code>curl "https://the.url.com/upload"
-F file="@path/to/the/file"
-F colours[]="red"
-F colours[]="yellow"
-F colours[]="blue"
</code></pre>
<p>The code I ... | <p>While the answer from @vee should have worked, this came down to validation on this particular server application. After consulting with the vender, I ended up having to do this:</p>
<pre><code>$headers = ['Content-type: multipart/form-data'];
$postFields = [
// NEEDED TO INCLUDE THE MIME TYPE
'file' => cu... | PHP Curl array post fields including a file upload | php|curl|upload | -1 | 65 | 2 | 72,812,701 | 72,812,701 | 0 | true | 2022-06-28T15:28:28.527Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
PHP Curl array post fields including a file upload<p>I need to do the following using PHP curl:</p>
<pre><code>curl "https://the.url.com/upload"
... |
72,816,286 | How to add a custom domain to IBM cloud engine<p>we are migrating from IBM Cloud Foundry Orgs (as they are <a href="https://cloud.ibm.com/docs/cloud-foundry-public?topic=cloud-foundry-public-deprecation" rel="nofollow noreferrer">depreciated</a>) to ibm cloud engine.</p>
<p>but what seems impossible is the "route... | <p>At the moment that is not possible. That being said the Code Engine team is working on a solution to enable this without requiring requiring an extra service (although the proposed cloudflare service in the blog is free AFAIK)</p> | How to add a custom domain to IBM cloud engine | ibm-cloud|cloudflare|ibm-cloud-code-engine | 0 | 65 | 2 | 72,816,575 | 72,816,575 | 0 | true | 2022-06-30T13:00:30.713Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to add a custom domain to IBM cloud engine<p>we are migrating from IBM Cloud Foundry Orgs (as they are <a href="https://cloud.ibm.com/docs/cloud-foundry-... |
72,828,380 | how to stop button play when click to play another button in elementor<p>im using wordpress with elementor i created multiple buttons that when clicked play a sound effect but my problem is when 1 button clicked and at the same time when button 1 playing if i clicked the button 2 also will play along side with button 1... | <p>If you have both buttons code's on the same script you can try this:</p>
<pre><code><script>
$(document).ready(function() {
//Audio 1 Starts
var audio1 = new Audio('Sound-Effect-URL')
var audio2 = new Audio('Sound-Effect-URL2')
$(".button-class").mousedown(function() {
audio2.pause();
... | how to stop button play when click to play another button in elementor | javascript|html|jquery|wordpress|elementor | 1 | 65 | 1 | 72,828,948 | 72,828,948 | 0 | true | 2022-07-01T11:11:54.147Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to stop button play when click to play another button in elementor<p>im using wordpress with elementor i created multiple buttons that when clicked play ... |
72,829,236 | Vala - Bytes convert to string?<p>I have a <strong>GLib.Bytes</strong> object.</p>
<p>I want to print it and use it as a <strong>string</strong> like this:</p>
<pre class="lang-cs prettyprint-override"><code>Bytes bytes = new Bytes({65, 66, 67});
print(bytes); // <-- ERROR
</code></pre>
<p>How can I convert it to s... | <p>Get <strong>raw byte array</strong> <code>uint8[]</code> with <a href="https://valadoc.org/glib-2.0/GLib.Bytes.get_data.html" rel="nofollow noreferrer">Bytes.get_data()</a> and <strong>cast</strong> it as string.</p>
<p>Example:</p>
<pre class="lang-cs prettyprint-override"><code>Bytes bytes = new Bytes({65, 66, 67}... | Vala - Bytes convert to string? | string|byte|vala | 1 | 65 | 1 | 72,829,237 | 72,829,237 | 0 | true | 2022-07-01T12:24:59.030Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Vala - Bytes convert to string?<p>I have a <strong>GLib.Bytes</strong> object.</p>
<p>I want to print it and use it as a <strong>string</strong> like this:</... |
72,849,262 | Query categories on ACF Taxonomy<p>I have created a custom field (taxonomy) on the category object, in order to categorize the categories, so to speak. But I don't know how to query categories based on this custom field.</p>
<p>My custom field is called "custom_parent" and the slug for the chosen value is &qu... | <p>To fetch terms of taxonomies( in your case category ) based on a custom field (or meta). You can use <a href="https://developer.wordpress.org/reference/classes/wp_meta_query/" rel="nofollow noreferrer">Meta Query</a></p>
<p>For your case: this code should work fine.</p>
<pre><code>$args = [
'meta_query' => [
... | Query categories on ACF Taxonomy | wordpress|advanced-custom-fields | 0 | 65 | 1 | 72,849,863 | 72,849,863 | 0 | true | 2022-07-03T19:15:36.010Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Query categories on ACF Taxonomy<p>I have created a custom field (taxonomy) on the category object, in order to categorize the categories, so to speak. But I... |
72,855,309 | Initialize deque efficiently<p>I am using a <code>deque</code> to store data that is going to be processed. The processing only starts when the deque is full so in a first step I fill my buffer the following way:</p>
<pre><code>from collections import deque
import numpy as np
my_deque = deque(maxlen=10)
dims = (20, 20... | <p>@MichaelSzczesny's comment was the right answer, it seems to have been deleted so I post it here:</p>
<pre><code>from collections import deque
import numpy as np
my_deque = deque(maxlen=10)dims = (10, 20, 20)
my_deque.extend(np.ones(dims))
</code></pre> | Initialize deque efficiently | python|numpy|copy|deque | 0 | 65 | 1 | 72,858,644 | 72,858,644 | 0 | true | 2022-07-04T10:29:00.067Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Initialize deque efficiently<p>I am using a <code>deque</code> to store data that is going to be processed. The processing only starts when the deque is full... |
72,857,467 | How to make one button visible when another is clicked in Flutter/Dart?<p>I know how to make elements visible or invisible using the Visibility widget. Here is my code:</p>
<pre><code>// New Game route
class NewGameRoute extends StatelessWidget {
const NewGameRoute({key});
@override
Widget build(BuildContext con... | <p>Provide you the whole code, check this out::</p>
<pre><code>import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {... | How to make one button visible when another is clicked in Flutter/Dart? | flutter|dart|flutter-layout | -1 | 65 | 3 | 72,864,608 | 72,864,608 | 0 | true | 2022-07-04T13:22:44.770Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to make one button visible when another is clicked in Flutter/Dart?<p>I know how to make elements visible or invisible using the Visibility widget. Here ... |
72,799,096 | Is it possible to send logs from a ubuntu to Loki?<p>We are using Azure DevOps to run various pipelines, and I would like to send these logs to a Loki instance. It is possible simply to send all STDOUT from an Ubuntu machine to Loki?</p> | <p>I found out that you can use the <a href="https://docs.microsoft.com/en-us/rest/api/azure/devops/build/builds?view=azure-devops-rest-7.1" rel="nofollow noreferrer">Azure DevOps REST API</a> to download your pipeline logs. So we have just gone with writing a small kubernetes-cronjob that downloads the pipeline logs b... | Is it possible to send logs from a ubuntu to Loki? | ubuntu|logging|azure-devops|grafana|loki | 0 | 65 | 2 | 72,865,839 | 72,865,839 | 0 | true | 2022-06-29T09:34:59.200Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is it possible to send logs from a ubuntu to Loki?<p>We are using Azure DevOps to run various pipelines, and I would like to send these logs to a Loki instan... |
72,862,861 | How to show new window when href from Edge IE Mode to Edge<p>In Edge IE Mode, when a new window is forced to appear on MS Edge, it is added to a new tab rather than a pop-up.</p>
<p>How to show new window when href from Edge IE Mode to Edge??</p>
<p>---add--
If i have to force Edge to run in IE Mode, I want to pop up i... | <p>First, if you don't configure the site in the IE mode list, it will open the site in Microsoft Edge instead of Edge IE mode by default.</p>
<p>Second, if you need to open a new window, you can add height and width to the <code>windowFeatures</code> parameter in <code>window.open()</code>, like this:</p>
<pre><code>f... | How to show new window when href from Edge IE Mode to Edge | internet-explorer | 0 | 65 | 1 | 72,866,226 | 72,866,226 | 0 | true | 2022-07-04T23:57:53.590Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to show new window when href from Edge IE Mode to Edge<p>In Edge IE Mode, when a new window is forced to appear on MS Edge, it is added to a new tab rath... |
72,872,588 | cast object Task<ActionResult<T>> where T is Type variable<p>I'm making a unit test class with a config file.
I have similar object (same interfaces) to check.</p>
<p>At a point of my code I get <em>Task<ActionResult<OneOfMyObjectType>></em> object by using reflection. my issue is to read the Result I have ... | <p>Without more information, my guess is that <em>Controller.Method</em> returns a <em>Task</em>, and that you're trying to cast the result from the method as <em>Task<ActionResult></em>.</p>
<p>All you need to here is two casts, one that matches the return type from the method, and one on the Task's result that ... | cast object Task<ActionResult<T>> where T is Type variable | c#|.net-core|reflection | 1 | 65 | 1 | 72,873,187 | 72,873,187 | 0 | true | 2022-07-05T16:13:59.073Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
cast object Task<ActionResult<T>> where T is Type variable<p>I'm making a unit test class with a config file.
I have similar object (same interfaces) to chec... |
72,881,570 | Class "Illuminate\Foundation\Auth\Student" not found error in laravel new version<p>I'm new to laravel framework and I'm trying to insert records into users table and students table. The following query works in users table but in the latter showing error Class "Illuminate\Foundation\Auth\Student" not found .... | <p>you have to just replace <code>use Illuminate\Foundation\Auth\Student as Authenticatable;</code> to <code>use Illuminate\Foundation\Auth\User as Authenticatable;</code></p>
<p><strong>Student.php</strong></p>
<pre><code><?php
...
...
...
use Illuminate\Foundation\Auth\User as Authenticatable;
...
...
...
class St... | Class "Illuminate\Foundation\Auth\Student" not found error in laravel new version | php|laravel-8 | -1 | 65 | 1 | 72,881,793 | 72,881,793 | 0 | true | 2022-07-06T10:05:41.680Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Class "Illuminate\Foundation\Auth\Student" not found error in laravel new version<p>I'm new to laravel framework and I'm trying to insert records into users ... |
72,875,676 | React-Boostrap [set dropdown menu width to the same size as dropdown when changes]<p>iam trying to set the dropdown menu width dynamically to the exact same size like the whole dropdown, when it changes. How do i get the width oft the dropdown itself?</p>
<p>I also tried to align the dropdown menu to the "end"... | <p>Make your outer container inline-block and give the dropdown menu 100% width. for example:</p>
<pre><code> <Dropdown className="d-inline-block">
...
<Dropdown.Menu className="w-100">
</code></pre>
<p><a href="https://codesandbox.io/s/modest-galois-z2xnlk" rel="nofollow noreferrer... | React-Boostrap [set dropdown menu width to the same size as dropdown when changes] | reactjs|react-bootstrap | 0 | 65 | 1 | 72,883,241 | 72,883,241 | 0 | true | 2022-07-05T21:22:35.347Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
React-Boostrap [set dropdown menu width to the same size as dropdown when changes]<p>iam trying to set the dropdown menu width dynamically to the exact same ... |
72,883,424 | Populate array by recycling a smaller array starting with a particular value<p>I need to populate an array with a predefined number of elements (<code>$vacancies</code>) using a pre-existing array of values (<code>$list_order_id</code>).</p>
<p>The source array may not contain enough values to meet the required number ... | <p>You have supplied the lookup array, the number of iterations, and the value before the starting value.</p>
<p>The only things left to do are:</p>
<ol>
<li>Find the count of the lookup,</li>
<li>Find the index of the last value in the lookup,</li>
<li>Loop the expressed number of times,</li>
<li>Use a modulus calcula... | Populate array by recycling a smaller array starting with a particular value | php|arrays|loops|while-loop|modulo | 0 | 65 | 2 | 72,887,445 | 72,887,445 | 0 | true | 2022-07-06T12:16:48.243Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Populate array by recycling a smaller array starting with a particular value<p>I need to populate an array with a predefined number of elements (<code>$vacan... |
72,894,500 | How to add animate on scroll effect to fetched data react<h1>Context:</h1>
<p>I want to add an AOS-effect to multiple divs filled with data from a server, which are rendered after the initial render:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet... | <p>I found the error. I had to import the aos css files as well:</p>
<pre><code>import AOS from "aos";
import "aos/dist/aos.css";
</code></pre> | How to add animate on scroll effect to fetched data react | javascript|reactjs|animation|animate-on-scroll | 0 | 65 | 3 | 72,894,637 | 72,894,637 | 0 | true | 2022-07-07T08:21:05.113Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to add animate on scroll effect to fetched data react<h1>Context:</h1>
<p>I want to add an AOS-effect to multiple divs filled with data from a server, wh... |
72,897,518 | Find data by today's date in mongoose<p>I have data like this in my database. I want to get data by today's date. I have described my problem here.</p>
<pre><code>"todayOrders": [
{
"_id": "62c5746105e721df2619d84f",
"invoiceId": "... | <p>You need to create the correct start and end times. You can use moment.js to do it easily or you can create a start date for today.</p>
<pre><code>const start = new Date().toDateString();
const todayOrders = await Order.find({
createdAt: {$gte : start } // it will get you records for today's date only
... | Find data by today's date in mongoose | node.js|mongodb|express|mongoose|mongodb-query | 0 | 65 | 1 | 72,897,702 | 72,897,702 | 0 | true | 2022-07-07T12:04:24.197Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Find data by today's date in mongoose<p>I have data like this in my database. I want to get data by today's date. I have described my problem here.</p>
<pre>... |
72,876,786 | SuiteScript 1.0 Get assemblyitem itemid from work order record search<p>I'm currently trying to build a RESTlet script that will run daily to sync new work order data over from NetSuite to another web application (Tulip) for production. I am attempting to get the itemid for an assembly item in the work orders so that I... | <blockquote>
<p>this script outputs for each work order 6 times</p>
</blockquote>
<p>Add a filter for Main Line = Yes so that only the header information is returned to avoid this. This will give one line per record, with only the assembly item shown and filter out the component lines.</p>
<blockquote>
<p>I'm unsure h... | SuiteScript 1.0 Get assemblyitem itemid from work order record search | netsuite|suitescript | 0 | 65 | 2 | 72,901,050 | 72,901,050 | 0 | true | 2022-07-06T00:29:16.740Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SuiteScript 1.0 Get assemblyitem itemid from work order record search<p>I'm currently trying to build a RESTlet script that will run daily to sync new work o... |
72,912,770 | Is it possible to use amazon cognito to authenticate a Private API?<p>I need to develop a private API Gateway at the company where I work.</p>
<p>What left me in doubt is that when using amazon cognito's OAUTH2.0, it generates a URL for authentication.</p>
<p>But I didn't find anything on the web talking about such an ... | <p>You can have a private api with public authentication, but there is no concept of private authentication with the Cognito User Pools hosted UI. End users will be able to authenticate, but not call your api unless they are in the VPC. This <a href="https://aws.amazon.com/blogs/security/protect-public-clients-for-am... | Is it possible to use amazon cognito to authenticate a Private API? | amazon-web-services|oauth-2.0|amazon-cognito | 0 | 65 | 1 | 72,915,679 | 72,915,679 | 0 | true | 2022-07-08T14:17:54.017Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is it possible to use amazon cognito to authenticate a Private API?<p>I need to develop a private API Gateway at the company where I work.</p>
<p>What left m... |
72,921,186 | create an object of objects using FOR Loop<p>I am trying to create a JSON object in javascript (node-red) in this format:</p>
<pre><code>gaugeData.channel.degrees:
gaugeData = {
ch1: {10: 'value',
20: 'value',
...
360: 'value'}
ch2: {10: 'value',
20: 'value',
... | <p>You basically have it, just store the values in a parent object before calling the next iteration of each for loop. Example:</p>
<pre><code>const createChannels = () =>{
const topObj = {}
for(let i = 1; i <= 8; i++){
const botObj = {}
for(let c = 10; c <= 360; c += 10){
botObj[c] = Math.fl... | create an object of objects using FOR Loop | javascript|node-red | -1 | 65 | 2 | 72,921,398 | 72,921,398 | 0 | true | 2022-07-09T12:00:11.343Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
create an object of objects using FOR Loop<p>I am trying to create a JSON object in javascript (node-red) in this format:</p>
<pre><code>gaugeData.channel.de... |
72,922,614 | How to check if an array of strings contains all elements of the array?<p>I have an array of strings array1 , and array2 to compare.
How to check for the occurrence of all elements in strict accordance and create a new array.
I understand that in my case it is necessary to apply filter + includes.
I have seen the answe... | <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>const array1 = [ 'apple_mango_banana', 'mango_apple_banana', 'apple_banana' ]
const array2 = [ 'apple', 'mango' ]
const goal = [ 'a... | How to check if an array of strings contains all elements of the array? | javascript|arrays | 0 | 65 | 2 | 72,922,934 | 72,922,934 | 0 | true | 2022-07-09T15:25:51.353Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to check if an array of strings contains all elements of the array?<p>I have an array of strings array1 , and array2 to compare.
How to check for the occ... |
72,923,865 | Missing part of the data in graph<p>I'm writing a program which will show the candlestick chart of Gold and detect patterns. I'm getting the data from yfinance and trying to draw the chart with plotly, but I see that some parts of the data are missing. I checked the data with mplfinance and everything worked successful... | <p>I don't have the code for <code>mplfinance</code> so I don't know, but I think <code>nontarading=True</code> is set and the gap is automatically removed. plotly has a feature for market holidays and nighttime exclusions. Since your time series data is in 5 minute increments, set dvalue=1000ms<em>60sec</em>60min minu... | Missing part of the data in graph | python|pandas|plotly|data-science | 0 | 65 | 2 | 72,925,608 | 72,925,608 | 0 | true | 2022-07-09T18:48:19.253Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Missing part of the data in graph<p>I'm writing a program which will show the candlestick chart of Gold and detect patterns. I'm getting the data from yfinan... |
72,926,687 | How can I find and replace value in a code block on jupyter in vs code<p>I am coding python jupyter on vs code. I am finding the way to find and replace in current selected code block</p>
<p>For example</p>
<pre><code>bl[(bl.uom_pallet == 0) & (bl.UOM == 'BG')]['uom_pallet'] = bl[(bl.uom_pallet > 0) & (bl.UO... | <p><strong>Here is my suggestion:</strong></p>
<ol>
<li><p>Use the mouse to select the area you want to replace</p>
<p><a href="https://i.stack.imgur.com/IfeWj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IfeWj.png" alt="enter image description here" /></a></p>
</li>
<li><p>Then use <kbd>CTRL</kbd... | How can I find and replace value in a code block on jupyter in vs code | python|visual-studio-code|jupyter-notebook | 1 | 65 | 1 | 72,933,112 | 72,933,112 | 0 | true | 2022-07-10T06:56:28.727Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I find and replace value in a code block on jupyter in vs code<p>I am coding python jupyter on vs code. I am finding the way to find and replace in c... |
72,933,443 | Python -- Why are my if statements not running inside while loop?<p>I'm new to python and decided to practice by building a game similar to snake with the turtle library. I was able to initiate the turtle to continually move forward with a while True loop, but now I'm having trouble with getting the turtle to break thi... | <p>Try this approach to move:</p>
<pre><code>def forward():
turtle.forward(how-many-pixels-forward)
turtle.onkey(forward,'what-key-you-want-to-listen-to') #when key pressed call forward function
</code></pre>
<p><a href="https://www.geeksforgeeks.org/turtle-onkey-function-in-python/" rel="nofollow noreferrer">htt... | Python -- Why are my if statements not running inside while loop? | python|conditional-statements | 1 | 65 | 2 | 72,933,657 | 72,933,657 | 0 | true | 2022-07-11T03:34:47.417Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python -- Why are my if statements not running inside while loop?<p>I'm new to python and decided to practice by building a game similar to snake with the tu... |
72,940,651 | How to change DRF endpoints's required fields<p>I am using jwt.io on my DRF project. As you know jwt.io has already a Login API view called 'TokenObtainPairView' and it requires 2 fields: username and password. But in our project, we want users to log in with their email instead of their username. I handle this with th... | <p>I think if you don't need the username you can define your own user model like this.</p>
<p>The USERNAME_FIELD = 'email' on user model says to Django that use the email as username.</p>
<p>Don't forget change settings.py to use your own user model adding this const: AUTH_USER_MODEL = 'users.User' where users is the ... | How to change DRF endpoints's required fields | django|django-rest-framework|drf-yasg | 1 | 65 | 2 | 72,941,280 | 72,941,280 | 0 | true | 2022-07-11T15:03:29.653Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to change DRF endpoints's required fields<p>I am using jwt.io on my DRF project. As you know jwt.io has already a Login API view called 'TokenObtainPairV... |
72,920,810 | How build lib for 386 arch with cgo on windows?<p>I have a golang library that builds and works well on Linux, MacOs and Windows. The problem comes when I'm trying to build it for 386 on the amd64 Windows VM. I've installed latest golang SDK and mingw, which makes amd64 build work fine, but not the 386:</p>
<pre><code>... | <p>I've found the diff in the project description and switched to <a href="https://www.mingw-w64.org/" rel="nofollow noreferrer">https://www.mingw-w64.org/</a>. It contains libs for both arch 386 and x64. Now across compilation works fine to me.</p> | How build lib for 386 arch with cgo on windows? | windows|go|mingw|cross-platform | 2 | 65 | 2 | 72,942,854 | 72,942,854 | 0 | true | 2022-07-09T11:01:45.437Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How build lib for 386 arch with cgo on windows?<p>I have a golang library that builds and works well on Linux, MacOs and Windows. The problem comes when I'm ... |
72,943,105 | Can't bind to 'ngSelected' since it isn't a known property of 'option' - Angular 14<p>I have a <code>select</code> with an option im trying to auto-select.</p>
<p>Here is the HTML</p>
<pre class="lang-html prettyprint-override"><code><select class="form-select" formControlName="role">
<... | <p>I found the solution.
In my code, I was using the <code>[value]</code> with the <code>[selected]</code></p>
<p>I removed the <code>[value]</code> and now the <code>[selected]</code> works.</p>
<pre><code><option *ngFor="let r of this.roles" [selected]="this.user.role.id == r.id">
{{r.na... | Can't bind to 'ngSelected' since it isn't a known property of 'option' - Angular 14 | html|angular|forms|html-select | 0 | 65 | 1 | 72,943,494 | 72,943,494 | 0 | true | 2022-07-11T18:31:27.963Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Can't bind to 'ngSelected' since it isn't a known property of 'option' - Angular 14<p>I have a <code>select</code> with an option im trying to auto-select.</... |
72,946,927 | How to create a new array for each unique key in an array of objects<p>I have an array of objects like so:</p>
<pre><code>originalArray = [
{ "16": { "id": 23, "data": "11",}, "17": { "id": 28, "data": "25",},..., "header": &q... | <p>You can create an object with desired properties and add the values there, then you can simply change it to array if you need it in that format</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 prettypri... | How to create a new array for each unique key in an array of objects | javascript|arrays|json|foreach | 0 | 65 | 3 | 72,947,002 | 72,947,002 | 0 | true | 2022-07-12T04:07:50.630Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to create a new array for each unique key in an array of objects<p>I have an array of objects like so:</p>
<pre><code>originalArray = [
{ "16&qu... |
72,948,350 | Building this implementation of IHostBuilder is not supported<p>I am trying configure IHostBuilder and getting following error.</p>
<blockquote>
<p>Building this implementation of IWebHostBuilder is not supported.</p>
</blockquote>
<p>I am not sure why this is complaining about IHostBuilder.
My IHostBuilder configurati... | <p>remove these two lines</p>
<pre><code> .Build()
.Run();
</code></pre>
<p>it should part of main method</p>
<pre><code> public static void Main(string[] args)
{
CreateHostBuilder(args).Build().Run();
}
</code></pre> | Building this implementation of IHostBuilder is not supported | c#|.net|asp.net-core|asp.net-core-webapi|kestrel | 0 | 65 | 1 | 72,948,768 | 72,948,768 | 0 | true | 2022-07-12T07:10:39.823Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Building this implementation of IHostBuilder is not supported<p>I am trying configure IHostBuilder and getting following error.</p>
<blockquote>
<p>Building ... |
72,959,727 | How to control tooltips for TypeScript types to make them more useful?<p>Is it possible / how can one control typescript's produced tooltips? Below is an example of of my requirement:</p>
<pre class="lang-js prettyprint-override"><code>type DontShowThisRedundantType<T, R = T extends ()=>infer X ? X : never> =... | <p>Destructure the type! e.g:</p>
<pre class="lang-js prettyprint-override"><code>type DontShowThisRedundantType<T, R = T extends ()=>infer X ? X : never> = (arg: R)=>void
type FnSwappedToArrray<T extends ()=>any, R = DontShowThisRedundantType<T>> = [(...args: R extends (...arg0: infer S)=>... | How to control tooltips for TypeScript types to make them more useful? | typescript|intellisense | 0 | 65 | 2 | 72,959,841 | 72,959,841 | 0 | true | 2022-07-13T00:40:14.287Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to control tooltips for TypeScript types to make them more useful?<p>Is it possible / how can one control typescript's produced tooltips? Below is an ex... |
72,960,718 | kusto: Calcuating duration<p>I have a kusto table where I will receive data every 2 hours. I need to find the start and end time for a given data. Here, endtime should be determined by the system by seeing if the data is not present for that message.</p>
<p>Eg:</p>
<pre><code>Id Name Timestamp
1 A 07-12-2022T04:05:... | <pre><code>let p_max_allowed_gap = 2h;
datatable(Id:int, Name:string, Timestamp:datetime)
[
1 ,"A" ,"2022-07-12T04:05:00z"
,2 ,"A" ,"2022-07-12T06:05:00z"
,3 ,"A" ,"2022-07-12T08:05:00z"
,4 ,"A" ,"2022-07-12T12:05:00z"
]
| pa... | kusto: Calcuating duration | azure-data-explorer|kql | 1 | 65 | 1 | 72,961,178 | 72,961,178 | 0 | true | 2022-07-13T03:49:49.577Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
kusto: Calcuating duration<p>I have a kusto table where I will receive data every 2 hours. I need to find the start and end time for a given data. Here, endt... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.