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,886,253
Custom endpoints of app not loading when APP_ENV is dev<p>When I install an app while the <code>APP_ENV</code> is set to dev, custom endpoints, and script as a whole, do not get executed. When I install the same under prod it works, but developing like this is hell.</p> <p>Am I missing something or could this be a bug?...
<p>Has been fixed with commit on trunk, will be released with next version <a href="https://github.com/shopware/platform/commit/6cfd67921782e9d4d1387c542696b26573c5704f" rel="nofollow noreferrer">https://github.com/shopware/platform/commit/6cfd67921782e9d4d1387c542696b26573c5704f</a></p>
Custom endpoints of app not loading when APP_ENV is dev
shopware6
0
65
1
72,916,746
72,916,746
2
true
2022-07-06T15:29:08.063Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Custom endpoints of app not loading when APP_ENV is dev<p>When I install an app while the <code>APP_ENV</code> is set to dev, custom endpoints, and script as...
72,919,051
Excel: Problems w. INDIRECT, Arrays, and Aggregate Functions (SUM, MAX, etc.)<p><strong>Objective</strong></p> <p>I have a Microsoft Excel spreadsheet containing a price list that may change over time (<code>B2:B5</code> in the example). Separately, I have a budget that too may change over time (<code>D2</code>). I a...
<p>The first point to make, as I mentioned in the comments, is that it must be understood that piecemeal evaluation of a formula - via highlighting subsections of that formula and committing with F9 within the formula bar - will not necessarily correspond to the actual evaluation.</p> <p>Evaluation via F9 in the formul...
Excel: Problems w. INDIRECT, Arrays, and Aggregate Functions (SUM, MAX, etc.)
arrays|excel|excel-formula|aggregate-functions
1
65
2
72,919,361
72,919,361
2
true
2022-07-09T04:57:19.317Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Excel: Problems w. INDIRECT, Arrays, and Aggregate Functions (SUM, MAX, etc.)<p><strong>Objective</strong></p> <p>I have a Microsoft Excel spreadsheet contai...
72,919,494
I want to use Sieve and DTOs in the same project<p>I want to use <a href="https://github.com/Biarity/Sieve" rel="nofollow noreferrer">Sieve</a> in my Web API project. I am using Data Transfer Objects (Dtos) instead of directly sending out my database entity models over the API. I am using Automapper to quickly map the ...
<p>When working with Automapper and EF, you should leverage Automapper's <code>ProjectTo</code> rather than <code>Map</code>. This will keep the mapping operation within the <code>IQueryable</code> so that the results don't need to be materialized and the Sieve operation should flow down to the query. Using <code>Proje...
I want to use Sieve and DTOs in the same project
entity-framework|asp.net-core|asp.net-web-api|automapper|sieve.net
0
65
1
72,919,571
72,919,571
2
true
2022-07-09T06:43:20.123Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: I want to use Sieve and DTOs in the same project<p>I want to use <a href="https://github.com/Biarity/Sieve" rel="nofollow noreferrer">Sieve</a> in my Web API...
72,924,543
Excluding dependencies from javafx maven plugin<p>I'm trying to use the maven shade plugin to make a cross platform fat jar for JavaFX.</p> <p>The shade plugin part works fine. It runs off of the <code>package</code> goal, and it bundles the far jar properly.</p> <p>The fat jar requires dependency classifiers to load i...
<p>You can put this dependency in <a href="https://maven.apache.org/guides/introduction/introduction-to-profiles.html" rel="nofollow noreferrer">profile</a> in your <code>pom.xm</code> file. And active when needed.</p>
Excluding dependencies from javafx maven plugin
java|maven|javafx
1
65
1
72,927,170
72,927,170
2
true
2022-07-09T20:49:08.453Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Excluding dependencies from javafx maven plugin<p>I'm trying to use the maven shade plugin to make a cross platform fat jar for JavaFX.</p> <p>The shade plug...
72,914,502
How to Force PySpark Rounding to Use Banker's Rounding<p>I need to round a column in PySpark using Banker's Rounding (where 0.5 is rounded to the nearest even number).</p> <p>So far, I've tried this:</p> <pre><code>from pyspark.sql.functions round as _round df = df.withColumn(new_name, col(old_name) * col('ExchangeRat...
<p>You can use <a href="https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.functions.bround.html" rel="nofollow noreferrer">bround</a> from <code>pyspark.sql.functions</code>. From the docs:</p> <blockquote> <p>Round the given value to scale decimal places using HALF_EVEN rounding mod...
How to Force PySpark Rounding to Use Banker's Rounding
python|pyspark|rounding
2
65
2
72,928,181
72,928,181
2
true
2022-07-08T16:41:52.067Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to Force PySpark Rounding to Use Banker's Rounding<p>I need to round a column in PySpark using Banker's Rounding (where 0.5 is rounded to the nearest eve...
72,944,130
Is it possible to have a Type Parameter that extends 2 other type parameters?<p>Here is my goal: I want to have an argument that needs to be two separate types at the same time.</p> <p>The goal here is to extract two different types from a single object using just generics (no casting or <code>instanceof</code>).</p> <...
<blockquote> <p>Is there some way to define a type parameter that constrains it to only be used with interfaces?</p> </blockquote> <p>Compiler can't know whether <code>A</code> and <code>B</code> are interfaces or classes, since these type variables are only placeholders and actual types will be provided at runtime.</p...
Is it possible to have a Type Parameter that extends 2 other type parameters?
java|generics|bounded-types
2
65
1
72,944,684
72,944,684
2
true
2022-07-11T20:10:19.670Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is it possible to have a Type Parameter that extends 2 other type parameters?<p>Here is my goal: I want to have an argument that needs to be two separate typ...
72,954,649
Apps Script with Google Sheets : how to execute ScriptApp.newTrigger?<p>I have a general Google Sheets document title &quot;Roadmap&quot;. I want to use a copy of it to share will all my students. Eg. &quot;John Doe Roadmap&quot;, &quot;Jame Smith Roadmap&quot;... And I want datas sent to a webhook (for Zapier) when so...
<p>Maybe you can try this way. The goal is to make a menu and in this way, ask to activate the trigger if it is not already active.</p> <pre><code>function onOpen() { SpreadsheetApp.getUi().createMenu(' Menu ') .addItem(' Activate', 'activate') .addToUi(); } function activate(){ myTriggerSetup() Spreadshe...
Apps Script with Google Sheets : how to execute ScriptApp.newTrigger?
google-apps-script|triggers
0
65
1
72,955,857
72,955,857
2
true
2022-07-12T15:16:59.547Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Apps Script with Google Sheets : how to execute ScriptApp.newTrigger?<p>I have a general Google Sheets document title &quot;Roadmap&quot;. I want to use a co...
72,886,675
Looker cannot adjust spacing on visual<p>I have been unable to find a way to lock in the spacing of columns in a visualization in Looker. Every time either in dev mode or not or when editing the dashboard if I adjust the size of the columns they will not stay that way when saving the dashboard. For example this is what...
<p>Mike, you can also hard code the width for each column in the <code>Edit</code> section of the table chart:</p> <p><a href="https://i.stack.imgur.com/XRdWm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XRdWm.png" alt="enter image description here" /></a></p>
Looker cannot adjust spacing on visual
data-visualization|visualization|dashboard|looker
0
65
3
72,963,507
72,963,507
2
true
2022-07-06T16:01:08.853Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Looker cannot adjust spacing on visual<p>I have been unable to find a way to lock in the spacing of columns in a visualization in Looker. Every time either i...
72,971,505
Counting values inside string<p>Today I stumbled upon an interesting task.</p> <pre><code>Create an algorithm that compress string with repeated symbols. &quot;aaaaabbbbbbbbcd&quot; -&gt; &quot;a5b8c1d1&quot; &quot;abcaaaaaaaaaaaaaaaaaabbc&quot; -&gt; &quot;a1b1c1a18b2c1&quot; if compressed string longer than origin...
<p>Do it the simplest way possible: with a loop. No need to know fancy stuff like map and reduce for now, no need for intermediate data structures either.</p> <p>Just iterate all characters and employ the logic in the loop (compare to previous character, count repetitions, etc...).<br /> Then you may encounter special ...
Counting values inside string
swift|string|algorithm
0
65
3
72,973,416
72,973,416
2
true
2022-07-13T19:14:16.253Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Counting values inside string<p>Today I stumbled upon an interesting task.</p> <pre><code>Create an algorithm that compress string with repeated symbols. &...
72,989,853
OR condition in a formula<p>The below formula helps to Start from ASD and before the slash it prints all the data.</p> <p>Query: Now as per the requirement, i need to search for two words with OR condition. For eg it should either start with ASD or DEF I tried with OR condition but that is not working. Can someone pls ...
<p>It has to look like:</p> <pre><code>=IF(OR(ISNUMBER(SEARCH(&quot;ASD&quot;,A11)), ISNUMBER(SEARCH(&quot;DEF&quot;,A11))),MID(A11,SEARCH(&quot;&quot;&quot;&quot;,A11)+1,SEARCH(&quot;/&quot;,A11)-1-SEARCH(&quot;&quot;&quot;&quot;,A11)),&quot;&quot;) </code></pre>
OR condition in a formula
excel|vba|excel-formula
2
65
2
72,990,981
72,990,981
2
true
2022-07-15T06:31:06.490Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: OR condition in a formula<p>The below formula helps to Start from ASD and before the slash it prints all the data.</p> <p>Query: Now as per the requirement, ...
72,990,971
UseEffect viewPort custom hook creates memory leak. Can anyone see why?<p>index.js:1 Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in a useEffect cleanup function.</p> <p...
<p>The issue is that with a debounced or otherwise deferred function, it's possible for <code>setViewport</code> (or any other state setter) to get called after the component itself is gone (and doing <code>setViewport</code> will not affect anything, as there could be nothing to read that state).</p> <p>That's why Rea...
UseEffect viewPort custom hook creates memory leak. Can anyone see why?
reactjs|react-hooks|use-effect
0
65
1
73,004,829
73,004,829
2
true
2022-07-15T08:12:23.290Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: UseEffect viewPort custom hook creates memory leak. Can anyone see why?<p>index.js:1 Warning: Can't perform a React state update on an unmounted component. T...
73,005,620
i am subtracting two variables in python<p>i am subtracting two variables in python . one variable from input and another one predefined . i am getting error it shows &quot; y=name - name2 TypeError: unsupported operand type(s) for -: 'str' and 'int' &quot;<a href="https://i.stack.imgur.com/KRaMM.png" rel="nofol...
<p><code>input</code> function in python returns string by default, so if you want to use mathematical operations, you have to converts that string to <code>int</code> or <code>float</code>.</p> <p>following code should work</p> <pre><code>import time number1 = int(input(&quot;Enter Your Number: &quot;) number2 = 5000...
i am subtracting two variables in python
python
-9
65
2
73,005,691
73,005,691
2
true
2022-07-16T15:50:41.637Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: i am subtracting two variables in python<p>i am subtracting two variables in python . one variable from input and another one predefined . i am getting error...
73,007,712
MoviePy Audio doesn't exist on iPhone<p>I have produced a video using MoviePy and the audio works perfectly fine on PC, but when I try watch it on iPhone it has no audio. I played the uploaded clip on my PC too so it's not the platform where the video is. Also got a friend to listen on iPhone and it also has no audio s...
<p>Based on this, you produced a video file that's (probably) <code>h264/mp3</code>, which isn't a supported format for iPhone - your video file needs to be <code>h264/aac</code> to work on iPhones (and probably any Mac device via Quicktime).</p> <p>This is also an open issue for <code>moviepy</code>: <a href="https://...
MoviePy Audio doesn't exist on iPhone
python|moviepy
1
65
1
73,007,790
73,007,790
2
true
2022-07-16T21:18:59.957Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: MoviePy Audio doesn't exist on iPhone<p>I have produced a video using MoviePy and the audio works perfectly fine on PC, but when I try watch it on iPhone it ...
73,011,513
Is the number of partitions of a parquet file in ADLS same as number of partitions after reading it as dataframe?<p>I have 3 parquet files in ADLS</p> <p>2 parquet files have 10 sub-parquet files and when i read it as a dataframe in databricks using pyspark, the number of partitions are equal to 10 which is expected be...
<p>When reading, Spark is trying to create Spark partitions of size not bigger than specified by <code>spark.files.maxPartitionBytes</code> (128Mb by default). When reading files, Spark will look for file size, and take it into account - when file size is smaller than desired partition size, then partition will be crea...
Is the number of partitions of a parquet file in ADLS same as number of partitions after reading it as dataframe?
apache-spark|pyspark|databricks
1
65
1
73,018,570
73,018,570
2
true
2022-07-17T11:50:54.327Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is the number of partitions of a parquet file in ADLS same as number of partitions after reading it as dataframe?<p>I have 3 parquet files in ADLS</p> <p>2 p...
73,029,309
Passing shared_ptr through 2 layers of methods?<p>What is the most efficient way to give a <code>shared_ptr&lt;void&gt;</code> to an object that passes it to another private method before being stored in it's final destination?</p> <p>It's difficult to describe... maybe asking with code will illustrate the question bet...
<p>An objective standard is needed for defining a &quot;most efficient way&quot;.</p> <p>You clarified that you consider just one reference counting increment. I would suggest a slightly non-intuitive solution which does exactly this:</p> <pre><code>#include &lt;memory&gt; class obj {}; class Example { public: v...
Passing shared_ptr through 2 layers of methods?
c++|optimization|shared-ptr
2
65
2
73,029,519
73,029,519
2
true
2022-07-18T22:38:18.347Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Passing shared_ptr through 2 layers of methods?<p>What is the most efficient way to give a <code>shared_ptr&lt;void&gt;</code> to an object that passes it to...
73,030,173
How do I get plain text from an API?<p>I'm sorry just asking like this, but I'm new to JSON and API-related Stuff.</p> <pre><code>@bot.command() async def insult(ctx): resp = requests.get(&quot;https://insult.mattbas.org/api/insult&quot;) if 300 &gt; resp.status_code &gt;= 200: content = resp.json() #We have...
<p>You should call resp.content or resp.text instead of json().</p> <pre><code>@bot.command() async def insult(ctx): resp = requests.get(&quot;https://insult.mattbas.org/api/insult&quot;) if 300 &gt; resp.status_code &gt;= 200: content = resp.content #We have a dict now. else: content = f&quot;Reciev...
How do I get plain text from an API?
python|discord.py
2
65
1
73,030,251
73,030,251
2
true
2022-07-19T01:29:51.050Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I get plain text from an API?<p>I'm sorry just asking like this, but I'm new to JSON and API-related Stuff.</p> <pre><code>@bot.command() async def in...
73,020,252
Log4j2 AsyncAppenderEventDispatcher: frozen thread, potential deadlock?<p>YourKit warns about a potential deadlock in Log4j2's <code>AsyncAppenderEventDispatcher</code>:</p> <pre class="lang-none prettyprint-override"><code>Potential deadlock: frozen threads found It seems that the following threads have not changed t...
<p>This is a false positive. Since you are using the <code>Async</code> appender, you have an instance of the <a href="https://github.com/apache/logging-log4j2/blob/release-2.x/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/AsyncAppenderEventDispatcher.java" rel="nofollow noreferrer"><code>AsyncAppende...
Log4j2 AsyncAppenderEventDispatcher: frozen thread, potential deadlock?
java|asynchronous|log4j2|deadlock
0
65
2
73,032,230
73,032,230
2
true
2022-07-18T09:43:54.997Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Log4j2 AsyncAppenderEventDispatcher: frozen thread, potential deadlock?<p>YourKit warns about a potential deadlock in Log4j2's <code>AsyncAppenderEventDispat...
72,889,575
Ignored ThenInclude statement on generating query expression EF Core<p><strong>Foreword:</strong></p> <p>I have 2 projects on .NET Core 3.1, one EF Core 3.1.17 and another on 5.0.10 and in both I've used Include/ThenInclude the same way and all works good. Now I'm trying upgrade my project on 3.1.17 to version 5.0.10 a...
<p>That shows why it's important to include all code in questions.</p> <p>This is the <code>GetRegionRoles</code> method :</p> <pre class="lang-cs prettyprint-override"><code>public IQueryable&lt;RegionRole&gt; GetRegionRoles(SystemCodesEnum systemId) { return _context.RegionRole .Include(x =&gt; x.SystemRo...
Ignored ThenInclude statement on generating query expression EF Core
c#|linq|.net-core|entity-framework-core|ef-core-5.0
2
65
1
72,902,565
72,902,565
2
true
2022-07-06T20:35:40.543Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Ignored ThenInclude statement on generating query expression EF Core<p><strong>Foreword:</strong></p> <p>I have 2 projects on .NET Core 3.1, one EF Core 3.1....
72,960,064
Keyboard event fires twice even when using !event.repeat<p>I've been making an online piano that uses the keyboard as input. Sometimes when you press a key, it registers two events instead of one.</p> <p>The thing is, I've tried using <code>e.repeat</code> (where <code>e</code> is the keyboard event) to only register t...
<p>I am preeeeeeeety sure this is a severe javascript bug, I was able to reproduce the problem, for example you press and keep holding Q and then you press and keep holding W, then you release only Q while still holding W, it will fire a W event.</p> <p>Here's what I did, I create an array of pressed keys, and the resp...
Keyboard event fires twice even when using !event.repeat
javascript|keyboard-events
2
65
1
73,000,427
73,000,427
2
true
2022-07-13T01:50:15.620Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Keyboard event fires twice even when using !event.repeat<p>I've been making an online piano that uses the keyboard as input. Sometimes when you press a key, ...
72,890,777
pandas : sampling avoiding twice same values in different samples<p>I have this 5000 rows dataframe.</p> <p>I want to make 4 random samples of 300 rows from the dataframe. I want each of my sample to have no duplicate inside the sample, but i also want no duplicate among samples. Ie i dont want a row to appear in sampl...
<p>I don't think there is a pandas function specifically for that, but how about doing this:</p> <pre><code>df = pd.DataFrame({&quot;col&quot;: range(5000)}) sample = df.sample(1200, replace= False) sample.duplicated().any() &gt;&gt; False # &lt;-- no duplicates samples = [sample.iloc[i-300:i] for...
pandas : sampling avoiding twice same values in different samples
python|pandas
1
65
1
72,890,835
72,890,835
2
true
2022-07-06T23:17:43.377Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: pandas : sampling avoiding twice same values in different samples<p>I have this 5000 rows dataframe.</p> <p>I want to make 4 random samples of 300 rows from ...
72,948,832
Android studio: apk is not installing<p>I am working on react-native application and for running app I have tried with emulator and on emulator apk is shwoing on screen and it's working fine but when I tried it with physical device I am getting log of that app installed on my phone but apk is not showing.</p> <p><stron...
<p>You can try one-thing if it's working fine on other device then xender or any other application through share your apk file and install it to your realme device and then do again build your app. May it will resolve your problem.</p>
Android studio: apk is not installing
android|react-native|android-studio|mobile|apk
0
65
1
72,949,914
72,949,914
2
true
2022-07-12T07:55:39.467Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Android studio: apk is not installing<p>I am working on react-native application and for running app I have tried with emulator and on emulator apk is shwoin...
72,784,944
Testing with Pester 5.3.3<p>I have written a function to write the errors that occur in my functions in a csv file, this function is called in the catch block of my functions. I would like to write a Test in Pester to check that my function works correctly, but to be honest I don't know where to start, I have tried som...
<p>Continuing from my comments, here is some code.</p> <p>First make the function testable, by actually using the <code>-LogFilePath</code> parameter. This way you can write the log to a temporay file during testing. Due to the default value you can still use it without <code>-LogFilePath</code> when calling it from no...
Testing with Pester 5.3.3
powershell|testing|pester
1
65
1
72,786,180
72,786,180
2
true
2022-06-28T10:37:55.713Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Testing with Pester 5.3.3<p>I have written a function to write the errors that occur in my functions in a csv file, this function is called in the catch bloc...
72,838,546
Clean way to assign conditional dict values without repeating dict<p>I'm working on my python and design pattern skills trying to model a game out.</p> <p>A character can have a hierarchical rank so wanted to use an Enum to specify ranks like:</p> <pre><code>class Ranks(Enum): BEGINNER = 0 MID = 1 ADVANCED = 2...
<p>I think a simple answer in this case is to mainatain a map of rank -&gt; abilities (dictionary), like so:</p> <pre><code>rank_to_abilities = { BEGINNER: { 'will': 1, 'health': 1 }, MID: { 'will': 2, 'health': 2 } ADVANCED: { 'w...
Clean way to assign conditional dict values without repeating dict
python|python-3.x
1
65
2
72,838,617
72,838,617
2
true
2022-07-02T11:04:07.353Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Clean way to assign conditional dict values without repeating dict<p>I'm working on my python and design pattern skills trying to model a game out.</p> <p>A ...
72,996,435
new Date(...).toISOString() in JavaScript gives incorrect result on one day of the year<p>I'm building a calendar and I noticed that the date is incorrect on one day of the year.</p> <p>I wanted to standardize dates to ISO 8601. Let's take <code>2022-03-27</code> for example:</p> <pre><code>const foo = new Date(2022, 2...
<p>What's happening is that <a href="https://www.timeanddate.com/time/change/uk/london" rel="nofollow noreferrer">British Summer Time</a> (Daylight Saving Time, aka DST) is kicking in between your two examples (specifically, it starts at 01:00 on 2022-03-27). <code>toISOString</code> always gives you UTC time (GMT) as ...
new Date(...).toISOString() in JavaScript gives incorrect result on one day of the year
javascript|date|iso8601
0
65
1
72,996,717
72,996,717
2
true
2022-07-15T15:36:42.577Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: new Date(...).toISOString() in JavaScript gives incorrect result on one day of the year<p>I'm building a calendar and I noticed that the date is incorrect on...
72,975,409
Get database name mongoDB with bash script<p>I want to automate my mongo backup process with bash. My plan is to get all database name on mongo and store to a file, lets called &quot;database-name.txt&quot;. Then I want to dump the database with for loop from that file and save the backup to other directory.</p> <p>the...
<p>Try <code>mongo --quiet</code></p> <p>However, it still prints the deprecation warning. You get rid of it in combination with <code>--eval</code> but then command <code>show dbs</code> is not possible</p> <pre><code>mongo --quiet --eval 'show dbs' uncaught exception: SyntaxError: unexpected token: identifier : @(sh...
Get database name mongoDB with bash script
mongodb|bash
1
65
1
72,976,181
72,976,181
2
true
2022-07-14T04:59:10.597Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Get database name mongoDB with bash script<p>I want to automate my mongo backup process with bash. My plan is to get all database name on mongo and store to ...
72,907,927
Simulating handling latency on non-blocking channel using a pipe<p>I'm trying to understand how to work with a web socket in Tcl using a non-blocking channel. I have the web socket open with the browser and can decode the XOR frame to read simple single-frame messages at this point, whether in blocking or non-blocking ...
<p>If using Tcl 8.6 or later, you can hide the complexities in a coroutine. Then the protocol can be programmed in a straight-forward manner (untested):</p> <pre><code>proc coread {chan count} { chan event $chan readable [list [info coroutine] data] set data {} set need $count while {![eof $chan]} { ...
Simulating handling latency on non-blocking channel using a pipe
websocket|tcl|event-driven
1
65
1
72,910,816
72,910,816
2
true
2022-07-08T07:13:24.433Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Simulating handling latency on non-blocking channel using a pipe<p>I'm trying to understand how to work with a web socket in Tcl using a non-blocking channel...
72,896,687
Different behaviours between base::cbind and dplyr::bind_cols<p>When combining a data frame and a vector with different number of rows/lengths, <code>bind_cols</code> gives an error, whereas <code>cbind</code> repeats rows – why is this?</p> <p>(And is it really wise to have that as a default behavior of <code>cbind</c...
<p><code>base::cbind</code> is a generic function. Its behavior is different for matrix and data frames.</p> <p>For matrices, it does warn if objects have different number of rows (see more on <strong>Note</strong> below).</p> <pre><code>cbind(as.matrix(xy10), z20) # x10 y10 z20 # [1,] 1 1 1 # [2,] 2 2 ...
Different behaviours between base::cbind and dplyr::bind_cols
r|dataframe|dplyr|cbind
1
65
1
72,896,878
72,896,878
2
true
2022-07-07T11:03:37.387Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Different behaviours between base::cbind and dplyr::bind_cols<p>When combining a data frame and a vector with different number of rows/lengths, <code>bind_co...
72,829,176
Is there a way to come back on last page in Navigation stack, and not execute OnApearing method in Xamarin?<p>So, I have <code>Page1</code>, with some input fields that my user already filled, and, there is a button that opens a new Page (let's call it <code>Page2</code>).</p> <p>This is the code I used to go on <code>...
<p>This is what I'm using in some of my apps. The logic is: Page1 loads data on the first load and then only reloads data when reload requested.</p> <p>Here's an example:</p> <p>Page1.xaml.cs</p> <pre class="lang-cs prettyprint-override"><code>public partial class Page1 : ContentPage { private bool _isFirstLoad = t...
Is there a way to come back on last page in Navigation stack, and not execute OnApearing method in Xamarin?
xamarin|xamarin.forms|xamarin.android
1
65
1
72,833,948
72,833,948
2
true
2022-07-01T12:20:17.620Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is there a way to come back on last page in Navigation stack, and not execute OnApearing method in Xamarin?<p>So, I have <code>Page1</code>, with some input ...
72,834,555
adding new random number after a link on every press<p>the goal of my code is to generate a new link each time &quot;generate&quot; is pressed, so that i can find new songs for geometry dash without having to spam numbers.</p> <p>i have tried the string below but every time the button were to be clicked, it would appen...
<p>Don't have a button in a link!</p> <p>The code can be much simpler with a form</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 url = "https://www.newgrounds.com/audio/...
adding new random number after a link on every press
javascript|html|random|hyperlink|href
1
65
3
72,834,703
72,834,703
2
true
2022-07-01T20:56:47.817Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: adding new random number after a link on every press<p>the goal of my code is to generate a new link each time &quot;generate&quot; is pressed, so that i can...
72,983,460
Count number of items in each row, multiply by their value and then sum over rows, all in one formula<p>I have a table of the following type:</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>Price</th> <th>Item 1</th> <th>Item 2</th> <th>Item 3</th> <th>Item 4</th> </tr> </thead> <tbody> <tr...
<p>Use <a href="https://support.google.com/docs/answer/3094292" rel="nofollow noreferrer">MMULT</a> and <a href="https://support.google.com/docs/answer/3094294" rel="nofollow noreferrer">SUMPRODUCT</a></p> <p>with id in row 1 (G1 and G2)</p> <pre><code>=arrayformula(SUMPRODUCT(mmult(IF($B$2:$E=G1,1,0),transpose(column(...
Count number of items in each row, multiply by their value and then sum over rows, all in one formula
google-sheets|count|google-sheets-formula|array-formulas
0
65
1
72,983,861
72,983,861
2
true
2022-07-14T16:00:26.300Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Count number of items in each row, multiply by their value and then sum over rows, all in one formula<p>I have a table of the following type:</p> <div class=...
72,871,892
Refresh div every second<p>this is the source code of a webpage made for an ESP8266 Web server (&quot;@t&quot;, &quot;@a&quot;, &quot;@p&quot; and &quot;@h&quot; are replaced by actual values using a C++ function):</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div...
<p>You can have the web server return 2 pages. The main index page and a second page that returns the data as JSON. The main page can use Javascript to periodically load the 2nd page and update the fields in the main page.</p> <p>Change the fields to spans to be updateable</p> <pre class="lang-html prettyprint-override...
Refresh div every second
html
1
65
1
72,872,594
72,872,594
2
true
2022-07-05T15:22:03.900Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Refresh div every second<p>this is the source code of a webpage made for an ESP8266 Web server (&quot;@t&quot;, &quot;@a&quot;, &quot;@p&quot; and &quot;@h&q...
72,931,394
AzerothCore Unable to connect to server, probably WorldSocket Malformed request sent by client<p>I am using AzerothCore locally and when I try to log in - I am stuck at &quot;Authenticating&quot;.</p> <p>Previously on login attempt - a error occured, WorldSocket Malformed request sent by client, But after opening the p...
<blockquote> <p>WorldSocket Malformed request sent by client</p> </blockquote> <p><code>WorldSocket::ReadHeaderHandler(): client 111.222.11.22 sent malformed packet (size: 1234, cmd: 3333333)</code> means some machine anywhere on the planet sent a random portscan to your IP. Not related to your actual problem.</p> <p>Y...
AzerothCore Unable to connect to server, probably WorldSocket Malformed request sent by client
c++|authentication|azerothcore
2
65
2
72,931,439
72,931,439
2
true
2022-07-10T19:41:23.857Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: AzerothCore Unable to connect to server, probably WorldSocket Malformed request sent by client<p>I am using AzerothCore locally and when I try to log in - I ...
72,893,851
Scala : StringBuilder class (append vs ++=) performance<p>I was using '<strong>++=</strong>' in scala for combining the string values using StringBuilder class instance.</p> <p>StringBuilder class also provides append method that takes string parameter to combine string values.</p> <p>I could see both the methods in th...
<p>They seem to be the same, as far as I can tell directly from the code in <code>StringBuider.scala</code> for Scala 2.13.8.</p> <p><code>++=</code> looks like this:</p> <pre><code> /** Alias for `addAll` */ def ++= (s: String): this.type = addAll(s) </code></pre> <p>which calls:</p> <pre><code> /** Overloaded ver...
Scala : StringBuilder class (append vs ++=) performance
scala|append|stringbuilder
1
65
2
72,894,173
72,894,173
2
true
2022-07-07T07:28:52.530Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Scala : StringBuilder class (append vs ++=) performance<p>I was using '<strong>++=</strong>' in scala for combining the string values using StringBuilder cla...
72,879,098
Make it faster to check if a certain regex is present in the text<p>I have a problem. I want to check whether a certain regex occurs in a text (This regex will become more complex later.). Unfortunately, my code snippet runs, but it takes a long time. How could I rewrite the code to make it faster and more efficient?</...
<p>You can use pandas <code>apply</code> to iterate through all the <code>text</code> and check if <code>element</code> exist in <code>text</code>. Here is one of the solution using <code>numpy</code></p> <pre><code>import numpy as np d = { &quot;customerId&quot;: [1, 3, 3], &quot;text&quot;: [&quot;Something ...
Make it faster to check if a certain regex is present in the text
python|pandas|dataframe
0
65
3
72,879,329
72,879,329
2
true
2022-07-06T06:56:48.993Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Make it faster to check if a certain regex is present in the text<p>I have a problem. I want to check whether a certain regex occurs in a text (This regex wi...
72,770,845
Replace terraform block with variable<p>How do I replace an entire block of a terraform script with a variable? For example,</p> <pre><code>resource &quot;azurerm_data_factory_trigger_schedule&quot; &quot;sfa-data-project-agg-pipeline-trigger&quot; { name = &quot;aggregations_pipeline_trigger&quot; data_...
<p>Nope, that is not possible as schedule is a block with arguments and it is not an argument itself. Maps are aggregate types and and they are made of primitive types (e.g., numbers in this case). A more detailed explanation on primitive and aggregate types with examples can be found in [1] (h/t: Matt Schuchard). In s...
Replace terraform block with variable
terraform
0
65
1
72,770,942
72,770,942
2
true
2022-06-27T10:47:34.427Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Replace terraform block with variable<p>How do I replace an entire block of a terraform script with a variable? For example,</p> <pre><code>resource &quot;az...
73,024,523
What is the purpose of calling the constructor of the object class in Java?<p>Take this simple class...</p> <pre><code>public class Gen { public static void main (String[] Args) { Gen genny = new Gen(); } } </code></pre> <p><a href="https://docs.oracle.com/javase/specs/jls/se17/html/jls-8.html#jls-8...
<p>First of all, it is NOT necessary to write this:</p> <pre><code> public class Gen extends Object { </code></pre> <p>If a class doesn't explicitly have some other class as its direct superclass, then it <em>implicitly</em> extends <code>Object</code>. There is not need to tell the compiler that.</p> <hr /> <p>Yes .....
What is the purpose of calling the constructor of the object class in Java?
java|object|constructor|super|default-constructor
0
65
1
73,024,787
73,024,787
2
true
2022-07-18T15:05:25.827Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What is the purpose of calling the constructor of the object class in Java?<p>Take this simple class...</p> <pre><code>public class Gen { public static v...
72,867,596
How to validate if a non-compliant HTTP cookie is handled correctly?<p><strong>Summary</strong>: A client's code is generating invalid cookies with a <code>secure,</code> attribute (note the illegal trailing comma). The IETF spec says unknown attributes for cookies must be ignored, but the cookies themselves can still ...
<p><a href="https://datatracker.ietf.org/doc/html/rfc6265#section-3" rel="nofollow noreferrer">RFC 6265 § 3</a> also states</p> <blockquote> <p>Origin servers SHOULD NOT fold multiple Set-Cookie header fields into a single header field. The usual mechanism for folding HTTP headers fields (i.e., as defined in <a href="...
How to validate if a non-compliant HTTP cookie is handled correctly?
security|cookies|https
1
65
1
72,868,774
72,868,774
2
true
2022-07-05T10:08:17.973Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to validate if a non-compliant HTTP cookie is handled correctly?<p><strong>Summary</strong>: A client's code is generating invalid cookies with a <code>s...
72,854,869
Asp.Net Core Identity RedirectToAction<p>I have an AccountController for authorization with Asp.Net Core Identity. If successful, I make a RedirectToAction and want to redirect the user to &quot;returnUrl&quot;, but the redirection does not work correctly.</p> <p>When the application opens, I am redirected to the autho...
<p><code>RedirectToAction</code> method is used to redirect to specified <code>action</code> instead of rendering the HTML. In this case, the browser receives the redirect notification and make a new request for the specified action. In this case, the browser receives the redirect notification and make a new request fo...
Asp.Net Core Identity RedirectToAction
c#|asp.net-core|asp.net-identity
1
65
2
72,855,187
72,855,187
2
true
2022-07-04T09:55:47.260Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Asp.Net Core Identity RedirectToAction<p>I have an AccountController for authorization with Asp.Net Core Identity. If successful, I make a RedirectToAction a...
72,860,804
What is the difference between `GetAsync` and `ExecuteGetAsync` in RestSharp?<p>What is the difference between the methods <code>RestClient.GetAsync</code> and <code>RestClient.ExecuteGetAsync</code>? When should I use one or the other?</p> <p>Thank you in advance.</p>
<p>GetAsync will throw an exception if the server returns an error because it is not part of RestClient interface and return <code>Task&lt;int&gt;</code> i.e. there is no way to set and response status code.</p> <p>while</p> <p>ExecuteGetAsync will not throw an exception if the server return an error because it's retur...
What is the difference between `GetAsync` and `ExecuteGetAsync` in RestSharp?
c#|api|restsharp
1
65
1
72,860,920
72,860,920
3
true
2022-07-04T18:32:22.950Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What is the difference between `GetAsync` and `ExecuteGetAsync` in RestSharp?<p>What is the difference between the methods <code>RestClient.GetAsync</code> a...
72,875,881
Change datatype of column in a Dataframe in Julia<p>I have a dataframe <code>df = DataFrame(CSV.File(&quot;file.csv&quot;, delim=&quot;;;&quot;))</code>. The dataframe has three columns (column1 = Date, column2 = String31, column3 = String15).</p> <pre><code>column1 | column2 | column3 date | String31 | ...
<p>On <code>column2</code> I would recommend leaving it as <code>String31</code> unless you run into an issue with that (and if you do maybe raise an issue with the <a href="https://github.com/JuliaStrings/InlineStrings.jl" rel="nofollow noreferrer"><code>InlineStrings.jl</code></a> package). <code>String31</code> is a...
Change datatype of column in a Dataframe in Julia
julia|julia-dataframe
1
65
1
72,878,248
72,878,248
3
true
2022-07-05T21:44:13.507Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Change datatype of column in a Dataframe in Julia<p>I have a dataframe <code>df = DataFrame(CSV.File(&quot;file.csv&quot;, delim=&quot;;;&quot;))</code>. The...
72,895,602
bit programing in C<p>I am new to bits programming in C and finding it difficult to understand how ipv4_to_bit_string() in below code works. Can anyone explain that, what is happening when I pass integer 1234 to this function. Why integer is right shifted at 24,16,8 and 4 places?</p> <pre><code>#include &lt;stdio.h&gt...
<p>An IPv4 address is four eight-bit pieces that have been put together into one 32-bit piece. To take the 32-bit piece apart into the four eight-bit pieces, you extract each eight bits separately. To extract one eight-bit piece, you shift right by 0, 8, 16, or 24 bits, according to which piece you want at the moment, ...
bit programing in C
c|bit-manipulation
0
65
1
72,895,882
72,895,882
3
true
2022-07-07T09:40:59.233Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: bit programing in C<p>I am new to bits programming in C and finding it difficult to understand how ipv4_to_bit_string() in below code works. Can anyone expl...
72,956,706
How to read this C++ function<p>Maybe someone here could help me to understand more about C++</p> <p>While reading about Unreal Engine 4, I came across this function which is used as the following</p> <pre><code>class ClassSample1 { public: Babu* pBabu; //0x022C }; void SetFuncton(Babu* param1, bool param2) { ...
<blockquote> <p>What I want to know.</p> <ol> <li>What will this function produce?</li> </ol> </blockquote> <p>That's the fun part, from what you've shown, nobody knows!</p> <blockquote> <ol start="2"> <li>What datatype will this function produce?</li> </ol> </blockquote> <p>I guess the answer is &quot;nothing&quot;, <...
How to read this C++ function
c++
0
65
1
72,957,260
72,957,260
3
true
2022-07-12T18:12:38.323Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to read this C++ function<p>Maybe someone here could help me to understand more about C++</p> <p>While reading about Unreal Engine 4, I came across this ...
72,962,821
How to get default value of java datatype using generic method?<p>I'm writing a program and need to get the default value of datatype (for example null for List, 0 for int, false for boolean, etc...). I have this method</p> <pre class="lang-java prettyprint-override"><code>private static &lt;T&gt; T getDefaultValue(Cla...
<p>You can just check each primitive type manually (there are not so many primitives in Java):</p> <pre><code> @SuppressWarnings(&quot;unchecked&quot;) public static &lt;T&gt; T defaultValue(Class&lt;T&gt; clazz) { if (!clazz.isPrimitive()) { return null; } if (clazz == int.cl...
How to get default value of java datatype using generic method?
java|generics|types
0
65
2
72,963,303
72,963,303
3
true
2022-07-13T08:02:34.747Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to get default value of java datatype using generic method?<p>I'm writing a program and need to get the default value of datatype (for example null for L...
72,968,364
How to add newline for each XML output?<p>I'm trying to add newlines to each <code>&lt;&gt;</code> line in the XML output of <code>XML::LibXML</code> from <a href="https://stackoverflow.com/a/2934794/19508169">https://stackoverflow.com/a/2934794/19508169</a>.</p> <pre><code>use strict; use warnings; use XML::LibXML; m...
<p>The <code>toString()</code> method (documented in <a href="https://metacpan.org/pod/XML::LibXML::Document" rel="nofollow noreferrer">XML::LibXML::Document</a> has an optional numeric argument that changes how the output is formatted.</p> <blockquote> <p><strong>toString</strong></p> <pre><code> $docstring = $dom-&gt...
How to add newline for each XML output?
perl|xml-libxml
2
65
2
72,968,581
72,968,581
3
true
2022-07-13T14:54:26.840Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to add newline for each XML output?<p>I'm trying to add newlines to each <code>&lt;&gt;</code> line in the XML output of <code>XML::LibXML</code> from <a...
72,958,110
MirageJS Error response not causing an error<p>Following the <a href="https://miragejs.com/docs/testing/application-tests/#testing-errors" rel="nofollow noreferrer">docs</a> I've set up this handler inside <code>routes()</code>:</p> <pre class="lang-js prettyprint-override"><code>this.put( '/admin/features/error/envi...
<p>Try importing the Mirage <a href="https://miragejs.com/api/classes/response/" rel="nofollow noreferrer">Response</a> class:</p> <pre class="lang-js prettyprint-override"><code>import { Response } from 'miragejs'; </code></pre> <p>Otherwise, <code>Response</code> refers to a <a href="https://developer.mozilla.org/en-...
MirageJS Error response not causing an error
miragejs
1
65
1
73,241,374
73,241,374
3
true
2022-07-12T20:38:51.013Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: MirageJS Error response not causing an error<p>Following the <a href="https://miragejs.com/docs/testing/application-tests/#testing-errors" rel="nofollow nore...
72,827,584
How can I edit my code to concurrency using in Go?<p>I have a function <strong>getIPSetInfo</strong> that makes HTTP requests as many times as there are elements in <code>IpsetInfo</code> array. How can I redesign my function to use multithreading? I need all those queries in loop to be done in parallel.</p> <pre><cod...
<p>Maybe this could help</p> <pre><code>func getIPSetInfo(ipsetIds []string) []IpsetInfo { mu := &amp;sync.Mutex{} var wg sync.WaitGroup var result []IpsetInfo call := func(val string){ defer wg.Done() url := &quot;https://api-cloud-platform.com/cloudapi/1.0.0/firewall...
How can I edit my code to concurrency using in Go?
go|concurrency
0
65
1
72,827,744
72,827,744
3
true
2022-07-01T10:00:57.440Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I edit my code to concurrency using in Go?<p>I have a function <strong>getIPSetInfo</strong> that makes HTTP requests as many times as there are elem...
72,870,281
Puppeteer element selection returning null or timing out<p>I am trying to use puppeteer to extract the innerHTML value from a button on a webpage. For now, I am simply trying to await the appearance of the selector to allow me to then work with it.</p> <p>On running the below code the program times out waiting.</p> <pr...
<p>It works fine with a user agent string:</p> <pre class="lang-js prettyprint-override"><code>const puppeteer = require(&quot;puppeteer&quot;); // ^14.3.0 let browser; (async () =&gt; { browser = await puppeteer.launch({headless: true}); const [page] = await browser.pages(); const ua = &quot;Mozilla/5.0 (Window...
Puppeteer element selection returning null or timing out
javascript|puppeteer|ethereum|etherscan
3
65
1
72,871,438
72,871,438
3
true
2022-07-05T13:27:46.910Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Puppeteer element selection returning null or timing out<p>I am trying to use puppeteer to extract the innerHTML value from a button on a webpage. For now, I...
72,952,476
Bash: How to use return from function in an if<p>I'm trying to do use the return for a function in an if statement within bash.</p> <p>I've come up with this very simple example which unfortunately fails.</p> <pre><code>always_false () { return 1 } always_true () { return 0 } if [ always_false ] then ...
<p>Modify your function like that:</p> <pre><code>#!/bin/bash check_space () { spaceAvailable=$(($(stat -f --format=&quot;%a*%S&quot; /path/to/dir))) || exit fiftyGig=50000000000 ((spaceAvailable &gt; fiftyGig)) } if check_space then echo 'do some things here' else echo 'not enough disk space' fi ...
Bash: How to use return from function in an if
bash
0
65
3
72,952,904
72,952,904
3
true
2022-07-12T12:39:11.137Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Bash: How to use return from function in an if<p>I'm trying to do use the return for a function in an if statement within bash.</p> <p>I've come up with this...
72,940,708
Split variable from comma into an ordered dataframe<p>I have a dataframe like this, where the values are separated by comma.</p> <pre><code># Events # A,B,C # C,D # B,A # D,B,A,E # A,E,B </code></pre> <p>I would like to have the next data frame</p> <pre><code># Event1 Event2 Event3 Event4 Event5 # A B C...
<p><strong>1)</strong> Here is a base R solution. split each row giving list <code>s</code> and create <code>cols</code> which contains the possible values. Then iterate over <code>s</code> and convert that to a data frame.</p> <p>Note that this does not hard code the column names and continues to work even if some c...
Split variable from comma into an ordered dataframe
r|dataframe|split
3
65
4
72,940,860
72,940,860
3
true
2022-07-11T15:08:22.550Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Split variable from comma into an ordered dataframe<p>I have a dataframe like this, where the values are separated by comma.</p> <pre><code># Events # A,B,C ...
73,030,235
How to "unmelt" a data.frame to matrix?<p>I have a data.frame</p> <pre><code>sources &lt;- c(&quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;a&quot;, &quot;a&quot;, &quot;b&quot;) targets &lt;- c(&quot;f&quot;, &quot;v&quot;, &quot;w&quot;, &quot;a&quot;, &quot;b&quot;, &quot;c&quot;) values &lt;- c(12, 34, 56, 3, 7...
<p>Tou could use <code>xtabs()</code>:</p> <pre class="lang-r prettyprint-override"><code>xtabs(values ~ sources + targets, df) # a b c f v w # a 3 76 0 12 0 0 # b 0 0 35 0 34 0 # c 0 0 0 0 0 56 </code></pre> <p>If you want the output to be a <code>data.frame</code>, just pass it into <code>as.data.fr...
How to "unmelt" a data.frame to matrix?
r|dataframe|matrix
2
65
4
73,030,271
73,030,271
3
true
2022-07-19T01:40:54.957Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to "unmelt" a data.frame to matrix?<p>I have a data.frame</p> <pre><code>sources &lt;- c(&quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;a&quot;, &quo...
72,780,103
R count number of subgraphs/components in a graph<p>Does anyone know any R packages or methods to count the number of subgraph in a graph? I know igraph can handle some measurements of the graph, but I don't find related functions to count the number of subgraphs in a graph. For example, the number of subgraphs in the ...
<p>Most directly, you can use <code>igraph::count_components</code>:</p> <pre><code>count_components(ig) # [1] 4 </code></pre> <p>(Using Maurits's nicely shared sample data)</p> <p><em>Component</em> is a better term than <em>subgraph</em> for what you're looking for - a subgraph can be any subset of a graph, connected...
R count number of subgraphs/components in a graph
r|graph|igraph
2
65
3
72,780,240
72,780,240
4
true
2022-06-28T02:25:39.460Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: R count number of subgraphs/components in a graph<p>Does anyone know any R packages or methods to count the number of subgraph in a graph? I know igraph can ...
72,902,041
How can I use a regex to remove HTML tags from a String?<p>I'm trying to use String.replaceAll(String regex, String replacement) to filter information out of an HTML document, i.e. HTML code. My aim is to remove all &lt;&gt;-brackets and the contents within them. To do this, I want to simply use an empty String (&quot;...
<p>Use a proper HTML-parser like <a href="https://jsoup.org/" rel="nofollow noreferrer">Jsoup</a>, instead of string manipilation or regex. Jsoup provides a very convenient API for extracting and manipulating HTML data and is intuitive to work with. Using Jsoup your code could look like:</p> <pre><code>import org.jsoup...
How can I use a regex to remove HTML tags from a String?
java|html|regex|regexp-replace
-1
65
1
72,902,251
72,902,251
4
true
2022-07-07T17:28:07.140Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I use a regex to remove HTML tags from a String?<p>I'm trying to use String.replaceAll(String regex, String replacement) to filter information out of...
72,954,451
How can I reinterpret a RefMut<T> as a RefMut<U><p>I have a collection containing elements wrapped in <code>RefCell</code> that I borrow. I have a wrapper struct to make the api usable like so:</p> <pre class="lang-rust prettyprint-override"><code>pub struct RefWrapper&lt;'a, T&gt; { inner: RefMut&lt;'a, T&gt;, } ...
<p>If you can get a <code>&amp;mut U</code> from a <code>&amp;mut T</code>, then you can use <a href="https://doc.rust-lang.org/std/cell/struct.RefMut.html#method.map" rel="nofollow noreferrer"><code>RefMut::map</code></a>.</p> <p>Here as a code example:</p> <pre class="lang-rust prettyprint-override"><code>use std::ce...
How can I reinterpret a RefMut<T> as a RefMut<U>
rust|borrow-checker
1
65
1
72,954,673
72,954,673
4
true
2022-07-12T15:02:02.003Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I reinterpret a RefMut<T> as a RefMut<U><p>I have a collection containing elements wrapped in <code>RefCell</code> that I borrow. I have a wrapper st...
72,921,071
binary '<': no operator found which takes a left-hand operand of type 'const _Ty' glm::vec3 in map<p>I've been dabbling with discregrids LRUCache, but I'm having trouble getting it working with glm's vec3's. I keep getting a <code>binary '&lt;': no operator found which takes a left-hand operand of type 'const _Ty'</cod...
<p>The short form is your <code>operator&lt;</code> is not being found due to how ADL works. In particular, C++ searches the namespaces of the arguments (and their base classes, and other related classes). You've placed <code>operator&lt;</code> in the global namespace, which is not the <code>glm</code> namespace.</...
binary '<': no operator found which takes a left-hand operand of type 'const _Ty' glm::vec3 in map
c++|dictionary|caching|key|glm-math
0
65
1
72,921,365
72,921,365
5
true
2022-07-09T11:42:49.373Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: binary '<': no operator found which takes a left-hand operand of type 'const _Ty' glm::vec3 in map<p>I've been dabbling with discregrids LRUCache, but I'm ha...
72,966,417
How are variadic parameters represented on the stack when they are forwarded multiple times?<pre class="lang-c prettyprint-override"><code>void fun2(char *format, ...){ va_list arg_list; va_start(arg_list, format); vprintf(format, arg_list); va_end(arg_list); } void fun1(char *format, ...){ fun2(format)...
<p>They aren't forwarded. This code doesn't work, unless you are lucky.</p> <p>If you <em>are</em> lucky, it's probably because the optimizer saw that <code>format</code> stays in the same argument position (register or the stack), so fun1 doesn't actually have any &quot;real&quot; code in it (it doesn't move any argum...
How are variadic parameters represented on the stack when they are forwarded multiple times?
c|stack|variadic-functions|variadic|stack-frame
2
65
2
72,966,516
72,966,516
6
true
2022-07-13T12:36:15.203Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How are variadic parameters represented on the stack when they are forwarded multiple times?<pre class="lang-c prettyprint-override"><code>void fun2(char *fo...
72,908,677
run a vbscript from usb "AS ADMIN" and get drive letter to ru batch script stored in usb drive<p>I have following vbscript:</p> <pre><code>set objShell = Createobject(&quot;wscript.shell&quot;) objShell.Run &quot;&quot;&quot;Scripts\Rec.bat&quot;&quot;&quot;, 0 objShell.Run &quot;&quot;&quot;Scripts\Prod.bat&quot;&quot...
<p>You don't want it to be relative to the current directory, you want it to be relative to the directory of the running vbscript:</p> <pre class="lang-vb prettyprint-override"><code>Set objShell = CreateObject(&quot;Wscript.Shell&quot;) strPath = Wscript.ScriptFullName Set objFSO = CreateObject(&quot;Scripting.FileSy...
run a vbscript from usb "AS ADMIN" and get drive letter to ru batch script stored in usb drive
batch-file|vbscript
-2
65
1
72,910,201
72,910,201
-1
true
2022-07-08T08:27:20.383Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: run a vbscript from usb "AS ADMIN" and get drive letter to ru batch script stored in usb drive<p>I have following vbscript:</p> <pre><code>set objShell = Cre...
72,993,807
Need Classic ASP for dynamic declaration of request inputs to add database record<p><strong>This is for Classic ASP</strong></p> <p>I have a webform that submits 64 form inputs for 64 columns - not rows] and that number can increase depending on the number of players. I usually define those variables while filtering th...
<p>The answer to &quot;is this even possible?&quot; is NO!</p> <p>There is no alternative language or method that could possibly work to cater for 64 columns of varying number and especially not one that can increase the number of columns in this case. While it may be possible to dynamically write a varying number of r...
Need Classic ASP for dynamic declaration of request inputs to add database record
sql-server|asp-classic|windows-server-2019
-6
65
1
73,001,099
73,001,099
-1
true
2022-07-15T12:11:33.663Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Need Classic ASP for dynamic declaration of request inputs to add database record<p><strong>This is for Classic ASP</strong></p> <p>I have a webform that sub...
72,893,225
ValueError: Input 0 of layer sequential is incompatible with the layer: expected ndim=3, found ndim=2. Full shape received: (57, 1)<p>I am working with the LSTM model and getting this error.</p> <blockquote> <p>ValueError: Input 0 of layer sequential is incompatible with the layer: expected ndim=3, found ndim=2. Full s...
<p>LSTM expects an input of three dimensions, namely <code>(batch, timestep, features)</code>. Is each sample of yours a length-1 sequence? In that case, you'll need to set <code>input_shape = (1,57)</code> and reshape your data as <code>x_train = x_train[:, None, :]</code> and <code>x_validation = x_validation[:, None...
ValueError: Input 0 of layer sequential is incompatible with the layer: expected ndim=3, found ndim=2. Full shape received: (57, 1)
python|tensorflow|keras|deep-learning|lstm
0
65
1
72,897,380
72,897,380
-1
true
2022-07-07T06:33:17.950Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: ValueError: Input 0 of layer sequential is incompatible with the layer: expected ndim=3, found ndim=2. Full shape received: (57, 1)<p>I am working with the L...
72,775,842
How to filter and sort dictionary (Map) in Kotlin<p>I am trying to filter and sort dictionary (map) in Kotlin: by key = shouldShow. Is shouldShow = true, sort these objects by key = displayOrder in descending order and get string list with state names. Is it possible to do it and how? Because I am trying and nothing wo...
<pre><code>val list = listOf( mapOf(&quot;shouldShow&quot; to true, &quot;displayOrder&quot; to 2, &quot;state&quot; to &quot;Alaska&quot;), mapOf(&quot;shouldShow&quot; to false, &quot;displayOrder&quot; to 3, &quot;state&quot; to &quot;Texas&quot;), mapOf(&quot;shouldShow&quot; to true, &quot;displayOrder&quot;...
How to filter and sort dictionary (Map) in Kotlin
kotlin|sorting|dictionary|filter
0
66
1
72,775,929
72,775,929
0
true
2022-06-27T17:02:23.813Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to filter and sort dictionary (Map) in Kotlin<p>I am trying to filter and sort dictionary (map) in Kotlin: by key = shouldShow. Is shouldShow = true, sor...
72,775,684
JsonNode.get("") returns null value. I want to take "name" and "forks" from json on code<pre><code> RestTemplate restTemplate = new RestTemplate(); String resourceUrl = &quot;https://api.github.com/orgs/engineyard/repos&quot;; //json address String response = restTemplate.getForObject(resourceUrl,String.clas...
<pre><code>public static void main(String[] args) throws Exception { RestTemplate restTemplate = new RestTemplate(); String resourceUrl = &quot;https://api.github.com/orgs/engineyard/repos&quot;; String response = restTemplate.getForObject(resourceUrl, String.class); ObjectMapper mapper = new ObjectMap...
JsonNode.get("") returns null value. I want to take "name" and "forks" from json on code
java|json|jsonnode
1
66
1
72,776,006
72,776,006
0
true
2022-06-27T16:49:47.230Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: JsonNode.get("") returns null value. I want to take "name" and "forks" from json on code<pre><code> RestTemplate restTemplate = new RestTemplate(); St...
72,790,178
Handle implementation error with Vivado TCL<p>I have several implementation (each with a different strategy) and I automate running them in Vivado with the following script:</p> <pre><code>reset_run synth_1 launch_runs synth_1 -jobs 16 wait_on_runs synth_1 # Run all implementations launch_runs impl_1 -jobs 16 launch...
<p>I have found a solution, but for some reason the result is not among the first ones when googling for words like &quot;vivado catch run failure&quot; and similar, so I'll post an answer:</p> <p>Based on this <a href="https://support.xilinx.com/s/article/47491?language=en_US" rel="nofollow noreferrer">Answer Record</...
Handle implementation error with Vivado TCL
tcl|xilinx|vivado
0
66
1
72,790,406
72,790,406
0
true
2022-06-28T16:33:04.863Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Handle implementation error with Vivado TCL<p>I have several implementation (each with a different strategy) and I automate running them in Vivado with the ...
72,782,197
Is there a way to filter out latitude and longitude data that lies outside a specific region? Preferably using Python?<p>I want to display a set of nodes that are mapped to the region of Vancouver. However, the dataset that I build on contains nodes that are mapped to other regions such as Burnaby, Richmond, Surrey etc...
<p>I think you will want to apply something like this...</p> <pre class="lang-py prettyprint-override"><code>import pandas as pd LATITUDE_KEY = 'Latitude' LONGITUDE_KEY = 'Longitude' columns = [ \ # stuff and LATITUDE_KEY, LONGITUDE_KEY ] nodes = pd.read_csv('place_nodes.csv', names=columns) nodes = nodes[nod...
Is there a way to filter out latitude and longitude data that lies outside a specific region? Preferably using Python?
python|graph|neo4j|gis|latitude-longitude
-1
66
1
72,801,642
72,801,642
0
true
2022-06-28T07:18:46.897Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is there a way to filter out latitude and longitude data that lies outside a specific region? Preferably using Python?<p>I want to display a set of nodes tha...
72,801,683
Configure Topics in Kafka broker itself or via Spring Cloud Stream<p>I have to define topics in my application. I am using Spring Cloud Stream to configure messaging between application. Spring cloud stream uses kafka binder in the background. I wonder what is the best way to create topics with partitions and replica...
<p>Kafka binder provides a topic provisioner as part of its implementation (<code>KafkaTopicProvisioner</code>). Therefore, if your broker allows automatic topic creation, the desired topic with the correct configurations can be created using the provisioner before any bindings take effect. If the topic does not alread...
Configure Topics in Kafka broker itself or via Spring Cloud Stream
java|spring|apache-kafka|spring-cloud-stream
0
66
2
72,803,925
72,803,925
0
true
2022-06-29T12:46:55.593Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Configure Topics in Kafka broker itself or via Spring Cloud Stream<p>I have to define topics in my application. I am using Spring Cloud Stream to configure ...
72,810,059
Duplicate value returned in Promises react<blockquote> <p>I working on a Covid-19 react. Js app in which I am fetching data from API to display on the screen. In this code, I am using promises I also using useEffect hook, but my issue is when I console.log the response it prints it 2 times, why is that? Can anyone poin...
<p>This will only happen on local build ,on your production build it will only run once In order to run only once on local build open <code>index.js</code> file and remove <code>&lt;StrictMode&gt;</code>.</p>
Duplicate value returned in Promises react
javascript|reactjs|async-await|promise|try-catch
1
66
2
72,810,211
72,810,211
0
true
2022-06-30T03:39:04.400Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Duplicate value returned in Promises react<blockquote> <p>I working on a Covid-19 react. Js app in which I am fetching data from API to display on the screen...
72,800,266
How to append comment to XML file after XML declaration using Python?<p>I create a root:</p> <pre><code>from xml.etree.ElementTree import Element, tostring root = Element(&quot;root&quot;) </code></pre> <p>Then generating a string repr of XML:</p> <pre><code>xmlstr = tostring(root, encoding=&quot;utf8&quot;, method=&q...
<p>Here is a suggestion. Provide both the XML declaration and the comment as a &quot;header&quot; string.</p> <pre class="lang-py prettyprint-override"><code>from xml.etree.ElementTree import Element, tostring header = &quot;&quot;&quot;&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt; &lt;!-- My commen...
How to append comment to XML file after XML declaration using Python?
python|xml|comments|elementtree|tostring
0
66
1
72,811,411
72,811,411
0
true
2022-06-29T11:00:55.637Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to append comment to XML file after XML declaration using Python?<p>I create a root:</p> <pre><code>from xml.etree.ElementTree import Element, tostring ...
72,797,166
Android - Data Binding cannot find method, using BottomSheetBehavior<p>Example Code</p> <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt; &lt;layout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot; xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot; ...
<p>You can listen bottom sheet behaviour state using call back... Not in binding... Use callback and update your views based on state</p> <pre><code>bottomSheetBehavior.setBottomSheetCallback(new BottomSheetBehavior.BottomSheetCallback() { @Override public void onStateChanged(@NonNull View bottomSheet, int newState) ...
Android - Data Binding cannot find method, using BottomSheetBehavior
android|android-databinding|android-bottomsheetdialog
1
66
2
72,811,677
72,811,677
0
true
2022-06-29T07:08:48.323Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Android - Data Binding cannot find method, using BottomSheetBehavior<p>Example Code</p> <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot...
72,776,215
Scala SymbolMatcher failing to match import prefix<p>I'm using the scalafix library to try to convert a project from scalaz to cats, but one particular attempt at removing imports (the first case in the following code) is failing. The relevant bits of code are:</p> <p>scalafix code:</p> <pre><code>package fix import s...
<p>My mistake was assuming that the tree and its associated symbol were structured the same way, with the symbol simply adding metadata.<br /> Actually, the AST is the same as what I was using, but when the <code>SymbolMatcher</code> runs its <code>unapply</code>, it finds that for syntax imports, their path actually g...
Scala SymbolMatcher failing to match import prefix
scala|scalameta|scalafix
1
66
1
72,818,969
72,818,969
0
true
2022-06-27T17:35:21.957Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Scala SymbolMatcher failing to match import prefix<p>I'm using the scalafix library to try to convert a project from scalaz to cats, but one particular attem...
72,819,213
Create XML nodes for values in SQL<p>I'm having an issue to create XML nodes. Help is much appreciated !</p> <p>This is a sample code</p> <pre><code>declare @tbl as table ( employeeName nvarchar(50), payFrequency nvarchar(50) ) insert into @tbl select 'John', 'Monthly' union select 'Carl', 'Biweekly' s...
<p>You can use a <code>CASE</code> conditional for each possibility, returning an empty string when you want that node, and null otherwise.</p> <pre class="lang-sql prettyprint-override"><code>SELECT t.employeeName AS [Company/Employee], CASE WHEN t.payFrequency = 'Monthly' THEN '' END AS [Company/PayFrequency/Mont...
Create XML nodes for values in SQL
sql-server|xml|tsql|xquery|for-xml-path
1
66
2
72,823,180
72,823,180
0
true
2022-06-30T16:34:45.493Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Create XML nodes for values in SQL<p>I'm having an issue to create XML nodes. Help is much appreciated !</p> <p>This is a sample code</p> <pre><code>declare ...
72,833,220
How to run a shell command on all containers of a replicated docker-compose service?<p>I am running spark workers using docker, replicated using a docker-compose setup:</p> <pre><code>version: '2' services: spark-worker: image: bitnami/spark:latest environment: - SPARK_MODE=worker - SPARK_MASTER_...
<p>There's no built-in facility for this, but you could construct something fairly easily. For example:</p> <pre><code>docker ps -q --filter label=com.docker.compose.service=spark-worker | xargs -ICID docker exec CID ls </code></pre>
How to run a shell command on all containers of a replicated docker-compose service?
bash|docker|docker-compose
0
66
2
72,833,339
72,833,339
0
true
2022-07-01T18:15:40.900Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to run a shell command on all containers of a replicated docker-compose service?<p>I am running spark workers using docker, replicated using a docker-com...
72,831,824
Camunda Human Task not blocking users from other group from claiming the task<p>I am constructing a PoC using camunda BPM running on Springboot. I am starting with a simple process and would like to efficiently use all the access rights restrictions such as candidate groups assignment. Here is my process:</p> <p><a hre...
<p>I assume you are using Camunda 7. You need to set the property</p> <pre><code>camunda.bpm.authorization.enabled = true </code></pre> <p>to enable authorizations. They are disabled by default.</p> <p><a href="https://docs.camunda.org/manual/7.17/user-guide/process-engine/authorization-service/" rel="nofollow noreferr...
Camunda Human Task not blocking users from other group from claiming the task
task|bpmn|camunda|access-rights
1
66
1
72,836,101
72,836,101
0
true
2022-07-01T15:54:43.723Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Camunda Human Task not blocking users from other group from claiming the task<p>I am constructing a PoC using camunda BPM running on Springboot. I am startin...
72,838,540
Regex .NET OR operator not working on alternative group<p>I need a regex which validate string of numbers either math &quot;aabb&quot; or &quot;abba&quot; pattern.</p> <p><em>For example: both 1122 or 1221 is valid</em></p> <p>Regex for both &quot;aabb&quot;, &quot;abba&quot; worked fine alone. But when i'm trying to c...
<p>The alternation changes the capture group numbers. You can either account for the incremented numbers in the alternation:</p> <pre><code>subPatterns[@&quot;(\d)(\d)\2\1$&quot;] = &quot;abba&quot;; subPatterns[@&quot;(\d)\3(\d)\4$&quot;] = &quot;aabb&quot;; </code></pre> <p>The pattern will look like this, matching t...
Regex .NET OR operator not working on alternative group
asp.net|regex
0
66
1
72,838,889
72,838,889
0
true
2022-07-02T11:03:00.560Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Regex .NET OR operator not working on alternative group<p>I need a regex which validate string of numbers either math &quot;aabb&quot; or &quot;abba&quot; pa...
72,862,128
Python find value from nested list parent element<p>I saved a Parent - Child structure inside a nested list with Python.</p> <pre><code>PC_List = [[1,1,2],[1,2,8],[1,3,5],[2,4,7],[3,5,1]] </code></pre> <p>First index of sub list element is ParentID, Second index of sub list element is ChildID, Third index of sub list e...
<p>I would first construct a dict that maps &quot;id&quot; to the &quot;value&quot;, and then use it to append the values.</p> <pre class="lang-py prettyprint-override"><code>PC_List = [[1,1,2],[1,2,8],[1,3,5],[2,4,7],[3,5,1]] values = {k: v for _, k, v in PC_List} output = [[p, c, v, values[p]] for p, c, v in PC_List...
Python find value from nested list parent element
python|for-loop|iteration|parent-child|nested-lists
-1
66
2
72,862,376
72,862,376
0
true
2022-07-04T21:19:49.973Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python find value from nested list parent element<p>I saved a Parent - Child structure inside a nested list with Python.</p> <pre><code>PC_List = [[1,1,2],[1...
72,856,219
How to debug Code Engine build errors (Dockerfile strategy)?<p>I am using IBM Cloud Code Engine. Building the container locally, pushing it to the IBM Container Registry and then creating the Code Engine app from it works. Now, I wanted to build the container image using Code Engine. The code is in a public GitHub repo...
<p>There are several options on how to approach the issue:</p> <ul> <li><p>First and most important: <a href="https://cloud.ibm.com/docs/codeengine?topic=codeengine-troubleshoot-build" rel="nofollow noreferrer">Obtain and check the logs for anything suspicious</a>. The logs are available in the Code Engine browser cons...
How to debug Code Engine build errors (Dockerfile strategy)?
docker|ibm-cloud|container-image|ibm-cloud-code-engine
0
66
1
72,869,721
72,869,721
0
true
2022-07-04T11:49:15.777Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to debug Code Engine build errors (Dockerfile strategy)?<p>I am using IBM Cloud Code Engine. Building the container locally, pushing it to the IBM Contai...
72,874,937
Is it possible set up an endpoint for a model I created in AWS SageMaker without using the SageMaker SDK<p>I've created my own model on a AWS SageMaker instance, with my own training and inference loops. I want to deploy it so that I can call the model for inference from AWS Lambda.</p> <p>I didn't use the SageMaker pa...
<p>You can use the boto3 library to do this.</p> <p>Here is an example of pseudo code for this -</p> <pre><code>import boto3 sm_client = boto3.client('sagemaker') create_model_respose = sm_client.create_model(ModelName=model_name, ExecutionRoleArn=role, Containers=[container] ) create_endpoint_config_response = sm_cli...
Is it possible set up an endpoint for a model I created in AWS SageMaker without using the SageMaker SDK
python|aws-lambda|amazon-sagemaker|endpoint
0
66
1
72,875,304
72,875,304
0
true
2022-07-05T20:01:39.687Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is it possible set up an endpoint for a model I created in AWS SageMaker without using the SageMaker SDK<p>I've created my own model on a AWS SageMaker insta...
72,855,396
Is it correct to share two different DTOs to represent the same object differently for different microservices using Client Modules (Libraries)?<p>Currently I am trying to authenticate an User in my system that resides in the user-service and I have two other microservices, authentication-service (is basically my gatew...
<p>This is more of a personal opinion than anything, but each element in the business unit should represent something different than other elements, and serve a single purpose. So, if the Authentication and Delivery business elements serve different purposes (even if they refer to the same database object, for instance...
Is it correct to share two different DTOs to represent the same object differently for different microservices using Client Modules (Libraries)?
spring-boot|microservices|spring-cloud
0
66
1
72,878,048
72,878,048
0
true
2022-07-04T10:35:46.777Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is it correct to share two different DTOs to represent the same object differently for different microservices using Client Modules (Libraries)?<p>Currently ...
72,858,976
Set range for Y axis using Matplotlib<p>I need to plot some columns from DataFrame in two different graph using Matplotlib. I'm be able to do this using the code below:</p> <pre><code>df.plot(x=datetime_column_name, y='NBR', kind='line', ax=ax1, marker='o', markerfacecolor='black', markersize=6, color='lightgrey', line...
<p>The solution for my question is:</p> <pre><code>ax1.set_yticks(ticks=[-0.4, -0.2, 0, 0.2, 0.4, 0.6, 0.8, 1.0]) </code></pre>
Set range for Y axis using Matplotlib
python|pandas|matplotlib
0
66
1
72,879,594
72,879,594
0
true
2022-07-04T15:21:43.020Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Set range for Y axis using Matplotlib<p>I need to plot some columns from DataFrame in two different graph using Matplotlib. I'm be able to do this using the ...
72,884,608
whereBetween doesn't work in laravel mongodb<p>Hello I'm new in MongoDB laravel and I have the following error:</p> <p>This is the object I want to query in Mongo.</p> <p><a href="https://i.stack.imgur.com/osxsd.png" rel="nofollow noreferrer">MongoDB Compass</a></p> <p>I want to fetch timestamps that are greater than o...
<p>The mongodb way of doing it is using <code>$gte</code>(greater than or equal), <code>$gt</code>(greater than) and <code>$lte</code>(less than or equal), <code>$lt</code>(less than) and <code>$eq</code> for equal.</p> <blockquote> <p>Check <a href="https://www.mongodb.com/docs/manual/reference/operator/query-comparis...
whereBetween doesn't work in laravel mongodb
laravel|mongodb
-1
66
4
72,886,608
72,886,608
0
true
2022-07-06T13:40:50.873Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: whereBetween doesn't work in laravel mongodb<p>Hello I'm new in MongoDB laravel and I have the following error:</p> <p>This is the object I want to query in ...
72,879,717
Pytest and Hypothesis: given in nested async functions<p>I have a problem with a test case as shown below. I want to test a function of class Foo, but I can't create any instance of class Foo until I create my test function. Then for creation test values for the test, I need the instance of Foo for hypothesis. I cannot...
<p>I found a solution derived with <a href="https://hypothesis.readthedocs.io/en/latest/details.html#custom-function-execution" rel="nofollow noreferrer">https://hypothesis.readthedocs.io/en/latest/details.html#custom-function-execution</a></p> <pre class="lang-py prettyprint-override"><code>class Foo: async d...
Pytest and Hypothesis: given in nested async functions
python|pytest|python-asyncio|python-hypothesis
0
66
1
72,897,439
72,897,439
0
true
2022-07-06T07:49:12.203Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Pytest and Hypothesis: given in nested async functions<p>I have a problem with a test case as shown below. I want to test a function of class Foo, but I can'...
72,897,404
R R-Leaflet addAwesomeMarkers. How to set conditional colours based on column values (character)<p>Using leaflet and addAwesomeMarkers, I want to vary the color of the map marker according to the value of a specific column.</p> <p>Using the quakes data, i can vary color according to a mutated column if the contents of ...
<p>Could you use the ifelse() function in the awesomeIcons() function?</p> <pre><code>library(leaflet) data(quakes) quakes&lt;- quakes %&gt;% mutate( type = ifelse(stations &gt; 60, &quot;foo&quot;,&quot;bar&quot;) ) icon &lt;- awesomeIcons( icon = 'ios-close', iconColor = 'black', library = 'ion', ma...
R R-Leaflet addAwesomeMarkers. How to set conditional colours based on column values (character)
r|r-leaflet
0
66
1
72,898,498
72,898,498
0
true
2022-07-07T11:55:41.507Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: R R-Leaflet addAwesomeMarkers. How to set conditional colours based on column values (character)<p>Using leaflet and addAwesomeMarkers, I want to vary the co...
72,907,577
Streamlit - How to show .tif images (possibly large size) in Streamlit using st.image?<p>I am trying to visualize high resolution *.tif images using streamlit. I tried using both a url to the image and the downloaded image. All I get is a &quot;0&quot; similar to a <code>st.write(&quot;0&quot;)</code>.</p> <p>What I tr...
<p>You can use the pillow library.</p> <pre><code>import streamlit as st from PIL import Image fn = 'f:/downloads/density.tiff' image = Image.open(fn) st.image(image) </code></pre> <h3>Output</h3> <p><a href="https://i.stack.imgur.com/UAWii.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UAWii.jpg...
Streamlit - How to show .tif images (possibly large size) in Streamlit using st.image?
tiff|streamlit
0
66
1
72,909,461
72,909,461
0
true
2022-07-08T06:41:29.700Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Streamlit - How to show .tif images (possibly large size) in Streamlit using st.image?<p>I am trying to visualize high resolution *.tif images using streamli...
72,876,245
Can't mock a module method when importing by name<p>I don't understand why I can't do this operation when trying to mock <code>time.sleep()</code> -- the <code>sleep()</code> method will still delay the given time:</p> <pre><code>import unittest from unittest.mock import patch from time import sleep class TestTime(un...
<p>The reason importing <code>sleep</code> by name doesn't allow <code>patch</code> to work in the examples is that <code>patch</code> is looking for attribute names on an object in order to patch it. When importing by name, the object isn't provided and thus why there is a TypeError. The <code>sleep</code> method is...
Can't mock a module method when importing by name
python|unit-testing|mocking|patch
0
66
1
72,914,343
72,914,343
0
true
2022-07-05T22:38:27.063Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can't mock a module method when importing by name<p>I don't understand why I can't do this operation when trying to mock <code>time.sleep()</code> -- the <co...
72,916,671
How to iterate a list of numbers through sed command in bash<p>I want to modify a specific line in my code</p> <pre><code>program main ... seed=k+rank ... end </code></pre> <p>and increment k by intervals of m(=96, in my example). So my implementation of the same in shell should look something like</p> <pre><code>for ...
<p>ok, this worked:</p> <pre><code>for k in {1..961..96}; do m=$k; n=$(($k+96)); sed -i &quot;s/seed=$m+rank/seed=$n+rank/g&quot; main.f90 ; #run main program sleep 15m done </code></pre>
How to iterate a list of numbers through sed command in bash
bash|sed
0
66
2
72,917,085
72,917,085
0
true
2022-07-08T20:27:55.780Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to iterate a list of numbers through sed command in bash<p>I want to modify a specific line in my code</p> <pre><code>program main ... seed=k+rank ... en...
72,916,532
Unhandled Runtime Error ReferenceError: navigate is not defined<p>Im Learning ReactJS with NextJS making a project, register with firebase, Gogle, User and Email, all is OK, but when i try to make some Route, when I log in with google it works but it doesn't redirect to /dashboard and essentially that's what I need don...
<p>Navigation through next.js is done automatically no need to react router just import useRouter from next</p> <p>see more about it <a href="https://nextjs.org/docs/api-reference/next/router" rel="nofollow noreferrer">https://nextjs.org/docs/api-reference/next/router</a></p> <pre><code>import { useRouter } from 'next/...
Unhandled Runtime Error ReferenceError: navigate is not defined
reactjs|next.js
1
66
1
72,917,560
72,917,560
0
true
2022-07-08T20:11:36.770Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Unhandled Runtime Error ReferenceError: navigate is not defined<p>Im Learning ReactJS with NextJS making a project, register with firebase, Gogle, User and E...
72,912,617
What is the octokit.js's method for updating Readme file?<p>I am using Octokit/rest to edit github files. When I am trying to edit the ReadMe file using the <code>octokit.repos.createOrUpdateFileContents</code> it throws the following error:</p> <pre><code>HttpError: Not Found </code></pre> <p>And this is the url I rec...
<p>Sorry, it's my bad that I used underscore in the repo owner value. I should have used a hyphen. That's the error. Leaving it here so someone might find it helpful in the future.</p>
What is the octokit.js's method for updating Readme file?
github|github-api|octokit-js
0
66
1
72,919,787
72,919,787
0
true
2022-07-08T14:05:36.517Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What is the octokit.js's method for updating Readme file?<p>I am using Octokit/rest to edit github files. When I am trying to edit the ReadMe file using the ...
72,850,721
Flutter : my custom Switch widget does not respond to state change<p>I made a custom SwitchTile widget to avoid code duplication, which is based on a StatefulWidget with a boolean value so this is quiet simple :</p> <pre class="lang-dart prettyprint-override"><code>class SwitchTile extends StatefulWidget { final St...
<p>Solved : my error was not using BLoC but with bad state management structure. As a Switch widget does not have to manage its own state, my custom Switch widget should not try to changes its own state.</p> <p>So it can be a simple StatelessWidget but used inside a parent StatefulWidget, or - I my case - in a BlocBuil...
Flutter : my custom Switch widget does not respond to state change
flutter|flutter-bloc|flutter-widget
0
66
3
72,920,757
72,920,757
0
true
2022-07-04T00:14:17.050Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Flutter : my custom Switch widget does not respond to state change<p>I made a custom SwitchTile widget to avoid code duplication, which is based on a Statefu...
72,922,856
How can i target a specific item of list on hover in React?<p>I'm new in React. I want to show a div element when I hover one list item. But now the change is happening on all of them. I want the div to appear only on the hovered list item.</p> <p>This is the LabelList components which is the parent component of one li...
<p>The problem is that you are using the same and only state 'isHover' for all the list items.</p> <p>This way, if you hover on one list item, isHover will be set to true, and all the other list items will start behaving as if you hovered on them too.</p> <p>What you should do is put the <code>const[isHover, setIsHover...
How can i target a specific item of list on hover in React?
reactjs|hover|onmouseover
0
66
1
72,922,960
72,922,960
0
true
2022-07-09T16:02:30.903Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can i target a specific item of list on hover in React?<p>I'm new in React. I want to show a div element when I hover one list item. But now the change i...
72,909,728
Unwanted bottom border in Angular material column header<p>I have upgraded Angular material to 9, but after upgrade when I sort mat-table columns, after sorting a bottom border appears under the sorted column heading and this border disappear on mouse-click I checked browser CSS and found out that below CSS is causing ...
<p>In your attempt to override the styling, did you try using <a href="https://angular.io/guide/component-styles#deprecated-deep--and-ng-deep" rel="nofollow noreferrer">::ng-deep</a>?</p> <p>Because of Angular's view encapsulation, you can't override child-component styles without a mechanism to pierce through that enc...
Unwanted bottom border in Angular material column header
angular|angular-material|angular-material-9
-1
66
2
72,926,133
72,926,133
0
true
2022-07-08T09:59:50.130Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Unwanted bottom border in Angular material column header<p>I have upgraded Angular material to 9, but after upgrade when I sort mat-table columns, after sort...
72,926,378
Nest.js websocket setuup<p>Does someone have a working sample for integrating nestjs with websockets ? I tried this setup and injecting the EventGateway to my app module as a provider</p> <pre><code>@WebSocketGateway({ path: '/api', namespace: 'events' }) export class EventGateway { @SubscribeMessage('events') find...
<p>If using the <code>new WebSocket</code> approach the <a href="https://docs.nestjs.com/websockets/adapter#ws-library" rel="nofollow noreferrer">websocket adapter</a> should be used instead of the default <code>socket.io</code> adapter. Also, the <code>ws://</code> protocol should be used unless a secure connection is...
Nest.js websocket setuup
websocket|nestjs
0
66
1
72,926,550
72,926,550
0
true
2022-07-10T05:43:58.230Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Nest.js websocket setuup<p>Does someone have a working sample for integrating nestjs with websockets ? I tried this setup and injecting the EventGateway to m...
72,922,298
Reference ephemeral external IP address in startup script for compute engine<p>Is there a special variable that references the assigned ephemeral external IP address so I can define it in the startup script?</p>
<p>If your VM start with an ephemeral IP, you can get it directly from the metadata server at this path <code>/instance/network-interfaces/0/access-configs/0/external-ip</code></p> <p>In your startup script, you can include that line if you want to get it</p> <pre><code>curl -H &quot;Metadata-Flavor: Google&quot; http:...
Reference ephemeral external IP address in startup script for compute engine
google-cloud-platform|google-compute-engine|static-ip-address|startupscript
0
66
2
72,928,067
72,928,067
0
true
2022-07-09T14:43:56.470Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Reference ephemeral external IP address in startup script for compute engine<p>Is there a special variable that references the assigned ephemeral external IP...
72,923,695
Bootstrap CSS positioning<p>The words or text below the logo in the navbar are not moving to the right of the logo (for reference link to the page -&gt; <a href="http://127.0.0.1:5500/index.html" rel="nofollow noreferrer">http://127.0.0.1:5500/index.html</a>).</p> <p>Additionally the logo is not shifting to its left - ...
<p>You need to add <code>.d-flex</code> in <code>div.navbar-header</code>.</p> <p>also add a little margin in you <code>h1</code> to make it vertically align with the logo or you can also you <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/vertical-align" rel="nofollow noreferrer"><code>vertical-align</code><...
Bootstrap CSS positioning
javascript|html|css|twitter-bootstrap|navbar
-1
66
1
72,929,646
72,929,646
0
true
2022-07-09T18:19:46.080Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Bootstrap CSS positioning<p>The words or text below the logo in the navbar are not moving to the right of the logo (for reference link to the page -&gt; <a h...
72,920,750
Error getting prediction explanation using shap_values when using scikit-learn pipeline?<p>I am building an NLP model to predict language type (C/C++/C#/Python...) for a given code. Now I need to provide an explanation for my model prediction. For example the following user_input is written in Java and the model is pre...
<p>I have figured out how to fix it, posting to help others :)</p> <pre><code>import pandas as pd from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.preprocessing import FunctionTransformer from sklearn.model_selection import train_test_split from sklearn.ensemble import RandomForestClassifier fr...
Error getting prediction explanation using shap_values when using scikit-learn pipeline?
python-3.x|scikit-learn|nlp|pipeline|shap
-1
66
1
72,929,720
72,929,720
0
true
2022-07-09T10:52:04.933Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Error getting prediction explanation using shap_values when using scikit-learn pipeline?<p>I am building an NLP model to predict language type (C/C++/C#/Pyth...
72,939,977
Different method of normalize values in image processing<p>I was trying to create a neural network to distinguish forest from other land in satellite images.</p> <p>I started analysing the images but I'm not sure not sure how to normalize the pixel values.</p> <p>I thought to divide each pixel value by 255 but in an ex...
<p>MinMaxScaler indeed may produce different values rather than simple division by 255 (In case, there are no pixels with intensities 0 or 255). As <a href="https://scikit-learn.org/stable/modules/generated/sklearn.preprocessing.MinMaxScaler.html" rel="nofollow noreferrer">official scikit-learn</a> documentation say, i...
Different method of normalize values in image processing
python|machine-learning|deep-learning
0
66
1
72,943,620
72,943,620
0
true
2022-07-11T14:14:32.960Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Different method of normalize values in image processing<p>I was trying to create a neural network to distinguish forest from other land in satellite images....
72,943,455
Borrowed value does not live long enough when using async/await<p>I am trying to make two async api call and eventually get error <a href="https://doc.rust-lang.org/error-index.html#E0597" rel="nofollow noreferrer">E0597</a>.</p> <p>Here is a code:</p> <pre><code>async fn make_request() -&gt; Result&lt;()&gt; { ......
<p>I have created a compile-able example based on your snipped to reproduce the error in the playground, and if you are able to do something like this in your question (for future reference), it usually helps you get more specific answers.</p> <p>The <code>Request</code> passed into the function has no lifetime guarant...
Borrowed value does not live long enough when using async/await
rust
0
66
1
72,944,181
72,944,181
0
true
2022-07-11T19:04:57.083Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Borrowed value does not live long enough when using async/await<p>I am trying to make two async api call and eventually get error <a href="https://doc.rust-l...
72,910,488
How to configure/run single autosys job on multiple unix servers simultaneously<p>I am working on shell script which will clean all the older logs and I would like to schedule this job autosys but since I have multiple servers where this job should run hence looking for the information that how to create a single JIL f...
<p>Achieving by a single job seems not in the scope of Autosys.</p> <p>However, the most efficient way to achieve this would be implementing box job.</p> <p><strong>Step01</strong>: Create individual jobs for each host, <code>Cleanup_on_HostA</code> and <code>Cleanup_on_HostB</code> so on</p> <p><strong>Step02</strong>...
How to configure/run single autosys job on multiple unix servers simultaneously
autosys
0
66
1
72,946,302
72,946,302
0
true
2022-07-08T11:06:03.077Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to configure/run single autosys job on multiple unix servers simultaneously<p>I am working on shell script which will clean all the older logs and I woul...
72,957,513
CodeDeploy not properly copying code from GitHub<p>I have CodeDeploy pull code from my GitHub repo. In the deployment Commit ID (for GitHub) I have specified the Commit ID that I want to deploy. My repo has the following structure:</p> <pre><code>my-service/ README.md .gitignore scripts/ deploy.sh ...
<p>Had to change <code>BeforeInstall</code> to <code>Install</code>.</p> <p><code>BeforeInstall</code> runs before it copies over the source code (specified under <code>files/source</code>). But <code>Install</code> run just after that copy occurs, hence files will be available on the file system.</p>
CodeDeploy not properly copying code from GitHub
config|aws-code-deploy|aws-code-deploy-appspec
0
66
1
72,965,419
72,965,419
0
true
2022-07-12T19:35:28.533Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: CodeDeploy not properly copying code from GitHub<p>I have CodeDeploy pull code from my GitHub repo. In the deployment Commit ID (for GitHub) I have specified...
72,967,944
Nodejs - TypeError: res.statusCode is not a function<p>There are obviously duplicate questions but the answers didn't help me. Either there is something fundamental that I just don't understand yet as a beginner in nodeJS and Express or something weird is happening.</p> <p>I have two Express routes, the first one works...
<p>It says it correctly.</p> <p><code>res.statusCode</code> is not a function, it is Node.js native variable: <a href="https://nodejs.org/api/http.html#responsestatuscode" rel="nofollow noreferrer">https://nodejs.org/api/http.html#responsestatuscode</a></p> <p>Express have function <code>res.status(statusCode)</code>, ...
Nodejs - TypeError: res.statusCode is not a function
node.js|express|express-router
0
66
1
72,968,007
72,968,007
0
true
2022-07-13T14:24:21.103Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Nodejs - TypeError: res.statusCode is not a function<p>There are obviously duplicate questions but the answers didn't help me. Either there is something fund...
72,968,339
[Errno 2]: No such file or directory problem<p>My code is so short and easy. I was trying to do an exercise about 'uses of time' in the course when I'm learning and I have to use the library: datetime, so I imported that but the problem is the next (Import here my code):</p> <pre><code>#ACTV. 1 ''' difference in the ag...
<p>try this:</p> <pre><code>diff = son2-son1 #total_seconds gives the seconds diff.total_seconds()/(365*24*60*60) #divide by the number of seconds in a year &gt;6.685797184170472 #years </code></pre>
[Errno 2]: No such file or directory problem
python|import|file-not-found|errno|filenotfounderror
0
66
1
72,968,455
72,968,455
0
true
2022-07-13T14:52:56.567Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: [Errno 2]: No such file or directory problem<p>My code is so short and easy. I was trying to do an exercise about 'uses of time' in the course when I'm learn...
72,945,211
Ansible: Combining 2 Lists by a Specific Attribute<p>I have 2 lists that I'm trying to combine together, by a specific attribute (the &quot;device&quot; attribute). I am not instantiating the lists in my code anywhere, they are being populated by API calls so the best I have here are printouts of each list.</p> <p><str...
<p>With the help of a peer, I was able to figure it out by looping the second list, adding a <code>selectattr</code> filter to match my attribute against the first list, and combining that result with the second list to create a new list of results.</p> <p><strong>Filtered Loop:</strong></p> <pre><code>- name: Combine ...
Ansible: Combining 2 Lists by a Specific Attribute
list|ansible|jinja2|f5
2
66
2
72,969,289
72,969,289
0
true
2022-07-11T22:18:38.743Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Ansible: Combining 2 Lists by a Specific Attribute<p>I have 2 lists that I'm trying to combine together, by a specific attribute (the &quot;device&quot; attr...
72,967,257
How to fetch dynamic modal content from Database Data in React<p>I'm trying to fetch a dynamic modal from my Firebase database.</p> <pre><code>/* src/App.js */ import './App.css' import { useState, useEffect } from 'react'; import { database } from './firebase'; import { ref, onValue } from &quot;firebase/database&quot...
<p>The solution I found:</p> <pre><code> const [modalData, setModalData] = useState(''); const [readInfo, setReadInfo] = useState([]); const findModalId = async () =&gt; { const dbRef = ref(database, 'id/' + ''+modalData+''); onValue(dbRef, (snapshot) =&gt; { const data = snapshot.val(); setR...
How to fetch dynamic modal content from Database Data in React
reactjs|database|dynamic|fetch|bootstrap-modal
0
66
1
72,969,309
72,969,309
0
true
2022-07-13T13:36:09.837Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to fetch dynamic modal content from Database Data in React<p>I'm trying to fetch a dynamic modal from my Firebase database.</p> <pre><code>/* src/App.js ...
72,983,483
GoogleJsonResponseException: API call with error: Login Required<p>I made a script using the <a href="https://developers.google.com/apps-script/advanced/drive" rel="nofollow noreferrer">advanced service API Google Drive</a>. It's working fine when we stay into the app script GUI :</p> <pre class="lang-js prettyprint-ov...
<p>Hi <a href="/users/14265469/yuri-khristich">@Yuri Khristich</a> you were right, using ui is a good work around , code turn up to work corectly</p> <pre class="lang-js prettyprint-override"><code>function onOpen() { var spreadsheet = SpreadsheetApp.getActiveSpreadsheet(); var ui = SpreadsheetApp.getUi(); ui.cr...
GoogleJsonResponseException: API call with error: Login Required
google-apps-script|google-sheets|google-drive-api|custom-function
1
66
2
72,986,397
72,986,397
0
true
2022-07-14T16:01:54.997Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: GoogleJsonResponseException: API call with error: Login Required<p>I made a script using the <a href="https://developers.google.com/apps-script/advanced/driv...