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,829,524
I get NuGet error when trying to install any package<p>I'm making a Windows form progect in Visual Studio. When I trying to install any package through console I get error</p> <blockquote> <p>Install-Package : Unable to find package 'PackageName' at source ''. I tried both Visual Studio 2013 and Visual Studio 2019.</p>...
<p>According to your description, you can check your package scources under Tools &gt; Options &gt; NuGet Package Manager if you don’t have the correct package sources you can add this “https://api.nuget.org/v3/index.json” such as: <a href="https://i.stack.imgur.com/52ZCP.png" rel="nofollow noreferrer"><img src="https:...
I get NuGet error when trying to install any package
visual-studio|nuget
0
70
2
72,851,197
72,851,197
0
true
2022-07-01T12:50:02.600Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: I get NuGet error when trying to install any package<p>I'm making a Windows form progect in Visual Studio. When I trying to install any package through conso...
72,849,876
Why do I get undefined when I use elements from a node-list or HTML-Collection when traversing the DOM?<p>While traversing the DOM there are sometimes many child elements under one parent.</p> <p>I can get these children as either node-lists using a <code>querySelectorAll</code> or I can get them as HTML-Collections by...
<p>While you cannot use node-list or HTML-Collection elements directly or indirectly when you are building up a DOM traversal. What I finally found was that I can use the element before the many child elements, in my original question that was a <code>div</code> with id of bottomOfPage. What I had to do was find the ...
Why do I get undefined when I use elements from a node-list or HTML-Collection when traversing the DOM?
javascript|html|dom-traversal
0
70
2
72,858,180
72,858,180
0
true
2022-07-03T21:01:01.127Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why do I get undefined when I use elements from a node-list or HTML-Collection when traversing the DOM?<p>While traversing the DOM there are sometimes many c...
72,881,421
How to concat resnet output and original size of input image?<p>I have image dataset with 17 classes. There is a significant differ in sizes of some classes eg. images in one class are on average 250x200 and in the other class 25x25. My idea was to concat output of pretrained resnet18 and original image size, because I...
<p>I guess you want to use the embedding that are produced by the Adaptive Pooling layer to have a fixed output size. First you need to get rid of the last linear layer (see <a href="https://stackoverflow.com/questions/52548174/how-to-remove-the-last-fc-layer-from-a-resnet-model-in-pytorch">this post</a>):</p> <pre><co...
How to concat resnet output and original size of input image?
deep-learning|pytorch|conv-neural-network|concatenation
0
70
1
72,881,604
72,881,604
0
true
2022-07-06T09:54:56.810Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to concat resnet output and original size of input image?<p>I have image dataset with 17 classes. There is a significant differ in sizes of some classes ...
72,872,915
TO get to know the status of our Cloud function in GCP<p>I am trying to know whether the cloud function URL is always responding or not, It is important to know the status of the URL and show it in GCP monitoring.</p> <p>Is it possible to know whether it is active or not. If it is possible can anyone help me with sampl...
<p>This is expected. You're getting <code>HTTP 403</code> because your requests are not being authenticated.</p> <p>Setting the <code>GOOGLE_APPLICATION_CREDENTIALS</code> variable to the Service Account will not automagically set the authentication headers.</p> <p>In addition the role you need is <code>Cloud Functions...
TO get to know the status of our Cloud function in GCP
python|google-cloud-platform|google-cloud-functions
0
70
1
72,887,918
72,887,918
0
true
2022-07-05T16:42:50.907Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: TO get to know the status of our Cloud function in GCP<p>I am trying to know whether the cloud function URL is always responding or not, It is important to k...
72,863,777
Why does useEffect only working properly once?<p>I'm having big problems that are getting me hella confused with React useEffect &amp; States.</p> <p>I have this following component, everything in it looks to work normally until I redirect to my app main page and try it again. The problem is that the useEffect is trigg...
<p>De-registering your socket.io listeners is the answer.</p>
Why does useEffect only working properly once?
javascript|reactjs|use-effect|use-state|setstate
1
70
1
72,892,257
72,892,257
0
true
2022-07-05T03:44:32.627Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why does useEffect only working properly once?<p>I'm having big problems that are getting me hella confused with React useEffect &amp; States.</p> <p>I have ...
72,900,007
Flatten json string into columns in big query<p>I am new to bigquery and trying to flatten the below JSON string into individual columns.</p> <p>{&quot;city&quot;: &quot;&quot;, &quot;country&quot;: &quot;US&quot;, &quot;email&quot;: &quot;test@gmail.com&quot;, &quot;province&quot;: &quot;&quot;, &quot;state&quot;: &qu...
<p>Use below approach</p> <pre><code>create temp function get_keys(input string) returns array&lt;string&gt; language js as &quot;&quot;&quot; return Object.keys(JSON.parse(input)); &quot;&quot;&quot;; create temp function get_values(input string) returns array&lt;string&gt; language js as &quot;&quot;&quot; re...
Flatten json string into columns in big query
sql|json|google-bigquery
0
70
1
72,900,117
72,900,117
0
true
2022-07-07T14:53:54.770Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Flatten json string into columns in big query<p>I am new to bigquery and trying to flatten the below JSON string into individual columns.</p> <p>{&quot;city&...
72,904,286
how to Get item from nested arrays in python<p>I am scraping web table and append scraped data to array. After append data to array i get array like this (there are arrays in array):</p> <pre><code> [['Action'], ['1 796004', '35', '2022-04-28', '2013 FORD FUSION TITANIUM', '43004432', '3FA6P0RU3DR297126', 'CA', 'Copart...
<p>Loop from the first index of the array to the end to avoid the first subarray.</p> <p>At every iteration, select the ith subarray and get the 3rd index.</p> <p>The result will be an array of the strings that you wanted.</p> <pre class="lang-py prettyprint-override"><code>prompt = [ ['Action'], ['1 796004', '...
how to Get item from nested arrays in python
python|arrays|selenium|web-scraping|beautifulsoup
0
70
1
72,904,775
72,904,775
0
true
2022-07-07T21:12:06.617Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to Get item from nested arrays in python<p>I am scraping web table and append scraped data to array. After append data to array i get array like this (th...
72,899,155
How do you declare multiple characteristics in Web Bluetooth?<p><strong>I have no clue how to implement multiple characteristics:</strong></p> <p>Currently my code works perfectly when a single characteristic is declared/implemented:</p> <pre><code> .then((service) =&gt; { pushlog(&quot;Getting Shutdown Character...
<p><code>service.getCharacteristic()</code> returns a <code>Promise</code> and so in order to have your program properly wait for all of the promises you return to resolve before executing the callback passed to <code>then()</code> you need to wrap the list in <code>Promise.all()</code>. The callback will get a li...
How do you declare multiple characteristics in Web Bluetooth?
next.js|bluetooth|bluetooth-lowenergy|web-bluetooth
0
70
1
72,906,698
72,906,698
0
true
2022-07-07T13:58:09.073Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do you declare multiple characteristics in Web Bluetooth?<p><strong>I have no clue how to implement multiple characteristics:</strong></p> <p>Currently m...
72,847,628
This interaction has already been acknowledged<p>I'm creating a discord bot that I use multi-threading to update an ArrayList every few minutes. The first 'update' works correctly with no error, though every update afterwards I get the error:</p> <pre><code>[JDA MainWS-ReadThread] ERROR RestAction - RestAction queue re...
<p>In essence you have already replied for example and you are trying to reply again which throws the error and there is not enough info from the code you provided.</p>
This interaction has already been acknowledged
java|multithreading|discord-jda
0
70
1
72,915,922
72,915,922
0
true
2022-07-03T15:14:27.997Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: This interaction has already been acknowledged<p>I'm creating a discord bot that I use multi-threading to update an ArrayList every few minutes. The first 'u...
72,905,015
Reduce output time - count with groupby (python, pandas)<p>I have a loop that calculates the &quot;total_count&quot; of a group of elements from multiple periods. Is there a way to optimize the script to have a shorter output time? The dataframe is 33MD and running a loop takes over 300++ms. Actual script runs over 50k...
<p>Your code took 75.1ms on my computer. The code below run in 14.6ms:</p> <pre><code>df['tr1_tc'] = (df.assign(tr1_tc=df['period'].between(tr1_sta, tr1_end)) .groupby(holder)['tr1_tc'].transform('sum')) print(df) # Output type class country period season tr1_tc 0 1 5 ...
Reduce output time - count with groupby (python, pandas)
python|pandas|pandas-groupby
1
70
1
72,916,741
72,916,741
0
true
2022-07-07T22:52:57.363Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Reduce output time - count with groupby (python, pandas)<p>I have a loop that calculates the &quot;total_count&quot; of a group of elements from multiple per...
72,918,237
Python Library - Module Not Found<p>I'm making a python library and i want to be able to run the code i'm developing, in another folder i have a python file, but I get the error: ModuleNotFoundError: No module named this is my folder structure</p> <pre><code>. └── project └── library_directory ├── __init__....
<p>Im not sure if this is the correct solution, but you can try this: In your test module:</p> <pre><code>import sys sys.path.insert(0, '/Your_project_root_path' </code></pre> <p>Now can access to the packages in the root directory. I took this solution from <a href="https://www.geeksforgeeks.org/python-import-module-f...
Python Library - Module Not Found
python|python-import|python-module
0
70
2
72,918,500
72,918,500
0
true
2022-07-09T01:02:36.647Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python Library - Module Not Found<p>I'm making a python library and i want to be able to run the code i'm developing, in another folder i have a python file,...
72,920,778
rstatix::anova_test() over multiple columns of data frame<p>I like to run multiple one-way ANOVAs over multiple columns of a data frame. My approach to doing this was with a for loop. The first column of my data frame contains the groups. To provide a reproducible example, i here take the iris data set. I want to use r...
<p>Maybe somebody else has a better answer, but the only way I can get this to work is to build the formula from the column names, that is replace your <code>anova_test</code> line with:</p> <pre><code>temp_anova_results &lt;- data %&gt;% anova_test(formula(paste0(names(dat)[i],&quot;~&quot;,&quot;Species&quot;))) </co...
rstatix::anova_test() over multiple columns of data frame
r
0
70
1
72,921,162
72,921,162
0
true
2022-07-09T10:56:23.277Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: rstatix::anova_test() over multiple columns of data frame<p>I like to run multiple one-way ANOVAs over multiple columns of a data frame. My approach to doing...
72,921,886
xng breadcrumb routes undefined in child module<p>I'm using xng-breadcrumb library from this package <a href="https://www.npmjs.com/package/xng-breadcrumb" rel="nofollow noreferrer">https://www.npmjs.com/package/xng-breadcrumb</a></p> <p>Everything is normal when using breadcrumb in children component, but when in lazy...
<p>After upgrading to xng breadcrumb version 8.02 it works for angular 14</p>
xng breadcrumb routes undefined in child module
angular|lazy-loading|xng-breadcrumb
0
70
1
72,922,762
72,922,762
0
true
2022-07-09T13:48:03.470Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: xng breadcrumb routes undefined in child module<p>I'm using xng-breadcrumb library from this package <a href="https://www.npmjs.com/package/xng-breadcrumb" r...
72,927,650
Marshalling Dynamo Data in Step functions<p>I would like to write a data structure like this to DynamoDB via a step function:</p> <pre class="lang-json prettyprint-override"><code>{ &quot;data&quot;: { &quot;foo&quot;: &quot;bar&quot; }, &quot;id&quot;: &quot;TEST-0123&quot;, &quot;rev&quot;: &quot;1.0.0&quot;, ...
<p>If your input format has a fixed shape, you can marshal it into DynamoDB JSON in the DynamoDB integration's <a href="https://docs.aws.amazon.com/step-functions/latest/dg/connect-ddb.html" rel="nofollow noreferrer">task parameters</a> with JSON Path references.</p> <p>If your input has an arbitrary shape, you'll need...
Marshalling Dynamo Data in Step functions
amazon-web-services|amazon-dynamodb|aws-step-functions
0
70
1
72,930,229
72,930,229
0
true
2022-07-10T10:01:08.187Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Marshalling Dynamo Data in Step functions<p>I would like to write a data structure like this to DynamoDB via a step function:</p> <pre class="lang-json prett...
72,943,737
Filter Pandas Dataframe Under Multiple Conditions<p><a href="https://i.stack.imgur.com/pnhVs.png" rel="nofollow noreferrer">My current progress</a></p> <p>I currently have a pandas Dataframe with 5 different instances</p> <p>df = {</p> <pre><code>'Name': ['John', 'Mark', 'Kevin', 'Ron', 'Amira' 'ID': [110,111,112,113,...
<p>Vectorial solution using a mask:</p> <pre><code>m = (df.filter(regex=r'^M') .apply(lambda s: s.isin(lst)) .sum(1).eq(1) ) out = df.loc[m] </code></pre> <p>Output:</p> <pre><code> Name ID Job title Manager M2 M3 M4 M5 Location 2 Kevin 112 xoz John Ronald Randal...
Filter Pandas Dataframe Under Multiple Conditions
python|pandas|list|dataframe|sorting
-3
70
3
72,944,061
72,944,061
0
true
2022-07-11T19:32:49.943Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Filter Pandas Dataframe Under Multiple Conditions<p><a href="https://i.stack.imgur.com/pnhVs.png" rel="nofollow noreferrer">My current progress</a></p> <p>I ...
72,948,614
Django get input radio select in a form<p>What I want, is a page where per user can be selected if they were either Present, Allowed Absent or Absent. I have managed to create a page where this is possible and can be submitted, see the image I attached. <a href="https://i.stack.imgur.com/EzDpi.png" rel="nofollow norefe...
<p>You just have to add a <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/radio#value" rel="nofollow noreferrer"><code>value</code></a> to your radio buttons. Then, when retrieving the value of your radio buttons by using <code>request.POST.get('your_input_name')</code> you are getting the <cod...
Django get input radio select in a form
django|forms|django-models|input|radio-button
-1
70
1
72,948,798
72,948,798
0
true
2022-07-12T07:35:35.367Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Django get input radio select in a form<p>What I want, is a page where per user can be selected if they were either Present, Allowed Absent or Absent. I have...
72,950,692
How to change background image according to result from an api?<p>function for changing background image :</p> <pre><code>function backgroundChange(checkDay) { if (checkDay === 0) { document.body.style.backgroundImage = &quot;url('night.jpg')&quot;; } else if (checkDay === 1) { document.body.style.backgroun...
<p>The same code you provided is working for me. Please check that you have some component(and style attached to it) set that overlap body completely.</p> <p>Here is what I tried, Just change API_key and it will work:</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <...
How to change background image according to result from an api?
javascript|axios
0
70
1
72,951,511
72,951,511
0
true
2022-07-12T10:18:18.863Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to change background image according to result from an api?<p>function for changing background image :</p> <pre><code>function backgroundChange(checkDay)...
72,910,973
Open source data of the world map that includes longitude and latitude information along with land and sea indicator<p>I've came across OpenStreetMap and it's too large with unnecessary data for my use case. What I'm searching for is an exact replica of the world map tagged with longitude and latitude information along...
<p>you might want to have a look at the NaturalEarth datasets...<br /> <a href="https://www.naturalearthdata.com/downloads/" rel="nofollow noreferrer">https://www.naturalearthdata.com/downloads/</a></p> <p>They provide land and ocean shapefiles (and much more) which should fit your purpose.</p>
Open source data of the world map that includes longitude and latitude information along with land and sea indicator
python|plot|gps|openstreetmap|world-map
0
70
1
72,954,306
72,954,306
0
true
2022-07-08T11:51:24.243Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Open source data of the world map that includes longitude and latitude information along with land and sea indicator<p>I've came across OpenStreetMap and it'...
72,941,623
An elegant way to extract 'Date' attribute from a File<p>So I have multiple files (on Windows 10 operating system and NTFS file system) with 'Date' attributes as <a href="https://i.stack.imgur.com/fOCvC.png" rel="nofollow noreferrer">here</a></p> <p>'Date' attributes are available in Windows File Explorer in the 'Detai...
<p>So apparently this 'Date' attribute has the same value as 'Last Saved Date' which is attribute specific to Microsoft Office or only (?) Excel files... The method to extract this data from a file in Scala (if you use org.apache.poi.hssf library) can look something like this</p> <pre><code>def getLastSaveDateTime(file...
An elegant way to extract 'Date' attribute from a File
java|scala|file|attributes|filesystems
-2
70
1
72,954,924
72,954,924
0
true
2022-07-11T16:17:31.127Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: An elegant way to extract 'Date' attribute from a File<p>So I have multiple files (on Windows 10 operating system and NTFS file system) with 'Date' attribute...
72,934,295
How can I debug an Azure Cosmos DB stored procedure?<p>I'm getting this error:</p> <pre><code>Error: Resulting message would be too large because of \\\&quot;Body\\\&quot;. Return from script with current message and use continuation token to call the script again or modify your script. </code></pre> <p>When I run:</p>...
<p>I found a tab called console.log next to Result in the Azure Portal under the Javascript code.</p> <p>This displayed any logs from <code>console.log()</code>.</p> <p>With trial and error I found that 1259 was the max the for loop would work with before I got the error.</p> <p>The <code>Body</code> param in the excep...
How can I debug an Azure Cosmos DB stored procedure?
azure-cosmosdb
0
70
1
72,959,272
72,959,272
0
true
2022-07-11T06:02:36.603Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I debug an Azure Cosmos DB stored procedure?<p>I'm getting this error:</p> <pre><code>Error: Resulting message would be too large because of \\\&quot...
72,934,499
How to see if business was in top/bottom 25th percentile in BigQuery?<p>I have data that looks like the following:</p> <pre><code>business_id|business_name| time_value | time_bin |yoy_txn_growth 1111 | A | July 1,2022 | Monthly | .43 2222 | B | July 1,2022 | Monthly | .35 1...
<p>For your requirement, <a href="https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#percentile_cont" rel="nofollow noreferrer">percentile_cont</a> can be used for getting percentiles with <a href="https://cloud.google.com/bigquery/docs/reference/standard-sql/conditional_expressions#i...
How to see if business was in top/bottom 25th percentile in BigQuery?
google-bigquery|percentile
-1
70
1
72,963,474
72,963,474
0
true
2022-07-11T06:28:54.480Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to see if business was in top/bottom 25th percentile in BigQuery?<p>I have data that looks like the following:</p> <pre><code>business_id|business_name| ...
72,964,521
How to JSON replace multiple nested array values in one single SELECT statement<p>I have table field called <code>values</code> which has a current JSON value of the following:</p> <p><code>{&quot;roles&quot;: [&quot;1&quot;,&quot;2&quot;,&quot;3&quot;,&quot;4&quot;]}</code></p> <p>I also have another table called <cod...
<p>You can use <code>json_table</code>:</p> <pre><code>select json_object('role', (select json_arrayagg(r1.role_name) from json_table(t.value, '$.roles[*]' columns(role int path '$')) r join roles r1 on r.role = r1.id)) from vals t </code></pre> <p><a href="https://dbfiddle.uk/?rdbms=mysql_8.0&amp;fiddle=ff07664...
How to JSON replace multiple nested array values in one single SELECT statement
mysql|sql|arrays|json
1
70
1
72,968,345
72,968,345
0
true
2022-07-13T10:11:11.397Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to JSON replace multiple nested array values in one single SELECT statement<p>I have table field called <code>values</code> which has a current JSON valu...
72,962,764
Pandas / Pyspark for loop column substract<p>I'd like to know a way to substract the values vouchers from credit balance in a dataframe.</p> <p>There is a column &quot;credit&quot; that will try to match the vouchers used : &quot;v1&quot;, &quot;v2&quot;, ecc.</p> <p>IS:<br /> <a href="https://i.stack.imgur.com/Mn3ri.p...
<p>One of the many ways to acheive this would be using pandas.apply. <br>See if this helps:</p> <pre><code>import numpy as np import pandas as pd data={ &quot;name&quot;:[&quot;tom&quot;,&quot;jim&quot;], &quot;cummulative&quot;:[17,15], &quot;voucher1&quot;:[10,0], &quot;voucher2&quot;:[5,5], &quot;voucher3...
Pandas / Pyspark for loop column substract
python|pandas|dataframe|for-loop|pyspark
0
70
2
72,970,307
72,970,307
0
true
2022-07-13T07:57:56.687Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Pandas / Pyspark for loop column substract<p>I'd like to know a way to substract the values vouchers from credit balance in a dataframe.</p> <p>There is a co...
72,972,669
Undefined property on object in firebase firestore rules<p>I have been playing around with firestore and the security rules feature. These are my current rules -</p> <pre><code>rules_version = '2'; service cloud.firestore { match /databases/{database}/documents { match /categories/{category} { allow read: i...
<p>An error like that just terminates the evaluation of the expression and rejects access. There are no harmful side-effects. If you're fine with that error resulting in the immediate rejection of access, then it's OK. There would be no advantage to adding additional checks that continue to reject access in the same...
Undefined property on object in firebase firestore rules
firebase|google-cloud-firestore|firebase-security
1
70
1
72,972,929
72,972,929
0
true
2022-07-13T21:08:33.683Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Undefined property on object in firebase firestore rules<p>I have been playing around with firestore and the security rules feature. These are my current rul...
72,981,353
useCollectionOnce infinite loading<p>I'm using <a href="https://github.com/CSFrequency/react-firebase-hooks" rel="nofollow noreferrer">react-firebase-hooks</a> to load data from firestore, and everything is working properly when I use <code>useDocument</code> or <code>useCollection</code>, but when I try to replace the...
<p>React StrictMode causes the problem. I hope that this answer will help someone. For more information see <a href="https://github.com/CSFrequency/react-firebase-hooks/issues/256#issuecomment-1184750056" rel="nofollow noreferrer">https://github.com/CSFrequency/react-firebase-hooks/issues/256#issuecomment-1184750056</a...
useCollectionOnce infinite loading
reactjs|firebase|google-cloud-firestore|react-hooks
1
70
1
72,986,548
72,986,548
0
true
2022-07-14T13:29:15.133Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: useCollectionOnce infinite loading<p>I'm using <a href="https://github.com/CSFrequency/react-firebase-hooks" rel="nofollow noreferrer">react-firebase-hooks</...
72,789,494
Couldn't connect to dpms while creating dataproc using airflow operator<p>I have a service created for dataproc metastore(in same project as composer's) and trying to use it instead of my hive warehouse. I could successfully run this using gcloud commands but when I am trying to use any airflow operators like DataprocC...
<p>I got the answer. Pasting it here if it helps others</p> <pre><code>CLUSTER_CONFIG = { &quot;master_config&quot;: { &quot;num_instances&quot;: 1, &quot;machine_type_uri&quot;: &quot;n1-standard-4&quot;, &quot;disk_config&quot;: {&quot;boot_disk_type&quot;: &quot;pd-standard&quot;, &quot;b...
Couldn't connect to dpms while creating dataproc using airflow operator
google-cloud-platform|hive-metastore|dataproc|airflow-api|google-cloud-dataproc-metastore
0
70
1
72,989,259
72,989,259
0
true
2022-06-28T15:41:59.193Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Couldn't connect to dpms while creating dataproc using airflow operator<p>I have a service created for dataproc metastore(in same project as composer's) and ...
72,990,511
The react state is not changing when I am trying to change it<p><a href="https://i.stack.imgur.com/9w39y.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9w39y.gif" alt="enter image description here" /></a></p> <p>I have a state <code>isCartACtive</code> when I am trying to close it running</p> <pre><...
<p>It works. It opens. It sets to true. But when you try to close you click outside + the icon. So 2 events occur. You are closing it with <code>handleClickOutside</code> and then opening it again with <code>handleCartActive</code>. The right solution would be to use <strong>backdrop</strong>. When the dialog is open, ...
The react state is not changing when I am trying to change it
javascript|reactjs|react-class-based-component
1
70
1
72,991,687
72,991,687
0
true
2022-07-15T07:32:24.683Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: The react state is not changing when I am trying to change it<p><a href="https://i.stack.imgur.com/9w39y.gif" rel="nofollow noreferrer"><img src="https://i.s...
72,993,302
Get value from promise using React/Typescript<p>I was given a snippet of a class named GithubService. It has a method getProfile, returning a promise result, that apparently contains an object that I need to reach in my page component Github.</p> <p>GithubService.ts</p> <pre><code>class GithubService { getProfile(log...
<p>as you are using React, consider making use of the <a href="https://reactjs.org/docs/hooks-reference.html#usestate" rel="nofollow noreferrer">useState</a> and <a href="https://reactjs.org/docs/hooks-effect.html" rel="nofollow noreferrer">useEffect</a> hooks.</p> <p>Your Code could then look like below, here's a work...
Get value from promise using React/Typescript
reactjs|typescript|promise
0
70
3
72,993,760
72,993,760
0
true
2022-07-15T11:30:32.890Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Get value from promise using React/Typescript<p>I was given a snippet of a class named GithubService. It has a method getProfile, returning a promise result,...
72,998,570
How to upload file to virtual folder in blob container?<p>I'm currently working on a function to upload a file to a virtual folder that is in my blob container. E.g. I want to upload the file into &quot;container1\folder&quot; rather than &quot;container1&quot;.</p> <p>So far, I am able to upload the file directly into...
<p>You can just prepend the path to the filename</p> <pre class="lang-py prettyprint-override"><code>var file_name = &quot;file.txt&quot;; var folder_name = &quot;folder1&quot;; var blobpath = f&quot;{folder_name}/{file_name}&quot;; file_path = &quot;C:\Users\____\Desktop\test.txt&quot; blob_client = blob_service_c...
How to upload file to virtual folder in blob container?
python|azure|azure-blob-storage
0
70
1
72,998,665
72,998,665
0
true
2022-07-15T19:00:55.287Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to upload file to virtual folder in blob container?<p>I'm currently working on a function to upload a file to a virtual folder that is in my blob contain...
73,008,645
(Python) data = "{:^13} {:<11} {:<6}\n"<p>Can't understand the bold line of code in python: data = &quot;{:^13} {:&lt;11} {:&lt;6}\n&quot; I know there is a string but what's the meaning of the symbold &quot;{}&quot; &quot;^&quot; &quot;&lt;&quot; in this string?The code is from here:</p> <p>#Run this prior to starti...
<p>Here is simple example:</p> <pre class="lang-py prettyprint-override"><code>line_to_format = &quot;|{var1:^13}|{var2:&lt;11}|{:&lt;6}|&quot; line_to_format.format(&quot;123&quot;, var1=&quot;abc&quot;, var2=&quot;def&quot;) </code></pre> <p>and output:</p> <pre><code>'| abc |def |123 |' </code></pre...
(Python) data = "{:^13} {:<11} {:<6}\n"
python
0
70
1
73,008,807
73,008,807
0
true
2022-07-17T01:12:21.900Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: (Python) data = "{:^13} {:<11} {:<6}\n"<p>Can't understand the bold line of code in python: data = &quot;{:^13} {:&lt;11} {:&lt;6}\n&quot; I know there is ...
72,970,855
Gst-launch How do i edit this pipeline so play the audio?<p>As title, how can I change this so it also plays the files audio too?</p> <pre><code>gst-launch-1.0 filesrc location='/usr/share/myfile.mp4' ! qtdemux ! h264parse ! imxvpudec ! imxipuvideosink framebuffer=/dev/fb2 &amp; </code></pre> <p>The I can get the file ...
<p>I posted a link to this question into the gstreamer reddit and a hero called Omerzet saved the day.</p> <p>The following is the solution:</p> <pre><code>gst-launch-1.0 filesrc location='/usr/share/myfile.mp4' ! qtdemux name=demux demux.video_0 ! queue ! h264parse ! imxvpudec ! imxipuvideosink framebuffer=/dev/fb2 de...
Gst-launch How do i edit this pipeline so play the audio?
gstreamer|gst-launch-1.0
-1
70
1
73,011,638
73,011,638
0
true
2022-07-13T18:15:27.013Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Gst-launch How do i edit this pipeline so play the audio?<p>As title, how can I change this so it also plays the files audio too?</p> <pre><code>gst-launch-1...
73,006,452
React Native - Strange error caught - {"line":25722,"column":33,"sourceURL":"http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=<p>My react native application is running on android virtual device (API 23)</p> <p>Android Gradle Plugin Version - 7.2.0 Gradle Version - 7.4.2</p> <p>build.gradle</p> <pre><c...
<p>Just remove JSON.stringify like so:</p> <pre><code>console.log(‘ERROR: ‘, error) </code></pre> <p>And you ‘ll see the error message as expected.</p>
React Native - Strange error caught - {"line":25722,"column":33,"sourceURL":"http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=
javascript|android|react-native
0
70
1
73,012,389
73,012,389
0
true
2022-07-16T17:47:48.050Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: React Native - Strange error caught - {"line":25722,"column":33,"sourceURL":"http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=<p>My react n...
73,015,194
React- Firebase: Uncaught TypeError: firebase.firestore is not a function<p>So I have tried methods in &quot;similar question&quot; with no luck so therefore making new one.</p> <p>I got 2 files,</p> <p><strong>1: firebase.js:</strong></p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" dat...
<p>First of all, you're mixing two different syntax. The web version 8 which is the dot notation of Firestore and web version 9 which is the modular syntax of Firestore. If you still want to use the web version 8 then you need to use the <code>compat</code> version when using the latest package of Firebase. See the fol...
React- Firebase: Uncaught TypeError: firebase.firestore is not a function
javascript|reactjs|firebase|google-cloud-firestore
1
70
1
73,017,218
73,017,218
0
true
2022-07-17T20:38:44.203Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: React- Firebase: Uncaught TypeError: firebase.firestore is not a function<p>So I have tried methods in &quot;similar question&quot; with no luck so therefore...
73,016,282
How do I make a table row an array?<p>If you add table rows as shown in the code below, they are stored in one row when they are saved in the database.</p> <pre><code>function addRow() { var table = document.getElementById(&quot;table&quot;); var row = table.insertRow(0); var cell1 = row.insertCell(0); ...
<p>You are posting a singular entity asfar as i can see. To post a list for a start you have to modify controller to accept said list</p> <pre class="lang-java prettyprint-override"><code>@RequestMapping(&quot;/testCase/register&quot;) public String register(List&lt;TestCase&gt; testCases) { testCaseService.registe...
How do I make a table row an array?
javascript|spring-boot|spring-data-jpa|mariadb|thymeleaf
0
70
2
73,019,165
73,019,165
0
true
2022-07-18T00:29:02.270Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I make a table row an array?<p>If you add table rows as shown in the code below, they are stored in one row when they are saved in the database.</p> <...
72,972,827
callback with results of apply in terraform provider<p>I'm writing a custom terraform provider. I need to wrap the calls to the backed API in a &quot;session&quot;, opening it before any calls are made and then closing it once all the terraform calls have completed.</p> <p>Opening the session is straightforward, I can ...
<p>After a fair amount of floundering I have what I believe to be a reasonable solution, and it even matches @Ben Hoyt's comment. We can defer and teardown in main.</p> <pre><code> func main() { var prov *schema.Provider defer func() { xyz.PrividerTeardown(prov) }() plugin.Serve(&amp;plugin.Serv...
callback with results of apply in terraform provider
go|terraform-provider
0
70
1
73,023,101
73,023,101
0
true
2022-07-13T21:28:28.700Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: callback with results of apply in terraform provider<p>I'm writing a custom terraform provider. I need to wrap the calls to the backed API in a &quot;session...
73,026,735
Continuously get the difference of integers in an array until the array size becomes one<p>I have an array:</p> <pre class="lang-java prettyprint-override"><code>int[] array= {5, 7, 16, 3, 2} </code></pre> <p>I want to develop an application that takes the difference of the elements up to a single element in the array....
<p>Try this:</p> <pre><code> int[] temp = {5, 7, 16, 3, 2}; int[] temp2 = new int[temp.length]; while (temp.length &gt; 1) { temp2 = new int[temp2.length - 1]; for (int i=0; i &lt; temp.length - 1; i++) { temp2[i] = temp[i + 1] - temp[i]; } temp = temp2; Sy...
Continuously get the difference of integers in an array until the array size becomes one
java|arrays|sorting|arraylist|integer
-1
70
3
73,027,124
73,027,124
0
true
2022-07-18T18:06:03.253Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Continuously get the difference of integers in an array until the array size becomes one<p>I have an array:</p> <pre class="lang-java prettyprint-override"><...
73,027,214
How to center items in a div (CSS) in a grid (justify-content and align-items not working)<p>I have a div with <code>grid</code> layout, with several divs inside. I want the divs inside the grid to be full-height, and I want the content of the divs inside the grid to be centered vertically. I already looked all over th...
<p>If I am not mistaken it should be so. Just on the &quot;card&quot; class:</p> <p>display: flex; align-items: center;</p> <p>Adding a div inside will put it in the center.</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippe...
How to center items in a div (CSS) in a grid (justify-content and align-items not working)
html|css|css-grid
0
70
4
73,027,497
73,027,497
0
true
2022-07-18T18:48:55.960Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to center items in a div (CSS) in a grid (justify-content and align-items not working)<p>I have a div with <code>grid</code> layout, with several divs in...
73,030,030
getting a document from firestore, in a method that returns undefined<p>so, i'm trying to get a single document from a collection, using the id from the current user, the request [getDoc] works, but when i'm trying to return the information from the exported function is where i', having all the problems, the function ...
<p>The top-level code in your <code>getUserInfo</code> function doesn't return any value, so the <code>await</code> you use when calling that function is meaningless - as is the <code>return doc</code> inside the <code>getDoc</code> callback.</p> <p>Since you want to await the async operations, you'll need to return a ...
getting a document from firestore, in a method that returns undefined
javascript|google-cloud-firestore|firebase-authentication
0
70
1
73,030,295
73,030,295
0
true
2022-07-19T00:57:39.743Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: getting a document from firestore, in a method that returns undefined<p>so, i'm trying to get a single document from a collection, using the id from the cur...
73,030,967
How to keep a number saved after page refresh<p>As the title, I need to let the number can continue increase after refresh the webpage but now the number will reset after refresh the webpage. Anyone know how to solve it?</p> <pre><code>Here is the number &lt;form method=&quot;POST&quot;&gt; &lt;div sty...
<p>This should work for you <code>NOTE</code>: Your code stop counting when <code>num2 = 9</code> Do not try this code snippet here, stack overflow disallow using <code>local storage</code></p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <p...
How to keep a number saved after page refresh
javascript|php
1
70
3
73,031,106
73,031,106
0
true
2022-07-19T03:59:00.490Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to keep a number saved after page refresh<p>As the title, I need to let the number can continue increase after refresh the webpage but now the number wil...
72,883,955
Custom Floating Text Field - Swift<p>I want to create a custom text field when I started to input label should float to top-left. I know there is some libraries to make that but I want to do it myself. I found some blog about that but these are generally make that in viewController but I'll use this format in many page...
<p>I found that medium blog and use that for my project.</p> <p><a href="https://medium.com/sprinthub/creating-a-custom-floating-label-style-text-field-in-swift-f9f6aeaf39fe" rel="nofollow noreferrer">https://medium.com/sprinthub/creating-a-custom-floating-label-style-text-field-in-swift-f9f6aeaf39fe</a></p>
Custom Floating Text Field - Swift
ios|swift|uitextfield
0
70
1
73,037,429
73,037,429
0
true
2022-07-06T12:56:15.557Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Custom Floating Text Field - Swift<p>I want to create a custom text field when I started to input label should float to top-left. I know there is some librar...
73,016,602
Change form location using nlua<p>I'm writing a simple program in c# using .net framework 4.8, winforms, and nlua. I want to change the location of my main form using a lua script. Here is what I tried:</p> <pre><code>public partial class MainForm : Form { public MainForm() { InitializeComponent(); ...
<p>Try to add</p> <p><code>import(&quot;System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&quot;)</code></p> <p>The <a href="https://github.com/NLua/NLua/blob/main/extras/examples/form.lua#L5" rel="nofollow noreferrer">form.lua</a> used to work</p>
Change form location using nlua
c#|.net|winforms|lua|nlua
-1
70
2
73,040,059
73,040,059
0
true
2022-07-18T01:52:22.367Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Change form location using nlua<p>I'm writing a simple program in c# using .net framework 4.8, winforms, and nlua. I want to change the location of my main f...
72,786,760
How to parse an xml file in android?<p>I have an XML file like</p> <pre><code>&lt;container xmlns=&quot;urn:oasis:names:tc:opendocument:xmlns:container&quot; version=&quot;1.0&quot;&gt; &lt;rootfiles&gt; &lt;rootfile full-path=&quot;OEBPS/content.opf&quot; media-type=&quot;application/oebps-package+xml&quot;...
<p>I found a way to access the attribute values. I have explained all the lines in the comments.</p> <pre><code> DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); Document doc = builder.parse(file); // We can use inputstream or uri also ...
How to parse an xml file in android?
java|android|xml|xml-parsing
0
70
2
73,134,261
73,134,261
0
true
2022-06-28T12:51:14.997Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to parse an xml file in android?<p>I have an XML file like</p> <pre><code>&lt;container xmlns=&quot;urn:oasis:names:tc:opendocument:xmlns:container&quot;...
72,857,382
Loop over dataframe and change value by compared to the previous line value<p>i need to do a loop over rows of dataframe. My goal is to change value compared to the previous line value. For instance, it's my dataframe :</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>index</th> <th>date</th...
<p>IIUC your code, you can use <code>rolling</code>:</p> <pre><code>ffill = lambda x: pd.DataFrame(x.rolling('30T', on='date')['value_dex'].max(), index=x.index) df['value_dex'] = df.groupby('id', as_index=False).apply(ffill) print(df) # Output date id valu...
Loop over dataframe and change value by compared to the previous line value
python|pandas|loops
1
70
1
72,857,585
72,857,585
0
true
2022-07-04T13:15:47.257Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Loop over dataframe and change value by compared to the previous line value<p>i need to do a loop over rows of dataframe. My goal is to change value compared...
72,941,086
Amcharts 5 bar Chart Race - valueAxis (reset on chart replay)<p>This is a long shot - I modified the off-the-shelf amcharts 5 bar chart (race) - among other things, I added a pause/play button that includes a replay option to restart the chart from the first year.</p> <p>The restart function works fine, except that:</p...
<p>This works - it will reset the series and the x-axis, so that the chart will redisplay exactly the same each time it's replayed.</p> <pre><code> function togglePlayButtonReInit () { // recalibrate xAxis chart.yAxes.removeIndex ( chart.yAxes.indexOf ( yAxis ) ); chart.xAxes.removeIndex ...
Amcharts 5 bar Chart Race - valueAxis (reset on chart replay)
amcharts5
0
70
1
72,960,477
72,960,477
0
true
2022-07-11T15:34:51.513Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Amcharts 5 bar Chart Race - valueAxis (reset on chart replay)<p>This is a long shot - I modified the off-the-shelf amcharts 5 bar chart (race) - among other ...
72,881,734
Segmentation Fault While Querying the KB using pyswip with ROS<p>I built a <code>ROS</code> Package to run this script called <code>planner_node.py</code> to interface with Prolog Knowledge Base(KB):</p> <pre class="lang-py prettyprint-override"><code>#! /bin/env python3 from pyswip import Prolog import rospy from std...
<p>I resolved the issue by using <a href="https://github.com/knowrob/rosprolog" rel="nofollow noreferrer">rosprolog</a> instead of pyswip.</p> <p>Here is an <a href="https://github.com/chcorbato/rosprolog_examples/blob/main/src/example_query_prolog.py" rel="nofollow noreferrer">example</a></p> <pre><code>#!/usr/bin/env...
Segmentation Fault While Querying the KB using pyswip with ROS
python|prolog|segmentation-fault|ros|swi-prolog
0
70
2
72,931,232
72,931,232
0
true
2022-07-06T10:16:16.793Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Segmentation Fault While Querying the KB using pyswip with ROS<p>I built a <code>ROS</code> Package to run this script called <code>planner_node.py</code> to...
73,001,911
Can someone explain this for/in loop to me?<pre><code>/* Write each function according to the instructions. When a function's parameters reference `cart`, it references an object that looks like the one that follows. { &quot;Gold Round Sunglasses&quot;: { quantity: 1, priceInCents: 1000 }, &quot;Pink ...
<p>If you try to run below program then it will be easier for you to visualize everything.</p> <p>What is happening is item is just the index of element and for an object we can either use the key name to access its value or its index.</p> <p>You can read <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript...
Can someone explain this for/in loop to me?
javascript|for-in-loop
0
70
2
73,001,954
73,001,954
0
true
2022-07-16T06:05:05.430Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can someone explain this for/in loop to me?<pre><code>/* Write each function according to the instructions. When a function's parameters reference `c...
72,770,377
Qt: How to pass parameters in url to rest api in Qt?<p>I need to connect to Rest API on the server in Qt and I can get token and authenticate but there is a problem and that is when i'm sending some parameters to Rest API like this :<code>&quot;http//localhost:44444/api/Getmojodi?Code=1234&quot;</code> it returns empty...
<p>For this problem I checked API request in <a href="https://www.postman.com" rel="nofollow noreferrer">postman</a> and there was hidden headers that I didn't know about them and added this headers to my request in qt and it worked very well.code is like this :</p> <pre><code>QUrl url(&quot;http://localhost:59444/api/...
Qt: How to pass parameters in url to rest api in Qt?
rest|qt
0
70
2
72,829,041
72,829,041
0
true
2022-06-27T10:12:28.283Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Qt: How to pass parameters in url to rest api in Qt?<p>I need to connect to Rest API on the server in Qt and I can get token and authenticate but there is a ...
72,986,023
Why is my prolog predicate returning 'true' rather than the desired list?<pre><code>append_green([],[],X,X,5):- write('Final Green: '), writeln(X). append_green([CorrectHead|CorrectTail], [GuessHead|GuessTail], Grn, _FinalGreen, N):- N &lt; 5, ( CorrectHead = GuessHead -&gt; replace(Grn,N,Gue...
<p>Although this is not the main cause of the error in your code, it is worth noting that there is no need to use the predicate <code>replace/4</code> to solve the problem:</p> <pre><code>% update_green(+Correct, +Guess, +gReen, -Updated) updated_green([], [], R, R). updated_green([C|Cs], [G|Gs], [R|Rs], [U|Us]):-...
Why is my prolog predicate returning 'true' rather than the desired list?
list|recursion|prolog
0
70
1
72,994,815
72,994,815
0
true
2022-07-14T19:57:53.320Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why is my prolog predicate returning 'true' rather than the desired list?<pre><code>append_green([],[],X,X,5):- write('Final Green: '), writeln(X). ...
72,885,849
Empty Console Output Python<p>I added and used undetected_chromedriver library, and after that the program stopped working. Did I do something wrong? <strong>Nothing is written in the console</strong></p> <pre><code>from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.chrom...
<p>I never figured out the options, but the problem was with the path. You need to use <code>driver_executable_path=&quot;&quot;</code>. And add the module import check <code>if __name__ == '__main__':</code>, and put all the code there. Now the program looks like this:</p> <pre><code>from selenium import webdriver fro...
Empty Console Output Python
python|selenium|console|output
0
70
2
72,896,056
72,896,056
0
true
2022-07-06T15:03:05.970Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Empty Console Output Python<p>I added and used undetected_chromedriver library, and after that the program stopped working. Did I do something wrong? <strong...
72,949,708
Run Flask on 127.0.0.2, get error "Can't assign requested address"<p>I heard that all the 127.x.x.x are loopback IPs. So I try to run Flask on 127.0.0.2 but It gets error &quot;Can't assign requested address&quot; instead. While it works fine on 127.0.0.1</p> <p>So how can I run flask on 127.0.0.x ?</p>
<p>Looks like your OS is a MacOS. MacOS using only <code>127.0.0.1</code> for loopback interface</p> <p>But it is possible to assign <code>127.0.0.XX</code> aliases manually</p> <p><a href="https://superuser.com/questions/458875/how-do-you-get-loopback-addresses-other-than-127-0-0-1-to-work-on-os-x">This article</a> ha...
Run Flask on 127.0.0.2, get error "Can't assign requested address"
python|flask
0
70
2
72,951,396
72,951,396
0
true
2022-07-12T09:06:40.537Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Run Flask on 127.0.0.2, get error "Can't assign requested address"<p>I heard that all the 127.x.x.x are loopback IPs. So I try to run Flask on 127.0.0.2 but ...
72,987,106
How do I elegantly call a bunch of methods on one object?<p>I apologize if this seems like an obvious question, but I cannot find the word to search for to describe this.</p> <p>I am currently writing this:</p> <pre><code>foo.cat() foo.dog() foo.fish() foo.moose() foo.horse() ... </code></pre> <p>I'd rather write this:...
<p>If you want to shorten &quot;foo&quot;, you can do</p> <pre><code>for f in [foo]: f.dog() f.cat() f.fish() f.horse() del f # deletes f to avoid leaving orphan variables </code></pre>
How do I elegantly call a bunch of methods on one object?
python|python-3.x
-1
70
3
72,987,446
72,987,446
0
true
2022-07-14T22:06:13.017Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I elegantly call a bunch of methods on one object?<p>I apologize if this seems like an obvious question, but I cannot find the word to search for to d...
72,881,262
BUTTON to move data from multiple google sheets into one master<p>My boss told to move same set of data from 40 multiple google sheets into one master sheets which are filled by 40 people separately currently am working on it with an ADD on function is there any way to put a submit button on each sheets so that when us...
<p>Try this</p> <pre><code>const ignoreSheets = [&quot;Verified NDRx&quot;,&quot;Business Tracker&quot;,&quot;NDRX&quot;,&quot;PMT_EBx&quot;,&quot;PMT_EBx.&quot;,&quot;NDRx PMT Business Tracker.&quot;,&quot;Analysis&quot;]; const masterSheet = &quot;ASM-A30&quot;; function compile() { let result = [] SpreadsheetApp...
BUTTON to move data from multiple google sheets into one master
javascript
0
70
1
72,881,460
72,881,460
0
true
2022-07-06T09:43:51.910Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: BUTTON to move data from multiple google sheets into one master<p>My boss told to move same set of data from 40 multiple google sheets into one master sheets...
72,832,476
Convert a For loop to a lambda expression in Java<p>I have the following code</p> <pre><code>//assume we have a list of custom type &quot;details&quot; already constructed for(int i = 0; i &lt; details.size(); ++i) { CallerID number = details.get(i).getNextNumber(); ClientData.addToClient(number); ...
<blockquote> <p>I am asking for help converting this loop to a lambda function so I can understand the logic of how to do so, then fill in the appropriate code as needed.</p> </blockquote> <p>A <code>Function</code> returns a value. As you are just updating something what you need is a <code>Consumer</code> which acce...
Convert a For loop to a lambda expression in Java
java|loops|lambda
-1
70
2
72,833,156
72,833,156
0
true
2022-07-01T16:54:46.490Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Convert a For loop to a lambda expression in Java<p>I have the following code</p> <pre><code>//assume we have a list of custom type &quot;details&quot; alrea...
72,962,096
MSYS2 UCRT64 ld can't find -lpython39<p>I am trying to use cargo to build a rust project that uses python. The rustup I installed was targeted for the GNU ABI in MSYS2, and when I try to <code>cargo build</code>, and I get an error saying that ld can't find the python library, despite it being installed.</p> <pre><code...
<p>I was able to fix this by installing <code>python-devel</code> and adding to my LD_LIBRARY_PATH by adding to my <code>~/.bashrc</code></p> <pre><code>export LD_LIBRARY_PATH=&quot;/usr/lib&quot; </code></pre> <p>I figured this out because on a fresh install of Ubuntu, I had the exact same error, and bafflingly, the e...
MSYS2 UCRT64 ld can't find -lpython39
python|windows|rust|ld|msys2
1
70
2
73,008,452
73,008,452
0
true
2022-07-13T06:58:50.267Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: MSYS2 UCRT64 ld can't find -lpython39<p>I am trying to use cargo to build a rust project that uses python. The rustup I installed was targeted for the GNU AB...
72,952,423
shapefile and dataset aggregate into one by coordinates<p>I have a shapefile like this (ms_shp)</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>Region</th> <th>Residuals</th> <th>Residuals 1</th> <th>Residuals2</th> <th>Residuals 3</th> <th>geometry</th> </tr> </thead> <tbody> <tr> <td>1</t...
<p>I'm currently working on something similar, the function exact_extract from the package exactextractr has worked very well in terms of processing time and ease of use. The following code will calculate the mean of variable z from every value within each polygon.</p> <pre><code>library(exactextractr) library(raster) ...
shapefile and dataset aggregate into one by coordinates
r
0
70
2
72,952,734
72,952,734
0
true
2022-07-12T12:35:06.517Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: shapefile and dataset aggregate into one by coordinates<p>I have a shapefile like this (ms_shp)</p> <div class="s-table-container"> <table class="s-table"> <...
72,867,366
How to show the text of the <li> inside the text of Select_Button?<p>I'm getting confused in this part. I have a list <code>li</code> and I would like to select one item on the list and then show the text to the <code>Select Button</code>. What the SelectButton do is to open the Select_list but then I need to select a ...
<p>You need to pass the button's label to the SelectButton (child) component, and use the <strong>'li' onclick event</strong> to modify this label :</p> <h5><a href="https://stackblitz.com/edit/react-ts-aurnm6?file=App.tsx" rel="nofollow noreferrer">Working Stackblitz (MCVE)</a></h5> <hr /> <pre class="lang-js prettypr...
How to show the text of the <li> inside the text of Select_Button?
javascript|html|reactjs
1
70
2
72,896,222
72,896,222
0
true
2022-07-05T09:51:48.523Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to show the text of the <li> inside the text of Select_Button?<p>I'm getting confused in this part. I have a list <code>li</code> and I would like to sel...
72,960,772
LINQ to get unique id that has list of items<p>I am trying to generate a list result through linq. I would like to have a result as a list with unique folder id with 0th item as folder_name, 1st Item as a list with one or more projects having fields project_id,name and description. I have written following query: Folde...
<p>You can query like this:</p> <pre><code>var result = resultModel .folders .GroupBy(x =&gt; new { x.folder_id }) .Select(s =&gt; new { folder_id = s.Key, folder_name = s.First().folder_name }) .ToList(); </code></p...
LINQ to get unique id that has list of items
c#|sql|list|linq
0
70
2
72,961,233
72,961,233
0
true
2022-07-13T03:57:44.940Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: LINQ to get unique id that has list of items<p>I am trying to generate a list result through linq. I would like to have a result as a list with unique folder...
72,940,250
ComboBox display wrongly<p>I have a code which display the text of the cell underneath it. However, it seems that the Combobox just refuse to display the correct text. As you can see in the screenshot</p> <ul> <li>The <code>Text</code> property is different from the displaying text. It's the previous value.</li> <li><c...
<p>After weeks of frustration, I am please to announce that I found out the cause. It was the Freeze Panes that affects the display of combobox. Particularly, ComboBox placed in freezed column is not refreshed as frequently as in other cell. In that area, combobox almost act as it's disabled (visually). No text changes...
ComboBox display wrongly
vba|combobox
0
70
1
72,964,489
72,964,489
0
true
2022-07-11T14:34:05.493Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: ComboBox display wrongly<p>I have a code which display the text of the cell underneath it. However, it seems that the Combobox just refuse to display the cor...
72,821,847
How to merge different operators with the same logic in C++ class for not copypasting<p>Is it possible to merge some operators of class that have same logic but different operators to not copypasting. For example, I have class with operators <code>+=</code>, <code>-=</code>:</p> <pre><code>class Matrix { public: Fu...
<p>You can do it by passing a lambda to a common implementation:</p> <pre><code>class Matrix { private: template&lt;typename Op&gt; Functor&amp; opImpl(const Functor&amp; rhs, Op op) { for (int i = 0; i &lt; rows_; ++i) { for (int j = 0; j &lt; columns_; ++j) { Op(v[i][j], rhs.v[i]...
How to merge different operators with the same logic in C++ class for not copypasting
c++|class|c++11|c++17|operator-overloading
1
70
1
72,821,905
72,821,905
0
true
2022-06-30T20:47:53.880Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to merge different operators with the same logic in C++ class for not copypasting<p>Is it possible to merge some operators of class that have same logic ...
73,001,746
WordPress form handling with admin-ajax<p>There is the official documentation of the form handling with <code>admin_post_{$action}</code></p> <p><a href="https://developer.wordpress.org/reference/hooks/admin_post_action/" rel="nofollow noreferrer">https://developer.wordpress.org/reference/hooks/admin_post_action/</a></...
<p><strong>Form</strong></p> <pre><code>&lt;form id=&quot;contact-form&quot;&gt; &lt;input id=&quot;fname&quot; placeholder=&quot;First Name&quot; type=&quot;text&quot; name=&quot;fname&quot;&gt; &lt;input id=&quot;lname&quot; placeholder=&quot;Last Name&quot; type=&quot;text&quot; name=&quot;lname&quot;&gt; &...
WordPress form handling with admin-ajax
php|wordpress
0
70
1
73,002,403
73,002,403
0
true
2022-07-16T05:25:09.320Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: WordPress form handling with admin-ajax<p>There is the official documentation of the form handling with <code>admin_post_{$action}</code></p> <p><a href="htt...
73,028,021
Intellij: Refactor Change Method Signature to change an abstract method from void to Int, but also add return -1 to all subclasses<p>Long story short personal project of mine, I am trying to re-do the implementation of something. However, there are many uses of this method and it would take me too much time to do it ma...
<p>Depending on the complexity of your <code>irrelevant code</code> you might be able to get away with using a regex for this.</p> <p>Something along the lines of:<br /> Find: <code>(\@Override\npublic void run\(int a\, int b\) \{)(.|\n*?)(^})</code><br /> Replace: <code>$1$2return -1;\n$3</code></p> <hr /> <p>Find exp...
Intellij: Refactor Change Method Signature to change an abstract method from void to Int, but also add return -1 to all subclasses
java|intellij-idea|refactoring|return-type|intellij-plugin
0
70
2
73,028,219
73,028,219
0
true
2022-07-18T20:06:32.130Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Intellij: Refactor Change Method Signature to change an abstract method from void to Int, but also add return -1 to all subclasses<p>Long story short persona...
72,777,833
awk: search and concatenate string in a single line<p>I've a text file with this data</p> <pre><code>set( VERSION_MAJOR 1 ) set( VERSION_MINOR 2 ) set( VERSION_PATCH 3 ) </code></pre> <p>I'm looking to make a string like this and save in a new file.</p> <pre><code>VERSION 1.2.3 </code></pre> <p>I tried following code,...
<p>Assumptions:</p> <ul> <li>there may be other lines in the file besides the 3x <code>VERSION_</code> entries</li> <li>spacing is exactly as depicted in the example, ie, the desired numbers are in the 3rd space-delimited field</li> </ul> <p>If you find yourself calling <code>awk</code> multiple times chances are prett...
awk: search and concatenate string in a single line
awk|sed
-2
70
4
72,778,202
72,778,202
0
true
2022-06-27T20:14:38.633Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: awk: search and concatenate string in a single line<p>I've a text file with this data</p> <pre><code>set( VERSION_MAJOR 1 ) set( VERSION_MINOR 2 ) set( VERS...
72,827,366
C++ output producing random long integers<p>I recently coded a question, and I have debugged and figured out where the problem is but cannot quite place a finger on it. My program aims to merge groups of sectors if they overlap or are next to each other, but the last section is scrambling the output.</p> <pre><code>#in...
<p>Pointing out some issues with the code above, many of which you can get reported by using compiler options:</p> <ul> <li><code>umbrellas[u][2]</code> and <code>groups[u][2]</code>: these are variable length arrays; they're not standard C++.</li> <li><code>n</code>, <code>k</code>, and <code>x</code> are declared, re...
C++ output producing random long integers
c++
0
70
1
72,829,177
72,829,177
0
true
2022-07-01T09:43:00.800Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: C++ output producing random long integers<p>I recently coded a question, and I have debugged and figured out where the problem is but cannot quite place a fi...
72,832,186
Limit drag in single direction and to a specific location<p>I am trying to make a custom notification control for winform. I'm currently trying to make it draggable to a specific direction (say right). Also I don't want the notification to go beyond the Initial location where it first appeared.</p> <p>Currently I've wr...
<p>After tinkering a lot, I found a solution that is somewhat near to my expectation. What I did is that I introduced a new variable that records the Starting location of the notification which is compared with current location during a mouse up event.</p> <p>Here is the new code:</p> <pre><code>private int cordX, cord...
Limit drag in single direction and to a specific location
c#|windows|winforms|.net-4.6.1
0
70
2
72,836,923
72,836,923
0
true
2022-07-01T16:26:09.530Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Limit drag in single direction and to a specific location<p>I am trying to make a custom notification control for winform. I'm currently trying to make it dr...
72,961,113
How can I install libdouble-conversion-dev on Ubuntu 18.04?<p>I tried installing the <strong>libdouble-conversion-dev</strong> package using <code>sudo apt-get install libdouble-conversion-dev</code> but failed with the following output:</p> <pre><code>Package libdouble-conversion-dev is not available, but is referred ...
<p>You can manually install a Debian package on a compatible Ubuntu host with <code>sudo dpkg -i $name_of_package_file</code>.</p>
How can I install libdouble-conversion-dev on Ubuntu 18.04?
installation|ubuntu-18.04
0
70
1
72,961,246
72,961,246
0
true
2022-07-13T04:54:13.500Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I install libdouble-conversion-dev on Ubuntu 18.04?<p>I tried installing the <strong>libdouble-conversion-dev</strong> package using <code>sudo apt-g...
72,817,283
ActiveMQ Artemis Shared Storage slave fail to start if master is not started<p>We have a master/slave setup with the shared storage strategy. We observed that if we start the slave when the master is down, we have the following message:</p> <pre><code>AMQ221032: Waiting to become backup node </code></pre> <p>And the se...
<p>Generally speaking what you're seeing is <em>not</em> the expected behavior for master/slave using shared storage. If the master is not started and the slave is started then the slave should acquire the lock on the shared storage and start. I just tested this out using the <code>transaction-failover</code> example w...
ActiveMQ Artemis Shared Storage slave fail to start if master is not started
activemq-artemis|failover
0
70
1
72,851,346
72,851,346
0
true
2022-06-30T14:09:03.530Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: ActiveMQ Artemis Shared Storage slave fail to start if master is not started<p>We have a master/slave setup with the shared storage strategy. We observed tha...
72,798,174
creating new columns based on several conditions in R<p>I have a data frame consisting of three columns and the unique values for status are as follows &quot;X&quot; &quot;0&quot; &quot;C&quot; &quot;1&quot; &quot;2&quot; &quot;3&quot; &quot;4&quot; &quot;5&quot;. In the beginning, I do not know how to group by each id...
<p>A base R solution can be to create a custom function and apply it on each group, i.e.</p> <pre><code>MyFunction &lt;- function(x){ month_begin = length(x) paid_off = sum(x == 'C') num_of_pastdues = sum(x %in% 0:5) no_loan = sum(x == 'X') target = ifelse(any(x %in% 2:5), 1, 0) return(c(month_begin=month_b...
creating new columns based on several conditions in R
r|dataframe|merge|conditional-formatting|feature-engineering
1
70
4
72,798,795
72,798,795
0
true
2022-06-29T08:28:53.420Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: creating new columns based on several conditions in R<p>I have a data frame consisting of three columns and the unique values for status are as follows &quot...
72,768,847
Collection of a type that does not have equals and hashCode<p>I have to use a type from a 3rd party library that does not have <code>equals</code> and <code>hashCode</code>.</p> <p>In my example this will be played by the class <code>Box</code> which contains some data. I have create a custom static method which compar...
<p>Since you can't provide <code>equals</code> and <code>hashCode</code>, most collections are out of the question. This leaves us only with tree structures(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/TreeMap.html" rel="nofollow noreferrer">TreeMap</a> to be precise) and custom <a href="https://docs.or...
Collection of a type that does not have equals and hashCode
java|equals
2
70
1
72,770,513
72,770,513
1
true
2022-06-27T08:07:15.607Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Collection of a type that does not have equals and hashCode<p>I have to use a type from a 3rd party library that does not have <code>equals</code> and <code>...
72,775,490
C++20: Validate Template Bodies Against Concepts<p>C++20 introduces concepts, which allows us to specify in the <em>declaration</em> of a template that the template parameters must provide certain capabilities. If a template is instantiated with a type that does not satisfy the constraints, compilation will fail at in...
<p>TL;DR: no.</p> <p>The design for the original C++11 concepts included validation. But when that was abandoned, the new version was designed to be much more narrow in scope. The new design was originally built on <code>constexpr</code> boolean conditions. The eventual <code>requires</code> expression was added to mak...
C++20: Validate Template Bodies Against Concepts
c++|templates|c++20|c++-concepts
0
70
2
72,776,032
72,776,032
1
true
2022-06-27T16:32:58.400Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: C++20: Validate Template Bodies Against Concepts<p>C++20 introduces concepts, which allows us to specify in the <em>declaration</em> of a template that the t...
72,782,449
nltk stopwords - AttributeError: 'function' object has no attribute 'words'<p>This is my import:</p> <pre><code>from nltk.corpus import stopwords </code></pre> <p>And this is my code:</p> <pre><code>def stopwords(text): &quot;&quot;&quot;a function for removing the stopword&quot;&quot;&quot; sw = stopwords.words('engli...
<p>Hello the problem is that you've named your function like the nltk.corpus module. You should find an other name for your function and it'll work I think.</p>
nltk stopwords - AttributeError: 'function' object has no attribute 'words'
python|error-handling|nlp|nltk|stop-words
0
70
1
72,782,983
72,782,983
1
true
2022-06-28T07:38:41.697Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: nltk stopwords - AttributeError: 'function' object has no attribute 'words'<p>This is my import:</p> <pre><code>from nltk.corpus import stopwords </code></pr...
72,954,374
Making a rust wasm bindgen future example from cc::Build<p><em>I don't mean to ask too much, but I think I have surpassed the basic requirements using the Rust VS Code formatter</em>. I'm positive futures are needed, and I believe the <code>run_until</code> local pool method can execute the operation. <strong>I think a...
<p>Turns out, wasm-bindgen is not required for the <code>cc::Build</code> use case/the only use case for the latter.</p> <pre><code>use serde::Serialize; use std::{ collections::HashMap, future::Future, mem, pin::Pin, sync::mpsc::{channel, Sender}, sync::{Arc, Mutex}, task::{Context, Poll, W...
Making a rust wasm bindgen future example from cc::Build
rust|wasm-bindgen
0
70
1
73,353,922
73,353,922
0
true
2022-07-12T14:56:26.550Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Making a rust wasm bindgen future example from cc::Build<p><em>I don't mean to ask too much, but I think I have surpassed the basic requirements using the Ru...
72,353,486
How to call Angular2 Function from C# code<p>Hi I want to invoke a method in my angular app from C# code. My angular app resides inside WPF WebBrowser control. Below are the code snippets from C# &amp; Angular.</p> <p>C# Code snippet:</p> <pre><code>[PermissionSet(SecurityAction.Demand, Name = &quot;FullTrust&quot;)] ...
<p>Posting my solution for this issue:</p> <p>C# end: WebBrowserView (XAML View) code:</p> <p>We can use WebBrowser Navigating event, I needed more control, hence using explicit API to shutdown the connection.</p> <pre><code>public Tuple&lt;bool, string&gt; OnShutdownEvent(string scriptName) { Tuple&lt;bool...
How to call Angular2 Function from C# code
c#|angular|wpf|webbrowser-control|invokescript
0
70
1
73,381,297
73,381,297
0
true
2022-05-23T18:46:07.863Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to call Angular2 Function from C# code<p>Hi I want to invoke a method in my angular app from C# code. My angular app resides inside WPF WebBrowser contro...
72,942,775
Turned flipper off and still getting Typedef redefinition with different types ('uint8_t' (aka 'unsigned char') vs 'enum clockid_t')<p>I'm getting this error in my React-Native iOS app:</p> <pre><code>Typedef redefinition with different types ('uint8_t' (aka 'unsigned char') vs 'enum clockid_t') </code></pre> <p>Which ...
<p>I fixed it temporarily by commenting out the offending line in Time.h as @jnpdx recommended I do. I think this may have been fixed in a recent update, as I don't see this error anymore.</p>
Turned flipper off and still getting Typedef redefinition with different types ('uint8_t' (aka 'unsigned char') vs 'enum clockid_t')
javascript|ios|xcode|react-native|cocoapods
1
70
1
73,630,878
73,630,878
0
true
2022-07-11T17:57:11.087Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Turned flipper off and still getting Typedef redefinition with different types ('uint8_t' (aka 'unsigned char') vs 'enum clockid_t')<p>I'm getting this error...
73,020,994
What can cause org-auto-tangle to result nil for all noweb code block evaluations<p>I'm using literate programming for some configuration files and would like to have some parts from elisp code block evaluations. I tried evaluating named code blocks with <code>:noweb tangle</code> but they always results nil and I do n...
<p>I had the same issue and below solved it for me.</p> <p>According to the code of <code>org-auto-tangle</code> the code will not be evaluated by default. In order to have the code auto evaluated you need to add your org file to the <code>org-auto-tangle-babel-safelist</code>. I've posted the definition of the variabl...
What can cause org-auto-tangle to result nil for all noweb code block evaluations
emacs|org-mode
1
70
1
73,272,121
73,272,121
1
true
2022-07-18T10:39:59.950Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What can cause org-auto-tangle to result nil for all noweb code block evaluations<p>I'm using literate programming for some configuration files and would lik...
72,241,814
I created a TF-IDF code to analyze an annual report, I want to know the importance of specific keywords<pre><code>import pandas as pd from sklearn.feature_extraction.text import TfidfTransformer from sklearn.feature_extraction.text import TfidfVectorizer import path import re with open(r'C:\Users\maxim\PycharmProjec...
<p>You have defined <code>tfIdf</code> as <code>tfIdf = tfIdfVectorizer.fit_transform(dataset)</code>.</p> <p>So <code>tfIdf.toarray()</code> would be a 2-D array, where each row refers to a document and each element in the row refers to the TF-IDF score of the corresponding word. To know what word each element is repr...
I created a TF-IDF code to analyze an annual report, I want to know the importance of specific keywords
machine-learning|nlp|keyword|tf-idf|tfidfvectorizer
0
70
1
72,242,436
72,242,436
0
true
2022-05-14T15:49:36.113Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: I created a TF-IDF code to analyze an annual report, I want to know the importance of specific keywords<pre><code>import pandas as pd from sklearn.feature_ex...
72,248,346
Cant change the background image with CSS<p>I'm just trying to change my background image on my website. I can change the background color but not the image. This is my first timeusing php so I don't know if I should know something there. Just been using HTML/CSS/JS. Appreciate the help!</p> <p>style.css</p> <pre><code...
<p>The issue is that you didn't put your CSS inside of a style tag.</p> <p>You also didn't include <code>&lt;/html&gt;</code>. That doesn't affect this issue, however it may cause issues with more complex webpages and older browsers.</p> <p>Here is the updated code, in a snippet:</p> <p><div class="snippet" data-lang="...
Cant change the background image with CSS
php|html|css|background-image
0
70
2
72,248,801
72,248,801
0
true
2022-05-15T12:40:17.907Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Cant change the background image with CSS<p>I'm just trying to change my background image on my website. I can change the background color but not the image....
72,250,938
Change of state render previous state React<p>I'm trying to change the state of a component but it keep rendering the previous state.</p> <p>From what I understood, the component is rendered before the state is getting saved and I need to use a callback function, except that I did not succeed.</p> <p>Here is a simplifi...
<p>You can just use the <code>event</code> parameter which returns the selected value. Then your <code>handleColor</code> will look like this</p> <pre><code>const handleColor = (event) =&gt; { console.log(event.target.value); if (event.target.value === &quot;blue&quot;) { setColor(&quot;blue&quot;); } else {...
Change of state render previous state React
reactjs|setstate
0
70
2
72,251,083
72,251,083
0
true
2022-05-15T18:04:15.870Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Change of state render previous state React<p>I'm trying to change the state of a component but it keep rendering the previous state.</p> <p>From what I unde...
72,255,269
item post with multiple phone numbers<p>This request is from a non programmer. An Osclass item post php form code sample is given below.</p> <pre><code>&lt;?php $action = 'item_add_post'; $prepare['s_phone_1'] = del_get_session('sPhone1') &lt;&gt; '' ? del_get_session('sPhone1') : @$item_extra['s_phone_1']; ?&gt; ...
<p>you are getting values in the array and now these array values you want in &quot;<strong>s_phone_1</strong>&quot;</p> <p>use this code to get value in &quot;s_phone_1&quot; here you can store $phonenumbers in your database</p> <pre><code>$phonenumbers = implode(&quot;;&quot;,$_POST['sPhone1']); //echo $phonenumbers...
item post with multiple phone numbers
php|html|mysql
0
70
1
72,255,632
72,255,632
0
true
2022-05-16T07:03:26.480Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: item post with multiple phone numbers<p>This request is from a non programmer. An Osclass item post php form code sample is given below.</p> <pre><code>&lt;?...
72,272,226
Pulling data from API that disappears when added to pandas data frame?<p>So I have connected to bybits API and pulled some data that I'm trying to add to a pandas data frame. The original data is fine until I use the pandas data frame, this leads to some values missing. I'm new to coding and have tried solving / search...
<pre><code>df=pd.DataFrame(data).join(pd.DataFrame.from_dict(data['result'])).drop('result',axis=1) </code></pre>
Pulling data from API that disappears when added to pandas data frame?
python|pandas|dataframe|api
0
70
1
72,272,434
72,272,434
0
true
2022-05-17T10:19:00.943Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Pulling data from API that disappears when added to pandas data frame?<p>So I have connected to bybits API and pulled some data that I'm trying to add to a p...
72,271,768
Check if column value is higher than other rows with corresponding columns<p>In SQL Server, I'm having problems checking multiple rows in a check constraint.</p> <p>For a bidding system, there is a table with these columns:</p> <pre><code>ObjectID [INT] BidAmount [NUMERIC(9,2)] User [VARCHAR(40)] Date [DATETIME] </...
<p>I solved this issue by using a trigger in T-SQL.</p> <pre><code>CREATE TRIGGER Bid_HighEnough ON dbo.Bod AFTER INSERT, UPDATE AS IF EXISTS (SELECT 'Wrong' FROM Inserted I INNER JOIN Bid B ON I.ObjectID = B.ObjectID INNER JOIN Object V ON I.ObjectID ...
Check if column value is higher than other rows with corresponding columns
sql|sql-server|tsql
0
70
2
72,274,120
72,274,120
0
true
2022-05-17T09:49:32.747Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Check if column value is higher than other rows with corresponding columns<p>In SQL Server, I'm having problems checking multiple rows in a check constraint....
72,266,719
Getting parent parents data in a pivot table in Laravel<p>What Eloquent model would you use to:</p> <p>Get all <code>Pages</code> that its <code>Company</code> brand color is <code>red/slug</code>.</p> <p>Where brand color is a pivot table and stored as an ID on the <code>Company</code> table.</p> <p>So you have <code...
<p>Your model layout isn't described that well, but I think you just want to define <a href="https://laravel.com/docs/9.x/eloquent-relationships#has-one-through" rel="nofollow noreferrer">a <code>HasOneThrough</code> relationship</a> to join <code>WebsitePage</code> to <code>BrandColor</code>:</p> <pre class="lang-php ...
Getting parent parents data in a pivot table in Laravel
php|laravel|eloquent
0
70
1
72,278,701
72,278,701
0
true
2022-05-16T23:45:11.347Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Getting parent parents data in a pivot table in Laravel<p>What Eloquent model would you use to:</p> <p>Get all <code>Pages</code> that its <code>Company</cod...
72,257,280
input 2 integers and getting erorr in pycharm ubuntu<p>So when i press &quot;Run&quot; and manually input the 2 integers , i get this error down below. I've tried via terminal ,debug and &quot;Run File in Python Console&quot; and it's working fine. I'm running on Ubuntu via VMware. Python version 3.10.4. My code:</p> <...
<p>Regression in 2022.1.1 PyCharm, ticket <a href="https://youtrack.jetbrains.com/issue/PY-54238/STDIN-is-lost-for-a-second-input-call" rel="nofollow noreferrer">https://youtrack.jetbrains.com/issue/PY-54238/STDIN-is-lost-for-a-second-input-call</a></p> <p>Will be fixed in 2022.1.2 (Release Candidate next week) and 202...
input 2 integers and getting erorr in pycharm ubuntu
ubuntu|pycharm|python-3.10
1
70
1
72,292,125
72,292,125
0
true
2022-05-16T09:51:27.610Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: input 2 integers and getting erorr in pycharm ubuntu<p>So when i press &quot;Run&quot; and manually input the 2 integers , i get this error down below. I've ...
72,274,650
how to split one database into two with django<p>I have one big data table (in Postgresql) that I want to turn into two tables Accordingly, I need certain columns from the big table in the first table Аnd in the second table I need to transfer the remaining columns</p> <p>here my old <strong>model.py</strong></p> <pre ...
<p>the easiest way to get this done is by doing these commands in psql</p> <pre class="lang-sql prettyprint-override"><code>INSERT INTO vmlist_cluster_name (id,name,kind,enabled,availability,time_availability,direction_id_id,project_id_id) SELECT id, name, kind,enabled ,availability ,time_unavailable ,direction_id ,pro...
how to split one database into two with django
python|django|postgresql
0
70
2
72,293,378
72,293,378
0
true
2022-05-17T13:08:29.600Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to split one database into two with django<p>I have one big data table (in Postgresql) that I want to turn into two tables Accordingly, I need certain co...
72,311,130
Calculating the closest store next to my location based on Longitude and Latitude<p>I want to create an algorithm that takes an array of grocery stores with their location (long and lat) and based on my current location calculates which store is closest to me.</p> <p>Do you have any idea what is the most optimal way to...
<p>This is the equivalent of finding <em><strong>the nearest point on an (x,y) plane from a list of points with a starting point</strong></em> and there are so many solutions.</p> <p><a href="https://stackoverflow.com/a/66238942/12062831">The solution I suggest</a> is already answered before and it is written on <code>...
Calculating the closest store next to my location based on Longitude and Latitude
algorithm|math|geolocation|latitude-longitude
0
70
1
72,312,192
72,312,192
0
true
2022-05-19T21:11:41.907Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Calculating the closest store next to my location based on Longitude and Latitude<p>I want to create an algorithm that takes an array of grocery stores with ...
72,314,868
How to associate label with checkbox but not using "for=id"<p>i have this code:</p> <pre><code>&lt;li&gt;&lt;input type=&quot;checkbox&quot; id=&quot;checkboxThree&quot; value=&quot;Alergia3&quot; &gt;&lt;label for=&quot;checkboxThree&quot;&gt;Alergia 1&lt;/label&gt;&lt;/li&gt; &lt;li&gt;&lt;input type=&quot;checkbox&q...
<p>It doesn't <em>seem</em> to work for the first two &quot;checkboxes&quot; because putting the checkboxes <em>in</em> the <code>label</code> elements makes this CSS rule stop working:</p> <pre class="lang-css prettyprint-override"><code>ul.ks-cboxtags li input[type=&quot;checkbox&quot;]:checked + label </code></pre> ...
How to associate label with checkbox but not using "for=id"
html|jquery|css|checkbox
0
70
1
72,315,079
72,315,079
0
true
2022-05-20T07:06:19.463Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to associate label with checkbox but not using "for=id"<p>i have this code:</p> <pre><code>&lt;li&gt;&lt;input type=&quot;checkbox&quot; id=&quot;checkbo...
72,309,655
Loading data to Neo4j with Python concurrently - asyncio function is blocked<p>I have code that reads from a json file and loads it into the neo4j database. Because the data is big, I want to do this with concurrent processing. I decided to use asyncio library but I'm having a problem. In the code below, session.run f...
<p>I ended up using neo4j python driver version 5 alpha with async support. Here is my fork to pyingest repo : <a href="https://github.com/cuneyttyler/pyingest" rel="nofollow noreferrer">https://github.com/cuneyttyler/pyingest</a></p>
Loading data to Neo4j with Python concurrently - asyncio function is blocked
python|neo4j|concurrency|parallel-processing|python-asyncio
0
70
1
72,316,902
72,316,902
0
true
2022-05-19T18:45:32.867Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Loading data to Neo4j with Python concurrently - asyncio function is blocked<p>I have code that reads from a json file and loads it into the neo4j database. ...
72,323,755
Fancytree selectmode 3 and drag and drop challenges<p>I prefer to work with selectmode 3 with Fancytree as I believe this makes for the most intuitive experience for users (where selecting a parent node auto selects the children). However, I noticed that when I use that mode with the dnd5 extension, that the hierarchy ...
<p>This code moves <em>all selected</em> nodes as children of the target node:</p> <pre class="lang-js prettyprint-override"><code>var sourceNodes = data.otherNodeList; ... $.each(sourceNodes, function(i, o){ o.info(&quot;move to &quot; + node + &quot;: &quot; + data.hitMode); o.moveTo(node, data.hitMode); }); </co...
Fancytree selectmode 3 and drag and drop challenges
jquery|drag-and-drop|fancytree
0
70
2
72,331,631
72,331,631
0
true
2022-05-20T19:05:56.757Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Fancytree selectmode 3 and drag and drop challenges<p>I prefer to work with selectmode 3 with Fancytree as I believe this makes for the most intuitive experi...
72,332,304
How do I provide my access_token with python<pre><code>request = requests.get(f&quot;https://api.mercadopago.com/v1/payments/{id}&quot;) </code></pre> <p><a href="https://i.stack.imgur.com/Iqrsw.png" rel="nofollow noreferrer">https://i.stack.imgur.com/Iqrsw.png</a></p> <p>Is there a way to do this with requests?</p>
<p>According to this <code>https://www.mercadopago.com.ar/developers/en/reference/payments/_payments_id/get</code> you need to provide a header with your access token you get through OAUTH. And then once you get the access token, you can do</p> <pre><code>header = {&quot;Authorization&quot;: &quot;Bearer &quot; + &quot...
How do I provide my access_token with python
python|api|python-requests|authorization
0
70
1
72,332,494
72,332,494
0
true
2022-05-21T18:37:36.213Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I provide my access_token with python<pre><code>request = requests.get(f&quot;https://api.mercadopago.com/v1/payments/{id}&quot;) </code></pre> <p><a ...
72,335,236
MongoDB map reduce - group and find top N<p>An , and collection called test</p> <p>Consider this test collection, in which an airport is identified by AirportID:</p> <pre><code>{ AirportID:&quot;1001&quot;, delayMinutes :&quot;15.0&quot; }, { AirportID:&quot;1004&quot;, delayMinutes :&quot;3.0&quot; }, { AirportID:&quo...
<p>You're very close, you just need to do 2 additional things:</p> <ol> <li>Add a <code>$limit</code> stage at the end to only return 2 results</li> <li>Cast the <code>delayMinutes</code> to a number using <code>$toDecimel</code> or <code>$toDouble</code>, note that any invalid string value will make this stage fail.</...
MongoDB map reduce - group and find top N
mongodb|mongodb-query
2
70
1
72,335,567
72,335,567
0
true
2022-05-22T06:18:38.307Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: MongoDB map reduce - group and find top N<p>An , and collection called test</p> <p>Consider this test collection, in which an airport is identified by Airpor...
72,339,931
"multiple definition of" while variable is not defined anywhere else in the scope<p>I have these three source files:</p> <p><strong>test.h</strong></p> <pre><code>#ifndef __TESTH #define __TESTH #ifdef __cplusplus #define EXTERNC extern &quot;C&quot; #else #define EXTERNC #endif typede...
<p>I think you would need to scope test.cpp's <code>test</code> variable to that file only, assuming your <code>test</code> pointer in main.cpp is different than <code>test</code> in test.cpp</p> <pre><code>namespace { my_struct test; } </code></pre> <p><kbd>See <a href="https://onlinegdb.com/zspUmKde0U" rel="nofol...
"multiple definition of" while variable is not defined anywhere else in the scope
c++
1
70
1
72,340,007
72,340,007
0
true
2022-05-22T17:39:42.667Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: "multiple definition of" while variable is not defined anywhere else in the scope<p>I have these three source files:</p> <p><strong>test.h</strong></p> <pre>...
72,331,168
c++ windows application edit the main window<p>I'm trying to create a simple windows application in cpp. Opening Visual Studio 2019, I noticed that there is, in fact, a project like that, so I opened up a new one.<a href="https://i.stack.imgur.com/r0szd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com...
<p>1.Right click on your project and <strong>Add resource</strong> -&gt; <strong>Dialog</strong>.</p> <p><code>IDD_DIALOG1</code> is created by default.</p> <p>2.Modify the code in <code>InitInstance()</code> :</p> <pre><code> HWND hWnd = CreateDialog(hInstance, MAKEINTRESOURCE(IDD_DIALOG1), GetDesktopWindow(), (DLGPRO...
c++ windows application edit the main window
c++|windows|user-interface|visual-studio-2019
0
70
1
72,344,118
72,344,118
0
true
2022-05-21T15:58:31.190Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: c++ windows application edit the main window<p>I'm trying to create a simple windows application in cpp. Opening Visual Studio 2019, I noticed that there is,...
72,319,706
Filter/ search Using Specifications gives different Results<p>I am working on filter/Search endpoint for my API of demo Project using dynamic query. This is my Endpoint for filter.</p> <pre><code> @GetMapping(&quot;/filter&quot;) public ResponseEntity&lt;List&lt;ProductDto&gt;&gt; filterProducts(@RequestParam(&quot;nam...
<p>I made the following Changes and it worked For me fine.</p> <ol> <li><p>Replace <code>return cb.conjunction();</code> with <code>return null;</code> in Specification class.</p> </li> <li><p>Remove <code>.isBlank()</code> check from Specification Class.</p> </li> <li><p>Add <code>.and(ProductSpecifications.withName(n...
Filter/ search Using Specifications gives different Results
spring|spring-boot|spring-data-jpa|spring-data|spring-data-rest
0
70
1
72,345,116
72,345,116
0
true
2022-05-20T13:25:17.977Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Filter/ search Using Specifications gives different Results<p>I am working on filter/Search endpoint for my API of demo Project using dynamic query. This is ...
72,324,981
Google SSO not asking for scope for just one user (other users OK)<p>I'm seeing a strange problem with google SSO and one of my users.</p> <p>I'm requesting the following scopes using the oauth:</p> <pre><code> const url = oauth2Client.generateAuthUrl({ access_type: 'offline', // we want refresh tokens s...
<p>The culprit in this case was:</p> <p><code>include_granted_scopes: true,</code></p> <p>The other users for whom the consent screen was shown had at some time in the past been given the correct scope, and granted permission. Therefore, on any subsequent grant, the consent screen showed the previously granted scopes. ...
Google SSO not asking for scope for just one user (other users OK)
google-oauth|single-sign-on|gmail-api
1
70
1
72,356,570
72,356,570
0
true
2022-05-20T21:34:13.940Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Google SSO not asking for scope for just one user (other users OK)<p>I'm seeing a strange problem with google SSO and one of my users.</p> <p>I'm requesting ...
72,329,080
Eloquent ORM LeftJoin with ifnull and orOn using is not working<p>I want to write this sql query with eloquent orm laravel 8.</p> <pre><code>Select * from apples as a Left Join Brands as b On ( (IFNULL(a.x, '') || IFNULL(a.y, '') || IFNULL(a.z, '')) = (IFNULL(b.t, '') || IFNULL(b.e, '') || IFNULL...
<p>I solved this problem.</p> <pre><code>-&gt;leftJoin('Apple', function ($join) { $join-&gt;on( DB::raw(&quot;IFNULL(Apple.x, '') || IFNULL(Apple.y, '') || IFNULL(Apple.z, '')&quot;), DB::raw(&quot;IFNULL(Brand.t, '') || IFNULL(Brand.e, '') || IFNULL(Brand.f, '')...
Eloquent ORM LeftJoin with ifnull and orOn using is not working
php|eloquent|left-join|laravel-8
-1
70
1
72,362,820
72,362,820
0
true
2022-05-21T11:21:29.073Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Eloquent ORM LeftJoin with ifnull and orOn using is not working<p>I want to write this sql query with eloquent orm laravel 8.</p> <pre><code>Select * from ap...
72,365,649
necessary data rewind wasn't possible with WEBDAV<p>I using <a href="https://github.com/protonemedia/laravel-webdav" rel="nofollow noreferrer">Laravel WebDAV wrapper</a> which uses <a href="https://github.com/sabre-io/dav" rel="nofollow noreferrer">Sabre</a> to upload media to the WebDAV server that uses the basic auth...
<p>When the authentication is needed for connection to the server the <code>authType</code> setting must be set. for me, it should be <code>1</code> for basic authentication.</p> <pre><code> 'dav' =&gt; [ 'driver' =&gt; 'webdav', 'baseUri' =&gt; 'https://dav.example.com/', 'userName' =&gt; 't...
necessary data rewind wasn't possible with WEBDAV
laravel|webdav|sabredav
0
70
1
72,365,650
72,365,650
0
true
2022-05-24T15:33:10.860Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: necessary data rewind wasn't possible with WEBDAV<p>I using <a href="https://github.com/protonemedia/laravel-webdav" rel="nofollow noreferrer">Laravel WebDAV...
72,377,431
Finding the last element of a list given a condition<p>I'm trying to write a function that finds the last element of a list of Ints given that all the Ints are greater than 100. This is the code I have written so far:</p> <pre><code>isLeast100All :: [Int] -&gt; [Int] isLeast100All list = filter (&gt;100) list lastList...
<p>You need to fix your types and use <code>filter</code> instead of <code>map</code> for <code>isLeast100All</code>:</p> <pre class="lang-hs prettyprint-override"><code>isLeast100All :: [Integer] -&gt; [Integer] isLeast100All = filter (&gt; 100) lastList :: [Integer] -&gt; Integer lastList list' = case isLeast100All ...
Finding the last element of a list given a condition
haskell|pattern-matching|parse-error
2
70
2
72,378,922
72,378,922
0
true
2022-05-25T12:12:49.113Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Finding the last element of a list given a condition<p>I'm trying to write a function that finds the last element of a list of Ints given that all the Ints a...
72,246,743
Is there way to narrow function parameters witch have same union types signature to exactly same subtypes by generic type<pre><code>// this is what i what for function parameters type type Combinable = string | number; function isString(param: unknown): param is string { return typeof param === &quot;string&quot;; }...
<p>If it's just about making sure the typescript compiler does his job, you can achieve it like this:</p> <pre><code>type Combinable = string | number; function add&lt;T extends Combinable&gt;(a: T, b: T): T { return (a as number) + (b as number) as T; } let a: Combinable = &quot;123&quot;; let b: Combinable = 123;...
Is there way to narrow function parameters witch have same union types signature to exactly same subtypes by generic type
typescript|typescript-generics
1
70
1
72,380,404
72,380,404
0
true
2022-05-15T08:39:36.380Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is there way to narrow function parameters witch have same union types signature to exactly same subtypes by generic type<pre><code>// this is what i what fo...
72,380,614
Forbidden: /api/v1.0/user/create-user/ & { "detail": "Authentication credentials were not provided." } DJANGO<p>I was creating Login functionality for my Python Django backend, &quot;create user&quot; functionality was working fine before. But then after Login was entirely coded, the create-user stopped working.</p> <p...
<p>You need to add <code>permission_classes</code> in <code>UserView</code>. It should contain <code>AllowAny</code> so that the api without authentication is allowed.</p> <pre><code>from rest_framework.permissions import AllowAny class UserView(APIView): permission_classes = [AllowAny] def post(self, request...
Forbidden: /api/v1.0/user/create-user/ & { "detail": "Authentication credentials were not provided." } DJANGO
python|django|authentication|django-rest-framework|createuser
0
70
1
72,380,883
72,380,883
0
true
2022-05-25T15:41:29.040Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Forbidden: /api/v1.0/user/create-user/ & { "detail": "Authentication credentials were not provided." } DJANGO<p>I was creating Login functionality for my Pyt...
72,400,757
Error-expected expression before FILE in fputs<p>Hiiii. This is my first time doing an little application with C. I have this problem:</p> <pre><code>void crearCuenta(){ char usuario[60], contrasenia[20]; FILE *cuentas; printf(&quot;Usuario: &quot;); scanf(&quot;%s&quot;, usuario); printf(&quot...
<p>As @Keylum states, your necessary answer should be: Change <code>fputs(usuario,FILE *cuentas)</code> to</p> <pre><code>fputs(usuario,cuentas); </code></pre> <p>and <code>fputs(contrasenia,FILE *cuentas)</code> to</p> <pre><code>fputs(contrasenia,cuentas); </code></pre>
Error-expected expression before FILE in fputs
c|syntax-error
-5
70
1
72,400,872
72,400,872
0
true
2022-05-27T05:17:27.163Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Error-expected expression before FILE in fputs<p>Hiiii. This is my first time doing an little application with C. I have this problem:</p> <pre><code>void cr...
72,395,938
How to make tick label with subscript bold?<p>I have the following dictionary with labels, where I'd like to plot K1/2 as K with subscript 1/2.</p> <pre><code>labels = {'label': 'Label1', 'Label2', '$K_{1/2}$'} </code></pre> <p>I then want to plot the xticks in bold and size 22, however, K1/2 is not plotted in bolt as ...
<p>This worked for me!</p> <pre><code> plt.xlabel(r'$\bf{K_{1/2}}$') </code></pre>
How to make tick label with subscript bold?
python|matplotlib|latex|label|subscript
0
70
1
72,401,147
72,401,147
0
true
2022-05-26T17:41:42.200Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to make tick label with subscript bold?<p>I have the following dictionary with labels, where I'd like to plot K1/2 as K with subscript 1/2.</p> <pre><cod...