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,118,813 | When Scrolling Horizontally Scrolled Section is not Highlighted Only First-Visible Section is Highlighted<p>Selam! I am using <strong><a href="https://github.com/lonekorean/highlight-within-textarea" rel="nofollow noreferrer">this plugin</a></strong> for textarea highlighting...</p>
<p>When Scroll Horizontally Scrolled... | <p>I have fixed it with ALLAH's permission:</p>
<pre><code>.hwt-backdrop {
position: absolute !important;
white-space: pre !important;
word-wrap: normal !important;
width: fit-content; /* this is the important part */
top: 0 !important;
right: -99px !important;
bottom: 0 !important;
left... | When Scrolling Horizontally Scrolled Section is not Highlighted Only First-Visible Section is Highlighted | css | -1 | 23 | 1 | 72,119,757 | 72,119,757 | 0 | true | 2022-05-04T20:00:21.357Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
When Scrolling Horizontally Scrolled Section is not Highlighted Only First-Visible Section is Highlighted<p>Selam! I am using <strong><a href="https://github... |
72,212,221 | ORA-02291: integrity constraint (string.string) violated - parent key not found<p>I am created 2 tables named <strong>entry</strong> and <strong>team</strong> based on the attached logical model.
<img src="https://i.stack.imgur.com/fctfq.png" alt="see image" /></p>
<p>I didn't have any problems with the create table as... | <p>Fix your design first.</p>
<ol>
<li>Start out with some simple sentences that define the what each thing is (Carnival, Event, Entry, Team, Competitor, Charity).</li>
<li>Once you know what they mean then you can write some more simple sentences defining the relationships.</li>
<li>Only once you have it straight in y... | ORA-02291: integrity constraint (string.string) violated - parent key not found | oracle|foreign-keys|constraints | -1 | 27 | 1 | 72,215,524 | 72,215,524 | 0 | true | 2022-05-12T08:19:49.253Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
ORA-02291: integrity constraint (string.string) violated - parent key not found<p>I am created 2 tables named <strong>entry</strong> and <strong>team</strong... |
72,227,145 | retrieving first rehire and terminated dates and second rehire and termination of employee<p>I want to write a SQL Query to fetch 1st rehire, termination date and 2nd rehire, termination dates of employee if employee doesn't having those dates then <strong>it will display blank(null) in result.</strong> Having table na... | <p>In Oracle, from version 12, you can use <code>MATCH_RECOGNIZE</code>:</p>
<pre class="lang-sql prettyprint-override"><code>SELECT *
FROM table_name
MATCH_RECOGNIZE (
PARTITION BY person_id
ORDER BY date_start
MEASURES
first_rehire.date_start AS rehire1_start,
first_rehire.actual_ter... | retrieving first rehire and terminated dates and second rehire and termination of employee | mysql | -1 | 24 | 1 | 72,227,371 | 72,227,371 | 0 | true | 2022-05-13T09:13:57.183Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
retrieving first rehire and terminated dates and second rehire and termination of employee<p>I want to write a SQL Query to fetch 1st rehire, termination dat... |
72,144,805 | Python modify the path of url without hacky string interpolation<p>How to use <code>urllib.parse</code> in python to modify the path of URI? I know I can use substring and index but I am wondering what is the right way to accomplish this.</p>
<p>Convert this:</p>
<p><a href="https://foo.blob.bar.storage.azure.net/conta... | <p>If you're just trying to remove <code>/blobname</code> from the URL, you can simply use:</p>
<pre><code>url = 'https://foo.blob.bar.storage.azure.net/container/blobname?sv=2015-04-05&ss=123&srt=abc&sp=efg&se=2022&sig=wsx'
new_url = url.replace('/blobname', '')
</code></pre>
<p>However, if you rea... | Python modify the path of url without hacky string interpolation | python | -1 | 41 | 1 | 72,145,045 | 72,145,045 | 0 | true | 2022-05-06T16:38:54.230Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python modify the path of url without hacky string interpolation<p>How to use <code>urllib.parse</code> in python to modify the path of URI? I know I can use... |
72,234,252 | Want to know how to divide my code into separate functions<p>I have recently started learning C in university and my task today was to write a program that calculates the average price of products in an array of structures. I was told that my code should be divided into separate functions.
How do I put the printf for l... | <p>Since you are learning C, there are several considerations with your existing code. Your real question seems to be "How to divide my code into separate functions".</p>
<p>There are two basic approaches,</p>
<ol>
<li>when learning, it's often easier to write your program, get it debugged and working and the... | Want to know how to divide my code into separate functions | c | -1 | 49 | 2 | 72,236,085 | 72,236,085 | 0 | true | 2022-05-13T18:52:14.903Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Want to know how to divide my code into separate functions<p>I have recently started learning C in university and my task today was to write a program that c... |
72,233,876 | Combine Columns in Pandas<p>Let's say I have the following Pandas dataframe. It is what it is and the input can't be changed.</p>
<pre><code>df1 = pd.DataFrame(np.array([['a', 1,'e', 5],
['b', 2, 'f', 6],
['c', 3, 'g', 7],
['d', 4, '... | <p>You can use a dictionary whose default value is list and loop through the dataframe columns. Use the column name as dictionary key and append the column value to the dictionary value.</p>
<pre class="lang-py prettyprint-override"><code>from collections import defaultdict
d = defaultdict(list)
for i, col in enumerat... | Combine Columns in Pandas | python|pandas|dataframe | -1 | 77 | 4 | 72,234,005 | 72,234,005 | 0 | true | 2022-05-13T18:13:52.373Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Combine Columns in Pandas<p>Let's say I have the following Pandas dataframe. It is what it is and the input can't be changed.</p>
<pre><code>df1 = pd.DataFra... |
72,225,786 | Get only max values from table for each ID record<p>I am having table like this, where id is repeating several times.</p>
<p><a href="https://i.stack.imgur.com/x1Mbq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/x1Mbq.png" alt="enter image description here" /></a></p>
<p>I need to get only max L1 v... | <p>Try using max(l1)over window function:</p>
<pre><code>select distinct max(l1)over (partition by idn),idn,value_varchar
from my_table
order by max(l1)over (partition by idn)
</code></pre>
<p>Sample:</p>
<pre><code>create table my_table (l1 number, idn number, value_varchar varchar2(100));
INSERT INTO MY_TABLE(L1, ID... | Get only max values from table for each ID record | sql|oracle|greatest-n-per-group | -1 | 103 | 3 | 72,225,934 | 72,225,934 | 0 | true | 2022-05-13T07:21:43.233Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Get only max values from table for each ID record<p>I am having table like this, where id is repeating several times.</p>
<p><a href="https://i.stack.imgur.c... |
72,232,157 | Dataframe Operation Splicing<p>I have a single column dataframe without headers and I want to split it into multiple columns as follows
The current dataframe -</p>
<pre><code>1
2
3
4
5
.
.
100
</code></pre>
<p>I want to represent it as -</p>
<pre><code>1 6 .. .. 96
2 7 .. .. 97
3 8 .. .. 98
4 9 .. .. 99
5 10 .. .. ... | <p>Assuming such a DataFrame:</p>
<pre><code>df = pd.DataFrame({'col': range(1, 101)})
</code></pre>
<p>you can use the underlying numpy array to reshape:</p>
<pre><code>df2 = pd.DataFrame(df['col'].to_numpy().reshape(5, -1, order='F'))
</code></pre>
<p>output:</p>
<pre><code> 0 1 2 3 4 5 6 7 8 9 ... | Dataframe Operation Splicing | pandas|dataframe | -1 | 28 | 1 | 72,232,189 | 72,232,189 | 0 | true | 2022-05-13T15:39:07.143Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Dataframe Operation Splicing<p>I have a single column dataframe without headers and I want to split it into multiple columns as follows
The current dataframe... |
72,233,570 | Azure Synapse, Pipeline and Azure Datalake<p>I have an ETL pipeline that gets triggers when file is uploaded into Datalake location "Processing" folder, Once data is processed I want to move the file to different location in datalake that is "Processed" folder, how can do that?</p> | <p>If you want to move data from processing folder to processed folder in your datalake, you can add additional activities to your previous copy activity with storage event trigger. An image of a similar approach is provided below.</p>
<p><a href="https://i.stack.imgur.com/yAm72.png" rel="nofollow noreferrer"><img src=... | Azure Synapse, Pipeline and Azure Datalake | azure|azure-synapse|azure-data-lake-gen2 | -1 | 210 | 1 | 72,285,171 | 72,285,171 | 0 | true | 2022-05-13T17:44:10.317Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Azure Synapse, Pipeline and Azure Datalake<p>I have an ETL pipeline that gets triggers when file is uploaded into Datalake location "Processing" f... |
72,162,516 | Mobile and Desktop media query priority<p>I'm a beginner in front-end web development. I want to know the order of priority when writing CSS media queries in desktop first approach. Do i write mobile queries first and tablet queries below it, in this manner:</p>
<p><code> /*Desktop CSS*/</code>
<code>/*Media query for ... | <p>You can write anywhere but if you are a beginner then I suggest you create a separate file for responsive CSS so that you will not confused.
SO in the style.css desktop approach and in responsive.css all media queries for mobile and tablet.
Standered Media queries:</p>
<pre><code>@media screen and (min-width: 1200px... | Mobile and Desktop media query priority | html|css|media-queries|web-frontend | -1 | 157 | 1 | 72,162,606 | 72,162,606 | 0 | true | 2022-05-08T15:29:46.920Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Mobile and Desktop media query priority<p>I'm a beginner in front-end web development. I want to know the order of priority when writing CSS media queries in... |
72,165,514 | Why deinit is not being called on ObservableObject subclass?<p>I have this simple example app. Why deinitializer is not being called on a Observable Object view model after the next screen is presented?</p>
<pre><code>import SwiftUI
@main
struct TestApp: App {
var body: some Scene {
WindowGroup {
... | <p><code>struct</code> is value type where as <code>class</code> is reference type (See <a href="https://stackoverflow.com/questions/27364117/is-swift-pass-by-value-or-pass-by-reference/27366050#27366050">Is Swift Pass By Value or Pass By Reference</a> to know what this means).</p>
<p>So basically you don't make refere... | Why deinit is not being called on ObservableObject subclass? | ios|swift|swiftui | -1 | 207 | 1 | 72,181,443 | 72,181,443 | 0 | true | 2022-05-08T22:26:47.143Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why deinit is not being called on ObservableObject subclass?<p>I have this simple example app. Why deinitializer is not being called on a Observable Object v... |
72,141,681 | Character problem with endpoint '/{GROUP_ID}/feed' of Facebook API<p>The code below works without error, but the posted text is cut off in Facebook as soon as a "&" character is found.</p>
<pre class="lang-py prettyprint-override"><code>TOKEN_ID = '<Token>'
GROUP_ID = '<group_id>'
headers = ... | <p>I found a solution that works. As supposed, it was an encoding problem.</p>
<pre class="lang-py prettyprint-override"><code>import urllib.parse
TOKEN_ID = '<Token>'
GROUP_ID = '<group_id>'
headers = { 'Content-Type': 'text/html; charset=UTF-8;', }
msg = 'Automation test & Python script'
msg = url... | Character problem with endpoint '/{GROUP_ID}/feed' of Facebook API | python|python-3.x|facebook|facebook-graph-api | -1 | 29 | 1 | 72,143,880 | 72,143,880 | 0 | true | 2022-05-06T12:45:05.377Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Character problem with endpoint '/{GROUP_ID}/feed' of Facebook API<p>The code below works without error, but the posted text is cut off in Facebook as soon a... |
72,056,240 | How to use Python-Operator % for multiple values?<p>I'm trying to fill an SQL database with soma data, measured by an bme680. Therefore I'd like to format the measured values like this:</p>
<pre><code>print ("Temperatur: %0.1f C" % (bme680.temperature + temperature_offset))
print ("Gas: %d ohm" % bm... | <p>I found a quite simple solution: Split up the string like this:</p>
<pre><code>string = "INSERT INTO bme680_tb (datum, uhrzeit, temperatur, gas, luftfeuchtigkeit, luftdruck) "
string += "VALUES (CURRENT_DATE(), NOW(), %0.1f, " %bme680.temperature
string += "%d, " %bme680.gas
string += &... | How to use Python-Operator % for multiple values? | mysql|sql|python-3.x|format | -1 | 28 | 1 | 72,057,292 | 72,057,292 | 0 | true | 2022-04-29T10:04:22.177Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to use Python-Operator % for multiple values?<p>I'm trying to fill an SQL database with soma data, measured by an bme680. Therefore I'd like to format th... |
72,199,574 | Write optimized code which takes following two list of dictionaries as input and gives output as final_result.I have solved it but I want to optimized<p>Inputs:</p>
<pre><code>list1 = [{'item_type':1,'value':55, 'title':'abc'},{'item_type':2,'value':43, 'title':'def'},{'item_type':3,'value':35, 'title':'ghi'}]
list2 =... | <p>So you want to use list (or other) comprehension.</p>
<p>From Python 3.7, dictionaries are officially ordered. You can (1) concatenate the lists and sort the items if necessary, (2) put the items into a dictionary with <code>item_type</code> as their keys, and (3) convert values in the dictionary back to the list, t... | Write optimized code which takes following two list of dictionaries as input and gives output as final_result.I have solved it but I want to optimized | python|list|dictionary|lambda|list-comprehension | -1 | 27 | 2 | 72,199,970 | 72,199,970 | 0 | true | 2022-05-11T10:38:46.257Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Write optimized code which takes following two list of dictionaries as input and gives output as final_result.I have solved it but I want to optimized<p>Inpu... |
72,230,413 | FFMPEG: using filters for adding transparent watermark<p>how can i combine these two lines of code for adding transparent watermark (with Dynamic size)</p>
<pre><code>ffmpeg -i 1.gif -i logo.png -filter_complex "[1]format=rgba,colorchannelmixer=aa=0.5[logo];[0][logo]overlay=(W-w)/2:H-h-5" -c:a copy output.gif... | <p><strike>Outputs of every filter must be connected to something, and your <code>[video]</code> output pad of <code>scale2ref</code> is not, hence the error.</p>
<p>You need to feed <code>[video]</code> instead of <code>[0]</code> to the <code>overlay</code> filter:
</strike></p>
<p>You need to make sure all the filte... | FFMPEG: using filters for adding transparent watermark | ffmpeg | -1 | 42 | 1 | 72,230,616 | 72,230,616 | 0 | true | 2022-05-13T13:32:47.393Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
FFMPEG: using filters for adding transparent watermark<p>how can i combine these two lines of code for adding transparent watermark (with Dynamic size)</p>
<... |
72,212,254 | Group rows in text file and select conditionally which to keep with python<p>I have a file which i have to manipulate using Python.<br/>
The file consists of entries like the below <br/>
student_id Name Surname DOB Sex Class<br/></p>
<p><a href="https://i.stack.imgur.com/nELkw.jpg" rel="nofollow noreferrer">Example of ... | <pre><code>import pandas as pd
a = [['John Taylor', '2010-05-07', 'M', 'ClsA'],
['Mary Oliver', '2010-01-29', 'F', 'ClsA'],
['Peter Edwards', '2010-10-23', 'M', 'ClsA'],
['Robert Lewis', '2010-12-02', 'M', 'ClsB'],
['Emily Clark', '2009-12-04', 'F' ,'ClsB'],
['Jeremy Wood', '2009-08-15', 'M', 'ClsB'],
['Will Bennett',... | Group rows in text file and select conditionally which to keep with python | python|python-3.x | -1 | 64 | 1 | 72,212,892 | 72,212,892 | 0 | true | 2022-05-12T08:23:11.977Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Group rows in text file and select conditionally which to keep with python<p>I have a file which i have to manipulate using Python.<br/>
The file consists of... |
72,186,010 | FAB on top of Bottom Navigation<p>How to display a fab on top of a Bottom Navigation? This is what I tried:</p>
<pre class="lang-xml prettyprint-override"><code><com.google.android.material.floatingactionbutton.FloatingActionButton
android:layout_width="wrap_content"
android:layout_height=&... | <p>You need to use coordinator layout</p>
<pre><code> <androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width... | FAB on top of Bottom Navigation | android|xml|floating-action-button|android-bottomnav | -1 | 101 | 1 | 72,186,352 | 72,186,352 | 0 | true | 2022-05-10T12:06:18.633Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
FAB on top of Bottom Navigation<p>How to display a fab on top of a Bottom Navigation? This is what I tried:</p>
<pre class="lang-xml prettyprint-override"><c... |
72,164,651 | C# Errror: Feature 'target-typed object creation' is not available in C# 7.3. Please use language version 9.0 or greater<p>How to write this part of code in C# 7.3? The <code>new()</code> is throwing an syntax error.</p>
<blockquote>
<p>Feature 'target-typed object creation' is not available in C# 7.3. Please use langu... | <p>Unless you're using C# >=9.0 (where target-typed object creation was introduced), you need to specify the type you're creating when using new</p>
<pre><code> List<ExcelModel> output = new List<ExcelModel>(){
new ExcelModel() { Id = 1, Type= "Normal", Mode= "Default" }
};
</code></... | C# Errror: Feature 'target-typed object creation' is not available in C# 7.3. Please use language version 9.0 or greater | c#|syntax-error | -1 | 105 | 1 | 72,164,682 | 72,164,682 | 0 | true | 2022-05-08T19:56:35.283Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
C# Errror: Feature 'target-typed object creation' is not available in C# 7.3. Please use language version 9.0 or greater<p>How to write this part of code in ... |
72,165,385 | Interpolating variable with object name<p>This is the code I am wondering about. Is there anyway I could interpolate the 'i' variable to go after the body object. This would make it so on the first loop it was body0, then body1, and so on. I tried to do body + i.innerHTML but it gives out an error. Does anyone know how... | <p>Well, a crude way could look 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 data = [
'Poem line 1',
'Poem line 2',
'Poem line 3'
];
for (l... | Interpolating variable with object name | javascript|html|for-loop|object|interpolation | -1 | 45 | 1 | 72,165,656 | 72,165,656 | 0 | true | 2022-05-08T22:01:02.773Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Interpolating variable with object name<p>This is the code I am wondering about. Is there anyway I could interpolate the 'i' variable to go after the body ob... |
72,219,195 | BigQuery - loading CSV with newlines fail with Node.js, but works with gsutil<p>I'm trying to load CSV from Cloud Storage to Big Query with a Cloud Function.
The file has newlines in some of the strings.</p>
<p>When I load from Cloud Shell it loads perfectly and the strings are found in the table with the newlines.</p>... | <p>Found the issue. For schema I had:</p>
<pre><code>{'name': 'gdb', 'type' : 'STRING'},
{'name': 'venueid', 'type' : 'STRING'},
</code></pre>
<p>Removing the <code>''</code> fixed the issue. So, with GSUTIL it was fine, in JS not so much.
Working schema:</p>
<pre><code>{name: 'gdb', type: 'STRING'},
{name: 'venueid', ... | BigQuery - loading CSV with newlines fail with Node.js, but works with gsutil | csv|google-bigquery | -1 | 76 | 1 | 72,256,919 | 72,256,919 | 0 | true | 2022-05-12T16:31:25.337Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
BigQuery - loading CSV with newlines fail with Node.js, but works with gsutil<p>I'm trying to load CSV from Cloud Storage to Big Query with a Cloud Function.... |
72,188,679 | split string with delimiters taking into account ' " ' in C<p>How do I write a fonction that splint a string taking <code> </code> as a delimiter but taking into account that something into <code>"</code> must be considerating as one thing:</p>
<p>exemple :</p>
<p>input :</p>
<pre><code>char *input = "./displ... | <p>I wouldn't vouch for this, nor run it without a lot more thought and some testing as there are undoubtedly edge case that are missed, but a quick and dirty solution might look like:</p>
<pre><code>#include <stdio.h>
#include <stdlib.h>
#include <string.h>
struct string_array {
char **data;
... | split string with delimiters taking into account ' " ' in C | c|split | -1 | 45 | 1 | 72,189,690 | 72,189,690 | 0 | true | 2022-05-10T14:59:24.797Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
split string with delimiters taking into account ' " ' in C<p>How do I write a fonction that splint a string taking <code> </code> as a delimiter but taking ... |
72,207,649 | Looping a function over different sheets in google scripts<p>so I have function lets call that XXXX . That function works over the course of one sheet only, trying to get it to work over all sheets as long as the sheet's name isn't "YYYY" or the sheet name doesn't include "ZZZZ" . What I have below ... | <p>Try this:</p>
<pre><code>function myFunction() {
SpreadsheetApp.getActiveSpreadsheet()
.getSheets()
.filter(i => i.getName() !== `YYYY` && !i.getName().includes(`ZZZZ`))
.forEach(i => {
i.activate()
XXXX(... | Looping a function over different sheets in google scripts | google-apps-script | -1 | 37 | 1 | 72,207,844 | 72,207,844 | 0 | true | 2022-05-11T21:12:58.733Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Looping a function over different sheets in google scripts<p>so I have function lets call that XXXX . That function works over the course of one sheet only, ... |
72,169,698 | SQL Select Count Subquery, Joins messing up everything<p>I've got a task to work with 4 different tables. I think I've got the "logic" correct, but I think I'm failing on joining the various separately working things together.</p>
<ul>
<li>The Case somehow returns two rows when the comparison is true; if it i... | <p>You have a lot of things going on although a short query to get it, but let me try to summarize what I THINK you are trying to get.</p>
<p>You want a list of distinct people within the company with a count of how many ACTIVE certs (not expired) per person. From that, you also want to know if they are in a managemen... | SQL Select Count Subquery, Joins messing up everything | sql|join|count|subquery | -1 | 63 | 2 | 72,170,916 | 72,170,916 | 0 | true | 2022-05-09T09:25:39.617Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SQL Select Count Subquery, Joins messing up everything<p>I've got a task to work with 4 different tables. I think I've got the "logic" correct, but... |
72,196,485 | How can I fix the ReferenceError: myFunction is not defined<p>I have <code><button id="submit" onclick="myFunction()">Submit</button></code> in my html file and</p>
<pre class="lang-js prettyprint-override"><code>document.addEventListener("click", myFunction);
function myF... | <p>As per CherryDT, you can remove the onclick="myFunction()" from the button and do it this way</p>
<pre><code>document.getElementById("submit").addEventListener("click", myFunction);
function myFunction() {
document.getElementById("demo").innerHTML = "Hello World&quo... | How can I fix the ReferenceError: myFunction is not defined | javascript | -1 | 59 | 1 | 72,197,170 | 72,197,170 | 0 | true | 2022-05-11T06:41:46.230Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I fix the ReferenceError: myFunction is not defined<p>I have <code><button id="submit" onclick="myFunction()">Submit</bu... |
72,190,288 | how to replace the ode45 method with the runge-kutta in this matlab?<p>I tried everything and looked everywhere but can't find any solution for my question.</p>
<pre><code>clc
clear all
%% Solving the Ordinary Differential Equation
G = 6.67408e-11; %Gravitational constant
M = 10; %Mass of the fixed object
r = 1; ... | <p>Before converting your ode45( ) solution to manually written RK scheme, it doesn't even look like your ode45( ) solution is correct. It appears you have a gravitational problem set up where the initial velocity is 0 so a small object will simply fall into a large mass M on a line (rectilinear motion), and that is wh... | how to replace the ode45 method with the runge-kutta in this matlab? | matlab|runge-kutta|ode45 | -1 | 145 | 2 | 72,233,310 | 72,233,310 | 0 | true | 2022-05-10T16:55:45.427Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to replace the ode45 method with the runge-kutta in this matlab?<p>I tried everything and looked everywhere but can't find any solution for my question.<... |
72,161,889 | Sorting array doesn't work properly when some items have unknown values<p>Say I have array of objects</p>
<pre><code>[
{
"name": "John",
"height": "172",
"weight": "87"
},
{
"name": "Tom",
"heigh... | <p>All you have to do is handle the specific cases when height/weight is <code>unknown</code> and return the appropriate value</p>
<p>For example:</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... | Sorting array doesn't work properly when some items have unknown values | javascript|reactjs|redux|redux-toolkit | -1 | 58 | 1 | 72,161,940 | 72,161,940 | 0 | true | 2022-05-08T14:18:48.757Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Sorting array doesn't work properly when some items have unknown values<p>Say I have array of objects</p>
<pre><code>[
{
"name": "John... |
72,060,551 | Css problem how to apply changes when i hover a parents child element to another parents child element?<p>What I am trying to do is that when I hover on the <code>#box</code> button I want to add font-size on <code>h1</code> is the child element of <code>#h</code></p>
<p><div class="snippet" data-lang="js" data-hide="f... | <p>It's because your using <code>~</code> and <code>#h</code> and <code>#hi</code> are not siblings to the button. You will have to nest the <code>#h</code> parent within <code>#box</code> for them to be siblings then use the <code>></code> selector to target <code>#hi</code>.</p>
<p>See below:</p>
<p><div class="sn... | Css problem how to apply changes when i hover a parents child element to another parents child element? | html|css|css-selectors | -1 | 34 | 1 | 72,060,631 | 72,060,631 | 0 | true | 2022-04-29T15:49:04.493Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Css problem how to apply changes when i hover a parents child element to another parents child element?<p>What I am trying to do is that when I hover on the ... |
72,193,171 | how to fix the corner problem in a minesweeper?<p>I'm coding the reveal function trying to use recursion but I have a problem, when the cycle runs at the corner it doesn't find any cell and returns an error, I've seen that this operator '?.' returns the value or undefined even if there is no value, but I cant figure ho... | <p>Check the bounds in the loops:</p>
<pre><code>export function reveal(boardWithMines: CellEnum[][], boardWithOutMines: CellEnum[][], x: number, y: number) {
if (boardWithOutMines[x][y] === CellEnum.Hidden || boardWithMines[x][y] === CellEnum.Cero) {
boardWithOutMines[x][y] = boardWithMines[x][y];
... | how to fix the corner problem in a minesweeper? | javascript|typescript|recursion | -1 | 45 | 1 | 72,193,715 | 72,193,715 | 0 | true | 2022-05-10T21:33:10.503Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to fix the corner problem in a minesweeper?<p>I'm coding the reveal function trying to use recursion but I have a problem, when the cycle runs at the cor... |
72,147,333 | Rollercoaster Project<p>I am supposed to filter the ages of the users through the following rule: if users >=120 cm then <code>print("You can ride the rollercoaster!")</code>, if users <=119 cm then <code>print ("Sorry, you must grow taller, see you next time.")</code></p>
<p>Everything is goi... | <p>You missed an <em>elif</em> statement in the main condition.</p>
<p>Try this:</p>
<pre><code>print("Welcome to the rollercoaster!")
height = int(input("Enter your height in cm, please: "))
if height >= 120 and height <300:
print("You can ride the rollercoaster!")
age = int(inp... | Rollercoaster Project | python|if-statement|break | -1 | 132 | 1 | 72,147,407 | 72,147,407 | 0 | true | 2022-05-06T21:03:37.390Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Rollercoaster Project<p>I am supposed to filter the ages of the users through the following rule: if users >=120 cm then <code>print("You can ride th... |
72,069,295 | How to Organize my ViewScreens on Swift Programmatic UI<p>I'm learning Programmatic UI and am a little bit obsessed with clean code.</p>
<p>I'm currently building a TabBarVC so that I can manage all of my VC's but I get an error message while doing this.</p>
<pre><code>import UIKit
class MainTabBarVC: UITabBarControll... | <p>You could change your <code>let</code>s into <code>lazy var</code>s.</p>
<pre><code>class MainTabBarVC: UITabBarController {
lazy var firstVC = FirstVC()
lazy var secondVC = SecondVC()
lazy var firstNavVC = UINavigationController(rootViewController: firstVC)
lazy var secondNavVC ... | How to Organize my ViewScreens on Swift Programmatic UI | swift|navbar|viewcontroller|tabbar|programmatically | -1 | 31 | 1 | 72,069,357 | 72,069,357 | 0 | true | 2022-04-30T14:20:09.833Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to Organize my ViewScreens on Swift Programmatic UI<p>I'm learning Programmatic UI and am a little bit obsessed with clean code.</p>
<p>I'm currently bui... |
72,166,177 | Importing XML into Lotus Notes?<p>We are looking to switch to the <a href="https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=legaldocml" rel="nofollow noreferrer">LegalDocML</a> XML standard for our documents. We've been looking at various XML databases such as <a href="https://www.oracle.com/au/database/tech... | <p>20+ years ago, there was a thriving market of Lotus business partners serving the legal market, so it's certainly possible that someone out there, somewhere, has some ready-made application templates that work with LegalDocML -- but I'm not aware of any, so for the purposes of this answer I'm assuming that nobody ha... | Importing XML into Lotus Notes? | xml|lotus-notes | -1 | 33 | 1 | 72,167,087 | 72,167,087 | 0 | true | 2022-05-09T01:31:32.817Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Importing XML into Lotus Notes?<p>We are looking to switch to the <a href="https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=legaldocml" rel="nofol... |
72,165,629 | How do I pass a variable into regex with Node js?<p>So basically, I have a regular expression which is</p>
<pre><code>var regex1 = /10661\" class=\"fauxBlockLink-linkRow u-concealed\">([\s\S]*?)<\/a>/;
var result=text.match(regex1);
user_activity = result[1].replace(/\s/g, "")
console... | <p>You can build the regex string with templates and/or string addition and then pass it to the <code>RegExp</code> constructor. One key in doing that is to get the escaping correct as you need an extra level of escaping for backslashes because the interpretation of the string takes one level of backslash, but you nee... | How do I pass a variable into regex with Node js? | javascript|html|node.js|regex|variables | -1 | 63 | 3 | 72,166,350 | 72,166,350 | 0 | true | 2022-05-08T22:58:16.410Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I pass a variable into regex with Node js?<p>So basically, I have a regular expression which is</p>
<pre><code>var regex1 = /10661\" class=\"... |
72,139,992 | Setting up password using inputbox to hide/unhide excel sheet<p>I've recently made a MCQ test module that will help in preparing test papers with random questions from the question bank and conduct test and calculate the marks.</p>
<p>All of it has been coded and completed. Since this is MCQ test macro, there is a shee... | <p>Brother, you have not assigned any value to inpu2; so if you want to compare inpu1 with inpu2. you should assign previously stored values to inpu2. only then you should compare them both. you can accomplish this in two simple steps.</p>
<p>Step 1: create a new hidden sheet to store pass</p>
<p>Step 2: retrieve pass ... | Setting up password using inputbox to hide/unhide excel sheet | excel|vba|passwords|inputbox | -1 | 83 | 1 | 72,141,410 | 72,141,410 | 0 | true | 2022-05-06T10:26:34.820Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Setting up password using inputbox to hide/unhide excel sheet<p>I've recently made a MCQ test module that will help in preparing test papers with random ques... |
72,219,035 | Any optimize way to iterate excel and provide data into pd.read_sql() as a string one by one<p><a href="https://i.stack.imgur.com/MihZJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MihZJ.png" alt="I have to read this excel and get the Report2 queries, B2 (cell) and C2 (cell) and compare the result... | <p>You are trying to loop through an excel file, run the 2 queries, see if they match and output the result, correct?</p>
<pre><code>import pandas as pd
from sqlalchemy import create_engine
# add user, pass, database name
con = create_engine(f"mysql+pymysql://{USER}:{PWD}@{HOST}/{DB}")
file = pd.read_excel('... | Any optimize way to iterate excel and provide data into pd.read_sql() as a string one by one | python-3.x|pandas|dataframe|openpyxl | -1 | 35 | 1 | 72,219,784 | 72,219,784 | 0 | true | 2022-05-12T16:18:59.827Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Any optimize way to iterate excel and provide data into pd.read_sql() as a string one by one<p><a href="https://i.stack.imgur.com/MihZJ.png" rel="nofollow no... |
72,113,955 | Get the number of Requests in Express with Save<p>I would like to know if is there any way of getting the total number of request in a certain path with Expressjs? But i need save On JSON like i want save data on JSON or TXT nothing more but i dont know how.</p>
<pre class="lang-js prettyprint-override"><code>let pingC... | <pre><code>import { readFileSync, writeFileSync } from "fs";
app.get('/ping',(req, res) => {
const pingCount = readFileSync("pingCount.txt");
const newPingCount = parseInt(pingCount) + 1;
writeFileSync("pingCount.txt", newPingCount.toString());
res.send(`ping world for $... | Get the number of Requests in Express with Save | javascript|node.js|ejs | -1 | 27 | 2 | 72,114,179 | 72,114,179 | 0 | true | 2022-05-04T13:40:19.093Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Get the number of Requests in Express with Save<p>I would like to know if is there any way of getting the total number of request in a certain path with Expr... |
72,216,903 | Is there some way to test the inner implementation when response in Observable is 500 (Error occured)<p>Here is the code below</p>
<pre><code>@Output() hitCodeReturned = new EventEmitter<boolean>();
ngOnInit() {
this.someService.method().subscribe(
() => {
// Some code here
},
({ error }) => {
... | <p>yes, just use <code>throwError</code> operator in test</p>
<pre><code> //in jasmine/karma test
//assuming that someService is a `mock`
it('propagates hitCodeReturned', (done)=>{
someService.and.return(throwError("here you can throw any kind of error"));
component.hitCodeReturned(... | Is there some way to test the inner implementation when response in Observable is 500 (Error occured) | angular|typescript|karma-jasmine | -1 | 13 | 1 | 72,217,059 | 72,217,059 | 0 | true | 2022-05-12T13:54:24.250Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is there some way to test the inner implementation when response in Observable is 500 (Error occured)<p>Here is the code below</p>
<pre><code>@Output() hitCo... |
72,180,462 | ValueError: Metric should be a callable, received<p>I don't know if what I'm doing is correct. But I would like to use <code>logcosh</code> as a loss. So I put it inside a class as shown below:</p>
<pre><code>class Logcosh(tf.keras.losses.Loss):
def __init__(self):
super().__init__()
def call(self, y_true, y... | <p>The model.fit_generator is quite old but the idea is the same.</p>
<p>LogCosh that identifies identity as logarithms scales, how would you present similarity with limited information?</p>
<p>You see it has the behavior of the logarithms for the categorize tasks.</p>
<p><strong>[ Sample ]:</strong></p>
<pre><code>imp... | ValueError: Metric should be a callable, received | python|tensorflow|keras|deep-learning | -1 | 78 | 1 | 72,185,490 | 72,185,490 | 0 | true | 2022-05-10T03:37:13.840Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
ValueError: Metric should be a callable, received<p>I don't know if what I'm doing is correct. But I would like to use <code>logcosh</code> as a loss. So I p... |
72,048,368 | Transact-SQL procedures : why does my else loop not work?<p>I need to print a list of countries together with other number of customers etc when a user enters a country name. My if loop works but the else loop doesn't work. The else loop should be executed when a user enters a country that is not in the column. It shou... | <p>This line of code in the if will always return something because you have no where clause</p>
<pre><code>select shipcountry from Sales.Orders
</code></pre>
<p>Try something like this</p>
<pre><code>select 1 from Sales.Orders where shipcountry = @land
</code></pre>
<p>and remove the condition on the else, not vary ma... | Transact-SQL procedures : why does my else loop not work? | sql|sql-server|stored-procedures | -1 | 32 | 1 | 72,048,529 | 72,048,529 | 1 | true | 2022-04-28T18:04:55.287Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Transact-SQL procedures : why does my else loop not work?<p>I need to print a list of countries together with other number of customers etc when a user enter... |
72,061,238 | Creating 1D array from two 1D arrays with condition<p>I am running this program:</p>
<pre><code>def f2d(x,y):
# condition
if 4*x**2 + y**2 <= 4:
return np.sin(x*y)
else:
return 0
def my_prog(function,n):
x = np.random.uniform(low=-1, high=+1, size=(n))
y = np.random.uniform(low=-... | <p>if-clause is expecting a truthy-value but <code>4*x**2 + y**2 <= 4</code> is shape (5,) boolean array. To get it to work, you should either convert it to a single truthy-value or iterate over it, depending on what you're trying to do. However, for the purpose of your task, you could use <code>numpy.where</code> t... | Creating 1D array from two 1D arrays with condition | python|arrays|numpy | -1 | 35 | 2 | 72,061,365 | 72,061,365 | 1 | true | 2022-04-29T16:49:19.500Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Creating 1D array from two 1D arrays with condition<p>I am running this program:</p>
<pre><code>def f2d(x,y):
# condition
if 4*x**2 + y**2 <= 4:
... |
72,063,176 | Unable to refernce a cell into an excel formula using openpyxl<pre class="lang-py prettyprint-override"><code>from openpyxl import Workbook
wb = Workbook()
ws = wb.create_sheet("Summary")
ws.cell(5,8).value = f'=PERCENTILE({ws.min_row}:{ws.max_row}, {ws.cell(6,6)})
</code></pre>
<p>So i want the formula to... | <p>You've passed the object wherein what you need is the coordinate (cell reference).</p>
<pre><code>ws.cell(5,8).value = f'=PERCENTILE({ws.min_row}:{ws.max_row}, {ws.cell(6,6).coordinate})'
</code></pre>
<p>ws.cell has an attribute "coordinate".</p> | Unable to refernce a cell into an excel formula using openpyxl | python|excel|automation|openpyxl | -1 | 31 | 1 | 72,065,503 | 72,065,503 | 1 | true | 2022-04-29T20:04:04.120Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Unable to refernce a cell into an excel formula using openpyxl<pre class="lang-py prettyprint-override"><code>from openpyxl import Workbook
wb = Workbook()
... |
72,068,990 | How can I migrate from "float" to "points" in MySQL?<p>I'm looking for a faster way to calculate Euclidean distances in SQL.</p>
<ul>
<li>Problem I want to solve</li>
</ul>
<p>The following "Euclidean distance calculation" is slow.</p>
<pre><code>SELECT
id,
sqrt(
power(f1 - (-0.09077361), 2) +
po... | <ul>
<li><p>Don't use <code>FLOAT(M,N)</code> it adds an extra rounding that only hurts various operations.</p>
</li>
<li><p><code>FLOAT(9,8)</code>, if the numbers are near "1.0" will lose some precision. This is because there are only 24 bits of precision in any <code>FLOAT</code>.</p>
</li>
<li><p><code>(... | How can I migrate from "float" to "points" in MySQL? | mysql|euclidean-distance | -1 | 28 | 1 | 72,069,853 | 72,069,853 | 1 | true | 2022-04-30T13:38:28.653Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I migrate from "float" to "points" in MySQL?<p>I'm looking for a faster way to calculate Euclidean distances in SQL.</p>
<ul>
<li>Problem I want to s... |
72,076,121 | why is a map object couldn't be assigned to a variable when it is printed beforehand as a list object<p>lst=['a','xyz', 'summer', 'spring']</p>
<pre><code>def it(x):
return str(x).upper()
map_iterator=map(lambda x: x.upper(), lst)
print(map_iterator)
print(type(map_iterator))
#print(list(map_iterator))
x=list(map_... | <p>map returns an iterator, as you have seen. once an iterator is consumed, it cannot be "re-consumed" or "rewound"
here:</p>
<pre><code>print(list(map_iter2)) # it is consumed!
y=list(map_iter2) # it's already empty
</code></pre>
<p>if you need to, you can uses <a href="https://docs.python.org/3/... | why is a map object couldn't be assigned to a variable when it is printed beforehand as a list object | python|python-3.x | -1 | 17 | 1 | 72,076,137 | 72,076,137 | 1 | true | 2022-05-01T11:05:32.977Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
why is a map object couldn't be assigned to a variable when it is printed beforehand as a list object<p>lst=['a','xyz', 'summer', 'spring']</p>
<pre><code>de... |
72,081,322 | Unknown date format from API response<p>API Server responds with token expiration date in the following format:
<code>2022-05-09T02:11:27.747</code>
What format is it?</p> | <p>That's ISO-8601 standard time format. Year month day T hour minute second millisecond. The <code>date_parse</code> function will handle this.</p>
<pre><code><?php
$x = '2021-04-01T19:18:17.654';
print_r(date_parse($x));
?>
</code></pre>
<p>Output:</p>
<pre><code>Array
(
[year] => 2021
[month] =&... | Unknown date format from API response | php|json | -1 | 21 | 1 | 72,081,339 | 72,081,339 | 1 | true | 2022-05-02T00:19:40.907Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Unknown date format from API response<p>API Server responds with token expiration date in the following format:
<code>2022-05-09T02:11:27.747</code>
What for... |
72,081,869 | Unexplained Border on side of iframe<p>I have a page that I'm working on (<a href="https://docs.focusfwd.com/" rel="nofollow noreferrer">https://docs.focusfwd.com/</a>) that has an iframe that is displaying a border on the left side. The border is set to 0 and I can't figure out from exploring the html/css what is caus... | <p>Each of your table rows has a <code><th></code> at the start that's getting squashed down to a single pixel. Force a width on them, and you'll see they're the culprit.</p>
<p><a href="https://i.stack.imgur.com/Fffry.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Fffry.png" alt="enter image ... | Unexplained Border on side of iframe | html|css | -1 | 34 | 1 | 72,081,909 | 72,081,909 | 1 | true | 2022-05-02T02:39:55.280Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Unexplained Border on side of iframe<p>I have a page that I'm working on (<a href="https://docs.focusfwd.com/" rel="nofollow noreferrer">https://docs.focusfw... |
72,088,252 | How to make Flutter Web scrollable?<p>I am trying to make a website with Flutter. I have a code like this:</p>
<pre><code>class say2 extends StatefulWidget {
say2({Key? key}) : super(key: key);
@override
State<say2> createState() => _say2State();
}
class _say2State extends State<say2> {
@overrid... | <p>You can use a <a href="https://api.flutter.dev/flutter/widgets/ListView-class.html" rel="nofollow noreferrer"><code>ListView</code></a></p>
<pre class="lang-dart prettyprint-override"><code> Widget build(BuildContext context) {
return ListView(
children: [
Text("Merhaba dünya"),
T... | How to make Flutter Web scrollable? | flutter | -1 | 18 | 1 | 72,088,387 | 72,088,387 | 1 | true | 2022-05-02T14:33:13.667Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to make Flutter Web scrollable?<p>I am trying to make a website with Flutter. I have a code like this:</p>
<pre><code>class say2 extends StatefulWidget {... |
72,104,336 | return value includes both array and object?<p>One of the functions I call from google firebase returns a response that looks the below.</p>
<p>I am not familiar with this syntax -- particularly the use of the '&' sign in the return value. It looks like it returns both an array and an object.</p>
<p>If I have an i... | <p>This intersection type can be treated as an object or as a tuple, depending on your preference.</p>
<p>If you have an interface representing the object part of the type, you should be able to assing the intersection type tou your interface</p>
<p><a href="https://www.typescriptlang.org/play?#code/C4TwDgpgBAsiDyAjAVl... | return value includes both array and object? | typescript | -1 | 22 | 1 | 72,104,839 | 72,104,839 | 1 | true | 2022-05-03T19:08:43.343Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
return value includes both array and object?<p>One of the functions I call from google firebase returns a response that looks the below.</p>
<p>I am not fami... |
72,106,779 | How to read mysql data using panda filtering by a specific date<p>I am trying to read a database stored in MySQL to python.</p>
<p>I understand how to connect and read the whole data, but I am having problem in how to just get the data from a specific date.
Like how to do SELECT * FROM country WHERE TIMESTAMP(date)= '2... | <pre class="lang-py prettyprint-override"><code>df = pd.read_sql(f"SELECT * FROM {tables[0]} WHERE date = '2022-02-19'", con=engine)
</code></pre> | How to read mysql data using panda filtering by a specific date | mysql|pandas|dataframe | -1 | 24 | 1 | 72,106,818 | 72,106,818 | 1 | true | 2022-05-04T00:35:00.517Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to read mysql data using panda filtering by a specific date<p>I am trying to read a database stored in MySQL to python.</p>
<p>I understand how to connec... |
72,111,869 | Canvas and arc drawing doesnt work properly in html and javascript<p>So I have this Canvas on which I have my circle and when I try to change the x and y of my circle it glitches.It appears like this when I try to move it towards the left by changing the x value to 10 changing the x to any other value makes no change:
... | <p>You need to Include Height an Width Tags to xour canvas</p>
<pre><code><canvas id ="canvas" height="200px" style="padding-left: 1215px;padding-bottom: 415px;margin:
0px;border:ridge rgb(127, 117, 117);"></canvas>
</code></pre>
<p>Then it will work.</p> | Canvas and arc drawing doesnt work properly in html and javascript | javascript|html | -1 | 24 | 2 | 72,112,119 | 72,112,119 | 1 | true | 2022-05-04T11:01:29.383Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Canvas and arc drawing doesnt work properly in html and javascript<p>So I have this Canvas on which I have my circle and when I try to change the x and y of ... |
72,134,081 | Unable to make fields and values in italics in html/jinja2<p>Hello I have the following Html jinja2 template</p>
<pre><code><h1>Table of contents</h1>
{%- for region, d in data.items() %}
<a href="#{{ pageTag }}-{{ region }}">{{ loop.index }}. TGW VPC - {{ region }}</a>
<br/>
{%... | <pre><code><h1>Table of contents</h1>
{%- for region, d in data.items() %}
<a href="#{{ pageTag }}-{{ region }}">{{ loop.index }}. TGW VPC - {{ region }}</a>
<br/>
{% endfor %}
{%- for region, d in data.items() %}
<h1>{{ region }}</h1>
<em>Account = {{ d["... | Unable to make fields and values in italics in html/jinja2 | html|jinja2|jinja2-cli | -1 | 16 | 1 | 72,134,109 | 72,134,109 | 1 | true | 2022-05-05T21:59:40.997Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Unable to make fields and values in italics in html/jinja2<p>Hello I have the following Html jinja2 template</p>
<pre><code><h1>Table of contents</h... |
72,138,301 | SQL count or max (sqlite)<p>The table is like this:</p>
<pre><code>ratio|user
0.1|2
0.3|2
1 |2
1 |2
0.4|3
0.7|3
</code></pre>
<p>The query should return, for each user, either the number of times the ratio is 1, or, if there is no 1 ratio for that user, the highest ratio. So given the table above, the que... | <p>Use a <code>CASE</code> expression to choose between the count and the highest value:</p>
<pre class="lang-sql prettyprint-override"><code>SELECT user, CASE WHEN SUM(ratio = 1) > 0
THEN SUM(ratio = 1) ELSE MAX(ratio) END AS ratio
FROM yourTable
GROUP BY user;
</code></pre> | SQL count or max (sqlite) | sql|sqlite|group-by | -1 | 20 | 2 | 72,138,361 | 72,138,361 | 1 | true | 2022-05-06T08:18:56.097Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SQL count or max (sqlite)<p>The table is like this:</p>
<pre><code>ratio|user
0.1|2
0.3|2
1 |2
1 |2
0.4|3
0.7|3
</code></pre>
<p>The query shou... |
72,138,842 | How to use more than 1 quotation using getRows method and .implode in sql Query, using PHP<p>I'm trying to get all records from db using getRows method, to achieve that I need to implode special characters.</p>
<p>In previous function, to get $ids I used:</p>
<pre><code>foreach ($ids as &$id) $id = (int)$id;
... | <p>Switching between single or double quotes like you did, doesn't change the fact that you did not add any quotes around the individual name values at all. These quotes are the string delimiters the PHP syntax requires, but you have not added any quotes around the names in your implode yet, which the SQL syntax requir... | How to use more than 1 quotation using getRows method and .implode in sql Query, using PHP | php|sql | -1 | 21 | 1 | 72,138,980 | 72,138,980 | 1 | true | 2022-05-06T08:59:45.900Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to use more than 1 quotation using getRows method and .implode in sql Query, using PHP<p>I'm trying to get all records from db using getRows method, to a... |
72,139,729 | Where on GitLab.com do I find the pipeline error logs?<p>I've been working on getting a .gitlab-ci.yml pipeline to work but cannot find where the logs go.</p>
<p>GitLab.com message tells me</p>
<pre><code>npm ERR! /root/.npm/_logs/2022-05-06T09_39_43_597Z-debug.log
</code></pre>
<p>I do not see this folder created ... | <p>That can be seen by adding debug logging to your .gitlab-ci.yml file.Once you add it ,run the job again and you can get a detailed log</p> | Where on GitLab.com do I find the pipeline error logs? | gitlab|gitlab-ci | -1 | 255 | 2 | 72,139,860 | 72,139,860 | 1 | true | 2022-05-06T10:06:35.683Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Where on GitLab.com do I find the pipeline error logs?<p>I've been working on getting a .gitlab-ci.yml pipeline to work but cannot find where the logs go.</p... |
72,140,540 | Is this a valid approach to scale your target in machine learning without leaking information?<p>Consider a housing price dataset, where the goal is to predict the sale price.</p>
<p>I would like to do this by predicting the "Sale price per Squaremeter" instead,
since it yields better results.</p>
<p>The ques... | <p>All is good.</p>
<p>1· You are not leaking information.</p>
<p>2· You can directly apply this target transformation to train and test sets and transform them back after prediction.</p>
<p>3· You can do this for any feature given in X. You don't need a remark about information about the target. You can always transfo... | Is this a valid approach to scale your target in machine learning without leaking information? | python|machine-learning|scikit-learn|training-data|data-transform | -1 | 34 | 1 | 72,140,848 | 72,140,848 | 1 | true | 2022-05-06T11:10:17.863Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is this a valid approach to scale your target in machine learning without leaking information?<p>Consider a housing price dataset, where the goal is to predi... |
72,139,322 | Splitting column value by '\' in Sql server<p>I have some data in <code>FileFullPath</code> Column</p>
<pre><code>Y:\dfs-dc-01\Split\Retail\Kroger\Kroger\FTP-FromClient\Oracle\2022-05-04\MSudaitemlov_20220503
Y:\dfs-dc-01\Split\Retail\Kroger\Kroger\FTP-FromClient\OracleABC\2022-05-04\FDERDMSudaitemlov_20220503
Y:\dfs-d... | <p>You should be able to use <code>STRING_SPLIT()</code> in SQL Server 2016, except in two scenarios:</p>
<ol>
<li>If you're not calling the function correctly - many people try to call it like a scalar function (<code>SELECT STRING_SPLIT(...</code>) instead of a table-valued function (<code>SELECT * FROM STRING_SPLIT(... | Splitting column value by '\' in Sql server | sql-server | -1 | 50 | 2 | 72,141,029 | 72,141,029 | 1 | true | 2022-05-06T09:38:01.283Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Splitting column value by '\' in Sql server<p>I have some data in <code>FileFullPath</code> Column</p>
<pre><code>Y:\dfs-dc-01\Split\Retail\Kroger\Kroger\FTP... |
72,142,525 | Restangular equivalent in Angular<p>I am looking into migrating our application from angularjs (1.6.x) to modern Angular.</p>
<p>One thing I am not finding is a recommended replacement for <a href="https://github.com/mgonto/restangular" rel="nofollow noreferrer">Restangular</a> (I am most interested in the generic resp... | <p>Maybe this library will cover features of Restangular in Angular 2+ </p>
<p><a href="https://github.com/2muchcoffeecom/ngx-restangular/" rel="nofollow noreferrer">Ngx-restangular</a></p> | Restangular equivalent in Angular | angular|angularjs|angular-upgrade | -1 | 45 | 1 | 72,142,691 | 72,142,691 | 1 | true | 2022-05-06T13:46:50.470Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Restangular equivalent in Angular<p>I am looking into migrating our application from angularjs (1.6.x) to modern Angular.</p>
<p>One thing I am not finding i... |
72,141,718 | HTML not being displayed properly in Flask, Python<p>I am trying to make a website using Flask. I have designed the HTML using TeleportHQ, a drag and drop HTML designer that gives you the HTML and CSS files. I have the website looking how I want it. I downloaded the HTML and CSS. when I open the index.html file, it ope... | <h2>Update of sorts....</h2>
<p>I installed flask and went about trying to see if the problem was, and <strong>weirdly I didn't get an issue with the code you provided.</strong></p>
<p>Is this on a certain page of the website? I see that you listed app.route('/') and then app.route('/home') and when I cleaned up some o... | HTML not being displayed properly in Flask, Python | python|html|css|flask | -1 | 57 | 1 | 72,143,370 | 72,143,370 | 1 | true | 2022-05-06T12:48:23.973Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
HTML not being displayed properly in Flask, Python<p>I am trying to make a website using Flask. I have designed the HTML using TeleportHQ, a drag and drop HT... |
72,143,078 | Get current time without methods<p>I am trying to do it without methods so that I can better grasp the concept.</p>
<p>I am really close. My hours math seems to be off. What am I not understanding there?</p>
<pre class="lang-java prettyprint-override"><code>static void showCurrent(){
Date today = new Date();
lo... | <p>The LocalDateTime.now() method returns the instance of LocalDateTime class so if you print the instance of LocalDateTime class, it will print the current time and time.
To get it the the right format you need to format the current date using DateTimeFormatter class included in JDK 1.8</p>
<pre><code>import java.tim... | Get current time without methods | java|date|gettime | -1 | 80 | 3 | 72,143,682 | 72,143,682 | 1 | true | 2022-05-06T14:25:22.937Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Get current time without methods<p>I am trying to do it without methods so that I can better grasp the concept.</p>
<p>I am really close. My hours math seems... |
72,144,032 | remove commas , and [ ] from a list python 3<p>I have a this funtion</p>
<p>n=5<br />
nums=5 1 4 2 3</p>
<pre><code>def LIS(nums, n):
dp = []
dp_list = []
for i in range(n):
dp.append(1)
dp_list.append([nums[i]])
for j in range(i):
if nums[j] < nums[i]:
... | <pre><code>print(*dp_list[dp.index(max(dp))])
</code></pre> | remove commas , and [ ] from a list python 3 | python|python-3.x | -1 | 31 | 1 | 72,144,122 | 72,144,122 | 1 | true | 2022-05-06T15:33:40.397Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
remove commas , and [ ] from a list python 3<p>I have a this funtion</p>
<p>n=5<br />
nums=5 1 4 2 3</p>
<pre><code>def LIS(nums, n):
dp = []
dp_lis... |
72,144,837 | Sql determine rows that dont have value<p>I have a table that returns results like</p>
<pre><code>abc yes
abc no
cdef no
cdef no
cdef no
xyz yes
xyz no
xyz no
</code></pre>
<p>sample query</p>
<pre><code>with abc as(
select 'abc' as b , 'yes' as a
union all
select 'abc', 'no'
union all
select 'cdef', '... | <p>A simple aggregation should do the trick.</p>
<pre><code>Select Col1
,Col2 = max(Col2)
From YourTable
Group By Col1
</code></pre> | Sql determine rows that dont have value | sql-server|tsql | -1 | 33 | 1 | 72,144,875 | 72,144,875 | 1 | true | 2022-05-06T16:41:05.523Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Sql determine rows that dont have value<p>I have a table that returns results like</p>
<pre><code>abc yes
abc no
cdef no
cdef no
cdef no
xyz yes
xyz... |
72,141,863 | How to apply test-driven development for storing data on db?<p>Let us assume that the next feature that I have to develop is to store some data on a database. Following the TDD paradigm, I have to first write a failing test. It is not clear to me how I can approach this task, considering that I am using JDBC.
The simpl... | <blockquote>
<p>in TDD I am trying to write a unit test.</p>
</blockquote>
<p>You should drop this constraint -- TDD isn't about "unit" tests, not really (see Chapter 32 of <em>Test Driven Development by Example</em>). It's about "programmer" tests - the small scale tests that act as scaffolding wh... | How to apply test-driven development for storing data on db? | java|unit-testing|testing|tdd | -1 | 69 | 1 | 72,145,505 | 72,145,505 | 1 | true | 2022-05-06T12:59:11.300Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to apply test-driven development for storing data on db?<p>Let us assume that the next feature that I have to develop is to store some data on a database... |
72,147,329 | Bubble sort on string array not doing anything in C with strcmp<p>I am trying to sort a string array in C (char**), the string array is an array of all the names of files in a directory.
Here are all the parts of the code, I expect the code to sort the array alphabetically, but it doesn't work.
Here is the code to get ... | <p>You swap, and the way it is invoked from bubblesort, are both wrong. First let me educate you on a simple fundamental.</p>
<p>Arguments in C are pass-by-value. The only way to change caller-side data from an argument passed to a function as a parameter is to change the fundamentals of the parameter. You'll still pas... | Bubble sort on string array not doing anything in C with strcmp | arrays|c|dynamic-arrays | -1 | 47 | 1 | 72,147,628 | 72,147,628 | 1 | true | 2022-05-06T21:02:57.467Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Bubble sort on string array not doing anything in C with strcmp<p>I am trying to sort a string array in C (char**), the string array is an array of all the n... |
72,147,801 | Javascript Custom Array.prototype.method logs 'not defined'<p>So, I've never done this before, trying to add a method to the Array.prototype. See console.log statement below for usage. It keeps telling me the method is not defined. I can't figure out what I'm doing wrong. Help!</p>
<p>My best conclusion / guess so... | <p>I tried the following and was able to resolve the issue of <code>not defined</code></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>Array.prototype.polyReverse = function(va... | Javascript Custom Array.prototype.method logs 'not defined' | javascript|recursion|ecmascript-6|prototype|prototypal-inheritance | -1 | 48 | 2 | 72,147,929 | 72,147,929 | 1 | true | 2022-05-06T22:03:41.007Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Javascript Custom Array.prototype.method logs 'not defined'<p>So, I've never done this before, trying to add a method to the Array.prototype. See console.lo... |
72,150,131 | indexing column name in the dataframe in r<pre><code>> df
A B C
1 1 2 3
2 4 5 6
3 7 8 9
</code></pre>
<p>This is an example from another stack over flow question.
Actually, in my dataset, there are 301 columns.</p>
<p>I wonder How I can index the column name.
For example, I want to extract A, B, and C as my 1st, ... | <p>In R indexing starts from 1 (and not 0). Secondly, <code>df</code> is the dataframe to get the names of the columns you need to index <code>names(df)</code> or <code>colnames(df)</code>.</p>
<pre><code>df <- data.frame(A = 1:5, B = 1:5, C = 1:5)
#To get all the column names
names(df)
#[1] "A" "B&q... | indexing column name in the dataframe in r | r|indexing | -1 | 47 | 2 | 72,150,161 | 72,150,161 | 1 | true | 2022-05-07T06:46:02.117Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
indexing column name in the dataframe in r<pre><code>> df
A B C
1 1 2 3
2 4 5 6
3 7 8 9
</code></pre>
<p>This is an example from another stack over flo... |
72,148,388 | Unauthorized Error when I want to delete article with authentification (jwt)<p>I've created a route called login and another one function(middleware), if the authentication is good, this can be redirected to the delete route but unfortunately, my jwt token is not recognizable.</p>
<p>I want to know why, the problem mus... | <p>You return the token to the client in the <code>Authorization</code> header:</p>
<pre class="lang-js prettyprint-override"><code>res.header("Authorization","Bearer " + token)
</code></pre>
<p>This is a non-standard use of this header, it will <em>not</em> automatically be sent back in the next re... | Unauthorized Error when I want to delete article with authentification (jwt) | javascript|node.js|express|jwt | -1 | 89 | 1 | 72,150,759 | 72,150,759 | 1 | true | 2022-05-06T23:46:11.330Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Unauthorized Error when I want to delete article with authentification (jwt)<p>I've created a route called login and another one function(middleware), if the... |
72,145,042 | Clap raw bytes arguments<p>I would like to use raw byte argument with clap</p>
<p>For example <code>--raw $(echo -n -e 'B\x10CC\x01\xff')</code> will give me the following bytes array <code>[66, 16, 67, 67, 1, 239, 191, 189]</code> (using <code>to_string_lossy().to_bytes()</code>).</p>
<p>Is there a way to get exact by... | <p><code>clap</code> is platform agnostic and therefore uses abstractions like <code>OsString</code> (which is the type of your <code>s</code> variable).</p>
<p>There seems to be no generic <code>as_bytes()</code> method attached to <code>OsString</code>, because not on every operating system <code>OsString</code> <em>... | Clap raw bytes arguments | rust|clap | -1 | 155 | 1 | 72,150,818 | 72,150,818 | 1 | true | 2022-05-06T16:58:12.663Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Clap raw bytes arguments<p>I would like to use raw byte argument with clap</p>
<p>For example <code>--raw $(echo -n -e 'B\x10CC\x01\xff')</code> will give me... |
72,151,208 | How to make wrap divs without display: inline-block;?<p>So I want the inner divs outside the outer div to wrap according to the width of the outer div, which in turn expands and contracts according to the width of the browser window. I know that I can use <code>display: inline-block;</code> to make the divs wrap around... | <p>Maybe you just need to add flex-wrap: wrap; to the container so the inner divs start wrapping.</p>
<pre><code>.container {
display: flex;
justify-content: center;
flex-wrap: wrap;
}
</code></pre>
<p>Here is a <a href="https://jsfiddle.net/mpheuLza/" rel="nofollow noreferrer">working demo</a>.</p> | How to make wrap divs without display: inline-block;? | html|css|flexbox | -1 | 38 | 2 | 72,151,306 | 72,151,306 | 1 | true | 2022-05-07T09:26:48.543Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to make wrap divs without display: inline-block;?<p>So I want the inner divs outside the outer div to wrap according to the width of the outer div, which... |
72,151,921 | Check in ansible if value is lower with islower<p>Could someone give an example to check if the value of a variable is lowercase with islower?</p>
<p>Thanks</p> | <p>use the islower function:</p>
<pre><code>- name: echo test
debug:
msg: |
is low lower?: {{ low.islower() }}
is notlow lower?: {{ notlow.islower() }}
vars:
low: er
notlow: Er
</code></pre> | Check in ansible if value is lower with islower | ansible | -1 | 36 | 1 | 72,152,258 | 72,152,258 | 1 | true | 2022-05-07T11:09:14.957Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Check in ansible if value is lower with islower<p>Could someone give an example to check if the value of a variable is lowercase with islower?</p>
<p>Thanks<... |
72,152,229 | Accessing an element in struct holding a pointer to a matrix array<p>I am trying to access an element using <code>temp_param->mat_ptr[0][0]</code> but it produces an error <code>Format specifies type 'int' but the argument has type 'int *'</code>. What is the problem?</p>
<pre><code>#include <stdio.h>
typedef... | <p>The type of expression <code>params.mat_ptr</code> is a pointer to 2D array. Therefore is must be dereferenced before being accessed like 2D array.
Moreover <code>temp_param</code> is a struct, not a pointer to struct. Therefore its members are accessed via <code>.</code> operator rather than <code>-></code>.</p>... | Accessing an element in struct holding a pointer to a matrix array | c | -1 | 15 | 1 | 72,152,286 | 72,152,286 | 1 | true | 2022-05-07T11:54:32.257Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Accessing an element in struct holding a pointer to a matrix array<p>I am trying to access an element using <code>temp_param->mat_ptr[0][0]</code> but it ... |
72,153,089 | How split a URL string containing multiple '&'<p>I'm using Python to split a string so that its results form a list.</p>
<p>String example:</p>
<pre><code>text = 'https://a.com/api?a=1&b=2&c&c=3&https://b.com/api?a=1&b=2&c&c=3'
# It uses '&' to separate multiple URLs. How should I get th... | <p>I would use <a href="https://docs.python.org/3/library/re.html#re.split" rel="nofollow noreferrer"><code>re.split</code></a>, splitting on an <code>&</code> that is followed by <code>http://</code> or <code>https://</code> (checking using a forward lookahead so as not to absorb those characters):</p>
<pre class=... | How split a URL string containing multiple '&' | python|string|split | -1 | 71 | 1 | 72,153,119 | 72,153,119 | 1 | true | 2022-05-07T13:43:25.270Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How split a URL string containing multiple '&'<p>I'm using Python to split a string so that its results form a list.</p>
<p>String example:</p>
<pre><code>te... |
72,153,034 | AutoMapper is not including the GetUserDto in response<p>AutoMapper Class:</p>
<pre><code>namespace ef_practice
{
public class AutoMapperProfile : Profile
{
public AutoMapperProfile()
{
CreateMap<Character, GetCharacterDto>();
CreateMap<AddCharacterDto, Character... | <p>In <code>GetCharacterDto</code> class, <code>User</code> is a field but not a property.</p>
<p>Change it to the property by adding getter and setter.</p>
<pre class="lang-cs prettyprint-override"><code>public class GetCharacterDto
{
...
public GetUserDto User { get; set; } = new GetUserDto();
}
</code></pre... | AutoMapper is not including the GetUserDto in response | c#|entity-framework|automapper | -1 | 25 | 1 | 72,153,210 | 72,153,210 | 1 | true | 2022-05-07T13:34:52.797Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
AutoMapper is not including the GetUserDto in response<p>AutoMapper Class:</p>
<pre><code>namespace ef_practice
{
public class AutoMapperProfile : Profil... |
72,152,961 | Function to generate a retry with time accumulator every error<p>I have a main file that calls the secondary:</p>
<pre><code>import code_two
if __name__ == '__main__':
code_two.main()
</code></pre>
<p>file <code>code_two.py</code>:</p>
<pre><code>from random import randint
import time
def try_again(a):
print(... | <p>Move your loop to <code>main</code>, and pass the sleep time to <code>try_again</code> as an argument.</p>
<pre><code>from random import randint
import time
def try_again(a, s):
print(a)
print('Next attempt in: '+ str(s/60) + ' minute(s)')
sleep(s)
return s + 30
def main(sleep_time=0):
done =... | Function to generate a retry with time accumulator every error | python | -1 | 24 | 2 | 72,153,211 | 72,153,211 | 1 | true | 2022-05-07T13:24:37.603Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Function to generate a retry with time accumulator every error<p>I have a main file that calls the secondary:</p>
<pre><code>import code_two
if __name__ == ... |
72,153,263 | Comma separator confusion in Array and ArrayList<p>Why am I getting an error while initializing <code>ArrayList</code> with a trailing comma (,) whereas I understand through various websites that <code>Array</code> with trailing comma(s) will create holes and iterating that will skip the holes?</p>
<p>Java:</p>
<pre cl... | <blockquote>
<p>hereas I understand through various websites that Array with trailing comma(s) will create holes and iterating that will skip the holes</p>
</blockquote>
<p>Not in java it doesn't. That's referring to various other languages where you can e.g. type <code>[, , ,]</code> and this makes a list of 4x "... | Comma separator confusion in Array and ArrayList | java|arrays|arraylist | -1 | 54 | 1 | 72,153,473 | 72,153,473 | 1 | true | 2022-05-07T14:07:14.490Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Comma separator confusion in Array and ArrayList<p>Why am I getting an error while initializing <code>ArrayList</code> with a trailing comma (,) whereas I un... |
72,153,840 | How to format the output in Oracle 19c SQL Plus?<p><img src="https://i.stack.imgur.com/4M6Ce.png" alt="enter image description here" /></p>
<p>Hi I am trying to format this select's output to look like a table with columns not on on top of each other, but one next to each other and the values to be under the correct co... | <p>For the vast majority of situations, you'd be better off using a GUI like SQL Developer to run your queries which will automatically format results in a visually pleasing manner.</p>
<p>In <code>SQL*Plus</code>, however, you can go for each column and identify the number of characters you want to be used in your out... | How to format the output in Oracle 19c SQL Plus? | sql|oracle|sqlplus|oracle19c | -1 | 127 | 1 | 72,154,037 | 72,154,037 | 1 | true | 2022-05-07T15:19:04.780Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to format the output in Oracle 19c SQL Plus?<p><img src="https://i.stack.imgur.com/4M6Ce.png" alt="enter image description here" /></p>
<p>Hi I am trying... |
72,153,851 | Create a simple like button component with React<p><strong>SOLUTION JAVASCRIPT:</strong></p>
<p>How create to Build a “like button” component using React 16. The component should be the default export (use export default).</p>
<p><a href="https://i.stack.imgur.com/TT4Ub.png" rel="nofollow noreferrer">Click here image</... | <p>Personally, I prefer to use functional components instead of using class-based components. One solution to your problem could be the following code.</p>
<pre><code>import React, { useState } from 'react';
const LikeButton = () => {
const [likes, setLikes] = useState(100);
const [isClicked, setIsClicked] = u... | Create a simple like button component with React | javascript|reactjs|button|counter|styled-components | -1 | 1,377 | 1 | 72,154,054 | 72,154,054 | 1 | true | 2022-05-07T15:20:26.470Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Create a simple like button component with React<p><strong>SOLUTION JAVASCRIPT:</strong></p>
<p>How create to Build a “like button” component using React 16.... |
72,154,077 | Google Maps embedded - set max zoom level<p>If I have an embedded Google Map</p>
<pre><code>$("#map_frame").attr("src", "https://www.google.com/maps/d/embed?mid=1Sdu3m4-YMx_Kc0gWshTNQQgSFys&z=2&ll=44.013922, -88.342259");
</code></pre>
<p>Is is possible to set a maximum zoom level?... | <p>You can't, google maps api doesn't offer that.</p> | Google Maps embedded - set max zoom level | google-maps|embed | -1 | 72 | 1 | 72,154,191 | 72,154,191 | 1 | true | 2022-05-07T15:45:25.647Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Google Maps embedded - set max zoom level<p>If I have an embedded Google Map</p>
<pre><code>$("#map_frame").attr("src", "https://www... |
72,154,432 | Returning to a previous choice in python<p>I’m working on a text adventure game for my first big self-made project in Python. I’m trying to figure out how to make it so that the player can go back to a previous area so that they may make another choice. I’m not sure how to do that. Any idea how?</p>
<pre><code>answer_y... | <p>Use while loop here.</p>
<pre class="lang-py prettyprint-override"><code>answer_yes = ["Yes" ,"Y" ,"yes" ,"y" ]
answer_no = ["No" ,"N", "no", "n"]
answer_north = ["North", "N"]
answer_south = ["South", "... | Returning to a previous choice in python | python|game-development | -1 | 31 | 1 | 72,154,500 | 72,154,500 | 1 | true | 2022-05-07T16:27:39.020Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Returning to a previous choice in python<p>I’m working on a text adventure game for my first big self-made project in Python. I’m trying to figure out how to... |
72,154,705 | Add column in first data frame based upon two columns in second data frame<p>I am trying to add a column to a first data frame based upon a second data frame.
Basically, in the data frame 1, I have values, that are existing in data frame 2 but with additional information that I would like to extract into data frame 1.<... | <p>As you are using the tidyverse you just need a <code>left_join</code>...</p>
<pre><code>dt_b %>% left_join(dt_a %>% rename(Food_b = Food_a))
Joining, by = "Food_b"
Food_b Class
1 Apple Fruit
2 Bread <NA>
3 Onion Vegetable
4 Banana Fruit
</code></pre>
<p>The <code>rename<... | Add column in first data frame based upon two columns in second data frame | r|data-wrangling | -1 | 57 | 1 | 72,154,767 | 72,154,767 | 1 | true | 2022-05-07T17:04:18.397Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Add column in first data frame based upon two columns in second data frame<p>I am trying to add a column to a first data frame based upon a second data frame... |
72,155,184 | Can docker container call host syscalls?<p>I'm running a Docker container (alphine) on MacOS 11.6, there's a Typescript app in that container. I need to simulate and record input from Docker on host. Is it possible to setup Docker in a way that would allow my container to control host's input using node.js <code>osx-mo... | <p>That's almost certainly not possible. In general Docker containers are prohibited from accessing the host display or other host devices. Since Docker Desktop runs a hidden Linux VM, it's especially difficult: the display technologies are totally different and the VM layer makes it look like the container and host ... | Can docker container call host syscalls? | docker|macos|input|simulation | -1 | 88 | 1 | 72,155,778 | 72,155,778 | 1 | true | 2022-05-07T18:00:51.060Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Can docker container call host syscalls?<p>I'm running a Docker container (alphine) on MacOS 11.6, there's a Typescript app in that container. I need to simu... |
72,157,048 | How can I compare the elements inside of a txt file in python?<p>I was doing a program in which I need to input some strings and then writes them on a file. What I have to do next is find the equal elements in the file. To do an example of what file I am handling:</p>
<pre><code>Surname-Name-class
Surname2-Name2-class
... | <p>You could simply use <code>open</code> and read the file line by line into a list.</p>
<pre><code>my_file = open("/PathToYourFile/test.txt", "r")
content = [element.replace('\n', '').split("-") for element in
my_file.readlines()]
print(content)
</code></pre>
<p>This will print an array... | How can I compare the elements inside of a txt file in python? | python | -1 | 40 | 2 | 72,157,089 | 72,157,089 | 1 | true | 2022-05-07T23:28:22.950Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I compare the elements inside of a txt file in python?<p>I was doing a program in which I need to input some strings and then writes them on a file. ... |
72,157,073 | java.util.Scanner refuses to take the next (or any) input<p><strong>Current error message</strong> "cannot find symbol: variable nextLine in variable input of type Scanner"</p>
<p>Eventually it is going to do much more than this but I don't even understand why it won't read...so it may take a bit XD</p>
<p>Me... | <p>you are missing parenthesis"()", nextLine() is a function when calling function in java we need parenthesis after a function name to invoke a function. similar to what you did here</p>
<pre><code>while(input.hasNextLine())
</code></pre>
<p>this will work</p>
<pre><code>public static void flipCoins(Scanner ... | java.util.Scanner refuses to take the next (or any) input | java|file|debugging|java.util.scanner | -1 | 75 | 3 | 72,157,122 | 72,157,122 | 1 | true | 2022-05-07T23:35:28.427Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
java.util.Scanner refuses to take the next (or any) input<p><strong>Current error message</strong> "cannot find symbol: variable nextLine in variable in... |
72,158,014 | INDEX MACTH [Google Sheets]<p>I have a table with the result of a test. The table is structured as follows:</p>
<pre><code>student score_description score_value
Juan test 1 5
Peter
Brian test 2 8
Jose test3 10
</code></pre>
<p>I need to conv... | <p>Try</p>
<pre><code>=QUERY(A:C,"select A,sum(C) where A is not null group by A pivot B ")
</code></pre>
<p>or</p>
<pre><code>=QUERY(A:C,"select A,sum(C) where B is not null group by A pivot B ")
</code></pre>
<p><a href="https://i.stack.imgur.com/o8XS3.png" rel="nofollow noreferrer"><img src="http... | INDEX MACTH [Google Sheets] | google-sheets|spreadsheet | -1 | 31 | 1 | 72,158,211 | 72,158,211 | 1 | true | 2022-05-08T04:15:48.693Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
INDEX MACTH [Google Sheets]<p>I have a table with the result of a test. The table is structured as follows:</p>
<pre><code>student score_description scor... |
72,158,325 | Why undeclared identifier error occurres while I'm using objet in class's function?<p>I've been self teaching CPP OOP and this error occurred:
<em>Error C2065 'carObj1': undeclared identifier</em></p>
<p>And since I'm self teaching I tried to search on Internet but nothing found!
Can anyone help me with this?</p>
<p... | <p>The <strong>problem</strong> is that you're trying to access the fields <code>brand</code>, <code>model</code> and <code>year</code> on an object named <code>carObj1</code> which isn't there in the context of the member function <code>car::enterObj</code>.</p>
<p>To <strong>solve</strong> this you can either remove... | Why undeclared identifier error occurres while I'm using objet in class's function? | c++|oop|compiler-errors | -1 | 34 | 1 | 72,158,472 | 72,158,472 | 1 | true | 2022-05-08T05:25:46.160Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why undeclared identifier error occurres while I'm using objet in class's function?<p>I've been self teaching CPP OOP and this error occurred:
<em>Error C20... |
72,158,466 | Unable to compare two instances of opaque types<p>It's interesting to see that we can now declare return values that are protocols with associated types.</p>
<p>The following throws an error and I don't understand the error.</p>
<pre><code>protocol Plant: Equatable {
var maintenance: String { get }
}
struct Rose: ... | <p>When you declare a function to return <code>some Plant</code> then the compiler will look at the content of the function to see what real type is returned and in your example you are returning different types, <code>Rose</code> and <code>Orchid</code>.</p>
<p>This breaks the requirement from <code>Equatable</code> t... | Unable to compare two instances of opaque types | swift|opaque-types | -1 | 40 | 2 | 72,158,866 | 72,158,866 | 1 | true | 2022-05-08T05:51:46.737Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Unable to compare two instances of opaque types<p>It's interesting to see that we can now declare return values that are protocols with associated types.</p>... |
72,159,135 | DB queries with "In" seem to be sorted<p>There are clients(companies) and contacts in two tables. Both contacts and clients have their own fields. But they all have an id that is a primaryKey. In addition, there are "links" between clients and contacts - each client can be assigned a contact and vice versa. T... | <p>By default an SQLite table has a Rowid column. We can use this column in ORDER BY.
If we want the ContactId's in the order they were inserted into the table contacts we can join onto contacts and order by it's Rowid.<br />
See [https://www.sqlitetutorial.net/sqlite-autoincrement/][1]</p>
<blockquote>
<pre><code>cre... | DB queries with "In" seem to be sorted | sql|sqlite | -1 | 35 | 1 | 72,159,514 | 72,159,514 | 1 | true | 2022-05-08T08:04:10.100Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
DB queries with "In" seem to be sorted<p>There are clients(companies) and contacts in two tables. Both contacts and clients have their own fields. But they a... |
72,159,674 | Input-Format in Excel-VBA<p>I am looking for a function in Excel-VBA that converts a user-input of the form "<strong>hhmm</strong>" in the input-cell to the form "<strong>hh:mm</strong>" and checks for pausibility.</p>
<p>Any solution is welcome...</p> | <p>Something like this:</p>
<pre class="lang-vb prettyprint-override"><code>
Dim InputText As String
Dim TextDate As String
Dim TrueDate As Date
InputText = "1749"
TextDate = Left(InputText, 2) & "\:" & Right(InputText, 2)
If IsDate(TextDate) Then
TrueDate = CDate(TextDate)
' True... | Input-Format in Excel-VBA | excel|vba | -1 | 36 | 1 | 72,159,897 | 72,159,897 | 1 | true | 2022-05-08T09:29:05.820Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Input-Format in Excel-VBA<p>I am looking for a function in Excel-VBA that converts a user-input of the form "<strong>hhmm</strong>" in the input-ce... |
72,161,247 | shared memory c++ cross platform<p>I'm coding in C++ a program that works as a socket between other programs in different languages (C#, Python till now). This socket reads data from the USB-port, do some stuff and stream it to the other programs.</p>
<p>My Idea: each program asks over a port-massage to be part of the ... | <blockquote>
<p>Is this possible? shared memory over different programing-languages?</p>
</blockquote>
<p>Yes. Memory is memory, so a shared-memory region created by language A can be accessed by a program written in language B.</p>
<blockquote>
<p>and can I just passe the pointer to the shared memory to the other pr... | shared memory c++ cross platform | c++ | -1 | 273 | 2 | 72,161,714 | 72,161,714 | 1 | true | 2022-05-08T12:59:25.400Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
shared memory c++ cross platform<p>I'm coding in C++ a program that works as a socket between other programs in different languages (C#, Python till now). Th... |
72,162,056 | I want to populate my dropdown dynamically with the date as value with a limit of 1 year as shown below<pre><code><select>
<option value="2022-05-01">May 2022</option>
<option value="2022-04-01">April 2022</option>
<option value="2022-03-01">... | <p>Here you are :)</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>let d = new Date(), currentYear = d.getFullYear(), currentMonth = d.getMonth(), month, months, sortedMonths,... | I want to populate my dropdown dynamically with the date as value with a limit of 1 year as shown below | javascript|html|css | -1 | 38 | 1 | 72,163,748 | 72,163,748 | 1 | true | 2022-05-08T14:39:20.637Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I want to populate my dropdown dynamically with the date as value with a limit of 1 year as shown below<pre><code><select>
<option value="2... |
72,162,986 | Load a apreadsheet and copy a row and pasted it in a different location<p>How can I copy a row for example from D51 to F51 and paste these values in the row T20 to AF20.</p>
<p>I know how to load a spreadsheet</p>
<pre><code>workbook = load_workbook(output)
sheet = workbook.active
</code></pre>
<p>But I dont know how ... | <p>You can achieve this by using code below...
Note that the file <code>output.xlsx</code> is opened, updated and saved. The function <code>num_to_excel_col</code> is borrowed from <a href="https://stackoverflow.com/questions/42176498/repeating-letters-like-excel-columns">here</a>.
This will update columns 20 (T) onwar... | Load a apreadsheet and copy a row and pasted it in a different location | python|openpyxl | -1 | 24 | 1 | 72,163,778 | 72,163,778 | 1 | true | 2022-05-08T16:22:18.087Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Load a apreadsheet and copy a row and pasted it in a different location<p>How can I copy a row for example from D51 to F51 and paste these values in the row ... |
72,164,007 | Can Azure front door be used as disaster management strategy for a web app hosted in azure?<p>I want to know if Azure front door be used for disaster management for a web app hosted in azure?</p>
<p>Reading the content around Azure front door, I understand that it can be used for following</p>
<ol>
<li>Load balancing a... | <p>Yes and it is mostly used for creating high availability applications. You can deploy your web application in multiple other Azure regions for high availability. You can then use the Azure front door which can redirect traffic to the other if first region is unavailable.</p>
<p><a href="https://i.stack.imgur.com/WV... | Can Azure front door be used as disaster management strategy for a web app hosted in azure? | azure|azure-web-app-service|replication|disaster-recovery|azure-front-door | -1 | 224 | 1 | 72,164,057 | 72,164,057 | 1 | true | 2022-05-08T18:26:36.217Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Can Azure front door be used as disaster management strategy for a web app hosted in azure?<p>I want to know if Azure front door be used for disaster managem... |
72,164,118 | How to calculate the distance to a pixel<p>I have an image in numpy.ndarray. <strong>The aim</strong> is to calculate the distance from the <strong>center</strong> of image to a <strong>darkest</strong> pixel. Image shape = (717, 717), pixel range = (-0.812, 0.895).</p>
<p>P.s. It's a normalized cross-correlation outp... | <p>If the darkest means the minimum then you can get the corrdinate of the minimum with <code>x_min,y_min = np.unravel_index(np.argmin(array),array.shape)</code> (found from <a href="https://stackoverflow.com/questions/20938586/get-minimum-x-and-y-from-2d-numpy-array-of-points">this post</a>)
then get the center coordi... | How to calculate the distance to a pixel | python|image-processing|computer-vision | -1 | 74 | 1 | 72,164,226 | 72,164,226 | 1 | true | 2022-05-08T18:42:57.580Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to calculate the distance to a pixel<p>I have an image in numpy.ndarray. <strong>The aim</strong> is to calculate the distance from the <strong>center</s... |
72,164,540 | Parsing output from ping<p>Having trouble trying to parse data from pinging an IP address. I've been trying to parse data from the ping results and format it like:</p>
<pre class="lang-none prettyprint-override"><code>IP, TimeToPing (ms)
10.1.2.3, 10
</code></pre>
<p>This is where the script is at so far:</p>
<pre><cod... | <p>Is this what you want?</p>
<pre class="lang-py prettyprint-override"><code>import re
import subprocess
import sys
from tabulate import tabulate
def main():
address = sys.argv[1]
pingthis = ['ping', '-c', '1', address]
r = (
subprocess
.run(
pingthis,
stdout=subp... | Parsing output from ping | python|parsing|ping | -1 | 141 | 1 | 72,164,985 | 72,164,985 | 1 | true | 2022-05-08T19:40:33.070Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Parsing output from ping<p>Having trouble trying to parse data from pinging an IP address. I've been trying to parse data from the ping results and format it... |
72,140,988 | Name error with Tkinter get() widget and global variables<p><a href="https://i.stack.imgur.com/qIBXf.png" rel="nofollow noreferrer">enter image description here</a>What I want to do is get user to input 4 values to entry widgets and after and using those input values or function returns in another function but I get na... | <p>Thank you for the comments guys! Like you suggested I was able to get to the root of the problem and realized I needed an entirely different approach and got rid of all my global variables and seperate functions. Instead I created one function that has 4 entries under a class and I used the Prompt() attribute to use... | Name error with Tkinter get() widget and global variables | python|global-variables|tkinter-entry | -1 | 28 | 1 | 72,165,310 | 72,165,310 | 1 | true | 2022-05-06T11:47:45.043Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Name error with Tkinter get() widget and global variables<p><a href="https://i.stack.imgur.com/qIBXf.png" rel="nofollow noreferrer">enter image description h... |
72,164,305 | How to make Docker Compose pull & restart when any of the image is updated?<p>How can I make my docker compose restart itself and use the latest image (pulls new version of the image) when any of its images has a new push? Thanks!</p> | <p>You can't do this with <code>docker-compose</code>. There is the need for something/someone who checks for new image, something like <a href="https://containrrr.dev/watchtower/" rel="nofollow noreferrer">Watchtower</a>, for example.</p> | How to make Docker Compose pull & restart when any of the image is updated? | docker|docker-compose | -1 | 57 | 1 | 72,165,397 | 72,165,397 | 1 | true | 2022-05-08T19:07:33.580Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to make Docker Compose pull & restart when any of the image is updated?<p>How can I make my docker compose restart itself and use the latest image (pulls... |
72,164,691 | Best practices for iOS back-end versioning<p>I've never worked at a tech company. I built an app from scratch with a NodeJS API and MongoDB hosted on AWS.</p>
<p>I will start hiring back-end developers to work with me.</p>
<p>What is the best way to making changes to the backend? All the .js files are stored in a repos... | <p>There are a number of considerations:</p>
<ol>
<li><p><strong>Environments</strong></p>
<p>Many would have multiple “environments”. Frequently, you would have at least “development”, “test”, and “production” environments. Many organizations have a fourth environment, adding a “staging” or “pre-production” environmen... | Best practices for iOS back-end versioning | ios|testing|versioning|testflight | -1 | 112 | 1 | 72,165,589 | 72,165,589 | 1 | true | 2022-05-08T20:02:08.520Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Best practices for iOS back-end versioning<p>I've never worked at a tech company. I built an app from scratch with a NodeJS API and MongoDB hosted on AWS.</p... |
72,166,279 | Is there a Numpy array broadcasting expression simpler than this list comprehension?<p>In this code snippet:</p>
<pre><code>triangles = np.float32([[[0, -2], [-2, 3], [1, 1]], [[0, -1], [-1, 3], [1, 1]]])
centers = np.average(triangles, axis=1)
samples = np.float32([t-centers[i] for i, t in enumerate(triangles)])
</cod... | <p>I believe this does what you want. Just reshape the centers to match the row size.</p>
<pre><code>samples = triangles - centers.reshape(triangles.shape[0],-1,triangles.shape[2])
</code></pre> | Is there a Numpy array broadcasting expression simpler than this list comprehension? | python|numpy|list-comprehension|array-broadcasting | -1 | 40 | 3 | 72,166,315 | 72,166,315 | 1 | true | 2022-05-09T01:54:24.363Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is there a Numpy array broadcasting expression simpler than this list comprehension?<p>In this code snippet:</p>
<pre><code>triangles = np.float32([[[0, -2],... |
72,158,538 | Angular 13 - Best Practice - with iFrames<p>I have a project which has only two parts</p>
<ol>
<li>Header: Having Prev-Home-Next buttons</li>
<li>Body: Having Home page (default)</li>
</ol>
<p>Now, on body there are 10 icons having unique Redirect URLs
When user clicks on any icon, its URL should open in place of Home ... | <p>Many ways to do this. Here's some ideas for you:</p>
<p>For the header get previous url using router history <a href="https://stackoverflow.com/a/41039092/15439733">https://stackoverflow.com/a/41039092/15439733</a>. Home is a static link to your home url. Next url is one url after current on your list or urls.</p>
<... | Angular 13 - Best Practice - with iFrames | angular|angularjs|routes | -1 | 311 | 1 | 72,166,468 | 72,166,468 | 1 | true | 2022-05-08T06:07:06.650Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Angular 13 - Best Practice - with iFrames<p>I have a project which has only two parts</p>
<ol>
<li>Header: Having Prev-Home-Next buttons</li>
<li>Body: Havin... |
72,166,418 | How to fix jump when click on search bar?<p>There is a phenomenon that jumps when you click the search bar.</p>
<p>The view is below.</p>
<p><a href="https://i.imgur.com/reKZ1wA.gif" rel="nofollow noreferrer">https://i.imgur.com/reKZ1wA.gif</a></p>
<h1></h1>
<hr />
<p>my code.</p>
<pre class="lang-swift prettyprint-ove... | <p><a href="https://developer.apple.com/documentation/uikit/uiviewcontroller/1621515-edgesforextendedlayout" rel="nofollow noreferrer">https://developer.apple.com/documentation/uikit/uiviewcontroller/1621515-edgesforextendedlayout</a></p>
<p>I have set "under top bars" of "extend edge" options in Vi... | How to fix jump when click on search bar? | ios|uikit|uisearchcontroller | -1 | 32 | 1 | 72,166,979 | 72,166,979 | 1 | true | 2022-05-09T02:24:47.740Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to fix jump when click on search bar?<p>There is a phenomenon that jumps when you click the search bar.</p>
<p>The view is below.</p>
<p><a href="https:/... |
72,169,195 | What kind of design pattern is MVC<p>There are three types of design patterns: behavioral, structural and creational.</p>
<p>MVC is also a design pattern, but I can't find what category it belongs to.</p> | <p>MVC is a kind of <code>Architecture</code>.
You need to separate when it comes to say about that.</p> | What kind of design pattern is MVC | model-view-controller|design-patterns | -1 | 225 | 1 | 72,169,240 | 72,169,240 | 1 | true | 2022-05-09T08:43:33.737Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What kind of design pattern is MVC<p>There are three types of design patterns: behavioral, structural and creational.</p>
<p>MVC is also a design pattern, bu... |
72,168,924 | Shell script to fetch S3 bucket size with AWS CLI<p>I have this script that fetches all the buckets in AWS along with the size. But when I am running the script its fetching the bucket, but when running the loop for fetching the size, its throwing error. can someone point me where I am going wrong here. bcos when I am ... | <p>Try this:</p>
<pre class="lang-sh prettyprint-override"><code>#!/bin/bash
aws_profiles=('aws-stage' 'aws-prod');
for profile in "${aws_profiles[@]}"; do
echo "$profile"
read -rd "\n" -a buckets <<< "$(aws --profile "$profile" s3 ls | cut -d " "... | Shell script to fetch S3 bucket size with AWS CLI | bash|amazon-web-services|shell|aws-cli | -1 | 163 | 1 | 72,169,362 | 72,169,362 | 1 | true | 2022-05-09T08:20:20.590Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Shell script to fetch S3 bucket size with AWS CLI<p>I have this script that fetches all the buckets in AWS along with the size. But when I am running the scr... |
72,169,671 | How can i display a string adding a hyphen each word on PL/SQL<p>How can I display a string, separating each letter by a dash with a for loop?</p>
<p>For example i want to display:</p>
<p>h-e-l-l-o-w-o-r-l-d</p>
<p>I tried with the <strong>substr</strong> function but I can't get it out</p> | <p>If it must be PL/SQL and <code>FOR</code> loop, then you could</p>
<pre><code>SQL> set serveroutput on
SQL> declare
2 l_str varchar2(20) := 'helloworld';
3 retval varchar2(50);
4 begin
5 for i in 1 .. length(l_str) loop
6 retval := retval || substr(l_str, i, 1) ||'-';
7 end loop;... | How can i display a string adding a hyphen each word on PL/SQL | oracle|plsql | -1 | 88 | 2 | 72,169,760 | 72,169,760 | 1 | true | 2022-05-09T09:22:52.830Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can i display a string adding a hyphen each word on PL/SQL<p>How can I display a string, separating each letter by a dash with a for loop?</p>
<p>For exa... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.