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,169,927 | Python/powershell? automation task on computer<p>Case:
On computer i have program (file.exe) - a window will pop up and I will have to enter the IP address and press the "connect" button. Another window of the connected device is displayed - it shows the image (the device is recording the image) and some stat... | <p>It seems the typical problem solved by <a href="https://en.wikipedia.org/wiki/Robotic_process_automation" rel="nofollow noreferrer">RPA</a>. There are a lot of software free and non, used for executing repetive tasks e.g. <a href="https://powerautomate.microsoft.com/it-it/robotic-process-automation/" rel="nofollow n... | Python/powershell? automation task on computer | python|powershell|automation | -1 | 35 | 1 | 72,170,098 | 72,170,098 | 1 | true | 2022-05-09T09:42:45.190Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python/powershell? automation task on computer<p>Case:
On computer i have program (file.exe) - a window will pop up and I will have to enter the IP address a... |
72,145,460 | What is the disadvantage of using a ForkJoinPool when it is not needed?<p>Imagine a scenario where a task can be divided into sub-tasks, each of which does some long running process. Assuming that this heavy task occurs only in 5/100 requests submitted to the server. Would it be wise to use a ForkJoinPool for this 5% o... | <p>I read this in the java docs recenty,</p>
<blockquote>
<p>ForkJoinTasks should perform relatively small amounts of computation. Large tasks should be split into smaller subtasks, usually via recursive<br />
decomposition. As a very rough rule of thumb, a task should perform more than 100 and less than 10000 basic co... | What is the disadvantage of using a ForkJoinPool when it is not needed? | java|forkjoinpool | -1 | 122 | 1 | 72,172,952 | 72,172,952 | 1 | true | 2022-05-06T17:39:30.357Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What is the disadvantage of using a ForkJoinPool when it is not needed?<p>Imagine a scenario where a task can be divided into sub-tasks, each of which does s... |
72,162,974 | How to display Map's list value based on 1 key in Apex Salesforce?<p>Hello beautiful people,</p>
<p>I have a scenario where I am defining a Map with string key and a list. Now, I want to put values in a list one by one and also display them using the single Key. Example code -</p>
<pre><code>Map<string,List<Accou... | <p>Using account id as example is terrible idea because they'll be unique -> your lists would always have size 0. But yes, you should be able to do something like that.</p>
<p>Your stuff doesn't even compile, you can't use "=" in <code>for(Account acc = [SELECT...])</code>.</p>
<p>Let's say you have accoun... | How to display Map's list value based on 1 key in Apex Salesforce? | salesforce|apex|visualforce|salesforce-lightning|lwc | -1 | 2,863 | 1 | 72,172,992 | 72,172,992 | 1 | true | 2022-05-08T16:21:06.340Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to display Map's list value based on 1 key in Apex Salesforce?<p>Hello beautiful people,</p>
<p>I have a scenario where I am defining a Map with string k... |
72,163,114 | Segmentation fault when trying to pass dynamic array to processes<p>I tried to pass dynamic array from 0 process to 1 and vice versa. Getting segmentation fault in process 1. All matrices printed as expected. What could be the problem in this situation?</p>
<pre><code>int main(int argc, char **argv){
MPI_Init(&ar... | <p>Interactive input in parallel programs is always dangerous. Your MPI processes are often started through an ssh connection, and so they will probably not get the terminal input. Process zero most likely will, so I'd advocate reading <code>n</code> only on process zero and then broadcasting it.</p> | Segmentation fault when trying to pass dynamic array to processes | c++|mpi | -1 | 56 | 1 | 72,173,789 | 72,173,789 | 1 | true | 2022-05-08T16:36:10.447Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Segmentation fault when trying to pass dynamic array to processes<p>I tried to pass dynamic array from 0 process to 1 and vice versa. Getting segmentation fa... |
72,174,192 | Cross join addition with 2D lists<p>I created a post earlier regarding cross joining two lists with addition. However, suppose I have two lists that are two dimensional.</p>
<p>For Example:</p>
<pre><code>list1 = ([5,2,8],[1,2,3])
list2 = ([11,6,3],[3,2,1])
sum_list = []
</code></pre>
<p>My expected output would be:</p... | <p>I honestly do not know why you would do this, but heres the code:</p>
<pre><code>list1 = ([5,2,8],[1,2,3])
list2 = ([11,6,3],[3,2,1])
sum_list = []
for i in list1:
for j in i:
for k in list2:
templ=[]
for l in k:
templ.append(j+l)
sum_list.append(templ)
print(sum_list)
</code></pre> | Cross join addition with 2D lists | python | -1 | 150 | 1 | 72,174,312 | 72,174,312 | 1 | true | 2022-05-09T15:06:39.690Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Cross join addition with 2D lists<p>I created a post earlier regarding cross joining two lists with addition. However, suppose I have two lists that are two ... |
72,174,008 | How to change "printed list" into dataframe with python<p>I would like to convert my "printed list" into a dtaframe:</p>
<p>1st: I import a lift of tickers/symbols from a folder
import yfinance as yf</p>
<pre><code>with open("/Users/AB/OD/Earnings/tickers.txt") as fh:
tick1 = fh.read().split()
<... | <ol>
<li>Before loop you could create list.</li>
<li>Inside loop you could append to this list</li>
<li>After loop you could convert this list to DataFrame</li>
</ol>
<p>And converting depends on what type of data you get in <code>marketCap</code> - <code>pandas.DataFrame</code>, <code>pandas.Series</code>, <code>list<... | How to change "printed list" into dataframe with python | python|pandas|list|dataframe | -1 | 47 | 1 | 72,174,382 | 72,174,382 | 1 | true | 2022-05-09T14:54:25.653Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to change "printed list" into dataframe with python<p>I would like to convert my "printed list" into a dtaframe:</p>
<p>1st: I import a lift of... |
72,168,425 | Understand numpy's transpose<p>I have the following python code</p>
<pre><code>import numpy as np
import itertools as it
ref_list = [0, 1, 2]
p = it.permutations(ref_list)
transpose_list = tuple(p)
#print('transpose_list', transpose_list)
na = nb = nc = 2
A = np.zeros((na,nb,nc))
n = 1
for la in range(na):
for... | <p>A more direct way of making your <code>A</code>:</p>
<pre><code>In [29]: A = np.arange(1,9).reshape(2,2,2)
In [30]: A
Out[30]:
array([[[1, 2],
[3, 4]],
[[5, 6],
[7, 8]]])
</code></pre>
<p>The transposes:</p>
<pre><code>In [31]: B = np.transpose(A, (0, 2, 1))
...: C = np.transpose(A, (1, ... | Understand numpy's transpose | python|numpy | -1 | 50 | 1 | 72,174,975 | 72,174,975 | 1 | true | 2022-05-09T07:34:56.677Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Understand numpy's transpose<p>I have the following python code</p>
<pre><code>import numpy as np
import itertools as it
ref_list = [0, 1, 2]
p = it.permuta... |
72,174,970 | How to sort order by descending in mongo query?<p>I want to show recently added data in the collection from MongoDB.</p>
<p>How can I do that?</p> | <p>You can use <a href="https://medium.com/@iamlittlerock/auto-generated-createdat-and-updatedat-fields-in-mongodb-86bb5980be2" rel="nofollow noreferrer">auto-generated-createdat-and-updatedat-fields-in-mongodb</a>, then use the <a href="https://www.mongodb.com/docs/manual/reference/operator/meta/orderby/" rel="nofollo... | How to sort order by descending in mongo query? | node.js|mongodb | -1 | 64 | 1 | 72,175,058 | 72,175,058 | 1 | true | 2022-05-09T16:04:00.513Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to sort order by descending in mongo query?<p>I want to show recently added data in the collection from MongoDB.</p>
<p>How can I do that?</p> |
72,174,585 | Creating a pool of locks in C#<p>I would like to use exactly one of a set of resources from a multi-threaded C# application. These resources are not thread-safe, so some lock or mutex must be for them. How should I do it?</p>
<p>I would like to get something like the following pseudo code:</p>
<pre class="lang-cs prett... | <p>The best way to do this is with some sort of pooling. A pool object can attempt to ensure that only 1 thing has a reference at a time (but .NET can't guarantee that like Rust).</p>
<p>.NET has recently added <a href="https://docs.microsoft.com/en-us/dotnet/api/microsoft.extensions.objectpool.objectpool-1?view=dotnet... | Creating a pool of locks in C# | c#|.net|multithreading|locking|mutex | -1 | 88 | 1 | 72,175,637 | 72,175,637 | 1 | true | 2022-05-09T15:34:17.563Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Creating a pool of locks in C#<p>I would like to use exactly one of a set of resources from a multi-threaded C# application. These resources are not thread-s... |
72,176,256 | how to make login and logout to blog with php without database or MySQL?<p>So I have been trying so much to fix this code but it's just not working. It first goes to my login page after I click on my blog which is what I want but the problem is that when I enter the login info it just brings me back to the login page a... | <p>Your are checking not isset, so they always logout.
Change this</p>
<pre><code>if (!isset($_POST["logout"])) {
unset($_SESSION["user"]);
}
</code></pre>
<p>to</p>
<pre><code>if (isset($_POST["logout"])) {
unset($_SESSION["user"]);
}
</code></pre> | how to make login and logout to blog with php without database or MySQL? | php|html | -1 | 26 | 1 | 72,176,323 | 72,176,323 | 1 | true | 2022-05-09T17:51:20.637Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to make login and logout to blog with php without database or MySQL?<p>So I have been trying so much to fix this code but it's just not working. It first... |
72,176,519 | How can I check if a number is descending in c?<p>How can I check if a number is descending, and have a flag that would indicate yes or no?
Not an array.</p>
<p>In the last loop, <em>last</em> or <em>x</em> take value 0, and because of that answer is not correct.</p>
<pre><code>while(n>1)
{
last=n%10;
... | <pre><code>#include <stdio.h>
#include <stdbool.h>
bool isDescending(int n)
{
bool descending=true;
while(n/10 && descending)
{
int d=n%10;
n/=10;
descending = d<n%10;
}
return descending;
}
int main(void) {
int test[] = { 123456, 975310 };
... | How can I check if a number is descending in c? | c | -1 | 47 | 1 | 72,176,934 | 72,176,934 | 1 | true | 2022-05-09T18:16:05.540Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I check if a number is descending in c?<p>How can I check if a number is descending, and have a flag that would indicate yes or no?
Not an array.</p>... |
72,176,109 | Maintain keyframes when transcoding and removing b-frames<p>I need to transcode a video from H.265 in a <code>.mov</code> container to H.264 in a <code>.mkv</code> container and would like to remove b-frames. The command to do that with <code>ffmpeg</code> is relatively straightforward [0], but it appears to be removin... | <p>Use</p>
<p><code>ffmpeg -i <input.mov> -force_key_frames source -vcodec libx264 -bf 0 -acodec copy <output.mkv></code></p>
<p>This will place KFs at same timestamps* as in the source.</p>
<p>*note that bacause of timestamp rounding due to a likely change of track timebase, the timestamps may not be ident... | Maintain keyframes when transcoding and removing b-frames | ffmpeg|h.264|keyframe|h.265|transcode | -1 | 229 | 1 | 72,177,165 | 72,177,165 | 1 | true | 2022-05-09T17:39:06.843Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Maintain keyframes when transcoding and removing b-frames<p>I need to transcode a video from H.265 in a <code>.mov</code> container to H.264 in a <code>.mkv<... |
72,174,391 | Rounded corner image view with a custom view<p>I currently am trying to make a project which does not use any libraries. Now, I wanted to use a round image many times I can't just do this:</p>
<pre><code><CardView>
<ImageView/>
</CardView>
</code></pre>
<p>every time. So, I decided to make a custom... | <p>First of all, you are not drawing on the <code>view</code>'s canvas, you've to override <code>onDraw</code> to draw anything on the <code>view</code>'s canvas. And, as you just want to make your image circular from the corners, you don't need <code>PorterDuff</code> for this. You can just clip a rounded rect from th... | Rounded corner image view with a custom view | android|kotlin|android-imageview|android-custom-view|round-imageview | -1 | 214 | 3 | 72,177,277 | 72,177,277 | 1 | true | 2022-05-09T15:18:54.867Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Rounded corner image view with a custom view<p>I currently am trying to make a project which does not use any libraries. Now, I wanted to use a round image m... |
72,176,971 | apt-get update start to fail since last Friday<p>On my ubuntu host, When I was to run the apt-get update command, I am starting to get such failure since 05/06/2022. And it was working perfectly fine before.</p>
<p>Any idea what may have triggered such failure ?</p>
<p>Thanks.</p>
<p>Jack</p>
<pre><code>apt-get update... | <p>You have 2 errors: The apt-translation and the Google repository.</p>
<p>Disable the translation:</p>
<pre><code>echo "Acquire::Languages { "none"; };" |sudo tee -a /etc/apt/apt.conf
</code></pre>
<p>Then disable (temporary) the Google repository in your <code>sources.list</code></p> | apt-get update start to fail since last Friday | ubuntu|apt-get | -1 | 994 | 1 | 72,177,693 | 72,177,693 | 1 | true | 2022-05-09T18:58:15.363Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
apt-get update start to fail since last Friday<p>On my ubuntu host, When I was to run the apt-get update command, I am starting to get such failure since 05/... |
72,177,991 | How to properly use Exception method getMessage<p>I have the following java code:</p>
<pre><code>System.out.print("\fPlease Enter an integer: ");
while(!validInt){
try{
number = kb.nextInt();
validInt = true;
}catch(InputMismatchException e){
System.out.print("Pretty please enter ... | <p>You only set the message when the exception is created, it's an argument to the constructor. In your case it would have been nice if the InputMismatchException was created like this:</p>
<p>tnrow new InputMismatchException("Pretty please enter an int: ")</p>
<p>Since you probably aren't creating the Input... | How to properly use Exception method getMessage | java|exception|getmessage | -1 | 107 | 1 | 72,178,117 | 72,178,117 | 1 | true | 2022-05-09T20:40:53.387Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to properly use Exception method getMessage<p>I have the following java code:</p>
<pre><code>System.out.print("\fPlease Enter an integer: ");
w... |
72,177,715 | Google Sheets, rearrange data to new rows<p>Second (and hopefully last) google sheets question today and forever.
As I am importing my data from a management system to another via google sheets, I am having some difficulty in following the new system's method of importing data.
So currently my sheet looks like this:</p... | <p>In your situation, how about the following sample script?</p>
<h3>Sample script:</h3>
<p>Please set the source and destination sheet names.</p>
<pre class="lang-js prettyprint-override"><code>function myFunction() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var srcSheet = ss.getSheetByName("Sheet1&quo... | Google Sheets, rearrange data to new rows | google-apps-script|google-sheets | -1 | 54 | 3 | 72,179,488 | 72,179,488 | 1 | true | 2022-05-09T20:11:21.910Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Google Sheets, rearrange data to new rows<p>Second (and hopefully last) google sheets question today and forever.
As I am importing my data from a management... |
72,179,614 | Aggregating column names that are True in a list<p>I am working with a pandas dataframe that is represented as a large truth matrix.</p>
<pre><code> a1 b2 c3 d4 e5 f6
a1 True True False True False True
b2 True True False True True True
c3 False False True True... | <p>First, because you have a boolean matrix here, you can use <code>sum</code> with axis=1 to get counts of True values for each row index.</p>
<pre><code>df.sum(axis=1)
</code></pre>
<p>Output:</p>
<pre><code>a1 4
b2 5
c3 3
d4 5
e5 3
f6 4
dtype: int64
</code></pre>
<p>Now, let's find "all" ... | Aggregating column names that are True in a list | python|pandas|dataframe | -1 | 26 | 1 | 72,179,729 | 72,179,729 | 1 | true | 2022-05-10T00:53:36.463Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Aggregating column names that are True in a list<p>I am working with a pandas dataframe that is represented as a large truth matrix.</p>
<pre><code> a1... |
72,178,068 | publish war file to Azure Web Service<p>At first I want to mention, I did try some articles and also tried to get help for existing question/answer regarding deploying the war file to Azure web app but I didn't really got any where. I am new to it but also existing support either was in complete or very old.</p>
<p>I h... | <p>You can deploy your WAR package to Azure App Service to run your Java web app using the Azure CLI, PowerShell, or the Kudu Publish API.</p>
<p><strong>Note</strong>: It is not recommended of deploying <code>WAR</code>/<code>JAR</code>/<code>EAR</code> packages using <em><strong>FTP</strong></em> or <strong><code>Web... | publish war file to Azure Web Service | azure|azure-web-app-service|war | -1 | 212 | 1 | 72,179,810 | 72,179,810 | 1 | true | 2022-05-09T20:49:41.300Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
publish war file to Azure Web Service<p>At first I want to mention, I did try some articles and also tried to get help for existing question/answer regarding... |
72,180,358 | How do I get the first element of every tuple from a nested list of tuples?<p>Im trying to iterate from a nested list of tuples in order to grab the first element.
What I am getting is just the tuple at zero.
what I want is</p>
<pre><code>###expected output
### [['d51', 'd874', 'd486','d329','d1328', 'd1268','d114','d7... | <p>You can use a list comprehension like so:</p>
<pre class="lang-py prettyprint-override"><code>new = [[item[0] for item in inner] for inner in tupple]
# [['d51', 'd874', 'd486', 'd329', 'd1328', 'd1268', 'd114', 'd792', 'd717', 'd522'], ['d51', 'd874', 'd486', 'd329', 'd1328', 'd1268']]
</code></pre> | How do I get the first element of every tuple from a nested list of tuples? | python|python-3.x|list|loops|tuples | -1 | 62 | 3 | 72,180,377 | 72,180,377 | 1 | true | 2022-05-10T03:17:32.817Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I get the first element of every tuple from a nested list of tuples?<p>Im trying to iterate from a nested list of tuples in order to grab the first el... |
72,180,731 | TypeError: Failed to execute 'fetch' on 'Window': Invalid name<p>am trying update my todo list in my project using useContext api, i want to remove completed if i click of input checkbox but whenever i click on it am getting this error TypeError: Failed to execute 'fetch' on 'Window': Invalid name at _callee$, i have c... | <p>I think your header is invalid headers: {"content-[type]": "application/json"} should be {"Content-Type": "application/json"}, this is causing the error</p> | TypeError: Failed to execute 'fetch' on 'Window': Invalid name | reactjs|next.js|use-context | -1 | 883 | 1 | 72,180,922 | 72,180,922 | 1 | true | 2022-05-10T04:23:08.757Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
TypeError: Failed to execute 'fetch' on 'Window': Invalid name<p>am trying update my todo list in my project using useContext api, i want to remove completed... |
72,177,241 | How to add C library to Visual Studio project<p>I am trying to add <a href="https://github.com/mlabbe/nativefiledialog" rel="nofollow noreferrer">https://github.com/mlabbe/nativefiledialog</a> this C library to my C++ project in visual studio 2022. I've built and generated the .lib file and added it to my project by go... | <p>I just forgot to add the path to the generated .lib file (nfd.lib) to Projects->Properties->Linker->Input Additional Dependencies. After doing this, everything worked perfectly.</p> | How to add C library to Visual Studio project | c++|visual-studio | -1 | 171 | 2 | 72,181,588 | 72,181,588 | 1 | true | 2022-05-09T19:22:32.920Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to add C library to Visual Studio project<p>I am trying to add <a href="https://github.com/mlabbe/nativefiledialog" rel="nofollow noreferrer">https://git... |
72,181,190 | How to indicate when the game is saving to file and then show something on screen?<p>I have a saving system and today i'm using a canvas and text and just displaying the words "Saving Game" make it flickering for 3 seconds.</p>
<p>but what i want to do is that it will show the text "Saving Game" but... | <p>Use Async/Threading, or in Unity's case, <a href="https://docs.unity3d.com/Manual/Coroutines.html" rel="nofollow noreferrer"><code>Coroutines</code></a>.</p>
<pre class="lang-cs prettyprint-override"><code>bool isSaving;
public void SaveGame(){
StartCoroutine(SaveGameCoroutine());
}
private IEnumerator SaveGam... | How to indicate when the game is saving to file and then show something on screen? | c#|unity3d | -1 | 51 | 1 | 72,181,618 | 72,181,618 | 1 | true | 2022-05-10T05:35:31.657Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to indicate when the game is saving to file and then show something on screen?<p>I have a saving system and today i'm using a canvas and text and just di... |
72,181,783 | How to get some values from a special set?<p>I need to get the rank number from this set:</p>
<pre><code>{'rank': 'a=1;b=2;c=3', 'type': 'valid', 'name': 'Mr.A'}
</code></pre>
<p>I can get the rank value by this:</p>
<pre><code>a = {'value': 'rank:a=1;b=2;c=3', 'type': 'valid', 'name': 'Mr.A'}
rank = a['value']
print(r... | <p>Assuming the format doesn't change, first split by <code>:</code>, and take right part:</p>
<pre><code>rank_value = rank.split(':')[1]
</code></pre>
<p>Then split by <code>;</code>, and split each part by <code>=</code>, putting them in a list:</p>
<pre><code>ranks = [x.split('=')[1] for x in rank_value.split(';')] ... | How to get some values from a special set? | python | -1 | 36 | 3 | 72,181,885 | 72,181,885 | 1 | true | 2022-05-10T06:48:09.613Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to get some values from a special set?<p>I need to get the rank number from this set:</p>
<pre><code>{'rank': 'a=1;b=2;c=3', 'type': 'valid', 'name': 'Mr... |
72,182,033 | getting text block length with css (preferred) or javascript<p>Is there a way to know the actual length of div below after filling with text? with css (preferred) or javascript.</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="sn... | <p>In JS, you can use <code>offsetWidth</code>. You also have <code>offsetHeight</code> for the height.</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>console.log(document.get... | getting text block length with css (preferred) or javascript | javascript|html|css | -1 | 43 | 1 | 72,182,057 | 72,182,057 | 1 | true | 2022-05-10T07:10:01.963Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
getting text block length with css (preferred) or javascript<p>Is there a way to know the actual length of div below after filling with text? with css (prefe... |
72,181,444 | Regex - named groups multiple match by patterns<p>Below is a string pattern from which I would like to extract some information for an analytics system.
<code>PRMS: {"load_numbers"=>"12345678", "shipper"=>"some-shipper", "app_id"=>"my_app_id", "t... | <p>You need to put the group name where you actually capture the value, so for example:</p>
<pre><code>(?:\"load_numbers\"=>\"*\"(?<loadnumbers>[^\"]*)\")
</code></pre>
<p>Your complete regex (with some simplification and optimisations) then becomes:</p>
<pre><code>(?:\"load_... | Regex - named groups multiple match by patterns | regex | -1 | 31 | 1 | 72,182,417 | 72,182,417 | 1 | true | 2022-05-10T06:10:37.133Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Regex - named groups multiple match by patterns<p>Below is a string pattern from which I would like to extract some information for an analytics system.
<cod... |
72,182,932 | How to add one more column in same table while keeping the group by clause<p>List of columns in Table1:
Plan_ID, Claim_id, Patient_id, B_OR_G</p>
<p>List of columns in Table2:
ORGID, SHAPLANID</p>
<pre><code>select distinct a.Plan_ID
, a.Total_Claims
, Total_Patients
, b.PERIOD
, b.ORGID,a.... | <p>I think you can use ANY_VALUE(B_or_G)</p>
<p>For your excample:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code>select distinct a.Plan_ID
, a.Total_Claims
... | How to add one more column in same table while keeping the group by clause | mysql|sql|snowflake-cloud-data-platform|snowflake-schema | -1 | 32 | 1 | 72,183,225 | 72,183,225 | 1 | true | 2022-05-10T08:23:01.900Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to add one more column in same table while keeping the group by clause<p>List of columns in Table1:
Plan_ID, Claim_id, Patient_id, B_OR_G</p>
<p>List of ... |
72,183,511 | Python check list of dictionaries for all None values<p>I have the following list of dictionaries, that currently contain None values:</p>
<pre><code>[{'connections': None}, {'connections': None}, {'connections': None}]
</code></pre>
<p>I want to loop through the list of elements, check if each "connections" ... | <p>You can use a generator expression and <code>all</code> to unpack all the dict values in <code>lst</code> and check if they are all None:</p>
<pre class="lang-py prettyprint-override"><code>out = all(x is None for d in lst for x in d.values())
</code></pre>
<p>Output:</p>
<pre><code>True
</code></pre> | Python check list of dictionaries for all None values | python-3.x|list|dictionary | -1 | 212 | 4 | 72,183,568 | 72,183,568 | 1 | true | 2022-05-10T09:06:43.760Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python check list of dictionaries for all None values<p>I have the following list of dictionaries, that currently contain None values:</p>
<pre><code>[{'conn... |
72,183,740 | Javascript push and wait for async promises in array<p>I want to wait for an array of <strong>Promises</strong> but I cannot add them without executing them.
So I had to create a wrapper function, however <strong>Promise.all</strong> does not execute them.</p>
<p>This is my code:</p>
<pre><code> const set = new Set(... | <p>You could just push promises to your array, not functions:</p>
<pre><code> const set = new Set(Array.from([1, 2, 3, 4, 5]));
const func = async (input) => {
let result = await asyncFunc(input);
return result;
}
var promises = [];
for(const element of set) {
promises.pu... | Javascript push and wait for async promises in array | javascript|async-await | -1 | 236 | 2 | 72,183,780 | 72,183,780 | 1 | true | 2022-05-10T09:20:55.303Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Javascript push and wait for async promises in array<p>I want to wait for an array of <strong>Promises</strong> but I cannot add them without executing them.... |
72,183,732 | MySQL stored prod insert from IN data and other table<p>I have an INSERT statement below, taking from 3 inputs that will be passed from a php post request. The statement below returns an error</p>
<pre><code>INSERT INTO orderitems (orderId, productId, quantity, productName, price) (korderid, kproductid,kquantity, SELEC... | <p>You did not mention how you're doing with the post data. But here is how it could be done:</p>
<pre><code>INSERT INTO orderitems (orderId, productId, quantity, productName, price)
SELECT :orderid, p.id, :quantity, p.productName, p.price
FROM products p
WHERE p.id = :productid
</code></pre>
<p>The <code>:xyz</code> i... | MySQL stored prod insert from IN data and other table | mysql | -1 | 24 | 1 | 72,183,858 | 72,183,858 | 1 | true | 2022-05-10T09:20:31.243Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
MySQL stored prod insert from IN data and other table<p>I have an INSERT statement below, taking from 3 inputs that will be passed from a php post request. T... |
72,183,156 | Separate a 200x200 bitmap into 5x5 array<p>I'm trying to create 25 bitmap of 40x40 in a 200x200 bitmap (so it's 5x5 bitmap) so I can determine where it's colored by the user draw (See example).</p>
<p>I tried to create 5 row and column of bitmap and insert a portion of the bitmap original (40x40) but i always get the b... | <p>I found a way :</p>
<pre><code>private Bitmap split(Bitmap bmpOriginal)
{
Bitmap[] bmpArray = new Bitmap[] { };
Rectangle cloneRect = new Rectangle(0, 0, 40, 40);
Bitmap cloneBitmap = bmpOriginal.Clone(cloneRect, bmpOriginal.PixelFormat);
return cloneBitmap;
... | Separate a 200x200 bitmap into 5x5 array | c#|winforms | -1 | 34 | 1 | 72,184,414 | 72,184,414 | 1 | true | 2022-05-10T08:39:45.473Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Separate a 200x200 bitmap into 5x5 array<p>I'm trying to create 25 bitmap of 40x40 in a 200x200 bitmap (so it's 5x5 bitmap) so I can determine where it's col... |
72,184,320 | How to select specific Variables retrieved using XMLHttpRequest<p>I am trying to to an integration on my website. I have successfully retrieved data using XMLHttpRequest, However I don't need all the information I only need specific information.</p>
<p>This is my JavaScript code<br />
`
<h2>Using the XMLHttpRequest Obj... | <p><code>xhr.responseText</code> is a JSON string. You need to prase it into a JS object and select only needed properties. Like</p>
<pre><code>const jsonResponse = JSON.parse(xhr.responseText);
const { metadata, amount, created_at } = jsonResponse.data;
const { first_name, last_name } = metadata.customer;
const result... | How to select specific Variables retrieved using XMLHttpRequest | javascript|html|xmlhttprequest | -1 | 19 | 1 | 72,184,570 | 72,184,570 | 1 | true | 2022-05-10T10:04:08.173Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to select specific Variables retrieved using XMLHttpRequest<p>I am trying to to an integration on my website. I have successfully retrieved data using XM... |
72,173,597 | Setting CORS headers do not solve my CORS problem<p>I'm trying to call an endpoint(<code>POST</code> <code>https://target-endpoint.com/authentication</code>) from another origin(<code>https://origin.com</code>) with below header settings, but CORS error has remain raised.</p>
<p>Is there any mistake in my settings?</p>... | <p>Before browsers make a cross-origin POST request, they first perform a so called CORS-preflight request to make sure that the target of the POST allows the request.</p>
<p>For that, browsers make an <code>OPTIONS</code> request to the URL and check the CORS headers of the response. Only if the respone headers of thi... | Setting CORS headers do not solve my CORS problem | ruby-on-rails|ruby|google-chrome|heroku|cors | -1 | 290 | 1 | 72,185,567 | 72,185,567 | 1 | true | 2022-05-09T14:24:41.267Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Setting CORS headers do not solve my CORS problem<p>I'm trying to call an endpoint(<code>POST</code> <code>https://target-endpoint.com/authentication</code>)... |
72,184,405 | Jenkins scp permission denied for file on Jenkins server<p>I'm trying to copy a file (created during SCM Checkout) from my Jenkins agent to a remote server. I have set up SSH to the remote server, and I'm able to connect to it. I'm getting a "permission denied" error for the file on the Jenkins agent (not the... | <p>It turns out that the permission error was at the remote host. The problem was that I was trying to write to a location on the remote host that I did not have permission to write to. With user0@host.xxx.net:/ I was trying to write to the root of the remote host. I created a temp folder in the home folder of my user ... | Jenkins scp permission denied for file on Jenkins server | docker|jenkins|ssh|jenkins-pipeline | -1 | 206 | 1 | 72,185,850 | 72,185,850 | 1 | true | 2022-05-10T10:10:19.423Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Jenkins scp permission denied for file on Jenkins server<p>I'm trying to copy a file (created during SCM Checkout) from my Jenkins agent to a remote server. ... |
72,185,901 | Request method 'POST' not supported. Spring+Thymeleaf<p>**Hi everyone. I ran into a problem while developing a web application. The saveEmployee method does not work properly and throws the corresponding error. In the project I use Spring-boot + Thymeleaf. I think there is an error in these two files or a problem in th... | <p>In your <code>myRestController.java</code>, I am not seeing any <code>@PostMapping</code> defined. In <code>addNewEmployee.html</code>, it appears you are attempting to call shop/allEmployees with a <code>POST</code> rather than the <code>GET</code> method. If your intention is to pass a body or form to the <code>... | Request method 'POST' not supported. Spring+Thymeleaf | java|spring|spring-boot|thymeleaf | -1 | 158 | 1 | 72,185,971 | 72,185,971 | 1 | true | 2022-05-10T11:57:21.083Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Request method 'POST' not supported. Spring+Thymeleaf<p>**Hi everyone. I ran into a problem while developing a web application. The saveEmployee method does ... |
72,179,357 | Create an object from nested struct definition in GoLang?<p>Is there a way to create an object from a nested struct type</p>
<pre><code>func main() {
car := Car{}
var wheel Car.Wheel
}
type Car struct {
Wheel struct {
name string
}
}
</code></pre>
<p>I have a deep nested json. I am interested i... | <blockquote>
<p>Is there a way to create an object from a nested struct type</p>
</blockquote>
<p>No, because there's no such thing as a "nested struct type". You don't have a type <code>Car.Wheel</code>, you have a type <code>Car</code>, with a field <code>Wheel</code>; that field's type is the unnamed type ... | Create an object from nested struct definition in GoLang? | go|struct | -1 | 413 | 2 | 72,186,032 | 72,186,032 | 1 | true | 2022-05-10T00:01:57.413Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Create an object from nested struct definition in GoLang?<p>Is there a way to create an object from a nested struct type</p>
<pre><code>func main() {
car... |
72,142,744 | Angular unit test calling readonly BehaviorSubject<p>I have a angular class implemented ControlValueAccessor interface too.</p>
<p>I need to have 100% coverage. Please help me to cover the remain.
Line 20, 35, 36 need to be cover. Tried my best seams I have missed somewhere.</p>
<p>Unit test code</p>
<pre><code>import ... | <p>When you spy on a method, you lose implementation details but gain access to when it was called, how it was called and how many times it was called. To get the best of both world, you have to add <code>.and.callThrough()</code>.</p>
<p>Try the following:</p>
<pre><code>it('should call writeValue', fakeAsync(() =>... | Angular unit test calling readonly BehaviorSubject | angular|unit-testing|karma-jasmine|jasmin | -1 | 121 | 1 | 72,186,744 | 72,186,744 | 1 | true | 2022-05-06T14:01:18.930Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Angular unit test calling readonly BehaviorSubject<p>I have a angular class implemented ControlValueAccessor interface too.</p>
<p>I need to have 100% covera... |
72,186,157 | Parse JSON string inside another JSON<p>I have some JSON that contains another JSON object inside <strong>in a form of a string</strong> (note quotes around the <code>"jsonString"</code> value):</p>
<pre><code>{
"jsonString":"{\"someKey\": \"Some value\"}"
}
</code></... | <p>The error is saying that the whole JSON isn't valid, not just the <code>jsonString</code> value.</p>
<p>While it's true that (you can test it in online validator like <a href="https://jsonlint.com" rel="nofollow noreferrer">JSONLint</a> for instance):</p>
<pre><code>{
"jsonString": "{\"someKe... | Parse JSON string inside another JSON | json|swift|codable | -1 | 75 | 1 | 72,186,770 | 72,186,770 | 1 | true | 2022-05-10T12:15:48.077Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Parse JSON string inside another JSON<p>I have some JSON that contains another JSON object inside <strong>in a form of a string</strong> (note quotes around ... |
72,188,573 | Phpstan fails with "Syntax error, unexpected T_STRING, expecting ';' " in definition of function<p>I am using Phpstan on a Drupal project that needs to be updated; I have solved all the issues revealed by Phpstan except one and I don´t know the solution to that one.</p>
<p>The error message is:</p>
<pre><code>Line as... | <p>I have no idea what happened here, but the code is completely wrong. It's supposed to be an array definition, not a function. From the source code at <a href="https://github.com/asm89/stack-cors/blob/master/src/Cors.php" rel="nofollow noreferrer">https://github.com/asm89/stack-cors/blob/master/src/Cors.php</a>, the ... | Phpstan fails with "Syntax error, unexpected T_STRING, expecting ';' " in definition of function | php|arrays|drupal|phpstan | -1 | 140 | 1 | 72,188,674 | 72,188,674 | 1 | true | 2022-05-10T14:52:31.210Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Phpstan fails with "Syntax error, unexpected T_STRING, expecting ';' " in definition of function<p>I am using Phpstan on a Drupal project that needs to be up... |
72,189,688 | How can I fix } expected error in Unity C#?<p>I have a little problem with my C# code, so I have this simple PlayerHealth code here and Unity always gives me this error: <a href="https://i.stack.imgur.com/Pr232.png" rel="nofollow noreferrer">Unity Bracket Error</a></p>
<p><strong>Code:</strong></p>
<pre><code>using Sys... | <p>Check your <a href="https://docs.unity3d.com/ScriptReference/Collider.OnCollisionEnter.html" rel="nofollow noreferrer">OnCollisionEnter</a> function, the parameter is wrong.</p>
<pre><code>using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerHealth : MonoBehaviour
{
... | How can I fix } expected error in Unity C#? | c#|unity3d | -1 | 79 | 1 | 72,189,813 | 72,189,813 | 1 | true | 2022-05-10T16:09:26.817Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I fix } expected error in Unity C#?<p>I have a little problem with my C# code, so I have this simple PlayerHealth code here and Unity always gives me... |
72,189,847 | Client side is not sending message to server Java Socket<p>I am learning about sockets in java, but when I was running a program that sends messages from the client side to server side it doesn't show a message. If I enter some text on the client side it doesn't show up on the server side, but if I type endProcess it s... | <p>There are many problems here.</p>
<h2>Duplex protocol issues</h2>
<blockquote>
<pre class="lang-java prettyprint-override"><code>line = dis.readUTF();
dos.writeUTF(line);
</code></pre>
</blockquote>
<p>This isn't going to work; The <code>dis.readUTF()</code> line is going to <strong>block</strong> (freeze) until a l... | Client side is not sending message to server Java Socket | java|sockets | -1 | 37 | 1 | 72,190,071 | 72,190,071 | 1 | true | 2022-05-10T16:20:01.133Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Client side is not sending message to server Java Socket<p>I am learning about sockets in java, but when I was running a program that sends messages from the... |
72,191,468 | how to use external scripts from main python file<p>so have 2 python project file one is qr scanner and other is youtube downloader. adn both are in different python file</p>
<p>so i wanna create an main python file where i will list the both project name like:</p>
<ol>
<li>Qr Scanner</li>
<li>YouTube Downloader
Enter ... | <p>It sounds like <a href="https://docs.python.org/3/library/subprocess.html" rel="nofollow noreferrer">subprocess</a> is what you want. It allows you to make command line calls by passing arguments to <code>.run()</code> method.</p>
<p>For example, you can call the <code>ls</code> bash command to get a list of files i... | how to use external scripts from main python file | python | -1 | 26 | 1 | 72,191,518 | 72,191,518 | 1 | true | 2022-05-10T18:36:26.640Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to use external scripts from main python file<p>so have 2 python project file one is qr scanner and other is youtube downloader. adn both are in differen... |
72,188,807 | Why is autoload cscope.out enabled only after opening vim for the second time<p>What I want to do is to create a new cscope database based on different file types every time I open vim, and then automatically load <code>cscope.out</code></p>
<p>I edit my <code>.vimrc</code>, based on this article: <a href="https://stac... | <p>In the "autocommand" block, you add autocommands to the default autocommand group. They will be executed <em>later</em>, when you edit a <code>*.py</code> file or whatever. At this point, no database is created.</p>
<p>In the "cscope" block, you point <code>cscope</code> to a database but no data... | Why is autoload cscope.out enabled only after opening vim for the second time | vim|vim-plugin|cscope | -1 | 36 | 1 | 72,191,876 | 72,191,876 | 1 | true | 2022-05-10T15:07:47.060Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why is autoload cscope.out enabled only after opening vim for the second time<p>What I want to do is to create a new cscope database based on different file ... |
72,191,940 | How do I add ucwords() on IntlDateFormatter()?<p>[PHP 8.0] I want to temporary change language just for displaying month as a word.
And this works:</p>
<pre><code>$fmt = new \IntlDateFormatter('Fi_FI', NULL, NULL);
$fmt->setPattern('d MMM yyyy');
echo $fmt->format(new \DateTime($w_date));
</code></pre>
<p>This g... | <p><code>ucwords</code> should surround the whole command, since <code>format</code> is a function of <code>$fmt</code>, while <a href="https://www.php.net/manual/en/function.ucwords.php" rel="nofollow noreferrer"><code>ucwords</code></a> is a function by itself.</p>
<pre><code>echo ucwords($fmt->format(new \DateTim... | How do I add ucwords() on IntlDateFormatter()? | php | -1 | 21 | 1 | 72,191,964 | 72,191,964 | 1 | true | 2022-05-10T19:20:05.470Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I add ucwords() on IntlDateFormatter()?<p>[PHP 8.0] I want to temporary change language just for displaying month as a word.
And this works:</p>
<pre>... |
72,192,154 | Fid sample size based on num of rows in data<p>I have a dataset that looks like this:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>Region</th>
<th>Name</th>
</tr>
</thead>
<tbody>
<tr>
<td>Region 1</td>
<td>Name 14</td>
</tr>
<tr>
<td>Region 2</td>
<td>Name 18</td>
</tr>
<tr>
<td>Region ... | <p>Here's a base R solution.</p>
<pre><code>lapply(split(data, data$Region),
\(x) x[sample(nrow(x), nrow(x) * 0.05),])
</code></pre>
<p>You can then convert it back into a data frame with <code>rbind</code></p> | Fid sample size based on num of rows in data | r|split|lapply | -1 | 23 | 1 | 72,192,368 | 72,192,368 | 1 | true | 2022-05-10T19:46:09.280Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Fid sample size based on num of rows in data<p>I have a dataset that looks like this:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr... |
72,192,332 | continue the execution of a function after handled panic<p>I'm trying to make a task scheduler that does tasks in the given interval and also can handle an occurring panic. My question is how can I continue executing the function after handling the panic.</p>
<pre><code>func scheduleTask(task func() error, interval tim... | <p>When recovering you will exit the current function. In this case you can easily wrap the <code>task()</code> in a closure.</p>
<pre class="lang-golang prettyprint-override"><code>package main
import (
"log"
"sync"
"time"
)
func scheduleTask(task func() error, interval time... | continue the execution of a function after handled panic | go | -1 | 52 | 1 | 72,192,431 | 72,192,431 | 1 | true | 2022-05-10T20:01:53.973Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
continue the execution of a function after handled panic<p>I'm trying to make a task scheduler that does tasks in the given interval and also can handle an o... |
72,192,694 | WHy getting Firebase Quota exceeded error?<p>I have cleared all cache on my browser still am getting this error:</p>
<pre><code>Uncaught (in promise) FirebaseError: Quota exceeded.
</code></pre> | <p>Because you've exceeded usage quota of Firebase.</p> | WHy getting Firebase Quota exceeded error? | javascript|firebase|firebase-realtime-database|google-cloud-firestore|firebase-authentication | -1 | 159 | 1 | 72,192,776 | 72,192,776 | 1 | true | 2022-05-10T20:41:30.533Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
WHy getting Firebase Quota exceeded error?<p>I have cleared all cache on my browser still am getting this error:</p>
<pre><code>Uncaught (in promise) Firebas... |
72,192,628 | How can I search for the variation of a word without typing all variations ( in R)?<p>I need to check whether the variation of a word is in the text? How can I do that without typing everything out? For example, I need to search for the word 'broken', is there a way in r where it can look for the word and other variati... | <p>You could check out <code>syn</code> from the <code>syn</code> package, which generates synonyms for a given word, allowing you to do:</p>
<pre class="lang-r prettyprint-override"><code>library(syn)
grepl(paste0(c("broken", syn("broken")), collapse = "|"), text, ignore.case = T)
#> ... | How can I search for the variation of a word without typing all variations ( in R)? | r|detect | -1 | 54 | 1 | 72,193,163 | 72,193,163 | 1 | true | 2022-05-10T20:34:00.263Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I search for the variation of a word without typing all variations ( in R)?<p>I need to check whether the variation of a word is in the text? How can... |
72,193,740 | How do I prevent pip automatically installing supporting packages?<p>I am using python 3.6.0 within a venv. I would like to "pip install" matplotlib==2.0.0, however when I do this, pip seems to automatically grab the newest versions of all other required supporting packages for matplotlib. i.e. cycler 0.11.0,... | <p>Pip has a built-in feature:</p>
<p><code>pip install matplotlib --no-dependencies</code></p>
<p>To exclude specific, you can put it in requirements file and pass it:</p>
<p><code>pip install --no-deps -r requirements.txt</code></p> | How do I prevent pip automatically installing supporting packages? | python|matplotlib|pip | -1 | 30 | 1 | 72,194,071 | 72,194,071 | 1 | true | 2022-05-10T22:55:13.863Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I prevent pip automatically installing supporting packages?<p>I am using python 3.6.0 within a venv. I would like to "pip install" matplotli... |
72,194,290 | Need help to check and modify my SQL code which is aimed to find the next working date ( I wrote this code but got syntax error message, ask for help)<pre><code>CREATE FUNCTION NewStartDate (startdate DATE)
RETURNS DATE DETERMINISTIC
BEGIN
DECLARE nextdate DATE;
DECLARE counter integer;
SET COUNTER = ... | <p>I'm afraid the code you provided have more than one syntax error. Notably, you did not specify the unit for the interval in your date_add function <code>DATE_ADD(startdate,INTERVAL counter)</code> . I have revised your code in workbench and tested it (using a different while condition). It works now.</p>
<pre><code>... | Need help to check and modify my SQL code which is aimed to find the next working date ( I wrote this code but got syntax error message, ask for help) | mysql | -1 | 30 | 1 | 72,194,712 | 72,194,712 | 1 | true | 2022-05-11T00:49:23.140Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Need help to check and modify my SQL code which is aimed to find the next working date ( I wrote this code but got syntax error message, ask for help)<pre><c... |
72,194,106 | Readme file created in GIT remote shows up as a separate branch<p>I uploaded my java project and later added a Readme file from the online GIT at the remote. This created a separate branch and the only file I see in the branch is the "readme" file. I later realized that while creating the readme file there wa... | <blockquote>
<p>Only the default branch has the "readme" file that got incorrectly created, and there is no delete option there</p>
</blockquote>
<p>Probably because it is the default branch.</p>
<p>You can <a href="https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/man... | Readme file created in GIT remote shows up as a separate branch | git|github | -1 | 44 | 2 | 72,195,445 | 72,195,445 | 1 | true | 2022-05-11T00:07:45.667Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Readme file created in GIT remote shows up as a separate branch<p>I uploaded my java project and later added a Readme file from the online GIT at the remote.... |
72,195,520 | Join two tables with common column names but no related data<p>A picture is worth more than a 1000 words, so here it goes. How could I craft a SQL statement to produce the table below?</p>
<p><a href="https://i.stack.imgur.com/QlrLK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QlrLK.png" alt="join... | <p>I think what you are looking for is UNION query like below</p>
<pre><code>select userid, username, incomeid, incomeamount, null as ExpenseID, null as expenseAmount
from table1
union
select userid, username, null as incomeid, null as incomeamount, null as ExpenseID, null as expenseAmount
from table2
</code></pre> | Join two tables with common column names but no related data | sql|join|merge | -1 | 63 | 1 | 72,195,572 | 72,195,572 | 1 | true | 2022-05-11T04:43:18.923Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Join two tables with common column names but no related data<p>A picture is worth more than a 1000 words, so here it goes. How could I craft a SQL statement ... |
72,196,563 | Erros shows xml how to fix it<p>I don't know why when I run it works fine but shows these red lines on every XML it defaults me to add new widgets
<a href="https://i.stack.imgur.com/cWXs4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cWXs4.png" alt="check" /></a></p>
<p>anyone knows how to fix it i... | <p>Invalidate Cache and Restart & click check box checked your issue is solved</p> | Erros shows xml how to fix it | java|android|xml|android-studio | -1 | 49 | 3 | 72,196,930 | 72,196,930 | 1 | true | 2022-05-11T06:48:22.343Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Erros shows xml how to fix it<p>I don't know why when I run it works fine but shows these red lines on every XML it defaults me to add new widgets
<a href="h... |
72,196,861 | Why does except not allow me to enter correct value after catching error?<p>I have a variable 'action' which I want to input from the user and validate, I have a while loop and a try-except block to catch the values which raise an error or are invalid according to the functionality of the rest of the code</p>
<pre><cod... | <ul>
<li>Your if statement is not correct.</li>
<li>Print the message generated during the except raising instead of creating a new message.</li>
</ul>
<pre class="lang-py prettyprint-override"><code>while True: # Input and validation of 'action'
try:
action = int(input('Please enter what you would like to ... | Why does except not allow me to enter correct value after catching error? | python|python-3.x|error-handling|try-except | -1 | 52 | 3 | 72,197,114 | 72,197,114 | 1 | true | 2022-05-11T07:14:11.770Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why does except not allow me to enter correct value after catching error?<p>I have a variable 'action' which I want to input from the user and validate, I ha... |
72,197,320 | How to add text in key value pair Object<p>I had two array data which I was able to convert into a key value pair object.</p>
<pre><code>firstArray: [] = ['a','b','c','d']
secondArray: [] = [1,2,3,4]
</code></pre>
<p>Code to convert two array to Key Value Pair:</p>
<pre><code>let dict = firstArray.map(function(obj, ind... | <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 firstArray = ['a','b','c','d'];
const secondArray = [1,2,3,4];
const dict = firstArray.map((i, index) => {
return {
... | How to add text in key value pair Object | javascript|arrays|angular|typescript | -1 | 98 | 3 | 72,197,371 | 72,197,371 | 1 | true | 2022-05-11T07:51:21.773Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to add text in key value pair Object<p>I had two array data which I was able to convert into a key value pair object.</p>
<pre><code>firstArray: [] = ['a... |
72,197,643 | what am I missing in my button to move to another screen?<p>Ok so as I am new to this work i just followed a youtube video exactly and it has not worked. I thinks it might be indicating to create a variable?</p>
<pre><code> button = (Button) findViewById(R.id.button);
button.setOnClickListener(new View... | <p>Do not know about your <strong>openactivity_machine</strong> variable but switching activity should be this</p>
<pre><code>Intent myIntent = new Intent(this, MyActivityName.class);
startActivity(myIntent);
</code></pre> | what am I missing in my button to move to another screen? | java | -1 | 75 | 1 | 72,197,710 | 72,197,710 | 1 | true | 2022-05-11T08:16:41.853Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
what am I missing in my button to move to another screen?<p>Ok so as I am new to this work i just followed a youtube video exactly and it has not worked. I t... |
72,198,924 | Convert list of class objects to list of lists<p>My goal is to write a function, which receives a list of class objects and converts these into a list of lists, this is what I currently have:</p>
<pre><code>def convertToListOfLists(toConvert):
listOfLists = []
temp = []
for t in toConvert:
temp.appe... | <p>You need to make a new <code>temp</code> everytime through the loop:</p>
<pre class="lang-py prettyprint-override"><code>def convertToListOfLists(toConvert):
listOfLists = []
for t in toConvert:
temp = []
temp.append(t.datenbestand)
temp.append(t.aktenzeichen)
temp.append(t.ma... | Convert list of class objects to list of lists | python|list|scope | -1 | 32 | 1 | 72,198,981 | 72,198,981 | 1 | true | 2022-05-11T09:50:30.903Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Convert list of class objects to list of lists<p>My goal is to write a function, which receives a list of class objects and converts these into a list of lis... |
72,199,614 | Is WordPress's API not accessible for free accounts?<p>I signed up for a free WordPress account with the intent of integrating their blogging capabilities as a 'feature' into my React-based app. However, after signing up for the WP account and creating a few blog posts, I attempted to acccess the API by appending "... | <p>On the WordPress.com platform the REST API is actually hosted and structured at <a href="https://public-api.wordpress.com/wp/v2" rel="nofollow noreferrer">https://public-api.wordpress.com/wp/v2</a> for all sites. In addition, there's a /sites/ endpoint that will namespace your specific site.</p>
<p>For example, the ... | Is WordPress's API not accessible for free accounts? | wordpress|rest | -1 | 22 | 1 | 72,199,822 | 72,199,822 | 1 | true | 2022-05-11T10:41:41.587Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is WordPress's API not accessible for free accounts?<p>I signed up for a free WordPress account with the intent of integrating their blogging capabilities as... |
72,200,100 | JavaScript How to output the value of result1 and result2<p>The script below outputs only the value of variable "result2"</p>
<p>How to output the value of "result1" and "result2" without using console.log, cuz i will put this script in the cefSharp framework of C#, cefSharp does not outpu... | <p>The console.log call just displays the value of the previous statement and nothing more.<br />
Using the result outside the promise function can be a problem - the promise might finish after. Maybe want to look into <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function"... | JavaScript How to output the value of result1 and result2 | javascript|cefsharp | -1 | 71 | 1 | 72,200,752 | 72,200,752 | 1 | true | 2022-05-11T11:18:15.603Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
JavaScript How to output the value of result1 and result2<p>The script below outputs only the value of variable "result2"</p>
<p>How to output the ... |
72,201,131 | Django backend on aws lambda : what is considered a request?<p>Im considering setting up a django backend on aws lambda and i need to calculate the costs based on the number of requests and duration of these requests.</p>
<p>How can I calculate the number of requests in django (ie what is considered in django as an aws... | <p>One HTTP request from the browser to your server equals one Lambda request. Whatever your Lambda function (Django) does internally (like queries to the database) just increases the runtime of the function invocation and thus the billed time, it's not a "request".</p>
<p>If you're serving a website, the bro... | Django backend on aws lambda : what is considered a request? | django|amazon-web-services|request | -1 | 130 | 1 | 72,201,492 | 72,201,492 | 1 | true | 2022-05-11T12:32:48.143Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Django backend on aws lambda : what is considered a request?<p>Im considering setting up a django backend on aws lambda and i need to calculate the costs bas... |
72,201,476 | Remove an array from computed reverse method Vuejs<p>Good day, how to remove an array from a reverse method?</p>
<p>Here's my code</p>
<pre><code>const app = Vue.createApp({
data() {
return {
app_title: 'Simple Checklist App',
entered_task_value: '',
list_of_tasks: [],
... | <p>You should update the list_of_tasks of task array instead of the <code>computed</code> array.</p>
<p>The computed values are calculated from the real data and updated each time the data changes.</p>
<p>Here is the <a href="https://vuejs.org/guide/essentials/computed.html" rel="nofollow noreferrer">documentation abou... | Remove an array from computed reverse method Vuejs | javascript|vue.js | -1 | 42 | 1 | 72,201,723 | 72,201,723 | 1 | true | 2022-05-11T12:57:08.867Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Remove an array from computed reverse method Vuejs<p>Good day, how to remove an array from a reverse method?</p>
<p>Here's my code</p>
<pre><code>const app =... |
72,200,335 | how to customize pub.dev package and use it?<p>We want to change and edit a package for flutter or dart .
How should we do this and use this package on own projects?
I'm planning to fork it from the GitHub source.
What do you think should be done next?</p> | <pre><code>dependencies:
plugin1:
git:
url: git://github.com/flutter/plugin1.git
</code></pre>
<p>See <a href="https://docs.flutter.dev/development/packages-and-plugins/using-packages#dependencies-on-unpublished-packages" rel="nofollow noreferrer">Dependencies on unpublished packages</a> for details.</p> | how to customize pub.dev package and use it? | flutter|flutter-dependencies | -1 | 126 | 2 | 72,201,742 | 72,201,742 | 1 | true | 2022-05-11T11:34:13.090Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to customize pub.dev package and use it?<p>We want to change and edit a package for flutter or dart .
How should we do this and use this package on own p... |
72,201,619 | I cannot load my workbook using Openpyxl in Python<p>I have an excel file that has 4 different worksheets and when I try to load my data as following:</p>
<pre><code>from openpyxl import load_workbook
template = "template.xlsx"
ws = load_workbook(template)
</code></pre>
<p>I get the error:</p>
<blockquote>
<p... | <p>If its not messing around with your, data you can use the below code to silence the warnings</p>
<pre><code>import warnings
warnings.filterwarnings('ignore', category=UserWarning, module='openpyxl')
</code></pre> | I cannot load my workbook using Openpyxl in Python | python|openpyxl | -1 | 44 | 1 | 72,202,127 | 72,202,127 | 1 | true | 2022-05-11T13:07:12.503Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I cannot load my workbook using Openpyxl in Python<p>I have an excel file that has 4 different worksheets and when I try to load my data as following:</p>
<p... |
72,202,121 | Checking a CheckBox in a DataGrid when double clicking on the corresponding row<p>I have a DataGrid with 3 Text columns and one CheckBox column :</p>
<pre class="lang-xml prettyprint-override"><code><DataGrid x:Name="EquipmentArray" Style="{StaticResource DataGridEquipment}">
<DataGrid.... | <p>You should add a boolean property like <code>IsEnabled</code> to your data model and bind it to the <code>CheckBox</code>:</p>
<p><strong>DataItem.cs</strong></p>
<pre><code>class DataItem : INotifyPropertyChanged
{
// Let property raise the INotifyPropertyChanged.PropertyChanged event
public bool IsEnabled { ge... | Checking a CheckBox in a DataGrid when double clicking on the corresponding row | c#|wpf|xaml | -1 | 59 | 1 | 72,202,528 | 72,202,528 | 1 | true | 2022-05-11T13:40:04.697Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Checking a CheckBox in a DataGrid when double clicking on the corresponding row<p>I have a DataGrid with 3 Text columns and one CheckBox column :</p>
<pre cl... |
72,202,029 | php timestring() fails to return correct result 4:00 PM<p><strong>GOAL:</strong> Add X amount of seconds to existing time stamp (H:i:s) and convert it into a human readable non-military (24:00 Hr) <strong>AM/PM time stamp</strong> ('3:15 pm'). IF possible, I want to nix the leading zero in instances where timestamp wou... | <p><code>$stamp</code> is already an integer/timestamp, so <code>strtotime($stamp)</code> fails. Take that off, and the date will format correctly.</p>
<pre><code>$est = date('h:i:s', $stamp);
</code></pre> | php timestring() fails to return correct result 4:00 PM | php|unix-timestamp | -1 | 36 | 1 | 72,202,594 | 72,202,594 | 1 | true | 2022-05-11T13:34:00.660Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
php timestring() fails to return correct result 4:00 PM<p><strong>GOAL:</strong> Add X amount of seconds to existing time stamp (H:i:s) and convert it into a... |
72,202,851 | How to apply function to GroupBy agg<p>I have the following groupby which does not work well since I want to sum absolute values.</p>
<pre><code>DF.groupby(["Name"], as_index=False).agg({"A":"sum",'B': 'first'}).round(2)
</code></pre>
<p>How can I add a rule which convert value to absolute... | <p>You might provide functions as values of dict you are passing to <a href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.agg.html" rel="nofollow noreferrer"><code>pandas.DataFrame.agg</code></a>, consider following example</p>
<pre><code>import pandas as pd
df = pd.DataFrame({'Name':['A'... | How to apply function to GroupBy agg | python | -1 | 23 | 1 | 72,202,945 | 72,202,945 | 1 | true | 2022-05-11T14:29:27.447Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to apply function to GroupBy agg<p>I have the following groupby which does not work well since I want to sum absolute values.</p>
<pre><code>DF.groupby([... |
72,203,129 | Javascript download: detect rename of file<p>If I use some code like this, to start a Download with Javascript in my browser:</p>
<pre><code>const link = document.createElement("a");
link.style.display = "none";
link.href = URL.createObjectURL(file);
link.download = file.name;
document.body.appendCh... | <p>These no way to detect the filename change.</p>
<p>if u want avoid the duplicated download (file name duplicated) from the same page as alternative solution u can create on an array to store previous filename</p> | Javascript download: detect rename of file | javascript | -1 | 44 | 3 | 72,203,427 | 72,203,427 | 1 | true | 2022-05-11T14:49:24.880Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Javascript download: detect rename of file<p>If I use some code like this, to start a Download with Javascript in my browser:</p>
<pre><code>const link = doc... |
72,186,121 | why does outputting the variable "$size = @keys;" the numerical value 3 output?(Perl)<pre><code>my %data = (-hund => 12, -katze => 14, -maus => 16, -kuh => 18);
my @keys = keys %data;
my $size = @keys;
print "$size\n";
</code></pre>
<p>Why is the number of keys displayed when the variable <code>$... | <p><code>@keys</code> is evaluated in scalar context (because it's being assigned to a scalar). An array evaluated in scalar context produces its number of elements.</p>
<pre class="lang-perl prettyprint-override"><code>my %data = (-hund => 12, -katze => 14, -maus => 16, -kuh => 18);
my @keys = keys %data;... | why does outputting the variable "$size = @keys;" the numerical value 3 output?(Perl) | perl | -1 | 67 | 2 | 72,203,605 | 72,203,605 | 1 | true | 2022-05-10T12:13:35.493Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
why does outputting the variable "$size = @keys;" the numerical value 3 output?(Perl)<pre><code>my %data = (-hund => 12, -katze => 14, -maus => 16, ... |
72,204,195 | Regex filter for file search Java<p>I'm quite new to using regex so I'm having problems with my current code. I created an Abstract File Search that returns a List of Files. I would like this searcher to be filtered by a regex (have ex. the extension it looks for based on a regex filter).</p>
<p>The code of my Abstract... | <p>Try this website: <a href="https://regexr.com/" rel="nofollow noreferrer">https://regexr.com/</a> and paste the regex <code>.+(?:.sql|.bat)$</code> for an explanation.</p>
<p>In code it'd look like this:</p>
<pre><code>Stream.of("file1.json", "init.bat", "init.sql", "file2.txt"... | Regex filter for file search Java | java|string | -1 | 66 | 2 | 72,204,341 | 72,204,341 | 1 | true | 2022-05-11T16:01:08.287Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Regex filter for file search Java<p>I'm quite new to using regex so I'm having problems with my current code. I created an Abstract File Search that returns ... |
72,204,637 | Combine objects in array in Javascript<p>I have an array of objects like follows</p>
<p>0: {bill_no: '0000633', test_code: '1', analyzer_code: '2'}</p>
<p>1: {bill_no: '0000633', test_code: '2', analyzer_code: '2'}</p>
<p>2: {bill_no: '0000633', test_code: '28', analyzer_code: '3'}</p>
<p>3: {bill_no: '0000633', test_c... | <p>Apparently you want to group by <code>bill_no</code> and <code>analyzer_code</code>.</p>
<p>One way is to use <code>reduce</code> and collect groups by a key that is the combination of <code>bill_no</code> and <code>analyzer_code</code> properties. I'll use <code>JSON.stringify</code> to create such a key:</p>
<p><d... | Combine objects in array in Javascript | javascript|arrays | -1 | 34 | 1 | 72,204,815 | 72,204,815 | 1 | true | 2022-05-11T16:34:51.763Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Combine objects in array in Javascript<p>I have an array of objects like follows</p>
<p>0: {bill_no: '0000633', test_code: '1', analyzer_code: '2'}</p>
<p>1:... |
72,205,293 | How to alter a header setting for mobile views?<p>I am a beginner trying to display a different header on a mobile screen. The header has a background image portrait of 4 people, which will be too narrow so people will be left out when viewing on mobile.</p>
<p>What I tried is setting the background size to 100%, but t... | <pre><code> @media only screen and (max-width: 430px){
smallheader {
background: url(../image.jpg);
background-repeat: no-repeat;
background-position: center 70px;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
backg... | How to alter a header setting for mobile views? | html|css | -1 | 27 | 1 | 72,205,497 | 72,205,497 | 1 | true | 2022-05-11T17:32:37.550Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to alter a header setting for mobile views?<p>I am a beginner trying to display a different header on a mobile screen. The header has a background image ... |
72,205,488 | Django Model Form doesn't seem to validate the BooleanField<p>In my model the validation is not validating for the boolean field, only one time product_field need to be checked , if two time checked raise validation error.</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="fals... | <p>Boolean and <code>None</code> are not always the same. I think that is the root of your problem. Here is <code>None</code> vs <code>False</code>:</p>
<pre><code># python3
> False is None
False
</code></pre>
<p>I find the code and information confusing.</p>
<p>I assume <code>product_filed</code> is a typo. Genera... | Django Model Form doesn't seem to validate the BooleanField | python|django-models|django-views|django-validation | -1 | 124 | 1 | 72,205,746 | 72,205,746 | 1 | true | 2022-05-11T17:50:25.290Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Django Model Form doesn't seem to validate the BooleanField<p>In my model the validation is not validating for the boolean field, only one time product_field... |
72,205,644 | Is there a difference between Static Classes vs Import prefixes?<p>I have a file in the app folder named <code>constants.dart</code>.</p>
<p>An example of a constant is</p>
<p><code>const String name = "Daniel";</code></p>
<p>I want to be able to use the const variables from the file by typing <code>Constant.... | <p>The officially recommended style is to use top-level constants, <a href="https://dart.dev/guides/language/effective-dart/design#avoid-defining-a-class-that-contains-only-static-members" rel="nofollow noreferrer">not have a class containing them</a>.</p>
<p>That allows users to import them with any prefix (not just <... | Is there a difference between Static Classes vs Import prefixes? | dart | -1 | 27 | 1 | 72,206,033 | 72,206,033 | 1 | true | 2022-05-11T18:02:18.307Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is there a difference between Static Classes vs Import prefixes?<p>I have a file in the app folder named <code>constants.dart</code>.</p>
<p>An example of a ... |
72,206,178 | Show data from table even if there is no data<p>I have 3 tables:<a href="https://i.stack.imgur.com/cMK8l.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cMK8l.png" alt="enter image description here" /></a></p>
<p>Data in <code>Compania</code> table:</p>
<p><a href="https://i.stack.imgur.com/xh4Tj.png... | <p>First of all, the question is a mess: tables and columns from the question and examples you've provided us with are different. Please fix that.</p>
<p>I don't speak Spanish, so I can only assume the VAC_PERIODICA is Periodo. In that case you need to move what you have in where condition to the join clause. Like this... | Show data from table even if there is no data | sql|oracle | -1 | 32 | 1 | 72,206,297 | 72,206,297 | 1 | true | 2022-05-11T18:48:56.857Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Show data from table even if there is no data<p>I have 3 tables:<a href="https://i.stack.imgur.com/cMK8l.png" rel="nofollow noreferrer"><img src="https://i.s... |
72,203,157 | Boost's stacktrace library doesn't work with C++ CLI<p>I have been using the Boost stacktrace library to print out a stacktrace of my program.</p>
<p><a href="https://www.boost.org/doc/libs/1_78_0/doc/html/stacktrace.html" rel="nofollow noreferrer">Boost 1.78.0</a></p>
<p>When compiling with pure C++ it compiles and my... | <p>I don't think Boost Stacktrace claims CLR support.</p>
<p>I'd expect some output, but not particularly useful output.</p>
<p>Of course, in CLR mode, you can use .NET stacktraces: <a href="https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.stacktrace?view=net-6.0" rel="nofollow noreferrer">https://docs.mi... | Boost's stacktrace library doesn't work with C++ CLI | boost|c++-cli|boost-stacktrace | -1 | 66 | 1 | 72,206,676 | 72,206,676 | 1 | true | 2022-05-11T14:51:28.980Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Boost's stacktrace library doesn't work with C++ CLI<p>I have been using the Boost stacktrace library to print out a stacktrace of my program.</p>
<p><a href... |
72,206,501 | Retrieve value from dictionary with list<p>I see so many questions but not found any with dictionary like that:</p>
<p>I have this <code>dict</code>:</p>
<pre><code>my_dict = {
'og_min': 'https://www.example.com/assets/images/empreendimentos/listing-varanda-vila-ema.png?_=1000',
'images_sobre_o_produto': ['http... | <p>The fact there is you have a dictionary, with two keys.
One key is a string, and the other holds a list.</p>
<p>So you can do something like this:</p>
<pre><code>for key, val in my_dict.items():
if type(val) is list:
for url in val:
print(url)
if type(val) is str:
print(val)
</co... | Retrieve value from dictionary with list | python-3.x | -1 | 19 | 1 | 72,206,832 | 72,206,832 | 1 | true | 2022-05-11T19:17:45.067Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Retrieve value from dictionary with list<p>I see so many questions but not found any with dictionary like that:</p>
<p>I have this <code>dict</code>:</p>
<pr... |
72,205,917 | How to convert event dates to longitudinal data in R?<p>I have a dataset of individual subject records with birth, diagnosis, and death dates. I would like to turn this into longitudinal data that shows whether or not subjects have been born, have been diagnosed (diagnosis can happen before or after birth), or have die... | <p>I used a weird approach that works. I just put the study weeks as columns, melted the data.frame and compared the values using <code>ifelse</code>.</p>
<pre><code>library(data.table) #load data.table package
# load your data as data.table
a = data.table(id=seq(1:4),
date_birth=c("2/28/2021", "... | How to convert event dates to longitudinal data in R? | r|dplyr|time-series|panel-data | -1 | 49 | 1 | 72,207,005 | 72,207,005 | 1 | true | 2022-05-11T18:23:55.083Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to convert event dates to longitudinal data in R?<p>I have a dataset of individual subject records with birth, diagnosis, and death dates. I would like t... |
72,206,357 | Fetching object in object in Angular<p>I'm trying to fetch data from my back-end API and I do not know how to fetch an object inside another one.</p>
<p>Here is the response of my back-end :</p>
<pre><code>{
"id": 4,
"website_id": 1,
"user_id": 5,
"username": &quo... | <p>First of all my suggestion would be to reconsider your API. Because if you had many objects in your response you would end up having too many http requests.<br />
Otherwise you can use combination of RxJS switchMap and forkJoin operators.</p>
<pre class="lang-js prettyprint-override"><code>// assuming you have have ... | Fetching object in object in Angular | angular | -1 | 35 | 1 | 72,207,259 | 72,207,259 | 1 | true | 2022-05-11T19:05:29.657Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Fetching object in object in Angular<p>I'm trying to fetch data from my back-end API and I do not know how to fetch an object inside another one.</p>
<p>Here... |
72,166,916 | HTML5 Video not displaying video from axios react data fetch<p>I am having issue with my video player page, not being able to find the data associated with the video file. I keep getting a 404 not found or a "undefined error coming from the axios code snippet of my code as that is where the console log for it is l... | <p>SOLUTION:
I have found the solution with the advice of VC.One and a bit of research, much thanks to him!</p>
<p>I have refactored some of my code for my DetailVideoPage.JS:</p>
<pre><code>function DetailVideoPage() {
const [Video, setVideo] = useState([]);
const videoId = useParams();
const videoVariable = {... | HTML5 Video not displaying video from axios react data fetch | axios|sequelize.js|html5-video|http-status-code-404 | -1 | 143 | 2 | 72,207,549 | 72,207,549 | 1 | true | 2022-05-09T04:09:52.323Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
HTML5 Video not displaying video from axios react data fetch<p>I am having issue with my video player page, not being able to find the data associated with t... |
72,163,823 | How much hardware is needed to create a microservices demo architecture<p>I am estimating how much hardware I need to set up a demo microservices architecture (for example: <a href="https://github.com/microservices-demo/microservices-demo" rel="nofollow noreferrer">https://github.com/microservices-demo/microservices-de... | <p>Not the answer to your question, but most of that stuff can be acquired "as a Service" (IaaS or PaaS), so no hardware required.</p>
<blockquote>
<p>I am estimating how much hardware I need to set up a demo microservices architecture</p>
</blockquote>
<p>Depends what you want to demo - if you only want to d... | How much hardware is needed to create a microservices demo architecture | server|architecture|microservices|hardware | -1 | 328 | 2 | 72,207,664 | 72,207,664 | 1 | true | 2022-05-08T18:01:16.877Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How much hardware is needed to create a microservices demo architecture<p>I am estimating how much hardware I need to set up a demo microservices architectur... |
72,205,825 | How to get the key by index in Hashtable?<p>I try to get the value of the key in a <code>Hashtable</code> based on the index position I provide, this is my hashtable:</p>
<pre><code>Hashtable<Integer, String> hash_table = new Hashtable<Integer, String>();
hash_table.put(5, "This");
hash_table.put(... | <p>As @WJS noted, the correct way to go is with a <code>LinkedHashMap</code> which maintains insertion order (as the iteration order on key/value pairs).
As an improvement to solutions proposed, we can extract the i-th key without populating a full array/list of the map keys (which can be rather inefficient) using O(1)... | How to get the key by index in Hashtable? | java|hashtable | -1 | 224 | 2 | 72,207,877 | 72,207,877 | 1 | true | 2022-05-11T18:17:26.847Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to get the key by index in Hashtable?<p>I try to get the value of the key in a <code>Hashtable</code> based on the index position I provide, this is my h... |
72,207,962 | Covert numbered date to actual date<p>How would you convert this date below into an actual date format?</p>
<pre><code>1652122994
</code></pre>
<p>Desired output (for example):</p>
<pre><code>2022-05-11
</code></pre> | <p>You can do something like this...</p>
<pre><code><?php
$timestamp=1652122994;
echo gmdate("Y-m-d", $timestamp);
?>
</code></pre> | Covert numbered date to actual date | php | -1 | 24 | 1 | 72,208,010 | 72,208,010 | 1 | true | 2022-05-11T21:48:40.627Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Covert numbered date to actual date<p>How would you convert this date below into an actual date format?</p>
<pre><code>1652122994
</code></pre>
<p>Desired ou... |
72,209,178 | Calculating income and expense by filtering according to the entered date<p>I have a date picker and I will calculate income and expense based on this date. I want to add a parameter named random_date to my function in view.py. I want the user to set the end date. The start time will be today's date. For example, if th... | <p>you can access POST or GET parameters from your request like this:</p>
<p><code>request.GET.get('my_var')</code><br>
<code>request.POST.get('my_var')</code></p>
<p>your summary.html sample omits your form opening tag so here is a view you might use assuming that you are POSTing information to your view:</p>
<pre><co... | Calculating income and expense by filtering according to the entered date | python|django | -1 | 28 | 1 | 72,209,882 | 72,209,882 | 1 | true | 2022-05-12T01:31:55.377Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Calculating income and expense by filtering according to the entered date<p>I have a date picker and I will calculate income and expense based on this date. ... |
72,210,429 | Replacing inconvenient package name. Got error: replacement module without version must be directory path (rooted or starting with ./ or ../)<h2>Problem</h2>
<p>In go.mod file I wrote:</p>
<pre><code>module github.com/Siiir/vector
go 1.17
require github.com/huandu/go-clone v1.3.2 // indirect
replace clone => githu... | <blockquote>
<p>Anyway, assume that a package name is indeed crazy or inconvenient. How can I replace it?</p>
</blockquote>
<p>You cannot.</p>
<p>And you should not. The import path is something you write just once in the <code>import</code> declaration and the package name can be changed on a per file level with <code... | Replacing inconvenient package name. Got error: replacement module without version must be directory path (rooted or starting with ./ or ../) | go|import|package|rename | -1 | 38 | 1 | 72,210,570 | 72,210,570 | 1 | true | 2022-05-12T05:18:00.980Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Replacing inconvenient package name. Got error: replacement module without version must be directory path (rooted or starting with ./ or ../)<h2>Problem</h2>... |
72,211,017 | Node js service that manages k8s jobs - is it feasible?<p>I need to create a node.js service that is supposed to run a large number (potentially hundreds) of scheduled jobs simultaneously. This service should also expose a REST interface to allow end users to perform CRUD on these jobs.
At first I thought of going for ... | <p>what you want is basically the definition of kubernetes <a href="https://kubernetes.io/docs/concepts/extend-kubernetes/operator/" rel="nofollow noreferrer">operator</a>, and yes, it is possible to do what you want.</p>
<p>in your case, you can use the kubernetes client for <a href="https://github.com/kubernetes-cli... | Node js service that manages k8s jobs - is it feasible? | node.js|kubernetes | -1 | 48 | 1 | 72,211,202 | 72,211,202 | 1 | true | 2022-05-12T06:33:07.003Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Node js service that manages k8s jobs - is it feasible?<p>I need to create a node.js service that is supposed to run a large number (potentially hundreds) of... |
72,211,254 | How do I scrape dynamic search results page with scrapy?<p>I'm trying to scrape the results from the website <a href="https://howlongtobeat.com/#search" rel="nofollow noreferrer">https://howlongtobeat.com/#search</a>. However, when I scrape, only the first 6 results only out of 20.</p>
<p>My code:</p>
<pre><code>import... | <p>Actually, Data is generating from external url which is API calls HTML response as <code>POST</code> method.</p>
<pre><code>import scrapy
from scrapy.crawler import CrawlerProcess
class TestSpider(scrapy.Spider):
name = 'test'
def start_requests(self):
url = 'https://howlongtobeat.com/search_resu... | How do I scrape dynamic search results page with scrapy? | python|scrapy | -1 | 78 | 1 | 72,211,756 | 72,211,756 | 1 | true | 2022-05-12T06:56:36.910Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I scrape dynamic search results page with scrapy?<p>I'm trying to scrape the results from the website <a href="https://howlongtobeat.com/#search" rel=... |
72,211,433 | Rename folders using pandas<p>A folder named <code>Folder</code> have several sub folder <code>Sub Folder A</code>, <code>Sub Folder B</code> and <code>Sub Folder C</code></p>
<p>I want to make them <code>sub folder a</code>, <code>sub folder b</code> and <code>sub folder c</code></p>
<p>Is there any way to that?</p> | <p>Alternatively you can use shutil.move(old_path, new_path).</p>
<pre class="lang-py prettyprint-override"><code>import shutil
old_path = r"C:\Users\adj\Desktop\root_dir\Sub Folder A"
new_path = r"C:\Users\adj\Desktop\root_dir\sub folder a"
shutil.move(old_path, new_path)
</code></pre>
<p>But bas... | Rename folders using pandas | python|pandas | -1 | 53 | 3 | 72,211,842 | 72,211,842 | 1 | true | 2022-05-12T07:12:37.610Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Rename folders using pandas<p>A folder named <code>Folder</code> have several sub folder <code>Sub Folder A</code>, <code>Sub Folder B</code> and <code>Sub F... |
72,211,731 | how to match data from a 2 arrays and create a new array<p>i have the following array</p>
<pre><code>response=[
{
"mId": "4a993417-3dae-4a85-bb2e-c535d7fda6d7",
"title": "test2",
"score": "4",
"id": &qu... | <p>As long as you write your response and mixture arrays correctly, you can achieve it by using a combination of <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map" rel="nofollow noreferrer">Array.prototype.map()</a> and <a href="https://developer.mozilla.org/en-US/docs/... | how to match data from a 2 arrays and create a new array | javascript|arrays|typescript | -1 | 38 | 1 | 72,212,194 | 72,212,194 | 1 | true | 2022-05-12T07:38:59.563Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to match data from a 2 arrays and create a new array<p>i have the following array</p>
<pre><code>response=[
{
"mId": &q... |
72,215,901 | How to wrap 2 elements in a list in []?<p>So I have a list like so:</p>
<pre><code>data= ['[a, b], [h,g]', '[j,f], [k,g]', '[g,h], [p,e]', '[u,f], [i,t]', '[o,g], [u,d]', '[g,f], [j,f]']
</code></pre>
<p>How can I wrap the 2 items in the list between <code> ''</code> with <code>[]</code> like so:</p>
<pre><code>data = ... | <p>Just doing this:</p>
<pre><code>coords = [[x] for x in data]
</code></pre> | How to wrap 2 elements in a list in []? | python | -1 | 35 | 1 | 72,215,947 | 72,215,947 | 1 | true | 2022-05-12T12:50:03.203Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to wrap 2 elements in a list in []?<p>So I have a list like so:</p>
<pre><code>data= ['[a, b], [h,g]', '[j,f], [k,g]', '[g,h], [p,e]', '[u,f], [i,t]', '[... |
72,216,535 | efficient way of substracting along specific dimension in numpy array<p>I have a NumPy array <code>a</code> of sizes (1000,100,2).</p>
<p>I want to subtract only values from the last dimension iterating along the firsts.
In other words:</p>
<p><code>a[i+1,j,[x1,y1]]-a[i,j,[x0,y0]]</code></p>
<p>to obtain an array <code... | <p>Looks like you want <code>np.diff</code></p>
<pre><code>a = np.random.rand(1000, 100, 2)
b = np.diff(a, axis = 0)
b.shape
Out[]: (999, 100, 2)
</code></pre> | efficient way of substracting along specific dimension in numpy array | python-3.x|numpy|numpy-ndarray | -1 | 20 | 1 | 72,216,785 | 72,216,785 | 1 | true | 2022-05-12T13:30:27.720Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
efficient way of substracting along specific dimension in numpy array<p>I have a NumPy array <code>a</code> of sizes (1000,100,2).</p>
<p>I want to subtract ... |
72,219,108 | How to use data from an ajax.done to stop a while loop<p>I have a while loop that does an ajax request to the backend and I want to use data from the backend response to decide when to get out of the while loop. Something like in the code below. The code below doesn’t work because the breakout variable is not accessibl... | <blockquote>
<p>The code below doesn’t work because the breakout variable is not accessible outside the <code>request.done</code> method.</p>
</blockquote>
<p>No, that is not the reason. The reason is that:</p>
<ul>
<li><p>The <code>done</code> callback never executes, because the engine is forever busy running the <co... | How to use data from an ajax.done to stop a while loop | jquery|ajax | -1 | 21 | 1 | 72,219,536 | 72,219,536 | 1 | true | 2022-05-12T16:24:00.300Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to use data from an ajax.done to stop a while loop<p>I have a while loop that does an ajax request to the backend and I want to use data from the backend... |
72,195,752 | Accessing the underlying tile image in holoviews<p>Is it possible to access the underlying image from <code>hv.element.tiles.EsriImagery()</code>? I would like to access the tile image and run an object detection model on it.</p>
<p>When I try accessing the <code>.data</code> property, I see the template url <code>http... | <p>Yes, it's possible, and we have an example like just that! It's not yet fully published, but the source code is reachable at <a href="https://github.com/pyviz-topics/examples/pull/193" rel="nofollow noreferrer">https://github.com/pyviz-topics/examples/pull/193</a> . The relevant function is in GeoViews (geoviews/uti... | Accessing the underlying tile image in holoviews | python|holoviews|geoviews | -1 | 35 | 1 | 72,219,792 | 72,219,792 | 1 | true | 2022-05-11T05:15:44.677Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Accessing the underlying tile image in holoviews<p>Is it possible to access the underlying image from <code>hv.element.tiles.EsriImagery()</code>? I would li... |
72,214,068 | Grafana group series<p>I have postgres table with three variables: datetime, robot_id and energy_percent. Now at chart I have <code>energy_percent</code> and <code>robot_id</code>. How to group records from this table by <code>robot_id</code> ? Currently at this table I have records with 3 different <code>robot_id</cod... | <p>Just group it properly. I would switch to text edit more and write SQL manually. For example:</p>
<pre><code>SELECT
$__timeGroupAlias(time_created, $__interval),
robot_id AS "metric",
AVG(energy_percent) AS "value"
FROM api_robotlog
WHERE
$__timeFilter(time_created)
GROUP BY 1,2
ORDER BY ... | Grafana group series | postgresql|grafana | -1 | 154 | 1 | 72,221,375 | 72,221,375 | 1 | true | 2022-05-12T10:35:44.033Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Grafana group series<p>I have postgres table with three variables: datetime, robot_id and energy_percent. Now at chart I have <code>energy_percent</code> and... |
72,221,701 | selecting all rows except top row using offset in MySQL<p>How can I use offset clause to get all rows except the first row. I am using query like</p>
<pre><code>SELECT * FROM EMPLOYEES ORDER BY SALARY OFFSET 1;
</code></pre>
<p>But this is not working in MySQL. what am I doing wrong here?</p> | <p>Sadly in MySQL OFFSET only works together with the LIMIT clause. So you need to use</p>
<pre><code>SELECT * FROM EMPLOYEES ORDER BY SALARY LIMIT 18446744073709551615 OFFSET 1;
</code></pre>
<p>or</p>
<pre><code>SELECT * FROM EMPLOYEES ORDER BY SALARY LIMIT 1, 18446744073709551615;
</code></pre>
<p>I have chosen that... | selecting all rows except top row using offset in MySQL | mysql|sql | -1 | 37 | 3 | 72,221,780 | 72,221,780 | 1 | true | 2022-05-12T20:23:52.313Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
selecting all rows except top row using offset in MySQL<p>How can I use offset clause to get all rows except the first row. I am using query like</p>
<pre><c... |
72,223,103 | How to know when image preloading is done with javascript?<p>Per <a href="https://stackoverflow.com/questions/3646036/preloading-images-with-javascript">this extremely popular question</a>, preloading images with javascript is as easy as:</p>
<pre><code>function preloadImage(url) {
var img=new Image();
img.src=url;... | <p>Image elements have two events that you can subscribe to to know that the image has loaded: <code>onload</code> and <code>onerror</code>:</p>
<pre><code>function preloadImage(url, doneCallback) {
var img=new Image();
img.src=url;
img.onload = () => {
doneCallback();
}
img.onerror = () => {
... | How to know when image preloading is done with javascript? | javascript|image|preload|image-loading | -1 | 45 | 2 | 72,223,244 | 72,223,244 | 1 | true | 2022-05-12T23:41:26.740Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to know when image preloading is done with javascript?<p>Per <a href="https://stackoverflow.com/questions/3646036/preloading-images-with-javascript">this... |
72,213,280 | Why does my TOC component add `{"-" + 1}` to its links every time I click on one of them?<p>I implemented a table-of-contents component to my site following <a href="https://johno.com/mdx-table-of-contents-components-in-gatsby" rel="nofollow noreferrer">this tutorial</a>.</p>
<p>It works, but every time I click on one ... | <p>It's because of the <a href="https://github.com/Flet/github-slugger" rel="nofollow noreferrer"><code>slugger</code></a>. In their docs:</p>
<blockquote>
<pre><code>slugger.slug('foo')
// returns 'foo'
slugger.slug('foo')
// returns 'foo-1'
slugger.slug('bar')
// returns 'bar'
slugger.slug('foo')
// returns 'foo-2... | Why does my TOC component add `{"-" + 1}` to its links every time I click on one of them? | javascript|reactjs|gatsby | -1 | 71 | 1 | 72,224,611 | 72,224,611 | 1 | true | 2022-05-12T09:38:40.253Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why does my TOC component add `{"-" + 1}` to its links every time I click on one of them?<p>I implemented a table-of-contents component to my site following ... |
72,223,442 | How to loop a tree array with unknown depth and get array blocks?<p>I found this solution to loop and print an unknown depth array:</p>
<pre><code> printAllValues($arr);
function printAllValues($arr) {
if(!is_array($arr)) {
echo ($arr);
return;
}
foreach($arr as $... | <p>If you just want to process when encountering these values then you can do this:</p>
<pre class="lang-php prettyprint-override"><code>function printAllValues($arr) {
if (!is_array($arr)) {
// don't process this
return;
}
if (
isset($arr["id"]) &&
isset($... | How to loop a tree array with unknown depth and get array blocks? | php|multidimensional-array|tree | -1 | 71 | 2 | 72,224,946 | 72,224,946 | 1 | true | 2022-05-13T00:54:34.850Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to loop a tree array with unknown depth and get array blocks?<p>I found this solution to loop and print an unknown depth array:</p>
<pre><code> printA... |
72,222,982 | MongoDB query inside an array<p>I want to use this mongoDB collection:</p>
<pre><code>[
{
"_id": {
"$oid": "627c4eb87e7c2b8ba510ac4c"
},
"Contact": [
{
"name": "ABC",
"phone": 5501234,
"mail"... | <p>Try this one:</p>
<pre><code>db.collection.aggregate([
{ $match: { "Contact.name": "ABC" } },
{
$project: {
Contact: {
$filter: {
input: "$Contact",
cond: { $eq: [ "$$this.name", "ABC" ] }
}
}
}
},
{ &qu... | MongoDB query inside an array | mongodb|mongodb-query | -1 | 39 | 1 | 72,225,371 | 72,225,371 | 1 | true | 2022-05-12T23:19:14.263Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
MongoDB query inside an array<p>I want to use this mongoDB collection:</p>
<pre><code>[
{
"_id": {
"$oid": "627c4eb87e7c... |
72,224,897 | How to configure XML file so RecyclerView doesn't overlap the rest of the content?<p><strong>What my layout file currently does:</strong></p>
<p>My layout file after building an app looks like on the <a href="https://i.ibb.co/9gV3p7s/obraz-2022-05-13-072755324.png" rel="nofollow noreferrer">picture</a> and <a href="htt... | <p>Modifying your layout like this might fix the problem</p>
<pre><code><?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://sch... | How to configure XML file so RecyclerView doesn't overlap the rest of the content? | android|xml|android-layout|android-recyclerview | -1 | 27 | 1 | 72,225,455 | 72,225,455 | 1 | true | 2022-05-13T05:40:06.410Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to configure XML file so RecyclerView doesn't overlap the rest of the content?<p><strong>What my layout file currently does:</strong></p>
<p>My layout fi... |
72,226,018 | how to get name from url dynamically<p><strong>How to get a part of the url?</strong></p>
<p>query to be made:</p>
<pre><code>$name = 'LeSant'; // (from url dinamic) //
$event = Dias::where('name', $name)->first();
</code></pre>
<p><a href="https://i.stack.imgur.com/y6QBu.png" rel="nofollow noreferrer"><img src="htt... | <p>It depends on how you are declared this route. You can specify model parameter and with laravel route binding you can inject model in your controller method <a href="https://laravel.com/docs/9.x/routing#customizing-the-key" rel="nofollow noreferrer">https://laravel.com/docs/9.x/routing#customizing-the-key</a></p>
<p... | how to get name from url dynamically | php|laravel|laravel-5 | -1 | 63 | 2 | 72,226,449 | 72,226,449 | 1 | true | 2022-05-13T07:40:39.830Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to get name from url dynamically<p><strong>How to get a part of the url?</strong></p>
<p>query to be made:</p>
<pre><code>$name = 'LeSant'; // (from url ... |
72,225,813 | How to find the number of seconds elapsed from the start of the day in pandas dataframe<p>I have a pandas dataframe df in which I have a column named time_column which consists of timestamp objects. I want to calculate the number of seconds elapsed from the start of the day i.e from 00:00:00 Hrs for each timestamp. How... | <p>You can use <a href="https://pandas.pydata.org/docs/reference/api/pandas.Series.dt.total_seconds.html" rel="nofollow noreferrer"><code>pandas.Series.dt.total_seconds</code></a></p>
<pre class="lang-py prettyprint-override"><code>df['time_column'] = pd.to_datetime(df['time_column'])
df['second'] = pd.to_timedelta(df[... | How to find the number of seconds elapsed from the start of the day in pandas dataframe | python|pandas|dataframe | -1 | 120 | 2 | 72,226,535 | 72,226,535 | 1 | true | 2022-05-13T07:23:56.140Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to find the number of seconds elapsed from the start of the day in pandas dataframe<p>I have a pandas dataframe df in which I have a column named time_co... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.