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,784,310 | FastText: Can't see the representation of words that starts with @ or @<p>I am working in an NLP project using FastText. I have some texts which contains words like @.poisonjamak, @aminagabread, @<em>iamquak123</em> and I want to see their FastText representation. I want to mention that the model has the following form... | <p>As comments note, the main issue is likely with your tokenizer, which won't put <code>'@'</code> characters inside your tokens. As a result, your <code>FastText</code> model isn't seeing the tokens you expect – but probably <em>does</em> have a word-vector for the 'word' <code>'@'</code>.</p>
<p>Separately reviewing... | FastText: Can't see the representation of words that starts with @ or @ | python|nlp|gensim|fasttext | 0 | 43 | 1 | 72,791,479 | 72,791,479 | 1 | true | 2022-06-28T09:53:20.617Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
FastText: Can't see the representation of words that starts with @ or @<p>I am working in an NLP project using FastText. I have some texts which contains wor... |
72,323,598 | Why is my choropleth not showing anything?<p>I want to show a map of the police deaths by states in the US.</p>
<p>Here is my code :</p>
<pre><code>import pandas as pd #manipulation des donnees
import plotly.express as px
file="../data/PoliceDeaths.csv"
data = pd.read_csv(file, index_col=None)
df = pd.read_... | <blockquote>
<p>@Sadeuh I tried to plot the US map with state_data and it is working
fine. You may want to check "state_code" column if it has empty
characters etc. – Kaymal May 21 at 21:41</p>
</blockquote>
<p>It was an empty character present before every state_code.</p> | Why is my choropleth not showing anything? | python|pandas|plotly|choropleth | 0 | 43 | 1 | 73,581,906 | 73,581,906 | 0 | true | 2022-05-20T18:50:05.457Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why is my choropleth not showing anything?<p>I want to show a map of the police deaths by states in the US.</p>
<p>Here is my code :</p>
<pre><code>import pa... |
72,340,095 | Apollo Client 3: how to cache a mutation result into a nested collection? (collection within a collection)<p>In my Apollo Client 3 app, I am doing a mutation and want to cache the result into a collection which is nested within an item of a collection.</p>
<p>Specifically, I am creating a <code>comment</code> within a ... | <p>You need to find the Post you are updating and update its featuredComments field like so:</p>
<pre><code>useMutation(CREATE_COMMENT_MUTATION, {
// ...
update: (cache, { data }) => {
cache.modify({
id: cache.identify({
__typename: 'Post', //Assuming your this is the _typename of your Post... | Apollo Client 3: how to cache a mutation result into a nested collection? (collection within a collection) | graphql|apollo-client | 0 | 43 | 1 | 73,554,218 | 73,554,218 | 1 | true | 2022-05-22T18:01:50.687Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Apollo Client 3: how to cache a mutation result into a nested collection? (collection within a collection)<p>In my Apollo Client 3 app, I am doing a mutation... |
72,245,918 | how can i fix the password to read in mysql<p>I have a problem .I have the code that needs to connect to a MySQL database in the TERMINAL.
but i can not open because this password does not support <strong>%pK]-K8FgAM,HS8$7}uY</strong></p>
<pre><code>mysql -N -h 127.0.0.1 -P 3306 -u test -p%pK]-K8FgAM,HS8$7}uY -D read
... | <p>Thank you for all.I found the problem by this way</p>
<pre><code>username='test'
password='%pK]-K8FgAM,HS8$7}uY'
database='read'
mysql -N -h 127.0.0.1 -P 3306 -u $username -p$password -D $database
</code></pre> | how can i fix the password to read in mysql | mysql|bash|terminal|quotes|mysql-connector | 0 | 43 | 4 | 72,246,596 | 72,246,596 | 0 | true | 2022-05-15T06:08:45.547Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how can i fix the password to read in mysql<p>I have a problem .I have the code that needs to connect to a MySQL database in the TERMINAL.
but i can not open... |
72,253,181 | GetElementsByTagName format filter (HELP)<p>I'm trying to format a NodeList obtained by getElementsByTagName and I can actually get the content of each tag, but I'm not able to filter, I'm trying to make the output like this:</p>
<pre><code>EXAMPLE:
name: jhon doe
number: 12345678
date: 00/00/0000
</code></pre>
<p>but... | <p>Where do you expect the <code>name</code>,<code>number</code> and <code>date</code> to come from? PHP doesn't know what the table-values mean, so you have to set them yourself somehow.</p>
<p>There is no indication in the HTML what each table cell means, so you can only guess and hope the table structure never chang... | GetElementsByTagName format filter (HELP) | php|html|getelementsbytagname | -1 | 43 | 2 | 72,256,742 | 72,256,742 | 0 | true | 2022-05-16T00:45:55.600Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
GetElementsByTagName format filter (HELP)<p>I'm trying to format a NodeList obtained by getElementsByTagName and I can actually get the content of each tag, ... |
72,262,411 | Manipulate an array of objects inside another array<p>I'm having a problem manipulating an array of objects inside another array.I created an example to explain what I need. So here we have this array:</p>
<pre><code>array1 =
[
{
"first": "A",
"second": [
&q... | <p>You can go with the following approach:</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>array1 =
[
{
"first": "A",
"second": [
"one"
... | Manipulate an array of objects inside another array | javascript|arrays | 0 | 43 | 3 | 72,262,757 | 72,262,757 | 0 | true | 2022-05-16T16:19:17.653Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Manipulate an array of objects inside another array<p>I'm having a problem manipulating an array of objects inside another array.I created an example to expl... |
72,267,241 | SQL CREATE TABLE missing left parentheses error<pre><code>CREATE TABLE residents
(
R_ID NUMBER(4), CONSTRAINTS pk_residents_R_ID PRIMARY KEY,
R_FN VARCHAR2(15), NOT NULL,
R_LN VARCHAR2(15), NOT NULL,
R_Contact NUMBER(10), NOT NULL,
DoB DATE, NOT NULL
);
</code></pre>
<p>Tried a few changes but I'm u... | <p>It works for Oracle in this way:</p>
<pre><code>CREATE TABLE residents(
R_ID NUMBER(4),
R_FN VARCHAR2(15) NOT NULL,
R_LN VARCHAR2(15) NOT NULL,
R_Contact NUMBER(10) NOT NULL,
DoB DATE NOT NULL,
pk_residents_R_ID NUMBER(4) PRIMARY KEY
);
</code></pre> | SQL CREATE TABLE missing left parentheses error | sql|oracle-apex | -2 | 43 | 2 | 72,267,521 | 72,267,521 | 0 | true | 2022-05-17T01:29:42.863Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SQL CREATE TABLE missing left parentheses error<pre><code>CREATE TABLE residents
(
R_ID NUMBER(4), CONSTRAINTS pk_residents_R_ID PRIMARY KEY,
R_FN VA... |
72,267,747 | Deserializing XmlArrayItemAttribute to PascalCase property is Null<p>I am consuming a 3rd party XML API and have copied a postman response from the API and "Pasted XML As Classes" from the result into visual studio. This gives me an object with the following property:</p>
<pre><code>
// NOTE: Generated co... | <p>The following resolved the issue and appears to be the required attributes to get it to deserialize correctly. I'm not very clear on what the generated code was doing to achieve the same result, but this has solidified my preference of JSON over xml</p>
<pre><code> [XmlArray("threads")]
[XmlArrayIte... | Deserializing XmlArrayItemAttribute to PascalCase property is Null | c#|xml|deserialization | 0 | 43 | 1 | 72,267,977 | 72,267,977 | 0 | true | 2022-05-17T03:04:39.133Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Deserializing XmlArrayItemAttribute to PascalCase property is Null<p>I am consuming a 3rd party XML API and have copied a postman response from the API and &... |
72,273,342 | Django Views filter objects by user from custom model<p>I've created custom user model, and i'm trying to filter data in views.py by that user.</p>
<p>The error i get is:</p>
<blockquote>
<p>'SomeClassView' object has no attribute 'user'</p>
</blockquote>
<p>My goal is to 'encapsulate' data for each user.</p>
<p><stron... | <p>Ok, i forgot that my react app doesn't put user to json, so in database user was null, that's why table was blank.</p> | Django Views filter objects by user from custom model | python|django|django-models|django-rest-framework|django-views | 0 | 43 | 1 | 72,274,102 | 72,274,102 | 0 | true | 2022-05-17T11:35:17.893Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Django Views filter objects by user from custom model<p>I've created custom user model, and i'm trying to filter data in views.py by that user.</p>
<p>The er... |
72,273,520 | Increment numbers in a Pandas column, based on existing highest value<p>I'm trying to concat two dataframes. dfA has incremental numbers in column 1, dfB does not. Starting from highest value in dfA, I would like to increment the numbers in the rows from dfB when they are concatenated in dfC. So it should be:</p>
<p... | <p>Thanks all, appreciate your help as it gave me the pieces I needed to make this work! I just kept it super simple:</p>
<pre><code>dfB['Column1'] = dfA['Column1'].max() + dfB.index + 1
dfC = pd.concat([dfA,dfB])
</code></pre> | Increment numbers in a Pandas column, based on existing highest value | python|pandas | 0 | 43 | 4 | 72,278,869 | 72,278,869 | 0 | true | 2022-05-17T11:48:36.440Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Increment numbers in a Pandas column, based on existing highest value<p>I'm trying to concat two dataframes. dfA has incremental numbers in column 1, dfB do... |
72,280,288 | Have I imported something wrong<pre><code>from random import shuffle
mylist = [' ','O',' ']
my_new_list = shuffle_list(mylist)
guess = player_guess
check_guess(my_new_list,guess)
def shuffle_list(list):
shuffle(list)
return list
def player_guess():
guess = ''
while guess not in ['0','1','2']:... | <p>Python reads scripts from top to bottom, so when it reaches the line where you call <code>shuffle_list</code> python doesn't yet know what <code>shuffle_list</code> is and so it throws an exception. All you need to do to fix it is to move the lines with function calls to the bottom.</p>
<pre><code>from random impor... | Have I imported something wrong | python|jupyter-notebook | 0 | 43 | 1 | 72,280,386 | 72,280,386 | 0 | true | 2022-05-17T20:27:19.327Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Have I imported something wrong<pre><code>from random import shuffle
mylist = [' ','O',' ']
my_new_list = shuffle_list(mylist)
guess = player_guess
check... |
72,270,760 | Will stripe.customers.createBalanceTransaction charge customer's credit card?<p>I am trying to create a workaround to make sure the customer has sufficient funds before to upgrade him to another tier. I am using <code>stripe.customers.createBalanceTransaction</code> in development mode but I am not sure how it will beh... | <p>Creating a customer balance transaction [0] will not charge your customer’s credit card. This will only add/subtract the balance on the customer [1] which will be applicable to their future invoices. It has nothing to do with charging your customer’s credit card.</p>
<p>To upgrade a subscription [2] only after your ... | Will stripe.customers.createBalanceTransaction charge customer's credit card? | node.js|express|stripe-payments | 0 | 43 | 1 | 72,281,958 | 72,281,958 | 0 | true | 2022-05-17T08:38:18.187Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Will stripe.customers.createBalanceTransaction charge customer's credit card?<p>I am trying to create a workaround to make sure the customer has sufficient f... |
72,281,945 | Same property type on different levels<p>I have a hook that accepts a type:</p>
<pre><code>type TJsonData = {
message: string;
activity: string;
};
</code></pre>
<p>But this type can be on three different levels, so it can accept either:</p>
<ul>
<li><code>{ message: "", activity: "" }</code></l... | <p>You need <a href="https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates" rel="nofollow noreferrer">user-defined type predicate</a> to let TypeScript know which part of your <code>TLoaderData</code> type union is handled in each code branch:</p>
<pre><code>/**
* Type predicate
* https:... | Same property type on different levels | reactjs|typescript | 2 | 43 | 1 | 72,283,442 | 72,283,442 | 0 | true | 2022-05-18T00:12:44.047Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Same property type on different levels<p>I have a hook that accepts a type:</p>
<pre><code>type TJsonData = {
message: string;
activity: string;
};
</cod... |
72,287,653 | radio input still true after unchecked<p>I have filter section with checkbox and radio when user unchecked for checkbox the content is hidding, but for radio I can't hidden the content he still <code>true</code>.
Any help please</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel... | <p>Separate into two types of handle: handle for <code>radio checked</code> and handle for <code>checkbox checked</code>.
Have to put <code>onChange</code> into each radio input <code><input type="radio" onChange={}... /></code>. Try this below code:</p>
<p><div class="snippet" data-lang="js" data-hide=... | radio input still true after unchecked | reactjs | 1 | 43 | 1 | 72,289,147 | 72,289,147 | 0 | true | 2022-05-18T10:41:17.897Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
radio input still true after unchecked<p>I have filter section with checkbox and radio when user unchecked for checkbox the content is hidding, but for radio... |
72,284,874 | How to use loop for response from another feature?<p>Іssue in the next.</p>
<p>I have a feature response which I check according to schema validation</p>
<pre><code> {
"name": "#string",
"director_first_name": "##string",
"director_last_name": "##stri... | <p>You can do this in one line. I leave it as an exercise to you to get the <code>data</code> from a second feature file if you wish.</p>
<pre><code>* def data =
"""
[
{
"id": "fde1312f-2ab2-4fdf-a4f3-a7095dd89a4d",
"name": "English",
&q... | How to use loop for response from another feature? | karate | 1 | 43 | 1 | 72,289,622 | 72,289,622 | 0 | true | 2022-05-18T07:30:45.453Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to use loop for response from another feature?<p>Іssue in the next.</p>
<p>I have a feature response which I check according to schema validation</p>
<pr... |
72,290,899 | Prolog Subset Return Values To List<p>I'm trying to return the subsets of a certain list in another list to do some operations on them, my code for finding the subsets is as follows:</p>
<pre><code>listSubset([] , []).
listSubset([Head|Tail] , [Head|Subset]) :-
listSubset(Tail, Subset).
listSubset([Head|Tail] , Su... | <p>To collect all subsets of a set in a list, just ask:</p>
<pre><code>?- findall(S, listSubset([a,b,c],S), L).
L = [[a, b, c], [a, b], [a, c], [a], [b, c], [b], [c], []].
</code></pre> | Prolog Subset Return Values To List | prolog | 1 | 43 | 2 | 72,291,713 | 72,291,713 | 0 | true | 2022-05-18T14:18:09.403Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Prolog Subset Return Values To List<p>I'm trying to return the subsets of a certain list in another list to do some operations on them, my code for finding t... |
72,279,598 | How to fix geospatial mislabeling on leaflet map within R Shiny app?<p>I made the following map from a data frame that contains the number of parole of each state from the years 1995-2015 per 100,000 as well as the spatial information for each state. I want to incorporate it into r shiny app to have a slider to be able... | <p>The problem is that you build the map on unfiltered data, then display it with filtered data. There is then a switch in factors.</p>
<p>A quick fix is to build your map on filtered data, directly in the <code>server()</code> function :</p>
<pre><code> output$mymap <- renderLeaflet({
leaflet(data = state_paro... | How to fix geospatial mislabeling on leaflet map within R Shiny app? | r|shiny|leaflet|label | 0 | 43 | 1 | 72,294,991 | 72,294,991 | 0 | true | 2022-05-17T19:20:32.247Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to fix geospatial mislabeling on leaflet map within R Shiny app?<p>I made the following map from a data frame that contains the number of parole of each ... |
72,293,072 | Modify List<T> using Linq to Average rows with matching designator<p>I have a .csv file wherein each row of data represents a part and its associated parameters. e.g. Name, Y-Position, etc.
I have defined a class to represent each part and have already parsed the .csv into <code>List<Part> parts</code></p>
<p>How... | <p>It looks like you are not selecting the XPosition when you are getting the other information from the Part. I have added a select statement below to grab the first value of the XPosition from the Part. I ran this snippet of code and was getting the desired XPosition. Hopefully that solves your problem.</p>
<pre><cod... | Modify List<T> using Linq to Average rows with matching designator | c#|linq | 0 | 43 | 1 | 72,295,193 | 72,295,193 | 0 | true | 2022-05-18T16:47:15.917Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Modify List<T> using Linq to Average rows with matching designator<p>I have a .csv file wherein each row of data represents a part and its associated paramet... |
72,292,330 | TypeLoadException when loading a dll<p>I have a behaviour when importing a C# dll into another C# solution.<br/>
The dll I'm trying to import is a class library that I've previously implemented for another project and in which I made some improvements during time.
The dll compiles just fine and after I've imported it i... | <p>Thanks all. <br/>
I was importing the same dll on 2 different projects of the new solution and (I still don't know why) one project had an old reference to the dll (even if the reference was directly to the file). <br>
Even if the method existed in the new reference, visual studio was loading the old one. <br/><br/>... | TypeLoadException when loading a dll | c#|import|dll|dllimport|typeloadexception | 0 | 43 | 1 | 72,301,085 | 72,301,085 | 0 | true | 2022-05-18T15:50:26.160Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
TypeLoadException when loading a dll<p>I have a behaviour when importing a C# dll into another C# solution.<br/>
The dll I'm trying to import is a class libr... |
72,308,715 | Different ways to Initialize an array<p>I know that you can initialize an array like this.</p>
<pre><code>int[] a1=new int[2]{4,5};
</code></pre>
<p>or like this and then assign the values manually.</p>
<pre><code>int[] a1=new int[2];
</code></pre>
<p>or like this</p>
<pre><code>int[] a2={45,45};
</code></pre>
<p>Since... | <p>It's just syntactic sugar, the compiler still outputs the same <code>newarr</code> cil instruction.</p> | Different ways to Initialize an array | c# | -1 | 43 | 2 | 72,308,738 | 72,308,738 | 0 | true | 2022-05-19T17:22:43.250Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Different ways to Initialize an array<p>I know that you can initialize an array like this.</p>
<pre><code>int[] a1=new int[2]{4,5};
</code></pre>
<p>or like ... |
72,266,602 | The sensitivity does not improve despite making multiple changes in model and dataset<p>I have a CNN model which I run on the dataset which is linked here for viewing : <a href="https://drive.google.com/drive/folders/1JPvRIs81XQOooRz4-VQt9vH_3Vat556a?usp=sharing" rel="nofollow noreferrer">data</a>
I have tried using se... | <p>The performance metrics improved when I used my custom validation set which is a stratified split of 80-20 from training.</p> | The sensitivity does not improve despite making multiple changes in model and dataset | python|tensorflow|keras|scikit-learn|deep-learning | 0 | 43 | 1 | 72,310,218 | 72,310,218 | 0 | true | 2022-05-16T23:22:17.133Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
The sensitivity does not improve despite making multiple changes in model and dataset<p>I have a CNN model which I run on the dataset which is linked here fo... |
72,311,024 | Program that converts from roman numerals to arabic numerals to roman sometimes gives wrong result<p>I have this program that tries to convert from arabic to roman numbers to arabic numbers and it compiles without problems, but for certain values it gives the correct answer but for other cases it does not. For example:... | <p>The static buffer inside <code>a2roman</code> builds up the complete result but each time it is called from <code>main</code> the partial result is also concatenated to the buffer that is printed out so you get duplicates if <code>a2roman</code> is called more than once.</p>
<p>One solution would be to use the retur... | Program that converts from roman numerals to arabic numerals to roman sometimes gives wrong result | arrays|c | 1 | 43 | 1 | 72,313,850 | 72,313,850 | 0 | true | 2022-05-19T21:01:47.657Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Program that converts from roman numerals to arabic numerals to roman sometimes gives wrong result<p>I have this program that tries to convert from arabic to... |
72,318,051 | jquery form submit can't handle success/error notifications<p>I want to show a success notification if the submit was successful with <a href="https://github.com/simple-notify/simple-notify" rel="nofollow noreferrer">this</a> js notify library but it's doesn't works.</p>
<p>If I change the <code>new Notify({ ... })</co... | <p>This statement in your comment under the question clarifies the issue:</p>
<blockquote>
<p>I want to send the form's data then the page is just reloading immadiatelly and the notify doesn't showing up</p>
</blockquote>
<p>The issue is because you've not called <code>preventDefault()</code> on the event which is rais... | jquery form submit can't handle success/error notifications | javascript|php|jquery | 1 | 43 | 1 | 72,318,245 | 72,318,245 | 0 | true | 2022-05-20T11:16:56.230Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
jquery form submit can't handle success/error notifications<p>I want to show a success notification if the submit was successful with <a href="https://github... |
72,332,203 | Flutter async function not synchronized<p>I have this code:</p>
<pre><code>APICalls ac = APICalls();
String getCurrentUser() {
return ac.getCurrentUser();
}
bool pass = false;
void postPassword(String idProfile) async {
final response = await ac.postItem("/v1/users/:0/pw", [
idProfile
... | <p>Try this:</p>
<pre class="lang-dart prettyprint-override"><code>
Future<bool> postPassword(String idProfile) async {
bool pass = false; // this is moved INSIDE !
// set pass to true or false accordingly in if-else-clauses
return pass;
}
</code></pre>
<pre class="lang-dart prettyprint-override"><code... | Flutter async function not synchronized | flutter|dart | 0 | 43 | 2 | 72,332,450 | 72,332,450 | 0 | true | 2022-05-21T18:20:31.043Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Flutter async function not synchronized<p>I have this code:</p>
<pre><code>APICalls ac = APICalls();
String getCurrentUser() {
return ac.getCurrentUse... |
72,335,404 | How to use @Binding when view is creating using function in SwiftUI?<p>I created view using Function and which i am calling from another view (AbcView), I want to perform normal <code>@Binding</code> with that, but not sure how to pass value and create <code>@Binding</code> in function.</p>
<p>In Below code I want to p... | <p>Just put it through everywhere you need to pass it, like</p>
<p>here</p>
<pre><code>func topSheetClassViews(abcViewModel: AbcViewModel, selection: Binding<Int?>) -> [AnyView] {
</code></pre>
<p>here</p>
<pre><code>views.append(TopSheetPassengerInfoView(abcViewModel: abcViewModel, selectedID: selection, inde... | How to use @Binding when view is creating using function in SwiftUI? | ios|swift|swiftui | -1 | 43 | 1 | 72,335,745 | 72,335,745 | 0 | true | 2022-05-22T06:52:40.530Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to use @Binding when view is creating using function in SwiftUI?<p>I created view using Function and which i am calling from another view (AbcView), I wa... |
72,336,090 | Check whether a product is sold out by crawler<p>I would like to access whether the product is avaliable on this website(<a href="https://finalmouse.com/collections/museum/products/starlight-12-phantom?variant=39672355324040" rel="nofollow noreferrer">mouse product</a>). By using the following code, I expected to get &... | <p>As Sean wrote in comment, on this page the html is loaded dynamically, the page is updated via js. To parse such sites you need to connect selenium and webdriver.
Code for your case:</p>
<pre class="lang-py prettyprint-override"><code>from bs4 import BeautifulSoup as bs
from selenium import webdriver
url = "ht... | Check whether a product is sold out by crawler | beautifulsoup|web-crawler | -1 | 43 | 1 | 72,336,572 | 72,336,572 | 0 | true | 2022-05-22T08:55:52.643Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Check whether a product is sold out by crawler<p>I would like to access whether the product is avaliable on this website(<a href="https://finalmouse.com/coll... |
72,337,160 | Is there way to set IdleTimeout in ignite XML configuration file?<p>I need to set idleTimeout at server level as the connections are not being closed properly by the client.</p>
<p>I found below link, but I am not sure how to set using XML configuration file.</p>
<p><a href="https://ignite.apache.org/releases/latest/ja... | <p>You can configure ClientConnectorConfiguration like this:</p>
<pre><code><bean class="org.apache.ignite.configuration.IgniteConfiguration" id="ignite.cfg">
<property name="clientConnectorConfiguration">
<bean class="org.apache.ignite.configuration.ClientC... | Is there way to set IdleTimeout in ignite XML configuration file? | ignite|gridgain | 0 | 43 | 1 | 72,337,245 | 72,337,245 | 0 | true | 2022-05-22T11:29:42.107Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is there way to set IdleTimeout in ignite XML configuration file?<p>I need to set idleTimeout at server level as the connections are not being closed properl... |
72,328,021 | Incorrect shadows from point light<p>When a light source (point light) is close to any object, a strange glare appears on it. I noticed that this problem is related to the parameter Near Plane, if I put it to a value of 1.6 or more, then the glare disappears, but then the shadows from objects within a certain radius ar... | <p>I just increased the bias parameter to 0.032 and the glare disappeared.</p> | Incorrect shadows from point light | unity3d | 1 | 43 | 1 | 72,338,193 | 72,338,193 | 0 | true | 2022-05-21T08:48:47.697Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Incorrect shadows from point light<p>When a light source (point light) is close to any object, a strange glare appears on it. I noticed that this problem is ... |
72,280,799 | Replacing the jQuery .on() method in Vanilla Javascript<p>I’m trying to replace my jQuery with Vanilla Javascript but I’m not able to replicate jQuery’s <code>.on()</code> method for this script ...</p>
<pre><code>document.querySelectorAll( "nav.subpage button" ).forEach( node => {
node.addEventListen... | <p>All right, I figured it out ...</p>
<pre><code>document.body.addEventListener( 'click', ( e ) => {
console.log( e.target );
if ( e.target.matches( 'nav.subpage button' ) ) {
e.target.closest( 'nav.subpage' ).querySelectorAll( '.current' ).forEach( node => {
node.classList.remove... | Replacing the jQuery .on() method in Vanilla Javascript | javascript|jquery | -1 | 43 | 1 | 72,338,627 | 72,338,627 | 0 | true | 2022-05-17T21:21:39.127Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Replacing the jQuery .on() method in Vanilla Javascript<p>I’m trying to replace my jQuery with Vanilla Javascript but I’m not able to replicate jQuery’s <cod... |
72,340,894 | I can not adjust the iframes height<p>Whatever I try I can not adjust the iframe's height on my website. I have tried <code>height="100%"</code> and in CSS</p>
<pre><code>iframe {
height: 100%;
}
</code></pre>
<p>link to it and my code (inspect)
<a href="https://jandjcards.netlify.app/" rel="nofollow noref... | <p>Have you tried using an absolute unit like vh, vw or px? If you use percentage the width and height of the iframe will depend on the parent element. However, using other relative units will allow you to change the width and height of the element properly.</p>
<h2>Absolute measurement units:</h2>
<ul>
<li>VH (Relativ... | I can not adjust the iframes height | html|iframe | 0 | 43 | 1 | 72,341,254 | 72,341,254 | 0 | true | 2022-05-22T19:57:58.313Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I can not adjust the iframes height<p>Whatever I try I can not adjust the iframe's height on my website. I have tried <code>height="100%"</code> an... |
72,336,416 | Media queries don't work in email - even in header<p>I've seen many posts talking about the same, saying that it's because of blank spaces, wrong formatting.. whatever. I've tried all, and there's no way to have a mobile and desktop version.</p>
<p>The way I'm doing it is by pasting the html with the inspector, inside ... | <p>While Gmail does support @media queries, there are some limitations: <a href="https://www.caniemail.com/features/css-at-media/" rel="nofollow noreferrer">https://www.caniemail.com/features/css-at-media/</a></p>
<p>However, you state in the comments that you are sending from Gmail itself. That will have different res... | Media queries don't work in email - even in header | html|css|gmail|media-queries|html-email | 0 | 43 | 1 | 72,342,540 | 72,342,540 | 0 | true | 2022-05-22T09:46:16.293Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Media queries don't work in email - even in header<p>I've seen many posts talking about the same, saying that it's because of blank spaces, wrong formatting.... |
72,344,821 | How to redirect only domain to another domain not subdomain & folders in nginx<p>i want to redirect only my homepage to another domain -no subdomain or files should redirect
for eg: <a href="https://example.com" rel="nofollow noreferrer">https://example.com</a> should redirect to <a href="https://nmg.com" rel="nofollo... | <p>Instead of</p>
<pre class="lang-none prettyprint-override"><code>if ($server_port !~ 443){
rewrite ^(/.*)$ https://$host$1 permanent;
}
</code></pre>
<p>You can try (in the following order):</p>
<pre class="lang-none prettyprint-override"><code>set $joined $host$uri;
if ($joined = example.com/) {
return 301 ... | How to redirect only domain to another domain not subdomain & folders in nginx | nginx|url-rewriting | 1 | 43 | 1 | 72,345,897 | 72,345,897 | 0 | true | 2022-05-23T07:37:16.177Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to redirect only domain to another domain not subdomain & folders in nginx<p>i want to redirect only my homepage to another domain -no subdomain or files... |
72,353,713 | Select and Convert bytes object from a list<p>I have tried everything in my mind but wasn't successfull. Can anybody help me to select bytes object from a list bellow?</p>
<pre><code>[('uid=xxxxxx,o=center', {'userCertificate;binary': [b'0\x82\x07q0\x82\x05Y\xa0\x03\x02\x01\x02\x02\x10`\ .....']})]
</code></pre>
<p>Thi... | <p>You have a Python list containing a single tuple. The 2nd element of that tuple is a dictionary. That dictionary has a single key. Its value is a list containing one item.</p>
<p>So...</p>
<pre><code>list_ = [('uid=xxxxxx,o=center', {'userCertificate;binary': [b'0\x82\x07q0\x82\x05Y\xa0\x03\x02\x01\x02\x02\x10']})]
... | Select and Convert bytes object from a list | python|ldap|certificate|openldap | 1 | 43 | 1 | 72,353,815 | 72,353,815 | 0 | true | 2022-05-23T19:10:27.483Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Select and Convert bytes object from a list<p>I have tried everything in my mind but wasn't successfull. Can anybody help me to select bytes object from a li... |
72,352,782 | How do I fill in empty html table spaces with <td></td> so my JSON data lines up properly?<p>How do I display JSON data in an HTML table and fill in the empty spaces with <code><td></td></code>? In the following HTML table, "modality" is in the wrong column. It should be under the column date &quo... | <p>I believe this will satisfy what you are trying to achieve. In order to keep the data aligned w/ the date columns, I first looped through known dates (the 2 under <code>DATE</code> property) and created object keys on <code>dateGroups</code> with the unique dates, and then set those date key's values as empty arrays... | How do I fill in empty html table spaces with <td></td> so my JSON data lines up properly? | javascript|html|json | 0 | 43 | 2 | 72,354,292 | 72,354,292 | 0 | true | 2022-05-23T17:44:13.327Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I fill in empty html table spaces with <td></td> so my JSON data lines up properly?<p>How do I display JSON data in an HTML table and fill in the empt... |
72,354,707 | Is it possible to execute more than one javascript in one script tag?<p>I am trying to run three different functions when the submit button is clicked before my form gets submitted but I noticed I wasn't getting the submit part of the code.</p>
<p>Kindly see my sample code below to better understand my problem.</p>
<p>... | <p>You don't need to put the <code>fetch()</code> call inside another <code>load</code> and <code>submit</code> event listeners. You're already inside the <code>submit</code> event listener. Just call <code>fetch()</code> directly.</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-ba... | Is it possible to execute more than one javascript in one script tag? | javascript|forms|onsubmit | -2 | 43 | 1 | 72,354,853 | 72,354,853 | 0 | true | 2022-05-23T20:53:55.347Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is it possible to execute more than one javascript in one script tag?<p>I am trying to run three different functions when the submit button is clicked before... |
72,284,665 | Importing documents including headers with VBA<p>I have a long template file, in which I need to import other template documents to be filled out. Each small template has a unique header with ActiveX labels, which I want to manipulate from the main file after importing, so all the titles in the headers for the differen... | <p>Based on macropod's link I managed to edit together a macro which deletes the target document's header, and pastes in the source document's, taking the ActiveX labels with it.
For anyone encountering a similar problem, tweaking that code to separately copy the header seems to be the way to go.</p> | Importing documents including headers with VBA | vba|ms-word | 0 | 43 | 1 | 72,359,279 | 72,359,279 | 0 | true | 2022-05-18T07:14:30.380Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Importing documents including headers with VBA<p>I have a long template file, in which I need to import other template documents to be filled out. Each small... |
72,361,327 | What is the reason for the obscure error in dir /al /s in command to report junctions -> file not found?<p>We have some code in C#:</p>
<pre class="lang-cs prettyprint-override"><code>RunProcessAndWaitForExit("cmd.exe", $"/C dir {pstrDriveLetter}:\\ /al /s > {pstrDriveLetter}:\\junctions.log");
<... | <p>Okay I think this just means that it found no junctions!</p> | What is the reason for the obscure error in dir /al /s in command to report junctions -> file not found? | windows|cmd|filesystems|junction | 0 | 43 | 1 | 72,361,533 | 72,361,533 | 0 | true | 2022-05-24T10:30:44.733Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What is the reason for the obscure error in dir /al /s in command to report junctions -> file not found?<p>We have some code in C#:</p>
<pre class="lang-cs p... |
72,363,079 | select list returns previous value after closing and reopening<p>I have a list and I choose a value from the list.</p>
<p>For example "Mercedes".</p>
<p>But I close this list with the "Save" or "Close" button and when I open it again, "Mercedes" is selected. How can I prevent thi... | <p>(I borrowed this code from one of my other answers because it was easier to change that than try to work out what UI library you're using. You can ignore most of it - the important part is in the <code>Example</code> component at the bottom.)</p>
<p>Going back to my comment:</p>
<blockquote>
<p>Maintain the state of... | select list returns previous value after closing and reopening | javascript|reactjs | 0 | 43 | 1 | 72,363,746 | 72,363,746 | 0 | true | 2022-05-24T12:41:10.990Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
select list returns previous value after closing and reopening<p>I have a list and I choose a value from the list.</p>
<p>For example "Mercedes".</... |
72,345,856 | Prevent Users from Entering Multiple Decimals In Objective-C<p>I am making an only number input app (still) in which users press a button, I store a value into a string to display in a label.</p>
<p>Works great for the most part, except I cannot figure out how to prevent users from entering more than one decimal in a s... | <p>Two steps...</p>
<ul>
<li>Check to see if the button is a decimal <code>.</code></li>
<li>if yes, see if the current label text already contains a <code>.</code></li>
</ul>
<p>If it does, return. If not, continue processing your button input:</p>
<pre><code>- (void)numberBtn:(UIButton *)sender {
NSString *btnTit... | Prevent Users from Entering Multiple Decimals In Objective-C | ios|objective-c|uilabel|calculator | 0 | 43 | 1 | 72,364,836 | 72,364,836 | 0 | true | 2022-05-23T09:01:53.757Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Prevent Users from Entering Multiple Decimals In Objective-C<p>I am making an only number input app (still) in which users press a button, I store a value in... |
72,364,913 | VBA get file (object) using recursion<p>The idea is to check all subfolders if certain file is exist in anyone of them. The code finds the file and Debug.Print prints me the Path, but my function "findFile" does not returns the object, just Nothing. I do not think that external var is a good way, so I try to ... | <p>I've fixed the problem with this:</p>
<pre><code>For Each iFolder In myFolder.SubFolders
Set tFile = findFile(iFolder, FileName)
If Not tFile Is Nothing Then
Set findFile = tFile
Exit Function
End If
Next
</code></pre>
<p>So I didn't stop the rucursion when needed and that was a problem.<... | VBA get file (object) using recursion | vba|recursion | 0 | 43 | 1 | 72,365,379 | 72,365,379 | 0 | true | 2022-05-24T14:42:26.577Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
VBA get file (object) using recursion<p>The idea is to check all subfolders if certain file is exist in anyone of them. The code finds the file and Debug.Pri... |
72,368,854 | sort according to a column value and take first n lines between the same headers in a file<p>I have an input like this;</p>
<pre><code>header score1 score2
item 1.3 100
item 2.3 170
item 4.0 35
header score1 score2
item 2.9 45
item 1.7 55
header score1 score2
item 0.5 60
header score1 score2
h... | <p>another <code>awk</code> with some support and no error handling.</p>
<pre><code>$ awk 'BEGIN {cmd="sort -k2nr | head -2"}
/header/ {close(cmd); print; next}
{print | cmd}' file
header score1 score2
item 4.0 35
item 2.3 170
header score1 score2
item 2.9 45
item ... | sort according to a column value and take first n lines between the same headers in a file | awk | 1 | 43 | 4 | 72,369,652 | 72,369,652 | 0 | true | 2022-05-24T20:02:27.203Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
sort according to a column value and take first n lines between the same headers in a file<p>I have an input like this;</p>
<pre><code>header score1 score2... |
72,370,269 | How do I color separate words that are in quotation marks<p>I am making a shop, and I made a "Colors available" part, but I want to be able to color separate words with different colors, in Javascript, css, or HTML, or however it is possible</p>
<pre><code><button onclick="getColors()">Colors ... | <p>You can have util method to create span with style.</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>function getColors() {
function createSpan(str, color) {
const span... | How do I color separate words that are in quotation marks | javascript|html|css | 0 | 43 | 2 | 72,370,628 | 72,370,628 | 0 | true | 2022-05-24T22:54:08.140Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I color separate words that are in quotation marks<p>I am making a shop, and I made a "Colors available" part, but I want to be able to colo... |
72,370,438 | I am trying to push some values from an object into a 3 dimensional array<p>I'm trying to port an object over to an array. However once i get to constructedQuestionBank[0][1] I can no longer insert the information within Object.keys(conceptArray.Level1). It comes back with the error "Uncaught TypeError: constructe... | <p>The <code>Object.entries()</code> method converts an object to an array of key-value pairs. You can use this method recursively to convert all your nested levels into a multidimensional array.</p>
<pre><code>function objectToArray(obj) {
if (typeof obj !== 'object') {
return obj
}
return Object.ent... | I am trying to push some values from an object into a 3 dimensional array | javascript|multidimensional-array | 0 | 43 | 2 | 72,370,687 | 72,370,687 | 0 | true | 2022-05-24T23:20:07.593Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I am trying to push some values from an object into a 3 dimensional array<p>I'm trying to port an object over to an array. However once i get to constructedQ... |
72,374,596 | How can I get the correct json in FlatBuffers?<p>I successfully parsed the data,but then are not correct json data.How can I get the correct json in FlatBuffers?
My code:</p>
<pre><code>auto result = GenerateText(parser, in, &json_data);
flatbuffers::SaveFile("test.json",json_data.c_str(), json_data.size(... | <p>You need to enable the <code>strict_json</code> option on the <code>Parser</code>, otherwise you don't get the quoted field names that JSON requires:</p>
<pre><code>auto options = IDLOptions();
options.strict_json = true;
auto parser = Parser(options);
</code></pre> | How can I get the correct json in FlatBuffers? | c++|flatbuffers | 0 | 43 | 1 | 72,374,758 | 72,374,758 | 0 | true | 2022-05-25T08:52:58.300Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I get the correct json in FlatBuffers?<p>I successfully parsed the data,but then are not correct json data.How can I get the correct json in FlatBuff... |
72,377,398 | Does the unary operator really gets executed first?<p>I have this question regarding priorities. Java states that this is the priority to work out operators (from high to low):</p>
<ol>
<li>postfix unary opartors xyz++, xyz--</li>
<li>prefixunary opartors ++xyz, --xyz</li>
<li>typeconversion/casting</li>
<li>"* / ... | <p>The "expression" that the unary operator is applied after the evaluation of is <code>a</code>, not any expression it might be part of.</p> | Does the unary operator really gets executed first? | java|operators|unary-operator | 0 | 43 | 1 | 72,377,455 | 72,377,455 | 0 | true | 2022-05-25T12:10:38.700Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Does the unary operator really gets executed first?<p>I have this question regarding priorities. Java states that this is the priority to work out operators ... |
72,380,383 | check each object, return true when the first condition is met, else return false<p>I have a method that works fine. This is how it looks.</p>
<pre><code>private ArrayList<Car> carsInStore ; //in car class have setter/getter/quals/Constructor.
</code></pre>
<pre><code>public boolean checkIfcarInStore(Car c) {
... | <p>If you really want to use <code>lambda</code>, this should work else you have your answer within your comment.</p>
<pre><code>
private ArrayList<Car> carsInStore ;
public boolean checkIfcarInStore(Car c) {
return carsInStore.stream().anyMatch(c::equals);
}
}
</code></pre> | check each object, return true when the first condition is met, else return false | java|lambda | 2 | 43 | 2 | 72,380,500 | 72,380,500 | 0 | true | 2022-05-25T15:24:18.357Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
check each object, return true when the first condition is met, else return false<p>I have a method that works fine. This is how it looks.</p>
<pre><code>pri... |
72,379,943 | HTML buttons are not aligned in center. either it moving to left side or right side<pre><code><div class="col-lg-3">
<div class="panel panel-default" style="height:750px;font-size:18px;overflow: auto;">
<div class="panel-heading">
... | <p>As suggested by <a href="https://stackoverflow.com/users/14335091/officer-erik-k">@Officer Erik K</a>, you can archive this using bootstrap 3 classes <code>text-center</code>, <code>pull-left</code> and <code>pull-right</code> :</p>
<p><div class="snippet" data-lang="js" data-hide="true" data-console="true" data-bab... | HTML buttons are not aligned in center. either it moving to left side or right side | html|bootstrap-modal | 0 | 43 | 2 | 72,380,606 | 72,380,606 | 0 | true | 2022-05-25T14:56:21.437Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
HTML buttons are not aligned in center. either it moving to left side or right side<pre><code><div class="col-lg-3">
<div class=&q... |
72,382,074 | Creating subplots with a for loop Pandas Python<p>I want to create 3 subplots below with the subplot with the coordinates stated in the for loop parameters as <code>add_plot</code>. The format of <code>add_plot</code> is <code>nrows, ncols ,cells</code>. But I get an error when I try to implement it. How can I modify t... | <p>This still raises a <code>NameError: name 'datetime' is not defined</code> as you didn't define <code>datetime</code> in your code, but shouldn't raise any error for the subplots.</p>
<pre><code>import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
data = pd.DataFrame({'col1': [4, 5, 2, 2, 3, 5, ... | Creating subplots with a for loop Pandas Python | python|python-3.x|pandas|dataframe|plot | 0 | 43 | 1 | 72,382,211 | 72,382,211 | 0 | true | 2022-05-25T17:39:20.937Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Creating subplots with a for loop Pandas Python<p>I want to create 3 subplots below with the subplot with the coordinates stated in the for loop parameters a... |
72,385,506 | Container with 'overflow-y: auto' adds extra horizontal and vertical scrolling bar<p>I have a HTML and CSS files containing the following code:</p>
<pre><code><div class="app">
<div class="header"></div>
<div class="main">
<div class="container_... | <p><code>display:grid</code> is a better layout choice than flexbox for this:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-css lang-css prettyprint-override"><code>html, body{
margin: 0;
padding: 0;
}
bo... | Container with 'overflow-y: auto' adds extra horizontal and vertical scrolling bar | html|css | 1 | 43 | 2 | 72,386,110 | 72,386,110 | 0 | true | 2022-05-26T00:40:19.190Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Container with 'overflow-y: auto' adds extra horizontal and vertical scrolling bar<p>I have a HTML and CSS files containing the following code:</p>
<pre><cod... |
72,385,088 | Unable to List all Roles<p>I'm unable to list all roles in my asp.net core 6 mvc web app. When entering the url path in the browser https://Localhost:44319/Admin/Role I recieve an 404 error. I followed the same steps for listing all users with no issues so I'm confused on why it's not working for roles. Any help would ... | <p>In RoleController, add <code>[Area("admin")]</code></p>
<pre><code>[Area("admin")]
public class RoleController : Controller
{
public IActionResult Index()
{
return View();
}
}
</code></pre>
<p>Result:</p>
<p><a href="https://i.stack.imgur.com/Nfrx1.gif" rel="nofollow noreferre... | Unable to List all Roles | asp.net-mvc|asp.net-core|.net-core | 1 | 43 | 1 | 72,386,310 | 72,386,310 | 0 | true | 2022-05-25T23:20:23.553Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Unable to List all Roles<p>I'm unable to list all roles in my asp.net core 6 mvc web app. When entering the url path in the browser https://Localhost:44319/A... |
72,386,759 | How do I sort a JSON value while dumping?<p>I am trying to dump/sort JSON values by a specific time format.</p>
<p>Before asking, I have looked as various questions such as:</p>
<ol>
<li><a href="https://stackoverflow.com/questions/34042961/when-i-tried-to-sort-a-list-i-got-an-error-dict-object-has-no-attribute">When I... | <pre class="lang-py prettyprint-override"><code>data = {'Arthur': '12/12', 'Lisa': '10/12'}
with open('saved_date.json', 'w', encoding='utf-8') as f:
json.dump(dict(sorted(data.items(), key=lambda x: x[1])), f, indent=2)
</code></pre>
<p>Output:</p>
<pre class="lang-json prettyprint-override"><code>{
"Lisa&... | How do I sort a JSON value while dumping? | python|json | 0 | 43 | 2 | 72,387,004 | 72,387,004 | 0 | true | 2022-05-26T04:38:43.620Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I sort a JSON value while dumping?<p>I am trying to dump/sort JSON values by a specific time format.</p>
<p>Before asking, I have looked as various qu... |
72,384,296 | Unable to get posted data with Angular from asp.net<p>I'm sending a post request to my asp.net server from angular and i tried printing the values of my custom model class (<strong>SchoolModel</strong>) and it's all the values corrent inside angular. But when i try to get these values on asp.net it doesn't return anyth... | <p>I had to use JSON.stringify(body) to make it work</p> | Unable to get posted data with Angular from asp.net | c#|asp.net|angular|typescript | 0 | 43 | 2 | 72,389,373 | 72,389,373 | 0 | true | 2022-05-25T21:18:54.950Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Unable to get posted data with Angular from asp.net<p>I'm sending a post request to my asp.net server from angular and i tried printing the values of my cust... |
72,383,894 | It seems my SELECT DISTINCT statement isn't processing when I view my results (BigQuery SQL)<p>(Using BigQuery SQL) I am trying to find the 10 regions that had the highest prices, and what date the price occurred on. The table has columns for Date, Region, AveragePrice, and other information not relevant to my query. T... | <p>You can use Navigation function <a href="https://cloud.google.com/bigquery/docs/reference/standard-sql/navigation_functions#first_value" rel="nofollow noreferrer">FIRST_VALUE</a> for that</p>
<h4>Sample Data</h4>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>Region</th>
<th>AveragePrice</t... | It seems my SELECT DISTINCT statement isn't processing when I view my results (BigQuery SQL) | sql|google-bigquery|distinct | 1 | 43 | 1 | 72,389,426 | 72,389,426 | 0 | true | 2022-05-25T20:38:27.687Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
It seems my SELECT DISTINCT statement isn't processing when I view my results (BigQuery SQL)<p>(Using BigQuery SQL) I am trying to find the 10 regions that h... |
72,381,291 | Not able to deploy Terrain Counter contract to localterra<p>I am trying to deploy a Terra contract of the Terrain: <a href="https://www.npmjs.com/package/@terra-money/terrain" rel="nofollow noreferrer">https://www.npmjs.com/package/@terra-money/terrain</a></p>
<p>In order to deploy the counter contract I need to do the... | <p>I found the solution. For those in the same situation and don't know what is happening and how to solve it, I refer to this link where I posted the solution:</p>
<p><a href="https://github.com/terra-money/terrain/issues/74" rel="nofollow noreferrer">https://github.com/terra-money/terrain/issues/74</a></p> | Not able to deploy Terrain Counter contract to localterra | node.js|docker|smartcontracts|terrain|terra | 0 | 43 | 2 | 72,390,347 | 72,390,347 | 0 | true | 2022-05-25T16:27:36.337Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Not able to deploy Terrain Counter contract to localterra<p>I am trying to deploy a Terra contract of the Terrain: <a href="https://www.npmjs.com/package/@te... |
72,393,817 | location props in gatsby is not defined<p>I am trying to use location props in my gastby page :
I am passing props in my Link in
pages/index.js:</p>
<pre><code> <Link state={{eventID: event.id}} to={`/date/${event.name}`}>
</Link>
</code></pre>
<p>pages/date/[dateId]/index.js:</p>
<pre><code>const DateWi... | <p>You should have the <code>location</code> variable already defined, it is likely in the global scope so you don't need to pass it as a parameter to the function. Try just using the variable and see if that works.</p> | location props in gatsby is not defined | javascript|reactjs|gatsby | 0 | 43 | 1 | 72,393,968 | 72,393,968 | 0 | true | 2022-05-26T14:54:55.617Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
location props in gatsby is not defined<p>I am trying to use location props in my gastby page :
I am passing props in my Link in
pages/index.js:</p>
<pre><co... |
72,394,417 | Dataset in Foundry has a marking that appeared from nowhere<p>I have a dataset in Foundry that has a marking, but none of its input datasets have a marking. How did the marking appear on my dataset?</p>
<p><a href="https://i.stack.imgur.com/JZYBW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JZYBW.... | <p>There are two options:</p>
<ol>
<li>The dataset is out of date and the last time it was built the input datasets had a marking applied to them. (Or a marking was retroactively applied to old versions of the input datasets)</li>
<li>If the dataset is up to date, the marking was directly applied to the dataset or its ... | Dataset in Foundry has a marking that appeared from nowhere | palantir-foundry|palantir-foundry-security | 2 | 43 | 1 | 72,394,418 | 72,394,418 | 0 | true | 2022-05-26T15:38:01.613Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Dataset in Foundry has a marking that appeared from nowhere<p>I have a dataset in Foundry that has a marking, but none of its input datasets have a marking. ... |
72,396,181 | ggpairs what is the name of the column with the facets?<p>I am trying to add text to a ggpairs plot. I have created my own data frame with columns for the x and y positions and the labels. However, I do not know what to name the column that contains the facet labels.</p>
<p>In the context of the example below: I want e... | <p>One option to achieve your desired result would be to filter the dataset passed to <code>geom_text</code> for the variable mapped on the <code>x</code> aes like so:</p>
<pre class="lang-r prettyprint-override"><code>library(GGally)
set.seed(123)
plot_my_bars <- function(data,
mapping,
... | ggpairs what is the name of the column with the facets? | r|ggplot2|geom-text|ggally|ggpairs | 0 | 43 | 1 | 72,396,435 | 72,396,435 | 0 | true | 2022-05-26T18:03:42.640Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
ggpairs what is the name of the column with the facets?<p>I am trying to add text to a ggpairs plot. I have created my own data frame with columns for the x ... |
72,400,980 | SSL decryption not generating the begin type correctly<p>My context is that I am using jwt token flow to connect to SF in bitbucket pipeline.
I have been able to correctly generate a certificate and key etc as required. I tested the key it is working fine. Next step was to add security, and did not wanted to store my k... | <p>As suggested by Topaco, I tried another simpler way to encrypt and decrypt :</p>
<p>Encrypt:</p>
<pre><code>openssl aes-256-cbc -a -salt -pbkdf2 -in server.key -out server.key.enc -k <password>
</code></pre>
<p>Decrypt:</p>
<pre><code>openssl aes-256-cbc -d -a -pbkdf2 -in server.key.enc -out server.key -k <... | SSL decryption not generating the begin type correctly | encryption|openssl|pipeline|pem|sfdx | 0 | 43 | 1 | 72,401,353 | 72,401,353 | 0 | true | 2022-05-27T05:47:38.990Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SSL decryption not generating the begin type correctly<p>My context is that I am using jwt token flow to connect to SF in bitbucket pipeline.
I have been abl... |
72,384,377 | How to get Spotify image from URI<p>I have a URI like this:</p>
<pre><code>spotify:image:ab67616d0000b2737005885df706891a3c182a57
</code></pre>
<p>I want to know how to get the image from this URI? I'm currently using the Web API. I imagine I might need to convert the URI into the image URL some how.</p>
<p>I can't see... | <p>I think the answer is you can't convert between the two, but if someone comes along one day with a way to do it I'll happily mark your answer as accepted instead.</p> | How to get Spotify image from URI | spotify | 0 | 43 | 1 | 72,596,792 | 72,596,792 | 0 | true | 2022-05-25T21:29:51.377Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to get Spotify image from URI<p>I have a URI like this:</p>
<pre><code>spotify:image:ab67616d0000b2737005885df706891a3c182a57
</code></pre>
<p>I want to ... |
72,330,327 | How to resize list elements to fit parent width<p>I noticed in Wikipedia <a href="https://en.wikipedia.org/wiki/Hercules#Modern_era" rel="nofollow noreferrer">https://en.wikipedia.org/wiki/Hercules#Modern_era</a> that there is a gallery of unsorted lists that always resize themselves to fit the maximum width based on h... | <p>You need to use grid display for that:</p>
<pre><code>ul {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
</code></pre> | How to resize list elements to fit parent width | javascript|jquery | 0 | 43 | 1 | 72,330,392 | 72,330,392 | 0 | true | 2022-05-21T14:10:28.840Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to resize list elements to fit parent width<p>I noticed in Wikipedia <a href="https://en.wikipedia.org/wiki/Hercules#Modern_era" rel="nofollow noreferrer... |
72,369,740 | Operator overloading not working as intended for class pointers<p>I've made a very simple program trying to understand operator overloading in C++. However as you too will see, the result of the dimention d3 is not updated even though the appropriate values are returned from the operator overloading.</p>
<pre><code>#in... | <p>I think you misunderstand the way methods operate on an object.</p>
<p>Consider the assignment operator:</p>
<pre><code>dimention& operator = (const dimention &d){
dimention *temp = new dimention;
temp->height = d.height;
temp->width = d.width;
return *temp;
}
</code></pre>
<p>You are... | Operator overloading not working as intended for class pointers | c++|operator-overloading|operators | 0 | 43 | 1 | 72,370,003 | 72,370,003 | 0 | true | 2022-05-24T21:35:49.963Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Operator overloading not working as intended for class pointers<p>I've made a very simple program trying to understand operator overloading in C++. However a... |
72,248,697 | R: for-loop over matrix returns only last values<p>So I have a matrix filled with random numbers: <code>mat_base = matrix(sample(1:20, 100, replace = TRUE), nrow=10, ncol=10)</code> and another matrix <code>mat_table = matrix(,100,3)</code> which has the column names: <code>colnames(mat_table) <- c("row", ... | <p>An alternate way of getting the desired table is this.</p>
<pre><code>mat_base = matrix(sample(1:20, 100, replace = TRUE), nrow=10, ncol=10)
mat_table <- data.frame(row = rep(1:nrow(mat_base), by = ncol(mat_base)),
col = rep(1:ncol(mat_base), each = nrow(mat_base)),
... | R: for-loop over matrix returns only last values | r|for-loop|matrix|caching|iteration | 0 | 43 | 1 | 72,248,861 | 72,248,861 | 0 | true | 2022-05-15T13:29:33.873Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
R: for-loop over matrix returns only last values<p>So I have a matrix filled with random numbers: <code>mat_base = matrix(sample(1:20, 100, replace = TRUE), ... |
72,288,328 | Akka : UnboundedPriorityMailbox - Is it possible to prioritize messages by complicated type?<p>UnboundedPriorityMailbox has the option to prioritize messages by type (like int string etc.). Is it possible to prioritize messages by type of class property?</p>
<p>I mean, I know that option is available:</p>
<pre><code>ca... | <p>Fundamentally, this has nothing to do with Akka. All you are doing is returning a partial function that has the interface of accepting an Any and returning an Int. Yes, behind the scenes that function will be used to determine the priority of a message, but from Akka's perspective it doesn't know anything about your... | Akka : UnboundedPriorityMailbox - Is it possible to prioritize messages by complicated type? | akka|message-queue|priority-queue|akka-typed|akka-actor | 0 | 43 | 1 | 72,470,193 | 72,470,193 | 0 | true | 2022-05-18T11:26:46.970Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Akka : UnboundedPriorityMailbox - Is it possible to prioritize messages by complicated type?<p>UnboundedPriorityMailbox has the option to prioritize messages... |
72,364,165 | Pandas: Efficient ways to calculate occupancy rate between check-in and check-out dates<p>I have the following toy data</p>
<pre><code>a = pd.DataFrame({"chkin": ["2022-05-22", "2022-05-22", "2022-05-23", "2022-05-24"],
"chkout": ["2022-... | <p>You could create a date range and then explode it, allowing you to groupby and sum for each day. The creation of the date range and explode will be a bit slow if your DataFrame is long.</p>
<p>This will also only give you dates in the output for which the occupancy is non-zero. If you also need the zeroes, <code>rei... | Pandas: Efficient ways to calculate occupancy rate between check-in and check-out dates | python|pandas | 1 | 43 | 1 | 72,364,655 | 72,364,655 | 0 | true | 2022-05-24T13:51:50.450Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pandas: Efficient ways to calculate occupancy rate between check-in and check-out dates<p>I have the following toy data</p>
<pre><code>a = pd.DataFrame({&quo... |
72,320,568 | Ordering substrings according to date in C#<p>I have a large string containing multiple ID's in my reservation program for overview purpose.</p>
<pre><code>string example = "ID01-20/05-Table1\n ID02-04/06-Table2\n ID03-21/05-Table1\n"
</code></pre>
<p>This is just an example, but the string could grow or shri... | <p>You can split the initial string into chunks</p>
<pre><code>.Split('\n')
</code></pre>
<p>the match the date part in each chunk with a help of <em>regular expression</em>:</p>
<pre><code>// one or two digits followed by slash and then one or two digits
Regex.Match(item, "[0-9]{1,2}/[0-9]{1,2}").Value
</cod... | Ordering substrings according to date in C# | c#|string|visual-studio | 0 | 43 | 1 | 72,320,773 | 72,320,773 | 0 | true | 2022-05-20T14:25:45.590Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Ordering substrings according to date in C#<p>I have a large string containing multiple ID's in my reservation program for overview purpose.</p>
<pre><code>s... |
72,306,529 | DLLNotFound when using DLLImport with shared library<p>I am creating a .NET Framework 4.0 application that use a DLL when launch on Windows and a shared library wrote in C++ when launch on Linux (debian version 10).</p>
<p>The C# codes looks like that :</p>
<pre class="lang-cs prettyprint-override"><code>[DllImport(&qu... | <p>My problem came from the fact that 1) my library was badly compiled (Makefile problem); and 2) I had to use the keyword <code>extern "C" {</code> in the definitions of my functions.</p>
<p>See <a href="https://stackoverflow.com/questions/1041866/">What is the effect of extern "C" in C++?</a> for ... | DLLNotFound when using DLLImport with shared library | c++|.net|linux|shared-libraries|wine | 0 | 43 | 1 | 72,319,993 | 72,319,993 | 0 | true | 2022-05-19T14:37:13.747Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
DLLNotFound when using DLLImport with shared library<p>I am creating a .NET Framework 4.0 application that use a DLL when launch on Windows and a shared libr... |
72,339,949 | How to make a new input field appear after choosing one option from a dropdown<p>I have to make a form with some input options and one of them being a Type Switcher (dropdown) that shows me some options and depending on the option I choose it has to appear a new input for me to write that info. This is a project in PHP... | <p>you can add input field using js</p>
<p><strong>html</strong></p>
<pre><code> <div class="type-switcher">
<div class="input-wrapper">
<label for="productType">Type Switcher</label>
<select name="Select Type" id=&qu... | How to make a new input field appear after choosing one option from a dropdown | javascript|php|html|jquery|css | -1 | 43 | 1 | 72,340,277 | 72,340,277 | 0 | true | 2022-05-22T17:42:28.583Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to make a new input field appear after choosing one option from a dropdown<p>I have to make a form with some input options and one of them being a Type S... |
72,242,921 | Why can't VSCode provide code completions for my object?<p>Why doesn't VS Code figure out how to complete the methods and attributes?
When I write:
ai_game.
nothing happens, no list of methods or attributes appear</p>
<pre><code>import pygame
class Ship:
"""A class to manage the ship.""&q... | <p>Because it has no idea what <code>ai_game</code> is. It can be any type. Add a type annotation to it for example:</p>
<pre><code>def __init__(self, ai_game: float):
</code></pre>
<p>Well in this example I'm pretty sure you don't have a float, but it'll help VS Code to know what type is <code>ai_game</code> actually ... | Why can't VSCode provide code completions for my object? | python|visual-studio-code|autocomplete | 0 | 43 | 1 | 72,242,989 | 72,242,989 | 0 | true | 2022-05-14T18:25:59.587Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why can't VSCode provide code completions for my object?<p>Why doesn't VS Code figure out how to complete the methods and attributes?
When I write:
ai_game.
... |
72,393,712 | How to combine 2 arrays in a way that 1st element of array1 and 1st element of array2 and so on form a new array<p>I have 2 arrays. The first contains the years like
<code>[2021,2020,2019,2018,2017]</code>
and the second contains number of occurrence like
<code>[2,3,1,3,3]</code>
I want the new array to look like this
... | <p>Make sure that the length of 2 arrays is equal</p>
<p>So we have:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>const arr1 = [2021,2020,2019,2018,2017];
const arr2 = [2,3,... | How to combine 2 arrays in a way that 1st element of array1 and 1st element of array2 and so on form a new array | javascript|arrays|multidimensional-array | 0 | 43 | 1 | 72,393,782 | 72,393,782 | 0 | true | 2022-05-26T14:46:45.657Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to combine 2 arrays in a way that 1st element of array1 and 1st element of array2 and so on form a new array<p>I have 2 arrays. The first contains the ye... |
72,322,609 | Dates not importing to SQL database correctly from Python<p>I have the following (subset of a) Pandas dataframe that I am trying to upload to a MySQL database:
<a href="https://i.stack.imgur.com/iCNuo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iCNuo.png" alt="enter image description here" /></a>... | <p>Python is claiming the dates are datatype Object, you will need them to be Cast as a Date type first. Information about how to Cast as a Date found here:</p>
<p><a href="https://www.w3schools.com/sql/func_mysql_cast.asp" rel="nofollow noreferrer">https://www.w3schools.com/sql/func_mysql_cast.asp</a></p>
<p>Also, ma... | Dates not importing to SQL database correctly from Python | python|mysql|pandas | 0 | 43 | 2 | 72,323,027 | 72,323,027 | 0 | true | 2022-05-20T17:18:03.910Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Dates not importing to SQL database correctly from Python<p>I have the following (subset of a) Pandas dataframe that I am trying to upload to a MySQL databas... |
72,246,536 | I want the character to walk not only in x but also in y<p><strong>I want the character to walk not only in x but also in y</strong></p>
<pre><code>using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Control : MonoBehaviour
{
public float speed; // speed
... | <p>To simply just make it work you could just modify your code like this:</p>
<pre><code>private Vector3 change;
// Declare private property above functions
private void FixedUpdate()
{
change.x = joystick.Horizontal;
change.y = joystick.Vertical;
change = change.normalized;
rb.MovePosition(rb.transfor... | I want the character to walk not only in x but also in y | c#|android|unity3d|topdown | 0 | 43 | 1 | 72,246,855 | 72,246,855 | 0 | true | 2022-05-15T08:04:28.877Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I want the character to walk not only in x but also in y<p><strong>I want the character to walk not only in x but also in y</strong></p>
<pre><code>using Sys... |
72,383,231 | How do get start_of_week(Monday) from dates in other column in dataframe<p>I need to get for each value, beginning of week (Monday).
Here is dataframe that I have</p>
<p><a href="https://i.stack.imgur.com/vgAGr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vgAGr.png" alt="enter image description he... | <p>You can use the following code</p>
<pre><code>df['Monday_date_x'] = df['Date'].dt.to_period('W').dt.start_time
</code></pre>
<p>You can find more information on it here:
<a href="https://stackoverflow.com/questions/27989120/get-week-start-date-monday-from-a-date-column-in-python-pandas">Get week start date (Monday) ... | How do get start_of_week(Monday) from dates in other column in dataframe | pandas|time|time-series | 0 | 43 | 1 | 72,383,350 | 72,383,350 | 0 | true | 2022-05-25T19:32:03.600Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do get start_of_week(Monday) from dates in other column in dataframe<p>I need to get for each value, beginning of week (Monday).
Here is dataframe that I... |
72,247,089 | My fetch command doesn't work, what did i do wrong?<p><a href="https://i.stack.imgur.com/EWSvW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EWSvW.png" alt="enter image description here" /></a>im trying to fetch customers and trainings by using a fetch request but for some reason it doesn´t print a... | <p>The props passed to AgGridReact component are not the right type.</p>
<p><a href="https://www.ag-grid.com/react-data-grid/column-definitions/#custom-column-types" rel="nofollow noreferrer"><code>columnDefs</code> prop</a> is used to declare the column headers and should look like:</p>
<pre><code>const columnDefs = [... | My fetch command doesn't work, what did i do wrong? | reactjs | 0 | 43 | 2 | 72,247,852 | 72,247,852 | 0 | true | 2022-05-15T09:36:39.270Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
My fetch command doesn't work, what did i do wrong?<p><a href="https://i.stack.imgur.com/EWSvW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur... |
72,278,557 | Filtering a dataframe (where 1 specific column is type 'object') based on the columns element number length (Association Rule Analysis)<p>I have a dataset with a column labeled 'antecedents', that involves a list of elements in it, that are of type 'object', listed like shown below. How can I filter my dataset to retu... | <p>You can use the built-in <code>.apply()</code> function.</p>
<pre class="lang-py prettyprint-override"><code>def antecedent_length(s):
# Calculate the length of the antecedent
# `s` is the value in each row
return len(s)
df[df.antecedents.apply(antecedent_length) == 1]
</code></pre>
<p>Depending on the ... | Filtering a dataframe (where 1 specific column is type 'object') based on the columns element number length (Association Rule Analysis) | python|pandas|dataframe|return|data-science | 0 | 43 | 1 | 72,278,922 | 72,278,922 | 0 | true | 2022-05-17T17:49:13.087Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Filtering a dataframe (where 1 specific column is type 'object') based on the columns element number length (Association Rule Analysis)<p>I have a dataset wi... |
72,366,777 | Java packaging issues<p>Based on java documentation, I've set up my project as such:
Source files are in <code>C:\...\sources\com\myname\tictactoe\</code>
And my class files are in <code>C:\...\classes\com\myname\tictactoe\</code>
When I try to run a class (<code>Main.java</code>) in that directory (on powershell) by r... | <p>Change directory to <code>C:\...\classes</code> then run</p>
<pre><code>java -cp . com/myname/tictactoe/Main
</code></pre> | Java packaging issues | java|classnotfoundexception | 0 | 43 | 2 | 72,367,090 | 72,367,090 | 0 | true | 2022-05-24T17:01:35.480Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Java packaging issues<p>Based on java documentation, I've set up my project as such:
Source files are in <code>C:\...\sources\com\myname\tictactoe\</code>
An... |
72,288,130 | Multi images, cannot get first image from array<p>I have a gatsby app which is connected to a Strapi backend.<br>
On my homepage i want to display all projects and their first image from the gallery.</p>
<p>My query looks like this:</p>
<pre><code> allStrapiProject {
edges {
node {
... | <p>The resolution has been:</p>
<pre><code>{
project.category.name === "Photo" && (
<GatsbyImage
image={getImage(project.gallery[0].localFile)}
alt="asdasdasd"
className=""
/>
);
}
</code></pre>
<p>The problem was that some categories don't conta... | Multi images, cannot get first image from array | gatsby|strapi | 1 | 43 | 1 | 72,290,184 | 72,290,184 | 0 | true | 2022-05-18T11:13:27.413Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Multi images, cannot get first image from array<p>I have a gatsby app which is connected to a Strapi backend.<br>
On my homepage i want to display all projec... |
72,302,183 | Add smoothed curves to plot using loess()<p>I have monthly data from this package: boston, and I did a timeserie</p>
<pre><code>install.packages("fma")
library(fma)
data(package="fma")
View(boston)
timeseries<-ts(boston,start=1)
plot(timeseries)
</code></pre>
<p>Now I want to add to this plot two... | <p>Do you wish something like this?</p>
<p>I used <code>{ggplot2}</code> for the plots. <code>geom_smooth()</code> allows the use of <code>loess</code> with <code>span</code> argument - assuming you want to use <code>loess</code>.</p>
<p>For the arrangement of the plots, i.e., stacked + one x-axis, I used <code>{grid}<... | Add smoothed curves to plot using loess() | r|time-series|loess | 1 | 43 | 1 | 72,302,679 | 72,302,679 | 0 | true | 2022-05-19T09:39:12.527Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Add smoothed curves to plot using loess()<p>I have monthly data from this package: boston, and I did a timeserie</p>
<pre><code>install.packages("fma&qu... |
72,317,684 | Switch paragraphs using inner HTML in JS<p>I am trying to switch two paragraphs after clicking the button but I am stuck. Is there any way how to do this using inner HTML without using IF or boolean? I tried this code but it doesn't work. Thanks</p>
<pre><code>let elmsButton = document.querySelectorAll("button&quo... | <p>Why don't you use <code>querySelector</code> in place of using <code>querySelectorAll</code> and choose the first element?</p>
<p>By the way, I advise to delete and re-add the elements from the parent rather than using <code>innerHTML</code>. The use of <code>innerHTML</code> would not preserve listeners and have wo... | Switch paragraphs using inner HTML in JS | javascript | 2 | 43 | 3 | 72,317,951 | 72,317,951 | 0 | true | 2022-05-20T10:50:35.790Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Switch paragraphs using inner HTML in JS<p>I am trying to switch two paragraphs after clicking the button but I am stuck. Is there any way how to do this usi... |
72,248,433 | visibility hidden after playing animation<p>I'm trying to add effects on modal.</p>
<p>I want to make like this:</p>
<ul>
<li>When <code>modal--show</code> class added, <code>visibility</code> set to <code>visible</code> and <code>opacity</code> continues to grow 0% to 100%.</li>
<li>When <code>modal--show</code> class... | <p>I would probably scrap the whole animation and just make a simple <code>transition</code> instead.</p>
<p>In this case, <code>transition</code> is specified in a shorthand. The associated properties are:</p>
<p><code>transition-timing-function: ease-in-out</code> - how the transition should be played, this value wil... | visibility hidden after playing animation | javascript|css | 1 | 43 | 1 | 72,248,545 | 72,248,545 | 0 | true | 2022-05-15T12:52:19.070Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
visibility hidden after playing animation<p>I'm trying to add effects on modal.</p>
<p>I want to make like this:</p>
<ul>
<li>When <code>modal--show</code> c... |
72,365,186 | How to make wx.Panel fill its parent wx.Panel?<p>I have some troubles in understanding sizers.</p>
<p>My frame calls a wx.Panel of AreaPanel class. After a keyboard button is pressed with that panel active, I want to create a new wx.Panel of InventoryPanel class, that should fill the whole AreaPanel. It doesn't. I expe... | <p>You're creating a sizer for InventoryPanel and add the InventoryPanel to this sizer. That's not correct.
Create a sizer for AreaPanel instead and add the Inventory Panel to it.
(And please follow usual conventions, e.g. <strong>init</strong> at the top of the class.)
P.S.: You write that you have difficulties unders... | How to make wx.Panel fill its parent wx.Panel? | wxpython | 0 | 43 | 1 | 72,367,177 | 72,367,177 | 0 | true | 2022-05-24T14:59:30.930Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to make wx.Panel fill its parent wx.Panel?<p>I have some troubles in understanding sizers.</p>
<p>My frame calls a wx.Panel of AreaPanel class. After a k... |
72,275,109 | Defining Parent For a Dataset with Several Conditions in Pandas<p>I have a CSV file with more than 10,000,000 rows of data with below structures:
I have an ID as my uniqueID per group:</p>
<p>Data Format</p>
<pre><code>ID Type Name
1 Head abc-001
1 Senior abc-002
1 Junior ... | <p>You could pivot the <code>Type</code> and <code>Name</code> columns then forword fill within <code>ID</code> group. Then take the right-hand two non-NaN entries to get the <code>Parent</code> and <code>Name</code>.</p>
<p>Pivot and forward-fill:</p>
<pre><code>dfn = pd.concat([df[['ID','Type']], df.pivot(columns='T... | Defining Parent For a Dataset with Several Conditions in Pandas | python|python-3.x|pandas|python-2.7 | 0 | 43 | 1 | 72,280,064 | 72,280,064 | 0 | true | 2022-05-17T13:41:09.830Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Defining Parent For a Dataset with Several Conditions in Pandas<p>I have a CSV file with more than 10,000,000 rows of data with below structures:
I have an I... |
72,238,223 | SQL query question, how to make a query that outputs all entries of two tables<p>I have two tables, <code>CITIES</code> and <code>FLIGHTS</code>:</p>
<p>CITIES</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>id</th>
<th>name</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>New York</td>
</tr... | <p>You can use join for that. Both inner join and left join will serve your purpose:</p>
<p>Query with left join:</p>
<pre><code>Select c.name as departure_city, ct.name as arrival_city from FLIGHTS f
left join CITIES c on f.departure_id=c.id
left join CITIES ct on f.arrival_id = ct.id
</code></pre>
<p>Outupt:</p>
<di... | SQL query question, how to make a query that outputs all entries of two tables | sql|sqlite|join | -1 | 43 | 3 | 72,238,287 | 72,238,287 | 1 | true | 2022-05-14T07:35:28.403Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SQL query question, how to make a query that outputs all entries of two tables<p>I have two tables, <code>CITIES</code> and <code>FLIGHTS</code>:</p>
<p>CITI... |
72,240,041 | Query with Elasticsearch and Return source field only<p>I have some data on Elasticsearch and retrieve data using Fastapi GET call.</p>
<p>i used below code to GET data from Elasticsearch</p>
<p>main.py</p>
<pre><code>@app.get("/get_all")
def getData():
es = Elasticsearch([{'host': 'localhost', 'port': 92... | <p>You need to transform Elasticsearch's response to the object that you want:</p>
<p>Here is one way to do it:</p>
<pre><code>@app.get("/get_all")
def getData():
es = Elasticsearch([{'host': 'localhost', 'port': 9200}])
es.indices.refresh(index="fraction")
res = es.search(index="fr... | Query with Elasticsearch and Return source field only | python|python-3.x|elasticsearch|fastapi | 0 | 43 | 1 | 72,240,289 | 72,240,289 | 1 | true | 2022-05-14T12:08:09.337Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Query with Elasticsearch and Return source field only<p>I have some data on Elasticsearch and retrieve data using Fastapi GET call.</p>
<p>i used below code ... |
72,244,670 | Split a comma delimited Pandas Column of Type Object<p>I have a pandas df with a column that have a mix of values like so</p>
<pre><code>| ID | home_page |
| ---------| ------------------------------------------------|
| 1 | facebook.com, facebook.com, meta.com ... | <p>You are right that this is coming from <code>np.nan</code> values which are of type float. The issue happens here: <code>set(np.nan)</code>. The following should work for you (and should be faster).</p>
<pre><code>df["home_page"].str.replace(' ', '').str.split(',').apply(np.unique)
</code></pre>
<p>If you ... | Split a comma delimited Pandas Column of Type Object | python|pandas | 0 | 43 | 1 | 72,244,721 | 72,244,721 | 1 | true | 2022-05-15T00:10:07.857Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Split a comma delimited Pandas Column of Type Object<p>I have a pandas df with a column that have a mix of values like so</p>
<pre><code>| ID | home_pa... |
72,247,958 | Calculate the number of points with integer coordinates inside the ellipse<p>Calculate the number of points with integer coordinates inside the ellipse<a href="https://i.stack.imgur.com/zhCuW.jpg" rel="nofollow noreferrer">1</a>. Hint: check those values for x and y for which</p>
<p><img src="https://i.stack.imgur.com/... | <p>There is no point inside the ellipse whose |x| is greater than 13.</p>
<p>If you want to count the number of points with integer coordinates inside the ellipse I would do something like this:</p>
<pre><code>int Points = 0;
for(int x = -13; x <= 13; x++)
{
for(int y = -16; y <= 16; y++)
{
if((Ma... | Calculate the number of points with integer coordinates inside the ellipse | c#|math | 0 | 43 | 2 | 72,248,240 | 72,248,240 | 1 | true | 2022-05-15T11:46:12.860Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Calculate the number of points with integer coordinates inside the ellipse<p>Calculate the number of points with integer coordinates inside the ellipse<a hre... |
72,259,589 | I want to query the row values as Column in SQL<p>I have a query to result in the below data from DB</p>
<p><a href="https://i.stack.imgur.com/fAlHk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fAlHk.png" alt="enter image description here" /></a></p>
<p>But actually, I want to get the data as</p>
... | <p>You can do this easily in SSRS without changing your dataset.</p>
<ol>
<li>Add a Matrix control to your report</li>
<li>Drag the Assignee field to the <code>Rows</code> placeholder</li>
<li>Drag the Priority_n field to the <code>Columns</code> placeholder</li>
<li>Drag the Count_C field to the <code>Data</code> plac... | I want to query the row values as Column in SQL | mysql|sql|select|reporting-services | 0 | 43 | 2 | 72,260,104 | 72,260,104 | 1 | true | 2022-05-16T12:56:13.377Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I want to query the row values as Column in SQL<p>I have a query to result in the below data from DB</p>
<p><a href="https://i.stack.imgur.com/fAlHk.png" rel... |
72,261,586 | Simplify the typescript interface for fetched data from api<p>I want to fetch movie data from omdbapi.</p>
<p>I'm trying to embed typescript to determine the exact data I get from the endpoint (I'm new to typescript).</p>
<p>The structure of the obtained data looks something like this, is it really necessary to list al... | <p>This sounds like a job for <a href="https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type" rel="nofollow noreferrer"><code>Record</code></a>:</p>
<pre><code>type Movie = Record<"Title" | "Year" | "... more keys here ..." | "Website" | "Respons... | Simplify the typescript interface for fetched data from api | typescript|react-typescript | 0 | 43 | 1 | 72,261,833 | 72,261,833 | 1 | true | 2022-05-16T15:19:02.120Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Simplify the typescript interface for fetched data from api<p>I want to fetch movie data from omdbapi.</p>
<p>I'm trying to embed typescript to determine the... |
72,260,510 | Why is Dart not going into null-safe mode?<p>For reasons I don't need to go into, I'm trying to get the end_to_end_test subproject of built_value (latest version from google repo on github) to be in null safe mode.
It looks like it should be anyway, the sdk version is >=2.12.0 (I changed that to 2.13.0 just to make ... | <p>The repository you are referring to is using a feature called <a href="https://dart.dev/guides/language/evolution#per-library-language-version-selection" rel="nofollow noreferrer">per-library language version selection</a>. Essentially you can add a comment at the top of a dart file such as <code>// @dart=2.11</code... | Why is Dart not going into null-safe mode? | dart | 0 | 43 | 1 | 72,263,426 | 72,263,426 | 1 | true | 2022-05-16T14:04:56.677Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why is Dart not going into null-safe mode?<p>For reasons I don't need to go into, I'm trying to get the end_to_end_test subproject of built_value (latest ver... |
72,263,231 | What is "=- 1" in a python method's argument list?<p>On the following page: <a href="https://docs.python.org/3/library/subprocess.html#popen-constructor" rel="nofollow noreferrer">subprocess.popen</a>, in the argument list of <code>popen()</code> there is a "<code>pipesize=- 1</code>". Since it pops up at a f... | <p>That is likely an error with the documentation. It should look like <code>pipesize = -1</code>. But, regardless, it is a default value for an argument.</p>
<h1>Parameters and Arguments in Functions</h1>
<p>By default, all parameters in a function signature MUST be passed an argument when you call the function:</p>
<... | What is "=- 1" in a python method's argument list? | python|arguments|default | -1 | 43 | 1 | 72,263,505 | 72,263,505 | 1 | true | 2022-05-16T17:23:59.547Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What is "=- 1" in a python method's argument list?<p>On the following page: <a href="https://docs.python.org/3/library/subprocess.html#popen-constructor" rel... |
72,265,185 | Groupby, sum, reset index & keep first all together<p>I am using the following code and my goal is to group by 2 columns (out of tens of them), then keep the first value of all the other columns while summing the values of two other columns. And it doesn't really work no matter the combination that I tried.</p>
<p>Code... | <p>You can use <code>agg</code> with configuring corresponding functions for each column.</p>
<pre class="lang-py prettyprint-override"><code>group = ['col_1', 'col_2']
(df.groupby(group, as_index=False)
.agg({
**{x: 'first' for x in df.columns[~df.columns.isin(group)]}, # for all columns other than grouping colum... | Groupby, sum, reset index & keep first all together | python|pandas|dataframe | -1 | 43 | 1 | 72,265,722 | 72,265,722 | 1 | true | 2022-05-16T20:23:41.753Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Groupby, sum, reset index & keep first all together<p>I am using the following code and my goal is to group by 2 columns (out of tens of them), then keep the... |
72,266,876 | How to select pair of userID that have at least 3 reviewed productID with a product score of at least 4/5 in sql<p>I have a dataset like this:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>userid</th>
<th>productid</th>
<th>score</th>
</tr>
</thead>
<tbody>
<tr>
<td>A</td>
<td>1</td>
<td>... | <p>You can try with the following query:</p>
<pre><code>WITH cte AS (
SELECT r.userid,
r.productid
FROM reviews r
WHERE r.score > 3
)
SELECT r1.userid,
r2.userid,
GROUP_CONCAT(r1.productid SEPARATOR ' ')
FROM cte r1
INNER JOIN cte r2
ON r1.productid = r2.prod... | How to select pair of userID that have at least 3 reviewed productID with a product score of at least 4/5 in sql | mysql|sql|hive | 1 | 43 | 2 | 72,267,037 | 72,267,037 | 1 | true | 2022-05-17T00:10:30.347Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to select pair of userID that have at least 3 reviewed productID with a product score of at least 4/5 in sql<p>I have a dataset like this:</p>
<div class... |
72,273,008 | R ggplot2 with stacked column instead of grouped<p>I want to plot the data shown below as a grouped bar_plot.</p>
<p>I tried <code>position = "dodge"</code> or <code>position = "dodge2"</code> but it didn't work. Ι also tried <code>position = position_dodge()</code></p>
<p>It kinda works if i use <c... | <p>Try using <code>species</code> as a factor and add <code>stat = "identity"</code> like this:</p>
<pre><code>ggplot(data = comp_coors, aes(x = factor(species), y = overlap_percent, fill = mirna_form)) +
geom_bar(position = "dodge", stat = "identity") + theme_classic() + labs(x = "... | R ggplot2 with stacked column instead of grouped | r|ggplot2|plot|stacked-bar-chart|grouped-bar-chart | 2 | 43 | 1 | 72,273,173 | 72,273,173 | 1 | true | 2022-05-17T11:10:49.853Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
R ggplot2 with stacked column instead of grouped<p>I want to plot the data shown below as a grouped bar_plot.</p>
<p>I tried <code>position = "dodge&quo... |
72,266,601 | Parsing PubMed data and extracting multiple columns from multiple files<p>I have multiple <code>xml</code> files from PubMed. Several files are <a href="https://drive.google.com/drive/folders/1MP5DSCYs8Eh4WILM07Xn8BahXUtK1MuN?usp=sharing" rel="nofollow noreferrer">here</a>.</p>
<p>How to parse it and get these columns ... | <p>First, what you want is doable. Something like this should work for your second file, and you could add other files by wrapping the code with a <code>for</code> loop:</p>
<pre><code>from lxml import etree
import pandas as pd
doc = etree.parse('file.xml')
columns = ['Title','ArticleDate','ArticleTitle','LastName','... | Parsing PubMed data and extracting multiple columns from multiple files | python|xml|parsing|pubmed | 1 | 43 | 1 | 72,273,993 | 72,273,993 | 1 | true | 2022-05-16T23:21:40.683Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Parsing PubMed data and extracting multiple columns from multiple files<p>I have multiple <code>xml</code> files from PubMed. Several files are <a href="http... |
72,276,184 | Capture `{cli}` output for reporting<p>I would like to capture the dynamic output produced by <code>{cli}</code> to use in error reporting/logging.</p>
<p>Here's an example:</p>
<pre><code>my_function <- function(val, return_message = TRUE) {
if(val == 'a'){
if (return_message) cli::cli_alert("your val... | <p>I don't think <code>cli_X()</code> returns the text, but you could imagine a wrapper that might do what you want. Consider this as a start:</p>
<pre class="lang-r prettyprint-override"><code>cli_wrapper <- function(str, type="alert", return_str = TRUE, return_message=TRUE, ...){
str <- with(list(.... | Capture `{cli}` output for reporting | r|logging | 0 | 43 | 2 | 72,276,630 | 72,276,630 | 1 | true | 2022-05-17T14:51:05.217Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Capture `{cli}` output for reporting<p>I would like to capture the dynamic output produced by <code>{cli}</code> to use in error reporting/logging.</p>
<p>He... |
72,277,112 | Batch file nested for loop throws "| was unexpected at this time"<p>I am attempting to store the return of a <code>dir</code> command into a variable. So far all I've found requires a <code>for /f</code> loop. This call is made from within another <code>for /f</code> loop and I am having issues with it. Here are snippe... | <p>You have to escape pipe with carret <code>^|</code> if pipe is used in subject of FOR loop. Pipe is a special character in batch files.</p> | Batch file nested for loop throws "| was unexpected at this time" | batch-file | 0 | 43 | 1 | 72,277,156 | 72,277,156 | 1 | true | 2022-05-17T15:50:36.757Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Batch file nested for loop throws "| was unexpected at this time"<p>I am attempting to store the return of a <code>dir</code> command into a variable. So far... |
72,276,960 | How to change text using arrays and DOM<p>So my proyect has the task that every time the <strong>siguiente</strong> button is clicked the text will change. So far, I have maneged to do that manupulating the DOM. But I have an array <strong>historia</strong> that I would like to use in order that, every time the button ... | <p>if i understand your issue, you want to display your history , so you can try this :</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>var section = document.querySelector('se... | How to change text using arrays and DOM | javascript|html | 0 | 43 | 2 | 72,277,158 | 72,277,158 | 1 | true | 2022-05-17T15:39:24.327Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to change text using arrays and DOM<p>So my proyect has the task that every time the <strong>siguiente</strong> button is clicked the text will change. S... |
72,279,616 | javascript regex group why do I get leading blanks?<p>When matching "product product name cat1" with this regex I get " product name" with a leading blank, of course I could trim in javascript but is there a way to modify regex to not catch that blank ?</p>
<pre><code>(product)((\s+)(.(?!cat1|cat2))... | <p>You can use</p>
<pre class="lang-none prettyprint-override"><code>(product)(\s+)((?:(?!cat1|cat2).)+)
</code></pre>
<p>See the <a href="https://regex101.com/r/Bf8DhR/1" rel="nofollow noreferrer">regex demo</a>.</p>
<p>Note:</p>
<ul>
<li>The tempered greedy token is fixed, see <a href="https://stackoverflow.com/q/309... | javascript regex group why do I get leading blanks? | javascript|regex | 0 | 43 | 2 | 72,279,857 | 72,279,857 | 1 | true | 2022-05-17T19:22:22.257Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
javascript regex group why do I get leading blanks?<p>When matching "product product name cat1" with this regex I get " product name" wit... |
72,280,404 | How to get the variable names of pairwise combinations?<p>I have multiple pairwise comparisons to do in order to find common items between the lists. My code below works. However, I would like to keep track of the names of the lists. which are geno1, geno2 and geno3. I'm not sure how to get the combinations refering to... | <p>Create a dictionary, where the keys are the name of the list and values are the lists that you originally have. You could do something using <code>locals()</code> if you didn't want to write out the name of the lists as strings, but it's pretty hacky and I wouldn't recommend it:</p>
<pre class="lang-py prettyprint-o... | How to get the variable names of pairwise combinations? | python|variables|pairwise | 1 | 43 | 3 | 72,280,559 | 72,280,559 | 1 | true | 2022-05-17T20:36:22.430Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to get the variable names of pairwise combinations?<p>I have multiple pairwise comparisons to do in order to find common items between the lists. My code... |
72,284,145 | Add number in front of number in columns<p>I have this example columns</p>
<pre><code>year_short
89
99
97
87
98
00
02
05
10
11
20
22
</code></pre>
<p>what I want to do is to make that column into like this</p>
<pre><code>year_long
1989
1999
1997
1987
1998
2000
2002
2005
2010
2011... | <p>You could use the logic that any two digit year which is less than 25 belongs to the <code>2000</code> century, while any value greater than or equal to 25 belongs to the <code>1900</code> century:</p>
<pre class="lang-py prettyprint-override"><code>df["year_long"] = np.where(df["year_short"] <... | Add number in front of number in columns | python|string|numbers | 0 | 43 | 2 | 72,284,189 | 72,284,189 | 1 | true | 2022-05-18T06:28:15.970Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Add number in front of number in columns<p>I have this example columns</p>
<pre><code>year_short
89
99
97
87
98
00
02
05
10
11
20
22
</code></pre>
<p>what I ... |
72,283,566 | Enemy bot moves away from the player Unity3D<p>I'm making top down shooting game. I wrote the code where enemies spawn randomly on map and they're trying to catch you. I made them do that and also I wrote a code to make them look at you. Basically rotate towards you only on Z axis. But problem is that when they are spa... | <p>Consider that <code>Translate</code> is a relative modifier. For this reason, when you specify the direction in the Translate itself, the movement becomes confused. Use <code>Vector3.MoveTowards</code> to solve the problem. If your game is 2D, you can also use <code>Vector2</code> like below:</p>
<pre class="lang-cs... | Enemy bot moves away from the player Unity3D | c#|unity3d | 2 | 43 | 1 | 72,285,550 | 72,285,550 | 1 | true | 2022-05-18T05:21:22.010Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Enemy bot moves away from the player Unity3D<p>I'm making top down shooting game. I wrote the code where enemies spawn randomly on map and they're trying to ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.