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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
73,014,534 | Bpmn.io custom panel properties doesn't show the field<p>I have tried to use the Bpmn.io modeler plus panel properties in Vue3 and I followed exactly what they have described in <a href="https://github.com/bpmn-io/bpmn-js-examples/tree/master/properties-panel" rel="nofollow noreferrer"><strong>this</strong></a> example... | <p>I solved my problem
I found out that I need to configure your compiler to recognize JSX properly.</p>
<p>That's the solution:</p>
<p>1- Adding <code>"@babel/plugin-transform-react-jsx": "^7.18.6"</code> as a devDependency in package.json</p>
<p><a href="https://i.stack.imgur.com/wF4yk.png" rel="n... | Bpmn.io custom panel properties doesn't show the field | vue.js|vuejs3|bpmn.io | 1 | 80 | 1 | 73,147,407 | 73,147,407 | 0 | true | 2022-07-17T18:55:19.707Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Bpmn.io custom panel properties doesn't show the field<p>I have tried to use the Bpmn.io modeler plus panel properties in Vue3 and I followed exactly what th... |
72,937,084 | Postman gives me the following error: "error": "no handler found for uri [/megacorp/employee/1] and method [PUT]"<p>I am just starting with Elasticsearch and I have started with adding an index, which works and I can get information about it:</p>
<p>GET http://localhost:9200/megacorp</p>
<pre><code>"megacorp"... | <p>Problem here, that you are using wrong URL in your request.
According to <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html" rel="nofollow noreferrer">documentation</a> you must use use following paths for document index:</p>
<pre><code>Request
PUT /<target>/_doc/<_id&... | Postman gives me the following error: "error": "no handler found for uri [/megacorp/employee/1] and method [PUT]" | elasticsearch | 1 | 80 | 2 | 72,937,341 | 72,937,341 | 0 | true | 2022-07-11T10:24:30.297Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Postman gives me the following error: "error": "no handler found for uri [/megacorp/employee/1] and method [PUT]"<p>I am just starting with Elasticsearch and... |
72,973,463 | Ternary for clipShape swift<p>I am trying to pick a clipShape based on a boolean value.</p>
<pre><code>.clipShape(
noText ? Circle() : Capsule()
)
</code></pre>
<p>this will not work because of this error:</p>
<pre><code>Result values in '? :' expression have mismatching types 'Circle' and 'Capsule'
</code></pr... | <p>Your ? : expression need to ensure that both conditions are the same type, so to solve your problem just wrap your shape inside AnyShape(). Try below sample code(you can replace with your own image):</p>
<pre><code>import SwiftUI
struct Practice: View {
@State private var test = false
var body: some View {
Image(sy... | Ternary for clipShape swift | ios|swift|swiftui | 1 | 80 | 2 | 72,973,808 | 72,973,808 | 0 | true | 2022-07-13T22:51:38.047Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Ternary for clipShape swift<p>I am trying to pick a clipShape based on a boolean value.</p>
<pre><code>.clipShape(
noText ? Circle() : Capsule()
)
</... |
72,873,417 | How to lookup data from one CSV in another CSV?<ul>
<li>In the <code>crq_data</code> file I have cities and states from a user uploaded *.csv file</li>
<li>In the <code>cityDoordinates.csv</code> file I have a library of American cities and states along with their coordinates, I would like this to be a sort of "lo... | <p>I see this not as a problem w/optimizing Pandas, but finding a good data structure for fast lookups: and a good data structure for fast lookups is the dict. The dict takes memory, though; you'll need to evaluate that cost for yourself.</p>
<p>I mocked up what your cityCoordinates CSV could look like:</p>
<pre class=... | How to lookup data from one CSV in another CSV? | python|pandas|csv|geopandas | 1 | 80 | 1 | 72,876,462 | 72,876,462 | 0 | true | 2022-07-05T17:29:08.497Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to lookup data from one CSV in another CSV?<ul>
<li>In the <code>crq_data</code> file I have cities and states from a user uploaded *.csv file</li>
<li>I... |
72,908,644 | Css cheat sheet template<p><br />
I'm trying to create a template for a cheat sheet in html, take as an example this <a href="https://wch.github.io/latexsheet/" rel="nofollow noreferrer">latex format</a>.<br />
The idea is to create 3 columns of height x and y row. The content has to follow this rule automatically.</p>... | <p>Solved, for who is instrested I'v used the following approch.</p>
<ol>
<li>Create an array with all the divs</li>
<li>Render the table, get the element that are inside and remove them from the array.</li>
<li>Render the next table with the rest of the array, and so on.</li>
</ol>
<p>Result:
<a href="https://i.stack.... | Css cheat sheet template | html|css | 1 | 80 | 2 | 72,917,242 | 72,917,242 | 0 | true | 2022-07-08T08:24:37.010Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Css cheat sheet template<p><br />
I'm trying to create a template for a cheat sheet in html, take as an example this <a href="https://wch.github.io/latexshee... |
72,986,382 | Modiyfing conda configuration file does not reflect changes in environment<p>I am trying to change the default installation location for Conda environments because the system I am using (a supercomputing cluster) has a ~20GB user home quota. Under normal circumstances, this could easily be done by editing <code>~/.cond... | <h2>Background: Conda's configuration priorities</h2>
<p>As documented in <a href="https://www.anaconda.com/blog/conda-configuration-engine-power-users" rel="nofollow noreferrer">"<em>The Conda Configuration Engine for Power Users</em>" post</a>, Conda sources configuration values from four sources, listed fr... | Modiyfing conda configuration file does not reflect changes in environment | anaconda|conda|virtual-environment | 1 | 80 | 1 | 72,997,599 | 72,997,599 | 0 | true | 2022-07-14T20:35:33.760Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Modiyfing conda configuration file does not reflect changes in environment<p>I am trying to change the default installation location for Conda environments b... |
72,939,160 | Spark Insufficient Memory<p>My Spark job fails with the following error:</p>
<pre><code>java.lang.IllegalArgumentException: Required executor memory (33792 MB), offHeap memory (0) MB, overhead (8192 MB), and PySpark memory (0 MB)
is above the max threshold (24576 MB) of this cluster!
Please check the values of 'yarn.... | <p>This error is happening because you're requesting more resources than is available on the cluster (<a href="https://github.com/apache/spark/blob/branch-3.2/resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala#L364" rel="nofollow noreferrer"><code>org.apache.spark.deploy.yarn.Client</code> ... | Spark Insufficient Memory | apache-spark|hadoop|pyspark|memory-management|hadoop-yarn | 1 | 80 | 1 | 72,940,304 | 72,940,304 | 0 | true | 2022-07-11T13:12:53.930Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Spark Insufficient Memory<p>My Spark job fails with the following error:</p>
<pre><code>java.lang.IllegalArgumentException: Required executor memory (33792 M... |
72,820,888 | How does one cast a literal string of byte values in ascii that describe bytes in characters to the actual bytes?<p>For example, I have the <em>literal string</em>,</p>
<blockquote>
<p>00180012001a001b...</p>
</blockquote>
<p>And I need to cast this literal string of characters to bytes, figure out what the right encod... | <p>Anyway, although it only helped rule some ideas out, the answer I initially sought is:</p>
<pre><code>byte_array = bytearray.fromhex(line)
# or, in my case, the following yielded more information,
# although it looks like a modified encoding
simplified = ''.join([line[i:i+2] for i in range(2, len(line)-2, 4)]
byt... | How does one cast a literal string of byte values in ascii that describe bytes in characters to the actual bytes? | python|string | -1 | 80 | 1 | 72,822,114 | 72,822,114 | 0 | true | 2022-06-30T19:06:48.920Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How does one cast a literal string of byte values in ascii that describe bytes in characters to the actual bytes?<p>For example, I have the <em>literal strin... |
72,878,851 | Laravel: Running a database migration on a production server<p>I have a local repo for development and a production server in Laravel.</p>
<p>When I work locally, as the project grows, so does the DB. Therefore I keep adding new migrations that sometimes change existing tables. Locally I can refresh / recreate tables a... | <p>As already mentioned, you can create migrations to update the columns without dropping the tables. And <a href="https://laravel.com/docs/9.x/migrations#modifying-columns" rel="nofollow noreferrer">the 'Modifying columns' docs</a> provide a clear explanation for this. However that is docs for modifying columns, if yo... | Laravel: Running a database migration on a production server | laravel|database|migration | 0 | 80 | 1 | 72,879,130 | 72,879,130 | 0 | true | 2022-07-06T06:33:40.927Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Laravel: Running a database migration on a production server<p>I have a local repo for development and a production server in Laravel.</p>
<p>When I work loc... |
72,905,711 | HTTP connector for Geneva actions fails with "Bearer error=\"invalid_token\", error_description=\"The signature is invalid\""<p>I am using Azure AD for authentication in my Geneva workflow, the code snippet is pasted below</p>
<pre><code>{
"inputs": {
"method": "POST",
... | <ol>
<li><p>The settings Audience and Authority are must and should be in
proper format. Authority must be something like
<code>"https://login.microsoftonline.com/tenantId</code></p>
<p><em><strong>The Authority value is the concatenation of the Instance and TenantId values.</strong></em></p>
<pre><code>"Ins... | HTTP connector for Geneva actions fails with "Bearer error=\"invalid_token\", error_description=\"The signature is invalid\"" | azure-active-directory | 0 | 80 | 1 | 72,934,243 | 72,934,243 | 0 | true | 2022-07-08T01:13:02.210Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
HTTP connector for Geneva actions fails with "Bearer error=\"invalid_token\", error_description=\"The signature is invalid\""<p>I am using Azure AD for authe... |
72,925,940 | C raw UDP socket failing to receive sent data using recvfrom() on loopback address<p>I have 2 programs. One program sends data to the other program. Both programs use raw UDP sockets. The sending program sends to loopback address <code>127.0.0.1</code>, from port <code>25252</code> to port <code>80</code>. The receivin... | <p>On the client side, this line is wrong:</p>
<pre><code>header = (struct udphdr *) (packet + sizeof(struct iphdr));
</code></pre>
<p>You said that you don't want to send your own IP header (and you are not enabling the <code>IP_HDRINCL</code> option to allow that), so your client should not be accounting for <code>st... | C raw UDP socket failing to receive sent data using recvfrom() on loopback address | c|linux|sockets|udp|raw-sockets | 0 | 80 | 1 | 72,927,091 | 72,927,091 | 0 | true | 2022-07-10T03:23:14.960Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
C raw UDP socket failing to receive sent data using recvfrom() on loopback address<p>I have 2 programs. One program sends data to the other program. Both pro... |
73,020,344 | Create a new double-field based on the existing string-filed<p>There is an SQL query forming a table. It is necessary to form another double-number field based on one of the string fields in the table.</p>
<p>Values of the original string field (BRLOADSTA0):</p>
<pre><code>АК-11 НК-82,7
АК-11 НК-82,8
АК-11 НК-82,9
АК-1... | <p>Could you tell us which datatype on BRLOADSTA0? I tested using those data provided by you. Please see the below sample.</p>
<p><a href="https://dbfiddle.uk/?rdbms=postgres_14&fiddle=743793f32d9371f049abe15c3e7f7332" rel="nofollow noreferrer">Demo</a></p>
<p>try:</p>
<pre class="lang-sql prettyprint-override"><co... | Create a new double-field based on the existing string-filed | sql|database|postgresql | -1 | 80 | 1 | 73,022,824 | 73,022,824 | 0 | true | 2022-07-18T09:51:36.243Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Create a new double-field based on the existing string-filed<p>There is an SQL query forming a table. It is necessary to form another double-number field bas... |
72,841,125 | sum() function to sum all items in a given list<p>there is a function I want to define that takes all items in a list and adds them up together:</p>
<pre><code>def sum():
for x in range(len(user)):
sum = 0
sum =+ user[x]
return sum
user = [1,1,1]
score = sum()
print(score)
</code></pre>
<p>for some reason... | <p>Given a list of integers you could do this:</p>
<pre><code>my_list = [1, 1, 1]
def accumulation(list_):
total = 0
for i in list_:
total += i
return total
</code></pre>
<p>...or...</p>
<pre><code>sum(my_list) # where sum is the Python built-in function
</code></pre> | sum() function to sum all items in a given list | python|list|function|sum|pythomnic3k | 0 | 80 | 4 | 72,841,184 | 72,841,184 | 0 | true | 2022-07-02T17:28:58.543Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
sum() function to sum all items in a given list<p>there is a function I want to define that takes all items in a list and adds them up together:</p>
<pre><co... |
72,824,054 | Python, I have several ideas on how to solve this, but which should be the correct one?<p>I do not need help with this, it is extremely easy, I need help to decide which of the several ways should I use. Like Do you think I can use recursion? I would need at least an</p>
<blockquote>
<p>if</p>
</blockquote>
<p>But, it ... | <p>Since we cannot use loops or condition statements, and can only make use of function, here is my solution.</p>
<pre><code>def print4x() :
print("Controlling complexity is the essence of programming!")
print("Controlling complexity is the essence of programming!")
print("Controlli... | Python, I have several ideas on how to solve this, but which should be the correct one? | python|function|recursion|call | -1 | 80 | 1 | 72,824,089 | 72,824,089 | 0 | true | 2022-07-01T03:20:25.220Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python, I have several ideas on how to solve this, but which should be the correct one?<p>I do not need help with this, it is extremely easy, I need help to ... |
72,780,786 | Convert JsonArray to to csv file in right format without using third party library<p>My dependency which is not third party</p>
<pre><code><dependency>
<groupId>javax.json</groupId>
<artifactId>javax.json-api</artifactId>
<version>1.1.4</version>
</dependency>... | <pre><code> If my understanding is correct, you want to convert the json into csv file but while writing to csv you are getting key value in each row instead of key in the first row and then value in the subsequent rows.
I think if you follow below steps then you will able to achieve this:
1) First... | Convert JsonArray to to csv file in right format without using third party library | java|json|csv | 1 | 80 | 1 | 72,781,054 | 72,781,054 | 0 | true | 2022-06-28T04:35:28.737Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Convert JsonArray to to csv file in right format without using third party library<p>My dependency which is not third party</p>
<pre><code><dependency>... |
72,996,894 | Bootstrap css is not working when using carousel<p>So basically it looks like my carousel does not have any styling whatsoever. I copied the exact code from ng-bootstrap carousel example but mine looks like <a href="https://i.stack.imgur.com/cOCde.png" rel="nofollow noreferrer">this</a> when running.</p>
<p>This is ngb... | <p>So, in my opinion, you added bootstrap incorrectly. When you are implementing bootstrap 5 to your html besides adding this in :</p>
<pre><code><link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-0evHe/X+R7YkIZDRvuz... | Bootstrap css is not working when using carousel | html|css|angular|carousel|ng-bootstrap | 2 | 80 | 1 | 72,997,673 | 72,997,673 | 0 | true | 2022-07-15T16:15:08.110Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Bootstrap css is not working when using carousel<p>So basically it looks like my carousel does not have any styling whatsoever. I copied the exact code from ... |
72,948,646 | npm run dev failed with laravel 8 bootstrap and auth<p>I am using the laravel 8.x with laravel/ui package and bootstrap
here is my steps I've run in cmd:</p>
<pre><code>composer require laravel/ui
php artisan ui bootstrap
php artisan ui bootstrap --auth
npm install && npm run dev
</code></pre>
<p>but it always ... | <p>I have find the answer:
go to file \Users\username\
look for and edit the file .npmrc then find the line which contains 'bash'. Delete that line and it works for me.</p> | npm run dev failed with laravel 8 bootstrap and auth | php|node.js|laravel|npm | 0 | 80 | 2 | 73,191,472 | 73,191,472 | 0 | true | 2022-07-12T07:37:59.293Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
npm run dev failed with laravel 8 bootstrap and auth<p>I am using the laravel 8.x with laravel/ui package and bootstrap
here is my steps I've run in cmd:</p>... |
72,933,384 | How to convert a Response String into List and extract values?<p>I am getting below Response from an API</p>
<pre><code>"[{\"num\":0.705251649,\"host\":\"a\"},{\"num\":0.6223491728,\"host\":\"b\"},{\"num\":0.6486086175,\"host\":\"... | <p>You can covert directly in list as shown below,</p>
<pre><code>ObjectMapper mapper = new ObjectMapper();
String str = "[{\"num\":0.705251649,\"host\":\"a\"},{\"num\":0.6223491728,\"host\":\"b\"},{\"num\":0.6486086175,\"host\":\"... | How to convert a Response String into List and extract values? | java|json|jackson | 0 | 80 | 1 | 72,933,998 | 72,933,998 | 0 | true | 2022-07-11T03:23:06.807Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to convert a Response String into List and extract values?<p>I am getting below Response from an API</p>
<pre><code>"[{\"num\":0.705251649... |
72,815,194 | Pause animation not working in GSAP (GreenSock)<p>I'm new with <strong>GSAP</strong> (<a href="https://greensock.com/" rel="nofollow noreferrer">greensock</a>), I created this text slide animation and it's working fine but I want it to play/pause on button click, for some reason it's not working as required.</p>
<p><di... | <p>This worked for me! I took out <code>gsap.timeline</code> from the loop and used <code>gsap.set</code> inside loop for delays.</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><cod... | Pause animation not working in GSAP (GreenSock) | javascript|gsap | 1 | 80 | 1 | 72,824,591 | 72,824,591 | 0 | true | 2022-06-30T11:44:22.437Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pause animation not working in GSAP (GreenSock)<p>I'm new with <strong>GSAP</strong> (<a href="https://greensock.com/" rel="nofollow noreferrer">greensock</a... |
72,828,146 | Error when rearranging a three-digit number to find the maximum C#<p>I need to find the maximum integer that can be obtained using numbers of arbitrary three-digit natural n permutation (100 <= n <= 999).
Example:</p>
<pre><code>n = 165 result = 651
</code></pre>
<p>My decision</p>
<pre class="lang-cs prettyp... | <p>The code below works, using an unrolled BubbleSort. But it uses some things that a teacher will know are too advanced for you at this moment, so don't use exactly this (teachers know about SO as well - at least, I hope they do). You can easily adjust it, once you understand what this does and how.</p>
<pre><code>voi... | Error when rearranging a three-digit number to find the maximum C# | c# | -1 | 80 | 3 | 72,828,533 | 72,828,533 | 0 | true | 2022-07-01T10:50:15.280Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Error when rearranging a three-digit number to find the maximum C#<p>I need to find the maximum integer that can be obtained using numbers of arbitrary three... |
72,990,189 | Nodejs iconv-lite convert wrong SHIFT JIS Character<p>I'm having trouble converting <strong>UTF8</strong> Japanese characters to <strong>SJIS</strong></p>
<p>Library used for conversion: <strong>iconv-lite</strong></p>
<p>Code:</p>
<pre><code>const iconv = require('iconv-lite')
const japanText = 'でんぱ組 出会いの歌26 カミソヤマ ユニ'... | <p>Your <code>.js</code> file seems to saved in UTF-8 with <a href="https://unicode.org/reports/tr15/" rel="nofollow noreferrer">NFD (Normalization Form D)</a>. Text editors on macOS often use this type of encoding.</p>
<p><code>iconv-lite</code> cannot handle NFD, so you have to change <code>japanText</code> to NFC. T... | Nodejs iconv-lite convert wrong SHIFT JIS Character | node.js|character-encoding|iconv|shift-jis | 0 | 80 | 1 | 73,320,913 | 73,320,913 | 0 | true | 2022-07-15T07:04:59.237Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Nodejs iconv-lite convert wrong SHIFT JIS Character<p>I'm having trouble converting <strong>UTF8</strong> Japanese characters to <strong>SJIS</strong></p>
<p... |
72,830,415 | using backtrack regex in istio<p>We are migrating from ingress-nginx to istio. While migrating existing ingress definitions to istio VirtualServices, we came across nginx style rewriting and wanted to achieve the same in istio. When researched it was found that <a href="https://istio.io/latest/docs/reference/config/net... | <p>Finally, I was able to crack it down. It's actually simple. We can just use rewrite along with match in virtual service and there is no need to complicate it using filter. Here is the virtual service.</p>
<pre><code>apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: sample-vs
namespace... | using backtrack regex in istio | kubernetes|istio|envoyproxy|istio-gateway | 0 | 80 | 1 | 73,403,538 | 73,403,538 | 0 | true | 2022-07-01T13:58:37.857Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
using backtrack regex in istio<p>We are migrating from ingress-nginx to istio. While migrating existing ingress definitions to istio VirtualServices, we came... |
72,833,477 | How to manually change value of primary key in Django Model through serializers?<p><strong>Is it somehow possible to manually change ID value in AutoField (primary key) through serializer?</strong><br />
I found this in documentation of Django: <a href="https://docs.djangoproject.com/en/4.0/ref/models/instances/#auto-i... | <p>If you are using <code>serializers.ModelSerializer</code> like your above example <code>class CarSerializer(serializers.ModelSerializer):</code>. You can set extra properties while saving.</p>
<pre><code>serializer = CarSerializer(data=car)
if serializer.is_valid():
serializer.save(id=id)
</code></pre>
<p>You ca... | How to manually change value of primary key in Django Model through serializers? | django|django-models|django-rest-framework|django-views|django-serializer | 1 | 80 | 3 | 73,682,646 | 73,682,646 | 0 | true | 2022-07-01T18:44:26.570Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to manually change value of primary key in Django Model through serializers?<p><strong>Is it somehow possible to manually change ID value in AutoField (p... |
72,969,544 | org.jooq.exception.DataAccessException: unsupported Unicode escape sequence \u0000<p>I'm trying to insert a serialized JSON into a Postgres JSONB column using jOOQ, but it's failing because the serialized JSON has a <code>\\0</code> inside of it.</p>
<p>Is there a way jOOQ will escape this automatically for us?</p>
<p>... | <p>Given the details provided in your <a href="https://github.com/jOOQ/jOOQ/issues/13903" rel="nofollow noreferrer">bug report #13903</a>, I don't think there's much jOOQ can do for you here out of the box. The <code>NUL</code> byte that can be contained in strings seems to have a special meaning in PostgreSQL, and is ... | org.jooq.exception.DataAccessException: unsupported Unicode escape sequence \u0000 | java|postgresql|jooq | 1 | 80 | 1 | 73,454,932 | 73,454,932 | 1 | true | 2022-07-13T16:21:00.337Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
org.jooq.exception.DataAccessException: unsupported Unicode escape sequence \u0000<p>I'm trying to insert a serialized JSON into a Postgres JSONB column usin... |
72,243,216 | How to align an embedded map to the center?<p>I am working with HTML code in Virtual Studio Code
I am trying to align an embedded map to the center, how can I do it?
This is my HMTML code below</p>
<pre><code><section class="s1">
<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1... | <p>what you need can be easily achieved by using flexbox, here is the css you need, Hope it helps</p>
<pre><code>.s1{
display: flex;
justify-content: center;
/* align-items: center;
height: 100vh; */ /* uncomment these two lines if you want to center vertically also */
}
</code></pre> | How to align an embedded map to the center? | html|css | 0 | 80 | 2 | 72,243,254 | 72,243,254 | 0 | true | 2022-05-14T19:14:23.633Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to align an embedded map to the center?<p>I am working with HTML code in Virtual Studio Code
I am trying to align an embedded map to the center, how can ... |
72,253,528 | Call Second API If Condition is Met in React<p>I need to call <code>http://sample-api-2.com</code> if <code>callAPI2</code> is true.
Also I need to pass the <code>response?.data.code</code> from <code>http://sample-api-1.com</code>.</p>
<p>What would be the correct way to do this?</p>
<pre><code>export const createProd... | <p>Assuming you don't need the response from the second API call (you don't show that you use it), you can refactor it this way:</p>
<pre class="lang-js prettyprint-override"><code>// ...
try {
dispatch({
type: constants.CREATE_PRODUCT_REQUEST,
});
const response = await axios.post("http://sample-api-1.... | Call Second API If Condition is Met in React | reactjs|redux|ecmascript-6|react-hooks|axios | 0 | 80 | 1 | 72,253,620 | 72,253,620 | 0 | true | 2022-05-16T02:03:52.580Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Call Second API If Condition is Met in React<p>I need to call <code>http://sample-api-2.com</code> if <code>callAPI2</code> is true.
Also I need to pass the ... |
72,255,305 | How do I inject an anonymous function directly into an enum<p>For Dart 2.17, we can use constructors in enum similarly to how we do with classes.</p>
<p>I am trying to insert an anonymous function inside of an enum directly.</p>
<p>here is code that works but doesn't do exactly what I'd like it to do.</p>
<pre><code>in... | <p>Have you tried extensions? I'm not sure you'll be able to do everything you want (as happened to me), but they almost got the job done. Sometimes I just have to invoke the extension instead of the enum, probably when I put some static method on the extension (like calling <code>SexExt.staticMethod()</code> instead o... | How do I inject an anonymous function directly into an enum | flutter|dart|enums | 1 | 80 | 2 | 72,255,406 | 72,255,406 | 0 | true | 2022-05-16T07:06:33.273Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I inject an anonymous function directly into an enum<p>For Dart 2.17, we can use constructors in enum similarly to how we do with classes.</p>
<p>I am... |
72,257,008 | Numpy - array of arrays recognize as vector<p>I encounter a problem with numpy arrays.
I used <strong>CountVectorizer</strong> from sklearn with a wordset and values (from pandas column) to create an array of arrays that count words (BoW). And when I print the array and the shape, I have this result:</p>
<pre><code>[[a... | <p><code>values</code> from a dataframe, even if it has just one column, will be 2d. <code>values</code> from a Series, one column of the frame, will be 1d.</p>
<p>If <code>labels_count_np</code> is (2800, 1) shape, you can easily make it 1d with <code>labels_count_np[:,0]</code> or <code>np.squeeze(labels...)</code>.... | Numpy - array of arrays recognize as vector | python|pandas|numpy|numpy-ndarray|countvectorizer | 0 | 80 | 2 | 72,261,731 | 72,261,731 | 0 | true | 2022-05-16T09:31:38.887Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Numpy - array of arrays recognize as vector<p>I encounter a problem with numpy arrays.
I used <strong>CountVectorizer</strong> from sklearn with a wordset an... |
72,267,705 | Is it possible to add to a string based on user input python<p>I am currently working on a program that takes in user inputs, and depending on that users input the string should change. I was wondering if there was a way I could alter the string once the user input has been received. The following is a sample code.</p>... | <p>Here's an approach that uses a regular expression for input validation and list comprehensions to gather the inputs and build the output string.</p>
<pre><code>import re
def get_input( label: str = None ) -> int:
entry = input(label + ': ')
if re.match(r'^\d+$', entry) is None:
return None
... | Is it possible to add to a string based on user input python | python|python-3.x|string|user-input | 1 | 80 | 5 | 72,268,448 | 72,268,448 | 0 | true | 2022-05-17T02:58:20.410Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is it possible to add to a string based on user input python<p>I am currently working on a program that takes in user inputs, and depending on that users inp... |
72,280,439 | Is there a way to add a label in between two other labels?<p>On another project, I have a bunch of labels that gets updated whenever a list of strings is given. But if I wanted to add a string to this list and show that with the labels, I would have to destroy and remake all of them again. To simplify it, the below cod... | <p>The order in which you call <code>pack</code> matters, in that it establishes the order in which the widgets appear relative to each other. <code>pack</code> also provides arguments to change that order. You can specify <code>before</code> to add a widget before another widget, and <code>after</code> to place the wi... | Is there a way to add a label in between two other labels? | python|tkinter | 0 | 80 | 2 | 72,280,667 | 72,280,667 | 0 | true | 2022-05-17T20:39:21.653Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is there a way to add a label in between two other labels?<p>On another project, I have a bunch of labels that gets updated whenever a list of strings is giv... |
72,285,805 | How to add foreach to Request $request in Controller<p>I have a post route and I wanted to add foreach loop to the requests like this:</p>
<pre><code>public function updateProductAttrsInfo(Request $request, $id)
{
foreach($request as $req){
dd($req);
}
}
</code></pre>
<p>But this is ... | <p>You can try this:</p>
<pre><code>foreach($request->all() as $k => $v){}
</code></pre> | How to add foreach to Request $request in Controller | php|laravel|laravel-8 | 0 | 80 | 1 | 72,285,942 | 72,285,942 | 0 | true | 2022-05-18T08:37:37.483Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to add foreach to Request $request in Controller<p>I have a post route and I wanted to add foreach loop to the requests like this:</p>
<pre><code>public ... |
72,313,353 | Vector visualization failed using plotters "required by a bound in `plotters::chart::ChartContext::<'a, DB, CT>::draw_series`"<p>I'm trying to visualize vector items in 2D using the crate "plotters".</p>
<pre><code>fn main() -> Result<(), Box<dyn Error>> {
let file_path = "out.csv"... | <p>First split the line <code>chart.draw_series(LineSeries::new(ke, &RGBColor(255,0,0)));</code> into two lines:</p>
<pre class="lang-rust prettyprint-override"><code>let series = LineSeries::new(ke, &RGBColor(255, 0, 0));
chart.draw_series(series);
</code></pre>
<p>and look at the type of <code>series</code>: ... | Vector visualization failed using plotters "required by a bound in `plotters::chart::ChartContext::<'a, DB, CT>::draw_series`" | plot|rust | 0 | 80 | 1 | 72,314,837 | 72,314,837 | 0 | true | 2022-05-20T03:44:35.380Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Vector visualization failed using plotters "required by a bound in `plotters::chart::ChartContext::<'a, DB, CT>::draw_series`"<p>I'm trying to visualize vect... |
72,320,970 | Failed to get the sites followed by user from Microsoft Graph<p>I am trying to retrieve the sites that the user is following from Microsoft Graph Explorer.</p>
<p>I found this document to do that: <a href="https://docs.microsoft.com/en-us/graph/api/sites-list-followed?view=graph-rest-1.0&tabs=http" rel="nofollow no... | <p>If you're using <strong>Graph Explorer</strong>, which is a Microsoft-created user interface to access the <strong>Graph API</strong>, you don't need to specify the token in the headers. When you sign into <a href="https://developer.microsoft.com/en-us/graph/graph-explorer" rel="nofollow noreferrer">Graph Explorer</... | Failed to get the sites followed by user from Microsoft Graph | authentication|microsoft-graph-api|sites | 0 | 80 | 1 | 72,321,721 | 72,321,721 | 0 | true | 2022-05-20T14:53:01.727Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Failed to get the sites followed by user from Microsoft Graph<p>I am trying to retrieve the sites that the user is following from Microsoft Graph Explorer.</... |
72,330,276 | Updating multiple cells in gspread using Python<p>I'm Inserting values in Google Sheets but the loop doesn't go to the next cell it keeps inserting only in A1 instead of going to A1, A2, etc.</p>
<pre class="lang-py prettyprint-override"><code>cell_list = wks.range('A1:A200')
# wks.update('A1', data['_embedded']['... | <p>In your script, how about the following modification?</p>
<h3>Modified script:</h3>
<p>I thought that your commented <code>wks.update()</code> will be able to be used.</p>
<pre class="lang-py prettyprint-override"><code>wks.update("A1", [[e["name"]] for e in data["_embedded"]["even... | Updating multiple cells in gspread using Python | python|google-sheets|google-sheets-api|gspread | 0 | 80 | 1 | 72,334,047 | 72,334,047 | 0 | true | 2022-05-21T14:03:30.500Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Updating multiple cells in gspread using Python<p>I'm Inserting values in Google Sheets but the loop doesn't go to the next cell it keeps inserting only in A... |
72,287,845 | Prevent mapstruct from using the single object mapping function in list of object mapping function<p>I have 2 micro-services: let's call them A and B.</p>
<p>The entities handled by B in which there is a reference to an entity of A are implemented as a simple Long id (eg. the groupId)</p>
<pre><code>@Getter
@Setter
@No... | <p>After around two days of intensive research and many attempts I think I have found a decent solution.</p>
<p>I can give the functions a name and by doing so they sort of work like they have a specific scope.
The mapper interface becomes:</p>
<pre><code>public interface IBaseMapper<T extends BaseEntity<K>, D... | Prevent mapstruct from using the single object mapping function in list of object mapping function | java|spring-boot|microservices|mapstruct | 0 | 80 | 1 | 72,345,558 | 72,345,558 | 0 | true | 2022-05-18T10:53:01.460Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Prevent mapstruct from using the single object mapping function in list of object mapping function<p>I have 2 micro-services: let's call them A and B.</p>
<p... |
72,346,942 | Event Value changed in DataTable bound to DataGridView<p>I have DataTables in a DataSet in a data base bound to a DataGridView. I'd like to show a status if the data changed. So I used the CellValueChanged event of the DataGridView as trigger. In the event routine I check for changes in the DataSet with DataSet.HasChan... | <p>Using <a href="https://docs.microsoft.com/en-us/dotnet/api/system.data.datatable.columnchanged?view=net-6.0" rel="nofollow noreferrer">DataTable.ColumnChanged Event</a>, make a change, press <kbd>TAB</kbd> or <kbd>ENTER</kbd> to get original and proposed value. In the following example we first subscribe to the Data... | Event Value changed in DataTable bound to DataGridView | c#|.net|database|datagridview | 0 | 80 | 1 | 72,347,369 | 72,347,369 | 0 | true | 2022-05-23T10:22:58.397Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Event Value changed in DataTable bound to DataGridView<p>I have DataTables in a DataSet in a data base bound to a DataGridView. I'd like to show a status if ... |
72,350,251 | Encoding python dictionary into JSON using a schema<p>I am struggling to encode json from a python dictionary. When using json.dumps on a dictionary there is no way to tell the function what objects and properties to map the dictionary keys and values to.</p>
<p>The result of the blind dump is that I end up with schema... | <p>Create the structure you want using a dictionary comprehension before calling <code>json.dump</code>:</p>
<pre><code>output = {"devices": [
{"device": {"deviceType": k,
"deviceBrands": [{"deviceBrand": {"deviceBrandName": k1,
... | Encoding python dictionary into JSON using a schema | python|json|schema|jsonschema | 0 | 80 | 1 | 72,350,469 | 72,350,469 | 0 | true | 2022-05-23T14:27:38.620Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Encoding python dictionary into JSON using a schema<p>I am struggling to encode json from a python dictionary. When using json.dumps on a dictionary there is... |
72,350,021 | Spacy Matcher isn't always matching<p>I can't figure out why the matcher isn't working. This works:</p>
<pre><code>test = ["14k"]
nlp = spacy.blank("en")
matcher = Matcher(nlp.vocab)
matcher.add("test", [[{"NORM": "14k"}]])
docs = []
for doc in nlp.pipe(test):
ma... | <p>It looks like you may be running into issues with differences in tokenization for this kind of sequence. In particular note that things that look like temperatures (so number + [FCK]) may get special treatment. This may seem odd but it usually results in better compatibility with existing corpora.</p>
<p>You can fin... | Spacy Matcher isn't always matching | python-3.x|spacy|spacy-3 | 1 | 80 | 1 | 72,357,752 | 72,357,752 | 0 | true | 2022-05-23T14:11:29.957Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Spacy Matcher isn't always matching<p>I can't figure out why the matcher isn't working. This works:</p>
<pre><code>test = ["14k"]
nlp = spacy.blan... |
72,351,184 | Application authentication security using browser cookies<p>I am building a social media application using nodejs for backend and considering different ways of establishing a "Keep me logged in" functionality.</p>
<p>I have read about the dangers of storing user authentication data in cookies, so I am looking... | <p>Depending what are your security requirements, http cookie may not be the best option for storing client-side session/token information as it is server readable, expirable, prone to accidental cleaning and so on. Consider using browser's localStorage <a href="https://en.wikipedia.org/wiki/Web_storage" rel="nofollow ... | Application authentication security using browser cookies | node.js|authentication|jwt|session-cookies|websecurity | 1 | 80 | 2 | 72,360,658 | 72,360,658 | 0 | true | 2022-05-23T15:33:32.690Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Application authentication security using browser cookies<p>I am building a social media application using nodejs for backend and considering different ways ... |
72,371,437 | Is there a way to add dotted borders between images in css<p>So I'm new to html and css and wanted to copy a design I saw on the web for practice. However, this section of the website has images seperated by borders. I'm not sure if it's possible to do in regular css or would I need to use javascript or something else?... | <p>Here's some sample you can play with base on your code. Let me know</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-css lang-css prettyprint-override"><code>.brands-sec{
justify-content: center;
display: grid;
gr... | Is there a way to add dotted borders between images in css | html|css | 0 | 80 | 5 | 72,371,693 | 72,371,693 | 0 | true | 2022-05-25T02:41:25.137Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is there a way to add dotted borders between images in css<p>So I'm new to html and css and wanted to copy a design I saw on the web for practice. However, t... |
72,365,769 | Finding how to populate a field in Powershell with JiraPS<p>So, i'm using JiraPS to create some tickets and so far i've been able to work out through trial and error how to populate certain standard and custom fields.</p>
<p>I'm now wanting to create a ticket and link to other tickets. I'm looking to use a standard fie... | <p>I've managed to work it out. I was thinking about it the wrong way, what I've done now is link the ticket to the parent, rather than trying to attach the child. Hope that makes sense...</p>
<p>I've used Add-JiraIssueLink on the child ticket(s) to link to the parent.</p> | Finding how to populate a field in Powershell with JiraPS | powershell|jira|jira-rest-api | 0 | 80 | 1 | 72,394,131 | 72,394,131 | 0 | true | 2022-05-24T15:41:41.367Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Finding how to populate a field in Powershell with JiraPS<p>So, i'm using JiraPS to create some tickets and so far i've been able to work out through trial a... |
72,387,736 | Is there a way to expand references in Swashbuckle to provide inline schemas?<p>Is there a mechanism in Swashbuckle that can prevent definitions from being created with referencing to them in parameters/responses/etc.?</p>
<p>By default, you might get a path that looks like this:</p>
<pre class="lang-json prettyprint-o... | <p>Digging into the codebase a little, it looks like it's not possible at the moment.</p>
<p>However, you can create a custom <code>ISchemaGenerator</code> from <a href="https://github.com/domaindrivendev/Swashbuckle.AspNetCore/blob/95cb4d370e08e54eb04cf14e7e6388ca974a686e/src/Swashbuckle.AspNetCore.SwaggerGen/SchemaGe... | Is there a way to expand references in Swashbuckle to provide inline schemas? | .net-core|swashbuckle | 1 | 80 | 1 | 72,397,727 | 72,397,727 | 0 | true | 2022-05-26T06:39:15.507Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is there a way to expand references in Swashbuckle to provide inline schemas?<p>Is there a mechanism in Swashbuckle that can prevent definitions from being c... |
72,381,079 | How to change a user's password in Realm data base. iOS App<p>Hello everyone who are going to read this.</p>
<p>I’m developing an iOS app that has a registration feature based on the MongoDB’s Realm. Unfortunately they aren’t providing any examples how to handle email confirmation for registration user or changing pass... | <p>Actually <code>callResetPasswordFunction()</code> was redundant, so I refactored(with a help from a friend of mine) my code a little bit and I'm going to post working solution for resetting password.</p>
<pre><code><!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8&q... | How to change a user's password in Realm data base. iOS App | javascript|ios|swift|mongodb|realm | 1 | 80 | 1 | 72,418,697 | 72,418,697 | 0 | true | 2022-05-25T16:12:43.870Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to change a user's password in Realm data base. iOS App<p>Hello everyone who are going to read this.</p>
<p>I’m developing an iOS app that has a registra... |
72,252,386 | loading classes from custom dependency in a custom gradle plugin<p>I have a custom Gradle plugin, that works well, I have published a couple of versions already.</p>
<p>I have a new requirement, where I want to allow the plugin's users to provide an optional list of dependencies, in which they would provide classes, th... | <p>Finally was able to solve this, thanks to the help I got on <a href="https://discuss.gradle.org/t/class-loaded-through-configuration-is-not-found-when-task-runs/42945/3" rel="nofollow noreferrer">https://discuss.gradle.org/t/class-loaded-through-configuration-is-not-found-when-task-runs/42945/3</a></p>
<p>I am quite... | loading classes from custom dependency in a custom gradle plugin | java|gradle|gradle-plugin | 0 | 80 | 1 | 72,560,091 | 72,560,091 | 0 | true | 2022-05-15T21:41:02.713Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
loading classes from custom dependency in a custom gradle plugin<p>I have a custom Gradle plugin, that works well, I have published a couple of versions alre... |
72,249,676 | In Jinja2, how to create auto increment numbers?<p>In a page, I want to display some figures with text prompt. For example:</p>
<pre><code>Figure 1
Figure 2
</code></pre>
<p>My code is</p>
<pre><code>{% set num = 0 %}
Figure {{ ++num }}
Figure {{ ++num }}
</code></pre>
<p>But it shows</p>
<pre><code>Figure 0
Figure 0
<... | <p>Either those <em>text prompt</em> are in a list already, and you can use a <code>for</code> to display them, along with <code>loop.index</code> for the numbering:</p>
<pre><code>{% set texts = ['foo', 'bar', 'baz'] %}
{%- for text in texts -%}
Figure {{ loop.index }}
{{ text }}
{% endfor -%}
</code></pre>
<p>W... | In Jinja2, how to create auto increment numbers? | jinja2 | 1 | 80 | 1 | 72,251,302 | 72,251,302 | 0 | true | 2022-05-15T15:29:34.867Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
In Jinja2, how to create auto increment numbers?<p>In a page, I want to display some figures with text prompt. For example:</p>
<pre><code>Figure 1
Figure 2
... |
72,246,014 | Pass input data from Angular to NodeJS<p>I am currently learning the MEAN stack and I'm wondering how I can pass data from the inputs in .html to my nodeJS app.js ?</p>
<p>Let's say I have a form :</p>
<p>register.component.html:</p>
<pre><code> <form>
<input type="text" name="surname"... | <p>First, your form should apply the two-way binding.</p>
<pre><code><form (ngSubmit)="register()">
<input type="text" name="surname" [(ngModel)]="input.surname" />
<input type="text" name="name" [(ngModel)]="input.name" />
... | Pass input data from Angular to NodeJS | node.js|angular|mongodb | 0 | 80 | 1 | 72,246,110 | 72,246,110 | 0 | true | 2022-05-15T06:29:42.793Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pass input data from Angular to NodeJS<p>I am currently learning the MEAN stack and I'm wondering how I can pass data from the inputs in .html to my nodeJS a... |
72,292,865 | How to remove WARN message using Spring Cloud Sleuth and Spring Cloud Gateway<p>I need to log traces in the Netty logs, so I added this configuration:</p>
<pre><code>@Configuration
public class SleuthGWConfiguration {
@Bean
public HttpClientCustomizer customizer(HttpTracing httpTracing) {
return (c) -&... | <p>Just set a property <code>logging.level.org.springframework.cloud.sleuth.autoconfig.instrument.web.SkipPatternConfiguration=ERROR</code>. You can do it e.g. via <code>application.yml</code></p>
<p>UPDATE:</p>
<p>With this issue <a href="https://github.com/spring-cloud/spring-cloud-sleuth/issues/2166" rel="nofollow n... | How to remove WARN message using Spring Cloud Sleuth and Spring Cloud Gateway | spring-cloud-sleuth | 0 | 80 | 1 | 72,316,033 | 72,316,033 | 0 | true | 2022-05-18T16:30:17.183Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to remove WARN message using Spring Cloud Sleuth and Spring Cloud Gateway<p>I need to log traces in the Netty logs, so I added this configuration:</p>
<p... |
72,328,531 | Selenium python: find_elements_by_tag_name and looping works but not find_element_by_xpath<p>I'm trying to locate a 'div' element which has the title 'Type a message'.</p>
<p>The following piece of code works:</p>
<pre><code>div_nodes = driver.find_elements_by_tag_name('div')
for element in div_nodes:
if element.ge... | <p>I tried with this xpath and it works</p>
<pre><code>element = driver.find_element_by_xpath('//div[contains(@title, "message")]')
</code></pre>
<p>Alternatively, you can try to click the send button with this</p>
<pre><code>driver.find_element_by_css_selector('span[data-testid="send"]').click()
</... | Selenium python: find_elements_by_tag_name and looping works but not find_element_by_xpath | python|selenium | 2 | 80 | 1 | 72,335,327 | 72,335,327 | 0 | true | 2022-05-21T10:02:12.260Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Selenium python: find_elements_by_tag_name and looping works but not find_element_by_xpath<p>I'm trying to locate a 'div' element which has the title 'Type a... |
72,345,410 | All blocks read same global memory location section. Fastest method is?<p>I am writing an algorithm which all blocks are reading a same address. Such as we have a list=[1, 2, 3, 4], and all blocks are reading it and store it to their own shared memory...My test shows the more blocks reading it, the slower it will be...... | <p>Once list element is accessed by first warp of a SM unit, the second warp in same SM unit gets it from cache and broadcasts to all simt lanes. But another SM unit's warp may not have it in L1 cache so it fetches from L2 to L1 first.</p>
<p>It is similar in <code>__constant__</code> memory but it requires same addres... | All blocks read same global memory location section. Fastest method is? | memory|cuda|gpu|nvidia|broadcast | 0 | 80 | 1 | 72,346,095 | 72,346,095 | 0 | true | 2022-05-23T08:26:01.543Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
All blocks read same global memory location section. Fastest method is?<p>I am writing an algorithm which all blocks are reading a same address. Such as we h... |
72,251,077 | Django rest framework datatables foreign key data could not be obtained<p>My problem here is when i add a foreign key to my table i face issues like not getting value and not filtering the table below i share the models and serializers.</p>
<pre><code>class Foo(models.Model):
name = models.CharField(max_length=77, ... | <p>I guess what you looking for is <a href="https://www.django-rest-framework.org/api-guide/relations/#nested-relationships" rel="nofollow noreferrer"><strong>Nested Relationships</strong></a></p>
<p>You will need to include a <code>FooSerializer</code> class and update your <code>ProcessSerializer</code></p>
<pre><cod... | Django rest framework datatables foreign key data could not be obtained | django|django-rest-framework|datatables | 0 | 80 | 1 | 72,313,930 | 72,313,930 | 0 | true | 2022-05-15T18:22:37.470Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Django rest framework datatables foreign key data could not be obtained<p>My problem here is when i add a foreign key to my table i face issues like not gett... |
72,322,319 | JFace TreeViewer Sorting - Updated<p>Linking in from <a href="https://stackoverflow.com/questions/50390554/sort-rows-in-jface-treeviewer/50391180">Sort rows in JFace Treeviewer</a> where I asked @greg-449 why my comparator doesn't work when (like the question on that page) I just wanted to sort by the label provider.</... | <p>So in addition to my updates in the question...</p>
<p>I tried to find the example of a different comparator that greg-449 referenced, but the specific package was not available in my environment if I tried to import it.</p>
<p>I then searched for a means to writing a custom comparator and found a Vogella post:
<a h... | JFace TreeViewer Sorting - Updated | java|eclipse-plugin|jface|equinox | 0 | 80 | 1 | 72,351,670 | 72,351,670 | 0 | true | 2022-05-20T16:51:19.620Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
JFace TreeViewer Sorting - Updated<p>Linking in from <a href="https://stackoverflow.com/questions/50390554/sort-rows-in-jface-treeviewer/50391180">Sort rows ... |
72,332,291 | Loading JSON file not reflecting changes<p>I have a JSON file I use to store dialogue for a game. However, the changes I make to this JSON file are sometimes not reflected in my game even after hard reloads (I've been doing ctrl+shift+r or shift+F5 for this). I have made sure the changes to the JSON file are saved.</p>... | <p>The problem is that phaser doesn't automatic start the loading files, except in the <code>preload</code> function.</p>
<p>If you want to load files in other <em>functions</em> you need to call the <code>start</code> method of the <code>LoadPlugin</code>. Here the link <a href="https://photonstorm.github.io/phaser3-d... | Loading JSON file not reflecting changes | phaser-framework | 1 | 80 | 1 | 72,335,753 | 72,335,753 | 0 | true | 2022-05-21T18:35:12.730Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Loading JSON file not reflecting changes<p>I have a JSON file I use to store dialogue for a game. However, the changes I make to this JSON file are sometimes... |
72,370,599 | Transformation of Payload to custom object using DataWeave 2.0<p>I have an input payload (json array) that needs to be enriched with a custom format.</p>
<p>Input payload:</p>
<pre><code>{
"report": [
{
"totPills": 100,
"food": "chm",
"drink": &q... | <p>I separated the mapping of <code>report</code> into two sets of key-values, whose keys are in dynWeek, and those who aren't.</p>
<pre class="lang-js prettyprint-override"><code>%dw 2.0
output application/json
var dynWeek = ['202201','202202','202203']
fun getInList(obj: Object, list: Array, in: Boolean)= obj filte... | Transformation of Payload to custom object using DataWeave 2.0 | json|dataweave|mulesoft|anypoint-studio|mule4 | 0 | 80 | 2 | 72,370,789 | 72,370,789 | 0 | true | 2022-05-24T23:49:40.200Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Transformation of Payload to custom object using DataWeave 2.0<p>I have an input payload (json array) that needs to be enriched with a custom format.</p>
<p>... |
72,370,864 | Partially collapsed Bootstrap navbar with hidden items not at edges<p>There are a <a href="https://stackoverflow.com/a/46141821/9971404">number</a> of <a href="https://stackoverflow.com/a/57870003/9971404">questions</a> for partially collapsing Bootstrap navbars, e.g.:</p>
<pre><code>Item1 Item2 Item3 Item4 Item5
<... | <p>There is no Bootstrap native solution. But there is a workaround <em>using two identical navbars</em>.</p>
<p>navbar 1:</p>
<ul>
<li>has <code>d-none d-md-block</code> (for example) for nav items that should be hidden on small screens</li>
<li>on large screens it shows all nav items</li>
<li>it does not have a toggl... | Partially collapsed Bootstrap navbar with hidden items not at edges | html|css|twitter-bootstrap|bootstrap-5 | -1 | 80 | 2 | 72,387,749 | 72,387,749 | 0 | true | 2022-05-25T00:41:05.210Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Partially collapsed Bootstrap navbar with hidden items not at edges<p>There are a <a href="https://stackoverflow.com/a/46141821/9971404">number</a> of <a hre... |
72,243,782 | How to iterate over a List of numbers and check if there are pairs of numbers that add up to a given value using Scala?<p>I have to generate a list of prime numbers smaller than a given number and then find all pairs of the generated prime numbers that add up to that value.</p>
<p>E.g.
num = 12</p>
<p>smaller_primes = ... | <p>The <strong>exact</strong> same implementation you have already implemented, but using map, ... would be:</p>
<pre class="lang-scala prettyprint-override"><code>def checkSum(n: Int) = {
val getPrimes = ((2 to n).filter(check_prime_bool)
getPrimes.flatMap { a =>
getPrimes.map(b => (a, b)).filter(b =>... | How to iterate over a List of numbers and check if there are pairs of numbers that add up to a given value using Scala? | scala | 0 | 80 | 1 | 72,244,268 | 72,244,268 | 0 | true | 2022-05-14T20:51:59.470Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to iterate over a List of numbers and check if there are pairs of numbers that add up to a given value using Scala?<p>I have to generate a list of prime ... |
72,240,921 | How to add a hover effect with dynamic styles to a component element?<p>I have this Angular component where hover effect is currently applied with pseudo-class <code>:hover</code> in .scss file. But I want to apply the hover effect with dynamic values.</p>
<p>So suppose if I want the element's background to change on h... | <p>You cannot dynamically set pseudo classes via JavaScript. You would have to either:</p>
<ol>
<li>Implement your own dynamic styling using the mouseover event in your component</li>
<li>Swap to a pure CSS solution and let the consumer of your component override the hover pseudo selector with the desired color in thei... | How to add a hover effect with dynamic styles to a component element? | javascript|css|angular | -2 | 80 | 1 | 72,241,419 | 72,241,419 | 1 | true | 2022-05-14T13:59:17.367Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to add a hover effect with dynamic styles to a component element?<p>I have this Angular component where hover effect is currently applied with pseudo-cla... |
72,244,573 | ARRAYFORMULA(VLOOKUP(QUERY(IMPORTRANGEs))) instead of ARRAYFORMULA(QUERY(IMPORTRANGEs)) doesn't work<p>I am importing data from 4 sources, their format is:</p>
<pre><code>| C | D | E | F | G | H |
| 31.03.2022 | * | -60 000 | * | * | Prepayment |
| 15.01.2022 | * | 17 087 ... | <p>use:</p>
<pre><code>=ARRAYFORMULA(IFNA(VLOOKUP(MONTH(A2:A); QUERY({IMPORTRANGE("15BFO8u_FbibFj06FI4AsRofvxUuEc4v9gW1s4UM1pcw"; "Operations!C2:H")};
"select month(Col1)+1,sum(Col3) where Col3 is not null and not Col6 matches 'Transfer|Loan' group by month(Col1)+1"); 2; 0)))
</code></pre... | ARRAYFORMULA(VLOOKUP(QUERY(IMPORTRANGEs))) instead of ARRAYFORMULA(QUERY(IMPORTRANGEs)) doesn't work | arrays|google-sheets|import|google-sheets-formula|array-formulas | 1 | 80 | 1 | 72,244,916 | 72,244,916 | 1 | true | 2022-05-14T23:43:39.970Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
ARRAYFORMULA(VLOOKUP(QUERY(IMPORTRANGEs))) instead of ARRAYFORMULA(QUERY(IMPORTRANGEs)) doesn't work<p>I am importing data from 4 sources, their format is:</... |
72,253,289 | Extract consecutive uppercase words from a column of strings in Python<p>I have a column of strings from which I wish to extract all consecutive uppercase words that appear in different cases. Here is an example of the type of strings I have:</p>
<pre class="lang-py prettyprint-override"><code>data = pd.DataFrame({
... | <p>You can use the following:</p>
<pre><code>words = '(?:ubicado|encuentra|direccion)'
regex = words+'[^A-Z]*([^a-z]+)'
data['extraction'] = data['strings'].str.extract(regex)
</code></pre>
<p>Output:</p>
<pre><code> strings extraction
0 ... | Extract consecutive uppercase words from a column of strings in Python | python|regex|pandas | 2 | 80 | 2 | 72,253,340 | 72,253,340 | 1 | true | 2022-05-16T01:09:52.860Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Extract consecutive uppercase words from a column of strings in Python<p>I have a column of strings from which I wish to extract all consecutive uppercase wo... |
72,251,372 | 'AfterInteractions' cannot be used as a JSX component<p>how can I fix this error?</p>
<pre><code>'AfterInteractions' cannot be used as a JSX component.
Its return type 'ReactNode' is not a valid JSX element.
Type 'undefined' is not assignable to type 'Element | null'
</code></pre>
<p>InteractionManager:</p>
<pre>... | <p>You are returning children without a parent, you need to wrap them in a ReactFragment.</p>
<pre class="lang-js prettyprint-override"><code>if (ready) {
return <>{children}</>;
}
</code></pre> | 'AfterInteractions' cannot be used as a JSX component | react-native|expo | 0 | 80 | 1 | 72,255,742 | 72,255,742 | 1 | true | 2022-05-15T19:02:19.563Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
'AfterInteractions' cannot be used as a JSX component<p>how can I fix this error?</p>
<pre><code>'AfterInteractions' cannot be used as a JSX component.
Its... |
72,268,850 | select distinct where id in a list of values - gives me a wrong result<pre><code>$('#btnmails').on('click', function(){
let ids = $.map($('.atitle'), (e) => $(e).attr('data-id'));
ids = JSON.stringify(ids);
console.log(ids); // ["26","25","24","23","22",... | <p>I think that your problem is in your php function</p>
<p>Probably <code>$ids</code> is an array so you have to transform it in a string using <code>implode</code></p>
<p>like this</p>
<pre><code>function btn_mails($ids){
global $db;
$sq = "select distinct mail from clients where id in (" . implode(... | select distinct where id in a list of values - gives me a wrong result | javascript|php|jquery|mysql | 1 | 80 | 1 | 72,269,006 | 72,269,006 | 1 | true | 2022-05-17T05:59:25.913Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
select distinct where id in a list of values - gives me a wrong result<pre><code>$('#btnmails').on('click', function(){
let ids = $.map($('.atitle'), (e)... |
72,267,987 | How do we convert string to number in a gremlin step?<p>I have a graph which has vertex E1 with property "price" and "name" which are storing String values. I need to calculate sum of the column "price" grouped by "name". I am writing the below query using Java:</p>
<pre><code>g.... | <p>At this time, you can not do such a conversion with Gremlin steps unless you use a lambda step (which is not always possible depending on the graph database you are using and since you tagged this question with Neptune, you definitely can't take that approach - <a href="https://tinkerpop.apache.org/docs/current/refe... | How do we convert string to number in a gremlin step? | gremlin|tinkerpop|amazon-neptune | 1 | 80 | 1 | 72,273,034 | 72,273,034 | 1 | true | 2022-05-17T03:47:51.857Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do we convert string to number in a gremlin step?<p>I have a graph which has vertex E1 with property "price" and "name" which are sto... |
72,273,991 | How do I access a plain Ether transaction event in a Solidity Ethereum smart contract dApp?<p>When a user sends some Ether to a smart contract/dApp address, is there a way I can access that transaction in my smart contract? Like a built-in method that's invoked, that I can add some code to?</p>
<p>My ideal work flow, i... | <p>There is the <a href="https://docs.soliditylang.org/en/v0.8.13/contracts.html#receive-ether-function" rel="nofollow noreferrer">receive()</a> special function that gets executed when you send ETH to the contract address and not specify any function to execute (i.e. the <code>data</code> field of the transaction is e... | How do I access a plain Ether transaction event in a Solidity Ethereum smart contract dApp? | ethereum|solidity|decentralized-applications | 0 | 80 | 1 | 72,274,543 | 72,274,543 | 1 | true | 2022-05-17T12:21:54.370Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I access a plain Ether transaction event in a Solidity Ethereum smart contract dApp?<p>When a user sends some Ether to a smart contract/dApp address, ... |
72,240,514 | MapBoxGL, multiple layers performance issue<p><strong>Premise:</strong>
I have a set of data (stops on the map)loaded via geoJSON in a clustered source,
each of these stop locations can have a different icon.</p>
<p>I have over 140 variations of icons.
I am iterating through all of them and I generate a "symbol&qu... | <p>You can and should have only one layer for all your stop locations. The way you set a different icon for each one is by using <a href="https://docs.mapbox.com/help/getting-started/map-design/#data-driven-styles" rel="nofollow noreferrer">data-driven styling</a>, see <a href="https://docs.mapbox.com/mapbox-gl-js/exam... | MapBoxGL, multiple layers performance issue | javascript|reactjs|performance|mapbox|mapbox-gl-js | 0 | 80 | 1 | 72,274,726 | 72,274,726 | 1 | true | 2022-05-14T13:09:17.867Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
MapBoxGL, multiple layers performance issue<p><strong>Premise:</strong>
I have a set of data (stops on the map)loaded via geoJSON in a clustered source,
each... |
72,273,276 | wxWidgets wxMessageDialog works well in a secondary thread while a custom dialog doesn't<p><strong>I am programming using C++ /CLI with wxWidgets on Windows 11.</strong></p>
<p><strong>I'm Also Using .NET threads</strong></p>
<hr />
<p>When I create a <code>wxMessageDialog</code> in a secondary thread and run <code>-&g... | <p>In a few words, <strong>no there's no way to use a custom dialog from a secondary thread</strong> with current implementation and in the foreseeable future.</p>
<p>Even though your current code works today using <code>wxMessageDialog</code>, there's no guarantee that it will continue to work tomorrow, or on differen... | wxWidgets wxMessageDialog works well in a secondary thread while a custom dialog doesn't | wxwidgets | 0 | 80 | 1 | 72,274,773 | 72,274,773 | 1 | true | 2022-05-17T11:30:48.933Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
wxWidgets wxMessageDialog works well in a secondary thread while a custom dialog doesn't<p><strong>I am programming using C++ /CLI with wxWidgets on Windows ... |
72,290,465 | How to get average of a list in pandas dataframe<p>Here is my dataframe. I am looking to calculate the average of the current, voltage, and power of each switch individually.</p>
<pre><code> switch12 switch11 switch10
Current [0.1, 0.12, 0.15] [0.15, 0.11, 0.13] [0.18, 0.17, 0.... | <p>Another method:</p>
<pre class="lang-py prettyprint-override"><code>out = df.explode([*df.columns]).groupby(level=0).mean()
print(out)
</code></pre>
<p>Prints:</p>
<pre class="lang-none prettyprint-override"><code> switch12 switch11 switch10
Current 0.123333 0.13 0.166667
Power 18.500000... | How to get average of a list in pandas dataframe | python|pandas|list|dataframe|average | 0 | 80 | 2 | 72,290,537 | 72,290,537 | 1 | true | 2022-05-18T13:50:32.607Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to get average of a list in pandas dataframe<p>Here is my dataframe. I am looking to calculate the average of the current, voltage, and power of each swi... |
72,293,305 | Function argument type inference and conditional type<p>I'm trying to cover following case:</p>
<p>I have a function which accepts a boolean and returns value of <code>RealItem | ImaginaryItem</code> type. I'm using conditional type to narrow the return type based on <code>boolean</code> argument.</p>
<pre><code>type R... | <p>The type information of <code>isReal</code> is essentially lost with the <code>itemsFactory</code> function since you specified <code>isReal</code> as a <code>boolean</code> here.</p>
<p>To fix this, you can also add the same generic type to the <code>itemsFactory</code> function:</p>
<pre><code>const itemsFactory =... | Function argument type inference and conditional type | typescript|typescript-typings|typescript-generics | 0 | 80 | 1 | 72,293,442 | 72,293,442 | 1 | true | 2022-05-18T17:07:20.413Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Function argument type inference and conditional type<p>I'm trying to cover following case:</p>
<p>I have a function which accepts a boolean and returns valu... |
72,297,889 | Kotlin Firestore Timestamp Add Time<p>Is there a way to add time to a <code>Timestamp</code> formatted time without having to convert it multiple times?</p>
<pre class="lang-kt prettyprint-override"><code> val seconds: Long = Timestamp.now().seconds
val utcDT = LocalDateTime.ofEpochSecond(seconds, 0, ZoneOf... | <p>Instead of creating a <code>LocalDateTime</code> instance, create an <code>Instant</code> instance and add <code>2</code> hours to it, using its <code>plus</code> method which takes <code>TemporalUnits</code> for addition.</p>
<pre><code>val seconds: Long = Timestamp.now().seconds
val addedSeconds = Instant.ofEpochS... | Kotlin Firestore Timestamp Add Time | android|firebase|kotlin|google-cloud-firestore | 0 | 80 | 1 | 72,300,409 | 72,300,409 | 1 | true | 2022-05-19T02:08:57.857Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Kotlin Firestore Timestamp Add Time<p>Is there a way to add time to a <code>Timestamp</code> formatted time without having to convert it multiple times?</p>
... |
72,304,416 | What is a difference between elastic computing and serverless computing?<p>I try to find out that is a difference between those two for AZ-900 exam. I found two webpages:</p>
<blockquote>
<p>Elastic computing is the ability to quickly expand or decrease computer processing, memory, and storage resources to meet changin... | <blockquote>
<p>Elastic computing is the ability to quickly expand or decrease computer processing, memory, and storage resources to meet changing demands without worrying about capacity planning and engineering for peak usage.</p>
</blockquote>
<p>So, based on the workload the available resources can be expaned/reduce... | What is a difference between elastic computing and serverless computing? | azure|cloud|terminology | 0 | 80 | 1 | 72,304,698 | 72,304,698 | 1 | true | 2022-05-19T12:19:24.170Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What is a difference between elastic computing and serverless computing?<p>I try to find out that is a difference between those two for AZ-900 exam. I found ... |
72,287,736 | Bokeh: how to custom scale of ColorBar?<p>I make a figure (empty to simplify the code but I will add many elements), and a ColorBar to designate the color of different elements.</p>
<pre><code>from bokeh.models import LinearColorMapper, ColorBar, BasicTicker, PrintfTickFormatter
from bokeh.plotting import figure, show,... | <p>Finally, I found how to custom the ColorBar with predefined values. I changed color palette by multiplying each color by the number corresponding to the interval of the color (for example: #75968f between -5000 and -2500 = 2500):</p>
<pre><code>colors = ["#465a55"]*5000 + ["#75968f"]*2500 + [&quo... | Bokeh: how to custom scale of ColorBar? | python|bokeh|colorbar | 1 | 80 | 1 | 72,316,410 | 72,316,410 | 1 | true | 2022-05-18T10:46:05.493Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Bokeh: how to custom scale of ColorBar?<p>I make a figure (empty to simplify the code but I will add many elements), and a ColorBar to designate the color of... |
72,305,871 | Convert multiple PPTX files to PDF at once using R<p>I have several powerpoint pptx files in my folder that I want to convert to PDF.</p>
<p>I found the code below that is supposed to be used to convert PowerPoint to pdf. I'm not sure how to used it for mutiple files.</p>
<pre><code>pdf <- convert_to_pdf(path, pdf_f... | <pre><code>all_files <- list.files() # Get all the files in your working directory
pptx_files <- all_files[ which(stringr::str_detect(all_files, "\\.pptx"))] # filter for only those files with .pptx extenstion
# Loop through all the pptx files converting them to pdf using the function. Replace the .ppt... | Convert multiple PPTX files to PDF at once using R | r | 0 | 80 | 1 | 72,323,995 | 72,323,995 | 1 | true | 2022-05-19T13:54:45.443Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Convert multiple PPTX files to PDF at once using R<p>I have several powerpoint pptx files in my folder that I want to convert to PDF.</p>
<p>I found the code... |
72,341,668 | Go Channels behaviour that i do not understand<p>I recently started learning Go and there is a case that i have been written that i cannot understand why does he get two different behaviors based on a change made in a single line that just prints [line 13],</p>
<p>In the first run i run the program with [line 13] and t... | <p>The behavior you're seeing is due to a race condition. Generally, you can't be sure when the main goroutine will print the length of the channel compared to when the other goroutine will write to it.</p>
<p>By adding the print statement, you cause additional I/O (to stdout), which in turn often means that goroutine... | Go Channels behaviour that i do not understand | go|concurrency | 1 | 80 | 1 | 72,341,970 | 72,341,970 | 1 | true | 2022-05-22T22:19:14.570Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Go Channels behaviour that i do not understand<p>I recently started learning Go and there is a case that i have been written that i cannot understand why doe... |
72,336,315 | How do I get a TextIO.instream from a POSIX file descriptor?<p>If I have a POSIX file descriptor of type <code>Posix.FileSys.file_desc</code>, how to I convert it into a <code>TextIO.instream</code>? I want to do the reverse of <a href="https://stackoverflow.com/questions/72300746/how-do-i-get-the-file-descriptor-of-a-... | <p>This'll do the trick. It requires a "name" for the instream, which the <a href="https://smlfamily.github.io/Basis/posix-io.html#SIG:POSIX_IO.mkBinReader:VAL" rel="nofollow noreferrer">basis library claims</a> is used for error messages shown to the user. So I would recommend using the name or path of the u... | How do I get a TextIO.instream from a POSIX file descriptor? | sml|file-descriptor | 1 | 80 | 1 | 72,349,623 | 72,349,623 | 1 | true | 2022-05-22T09:31:14.020Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I get a TextIO.instream from a POSIX file descriptor?<p>If I have a POSIX file descriptor of type <code>Posix.FileSys.file_desc</code>, how to I conve... |
72,349,542 | MySQL Query to rename duplicate column<p>Thanks to this question <a href="https://stackoverflow.com/questions/21795891/rename-mysql-duplicate-value">Rename Mysql Duplicate Value</a> I was able to come up with this queryn to elminate the duplicate rows.</p>
<pre><code>UPDATE table1
inner join (SELECT OBJECTID,CONCAT(IDE... | <p>Change the grouping to be both <code>NAME</code> and <code>IDENT</code>.</p>
<pre><code>UPDATE table1
JOIN (
SELECT MAX(objectid) AS max_id, name, CONCAT(ident, '_1') AS new_ident
FROM table1
GROUP BY name, ident
HAVING COUNT(*) > 1
) AS t ON t.max_id = table1.objectid
SET table1.ident = t.new_ide... | MySQL Query to rename duplicate column | mysql | 0 | 80 | 1 | 72,350,621 | 72,350,621 | 1 | true | 2022-05-23T13:37:46.427Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
MySQL Query to rename duplicate column<p>Thanks to this question <a href="https://stackoverflow.com/questions/21795891/rename-mysql-duplicate-value">Rename M... |
72,351,545 | Importing, editing, and displaying videos in spyder, python? (alternative to cv2.imshow?)<p>I am making a script in which you read a video file and detect and track object motion. I am loosely following this methodology: <a href="https://pyimagesearch.com/2015/05/25/basic-motion-detection-and-tracking-with-python-and-o... | <p>According to <a href="https://stackoverflow.com/a/59825474/4926757">this post</a>, it is not possible to update the "inline plots" in Spyder.</p>
<p>The closet solution I found is using <code>clear_output</code> as described in <a href="https://stackoverflow.com/a/59736741/4926757">this post</a>.</p>
<p>Co... | Importing, editing, and displaying videos in spyder, python? (alternative to cv2.imshow?) | python|opencv|matplotlib|video|spyder | 1 | 80 | 1 | 72,355,544 | 72,355,544 | 1 | true | 2022-05-23T15:58:31.337Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Importing, editing, and displaying videos in spyder, python? (alternative to cv2.imshow?)<p>I am making a script in which you read a video file and detect an... |
72,334,849 | Modelica external C function call to DLL results in exit with code 0xffffffffc0000135<p><strong>In short, my question is:</strong> <em>How do I build a DLL in Windows 11 using mingw-gcc that can be used as an external function for a Modelica simulation in OpenModelica?</em></p>
<p>I am able to get the simulation to com... | <p>Follow up:</p>
<p>The problem was related to an issue in OpenModelica version 1.18 where the DLL was not being added to the path prior to executing the simulation, as noted in the comments by Adrian Pop. By upgrading to the latest stable development release, 1.19.0, the problem resolved itself.</p> | Modelica external C function call to DLL results in exit with code 0xffffffffc0000135 | c|gcc|mingw-w64|modelica|openmodelica | 1 | 80 | 1 | 72,356,796 | 72,356,796 | 1 | true | 2022-05-22T04:41:53.163Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Modelica external C function call to DLL results in exit with code 0xffffffffc0000135<p><strong>In short, my question is:</strong> <em>How do I build a DLL i... |
72,332,919 | Extract data from PDFs at scale with form recognizer: HttpResponseError: (FailedToDownloadImage) Failed to download image from input URL on Databricks<p>I am trying to extract data from pdfs at scale with Azure Form Recognizer. I am using the <a href="https://github.com/tomweinandy/form_recognizer_demo" rel="nofollow n... | <p>As mentioned in <a href="https://westus2.dev.cognitive.microsoft.com/docs/services/form-recognizer-api-v2-preview/operations/AnalyzeLayoutAsync" rel="nofollow noreferrer">REST API</a> supportive documentation, there is a need to specify the <strong>Content-Type</strong>. There is a need to set the public access to s... | Extract data from PDFs at scale with form recognizer: HttpResponseError: (FailedToDownloadImage) Failed to download image from input URL on Databricks | apache-spark|databricks|azure-cognitive-services | 0 | 80 | 1 | 72,360,477 | 72,360,477 | 1 | true | 2022-05-21T20:13:49.667Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Extract data from PDFs at scale with form recognizer: HttpResponseError: (FailedToDownloadImage) Failed to download image from input URL on Databricks<p>I am... |
72,361,972 | How to work with NOT IN using CTE in sql query?<p>I am having an issue with using NOT IN with cte. Actually, I want to display also a user who does not have any person_id in AccountOf table. But the statement after NOT IN is not executing Can anyone help me, please?</p>
<pre><code>with p as (
select p.id, p.nam... | <p>It looks like person_id is not in the p table specified in your subquery. Person_id is in the a table so if you change it to p.id NOT IN (select person_id from account of) that should work so long as the join you’re doing in the CTE between tables p and a is NOT an inner join since that would be filtering for only i... | How to work with NOT IN using CTE in sql query? | mysql|sql | 0 | 80 | 1 | 72,362,076 | 72,362,076 | 1 | true | 2022-05-24T11:20:37.807Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to work with NOT IN using CTE in sql query?<p>I am having an issue with using NOT IN with cte. Actually, I want to display also a user who does not have ... |
72,376,650 | AnimatePresence and react-router-dom [BrowserRouter] is not a <Route> component. All component of <Routes> must be a <Route> or <React.Fragment><p>[BrowserRouter] is not a component. All component children of must be a or <React.Fragment></p>
<p>I don't understand why this isn't working anymore.
I've built a c... | <p>You have a mistake in line 4 of <code>AnimatedRoutes.js</code>, it should be</p>
<p><code>import { Route, Routes, useLocation} from 'react-router-dom'</code></p>
<p>There is an actual <code><Route /></code> component that you should use, instead of <code>BrowserRouter as Route</code> that's already used once i... | AnimatePresence and react-router-dom [BrowserRouter] is not a <Route> component. All component of <Routes> must be a <Route> or <React.Fragment> | reactjs|react-router|react-router-dom|framer-motion | 0 | 80 | 1 | 72,376,772 | 72,376,772 | 1 | true | 2022-05-25T11:18:43.090Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
AnimatePresence and react-router-dom [BrowserRouter] is not a <Route> component. All component of <Routes> must be a <Route> or <React.Fragment><p>[BrowserRo... |
72,377,845 | Window function query in MySQL<p>We have columns Date, CID, Budget. We want to create a column Budget_rank which gives us result as:
Observe that the resultant table looks sorted on date first and then whichever same Budget values were there, they got the same rank</p>
<p>Expected Output:</p>
<div class="s-table-contai... | <p>First use <code>LAG()</code> window function to get the previous <code>Budget</code> of each row and create a boolean flag of 1 or 0 depending on whether the previous <code>Budget</code> is different than the current <code>Budget</code> and then sum over the flags to create the column <code>Budget_rank</code>:</p>
<... | Window function query in MySQL | mysql|sql|window-functions|dense-rank | 0 | 80 | 2 | 72,379,078 | 72,379,078 | 1 | true | 2022-05-25T12:41:25.803Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Window function query in MySQL<p>We have columns Date, CID, Budget. We want to create a column Budget_rank which gives us result as:
Observe that the resulta... |
72,379,791 | Media query only working between 1024 and 1280<p>I have this media query:</p>
<pre><code> @media only screen and (min-width: 360px) and (max-width: 1280px) {
.discount-box-primary {
display: none;
}
}
</code></pre>
<p>The <code>.discount-box-primary</code> element is supposed to not be shown between 36... | <p>It's preferable to have a base, and define min amounts. This way it's easier to manage your breakpoints. Have a primary rule defined, then work your way up the min-widths instead of using ranges. See how something like this works for you:</p>
<pre class="lang-css prettyprint-override"><code>.discount-box-primary { d... | Media query only working between 1024 and 1280 | css|media-queries | -1 | 80 | 1 | 72,379,920 | 72,379,920 | 1 | true | 2022-05-25T14:46:35.533Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Media query only working between 1024 and 1280<p>I have this media query:</p>
<pre><code> @media only screen and (min-width: 360px) and (max-width: 1280px) ... |
72,369,401 | JOIN performance: affected by primary key choice or column order?<p>I have a table <code>labor</code> with 20 columns and 30 millions rows. One column <code>lab_id</code> is a foreign key and has an index (not unique). Another table <code>map</code> has 10 columns and has primary key <code>id</code> and an unique index... | <p>The order of columns in the table makes no measurable difference.</p>
<p>The choice of primary key <em>does</em> make a difference in InnoDB. That storage engine uses a table's primary key as a so-called <em><a href="https://dev.mysql.com/doc/refman/8.0/en/innodb-index-types.html" rel="nofollow noreferrer">clustered... | JOIN performance: affected by primary key choice or column order? | mysql|indexing|sql-update|query-optimization|primary-key | 0 | 80 | 1 | 72,384,407 | 72,384,407 | 1 | true | 2022-05-24T20:58:45.670Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
JOIN performance: affected by primary key choice or column order?<p>I have a table <code>labor</code> with 20 columns and 30 millions rows. One column <code>... |
72,384,734 | R ggplot scale_y_log10, remove 10^(-0.5) from log scale<p>I'm using the following code to get a log scale on my axis, however, it also displays intermediate values like 10^(0.5), 10^(1.5), 10^(2.5)... How can I get rid of those and only show the full 10^1, 10^2,..., as my axis labels?</p>
<pre><code>scale_y_log10(break... | <p>You could try playing with the <code>n</code> argument to <code>scales::breaks_log</code> (the default is <code>n=5</code>), as in</p>
<pre class="lang-r prettyprint-override"><code>scale_y_log10(breaks = breaks_log(n=3))
</code></pre>
<p>Or if you are willing to hard-code the solution for a particular graph you cou... | R ggplot scale_y_log10, remove 10^(-0.5) from log scale | r|ggplot2 | 0 | 80 | 1 | 72,385,023 | 72,385,023 | 1 | true | 2022-05-25T22:21:42.593Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
R ggplot scale_y_log10, remove 10^(-0.5) from log scale<p>I'm using the following code to get a log scale on my axis, however, it also displays intermediate ... |
72,386,887 | How do I get the currently selected pencil kit color?<p>I have the following pencil kit setup:</p>
<pre><code>class PencilKitVC: UIViewController {
// MARK: - Views
private let canvasView = PKCanvasView()
private let toolPicker = PKToolPicker()
// MARK: - View Lifecycle
override func viewDidLoad... | <p>You need to add an observer to ToolPicker. Then listen to it.</p>
<pre><code>toolPicker.addObserver(self)
func toolPickerSelectedToolDidChange(_ toolPicker: PKToolPicker) {
if let inkingTool = toolPicker.selectedTool as? PKInkingTool {
let color = inkingTool.color
}
}
</code></pre>
<p>You can get mo... | How do I get the currently selected pencil kit color? | ios|swift|pencilkit | 0 | 80 | 1 | 72,389,793 | 72,389,793 | 1 | true | 2022-05-26T05:00:24.267Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I get the currently selected pencil kit color?<p>I have the following pencil kit setup:</p>
<pre><code>class PencilKitVC: UIViewController {
// M... |
72,389,684 | Set Optional params in PUT method using fastAPI/mongodb<p>I am trying to set <code>Optional</code> some params in a PUT method from my API.
Using <code>fastAPI</code> and <code>mongodb</code> I've build a simple API to insert students and delete the ones, now I am looking to allow me update the entries but not mandator... | <p>You can use <code>exclude_unset=True</code> argument as suggested in <a href="https://fastapi.tiangolo.com/tutorial/body-updates/" rel="nofollow noreferrer">FastAPI documentation</a>:</p>
<pre><code>@api_router.put('/update-student/{id}', tags=['Student'])
async def update_student(id,ustudent: UpdateStudent):
cl... | Set Optional params in PUT method using fastAPI/mongodb | python|python-3.x|api|fastapi | 0 | 80 | 1 | 72,389,796 | 72,389,796 | 1 | true | 2022-05-26T09:32:29.500Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Set Optional params in PUT method using fastAPI/mongodb<p>I am trying to set <code>Optional</code> some params in a PUT method from my API.
Using <code>fastA... |
72,778,869 | DefaultLambdaJsonSerializer ignores custom input (aws lambda net6)<p>Following the documentation for aws lambda net6:</p>
<ul>
<li><a href="https://docs.aws.amazon.com/lambda/latest/dg/csharp-handler.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/lambda/latest/dg/csharp-handler.html</a></li>
<li>or small t... | <p>Question and answer here:
<a href="https://github.com/aws/aws-lambda-dotnet/issues/1227" rel="nofollow noreferrer">https://github.com/aws/aws-lambda-dotnet/issues/1227</a>
by @normj</p>
<p>You are writing a Lambda function that listens to API Gateway's HTTP events. The event type for those Lambda functions is Amazon... | DefaultLambdaJsonSerializer ignores custom input (aws lambda net6) | c#|.net|amazon-web-services|aws-lambda|.net-6.0 | 0 | 80 | 1 | 72,803,403 | 72,803,403 | 1 | true | 2022-06-27T22:23:47.697Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
DefaultLambdaJsonSerializer ignores custom input (aws lambda net6)<p>Following the documentation for aws lambda net6:</p>
<ul>
<li><a href="https://docs.aws.... |
72,817,615 | webview going under the toolbar<p>As the title implies the WebView is under th toolbar. When I started the project the toolbar appears in the app but is not coded. This toolbar behaves badly as when I access a full screen video and then I go back a white space apperas between the statusbar and the toolbar. Enter the co... | <p>You need to apply proper constraints to your <code>WebView</code> like this</p>
<p>Try this</p>
<pre><code><?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="ht... | webview going under the toolbar | android|android-layout|android-webview|android-toolbar|android-fullscreen | 0 | 80 | 2 | 72,817,781 | 72,817,781 | 1 | true | 2022-06-30T14:31:19.460Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
webview going under the toolbar<p>As the title implies the WebView is under th toolbar. When I started the project the toolbar appears in the app but is not ... |
72,821,467 | Linq query geting list by comparing Id with an list of objects that have ids<p>I have the following code:</p>
<pre><code>var translations = _context.Translations
Where(t => t.LineId == lines.Id)
</code></pre>
<p>I got a variable named <code>lines</code> which is of type <code>List<Line></code> every <co... | <p>Project an <code>IEnumerable<T></code> of your <code>Line.Id</code> property, then use the result in your query with the <code>Contains</code> method:</p>
<pre><code>var lineIDs = lines.Select(l => l.Id).ToArray();
var translations = _context.Translations
.Where(t => lineIDs.Contains(t.LineId))
... | Linq query geting list by comparing Id with an list of objects that have ids | c#|entity-framework|linq | 0 | 80 | 2 | 72,821,676 | 72,821,676 | 1 | true | 2022-06-30T20:08:21.507Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Linq query geting list by comparing Id with an list of objects that have ids<p>I have the following code:</p>
<pre><code>var translations = _context.Translat... |
72,823,498 | SQLite3 How to handle column index out of range<p>Whenever I want to insert a type object (define below) in the database I get "error 25 : column index out of range".
Which means that the value I try to bind doesn't fit in the query right?</p>
<pre class="lang-sql prettyprint-override"><code>CREATE TABLE colo... | <p>If you used your debugger to show the value of <code>query</code> here, the problem becomes very easy to see:</p>
<pre><code>rc = sqlite3_prepare_v2(db, query.c_str(), -1, &pStmt, NULL);
</code></pre>
<p>You will discover that this <code>query</code> is not really the <code>INSERT</code> statement that you think... | SQLite3 How to handle column index out of range | c++|database|sqlite | 1 | 80 | 1 | 72,823,894 | 72,823,894 | 1 | true | 2022-07-01T01:16:06Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SQLite3 How to handle column index out of range<p>Whenever I want to insert a type object (define below) in the database I get "error 25 : column index ... |
72,831,489 | How to Connect Tableau to Azure Data Lake Storage Gen2<p>I am using the following link to guide me on connecting Tableau to ADLS Gen2 <a href="https://help.tableau.com/current/pro/desktop/en-us/examples_azure_data_lake_gen2.htm" rel="nofollow noreferrer">https://help.tableau.com/current/pro/desktop/en-us/examples_azure... | <p>You're using Tableau Public (limited connection options), but if you download Tableau Desktop (even on a 14day trial) it will work <a href="https://i.stack.imgur.com/cQu4a.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cQu4a.png" alt="enter image description here" /></a></p> | How to Connect Tableau to Azure Data Lake Storage Gen2 | azure-data-lake|tableau-desktop | 0 | 80 | 1 | 72,836,829 | 72,836,829 | 1 | true | 2022-07-01T15:27:08.680Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to Connect Tableau to Azure Data Lake Storage Gen2<p>I am using the following link to guide me on connecting Tableau to ADLS Gen2 <a href="https://help.t... |
72,837,445 | Retrieve list of buckets from all regions using boto3<p>I was trying to retrieve the list of buckets from all regions using boto3, however I am unable to list the buckets from the correct region</p>
<p>So far I have tried <code>location['LocationConstraint']</code>, which comes up as <code>None</code>
I have also tried... | <p>You don't have to change region for client. <code>list_buckets</code> returns <strong>all buckets</strong> in the account, regardless where they are located. That's why you get the same buckets for each region in your code.</p>
<p>You have to iterate over <code>list_buckets</code> results, and use <a href="https://b... | Retrieve list of buckets from all regions using boto3 | amazon-web-services|amazon-s3|boto3 | 1 | 80 | 1 | 72,837,632 | 72,837,632 | 1 | true | 2022-07-02T07:54:39.160Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Retrieve list of buckets from all regions using boto3<p>I was trying to retrieve the list of buckets from all regions using boto3, however I am unable to lis... |
72,837,220 | fs.readFileSync doesn't recognize file<p>The fs.readFileSync function does not recognize the HTML-file, even tho it is localted in the same folder. The error says: Error: ENOENT: no such file or directory, open 'node.html'</p>
<pre><code>const http = require('http');
const PORT = 3000;
const fs = require('fs')
const s... | <p>The logical explanation for your issue is that when you start your program the current working directory in the OS is not the directory that contains your <code>node.html</code> file. Thus, <code>fs.readFileSync('node.html', "utf8");</code> which only looks in the current working directory does not find t... | fs.readFileSync doesn't recognize file | node.js|fs | 0 | 80 | 3 | 72,843,210 | 72,843,210 | 1 | true | 2022-07-02T07:18:12.750Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
fs.readFileSync doesn't recognize file<p>The fs.readFileSync function does not recognize the HTML-file, even tho it is localted in the same folder. The error... |
72,842,442 | How to draw a line along the Z axis in openGL<p>I'm stuck drawing a line along the Z-axis. I have checked the related topic that <a href="https://stackoverflow.com/questions/36151895/opengl-cant-draw-z-axis">OpenGL Can't draw z axis</a> but even if I change my camera position, I still can't see my line; meanwhile, ... | <p>Assuming that you want to draw a 3D line, the size argument of <code>glVertexAttribPointer</code> is wrong. By setting it to two, you tell OpenGL to read only two values and add 0 for z.</p>
<p>Set the size to 3 as in</p>
<pre><code>glVertexAttribPointer(0, // attribute 0 matches aPos in Vertex Sha... | How to draw a line along the Z axis in openGL | c++|opengl|glsl|glfw|glm-math | 0 | 80 | 1 | 72,846,416 | 72,846,416 | 1 | true | 2022-07-02T21:10:39.693Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to draw a line along the Z axis in openGL<p>I'm stuck drawing a line along the Z-axis. I have checked the related topic that <a href="https://stackoverfl... |
72,847,818 | find multiple elements by id<p>I am trying to find multiple elements by their respective ids
The elements are named</p>
<blockquote>
<p>dcm-reservation-limit-multiple-input-generic-X</p>
</blockquote>
<p>with X being the number of elements, it could be:</p>
<pre><code>dcm-reservation-limit-multiple-input-generic-0
dcm-... | <p>Use <a href="https://www.guru99.com/using-contains-sbiling-ancestor-to-find-element-in-selenium.html#1" rel="nofollow noreferrer">contains</a> or <a href="https://www.guru99.com/using-contains-sbiling-ancestor-to-find-element-in-selenium.html#6" rel="nofollow noreferrer">starts-with</a>?</p>
<p><code>pricesToFind = ... | find multiple elements by id | python|selenium|web-scraping | 0 | 80 | 2 | 72,848,369 | 72,848,369 | 1 | true | 2022-07-03T15:37:26.317Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
find multiple elements by id<p>I am trying to find multiple elements by their respective ids
The elements are named</p>
<blockquote>
<p>dcm-reservation-limit... |
72,846,326 | Is it possible to accelerate this postgres / sql (read) query?<p>I have the following table:</p>
<pre><code>CREATE TABLE mosmix_data (
id SERIAL PRIMARY KEY,
created_at TIMESTAMP without time zone default (now() at time zone 'utc'),
TimeStep timestamp,
name char(8),
description text,
PPPP float8,
... | <p>The simple way is to create an index on timestamp then name:</p>
<pre><code>CREATE INDEX my_idx ON mosmix_data(timestamp, name)
</code></pre>
<p><code>timestamp</code> is a good candidate for the first column of the index because that's the tightest condition in your <code>where</code> clause (within a range of 4 da... | Is it possible to accelerate this postgres / sql (read) query? | postgresql|postgresql-14 | 1 | 80 | 1 | 72,850,452 | 72,850,452 | 1 | true | 2022-07-03T12:01:05.650Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is it possible to accelerate this postgres / sql (read) query?<p>I have the following table:</p>
<pre><code>CREATE TABLE mosmix_data (
id SERIAL PRIMARY K... |
72,865,865 | UseEffect stop working after refreshing the site<p>I'm working in ReactJS. I have a form that is suppossed to be the configuration of another form. This specif form kind of looks like this:</p>
<pre><code> const [startingDate, setStartingDate] = useState();
const [endingDate, setEndingDate] = useState();
const [st... | <p>The <code>useEffect</code> hook is executed after the page is loaded. and at the time of initial page loading, <code>config[0]</code> is not defined.</p>
<p>use optional chaining and default value togther:</p>
<pre><code><input
type="date"
placeholder="Date of the meeting"
name=&qu... | UseEffect stop working after refreshing the site | javascript|reactjs|use-effect | 2 | 80 | 4 | 72,866,305 | 72,866,305 | 1 | true | 2022-07-05T07:55:25.470Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
UseEffect stop working after refreshing the site<p>I'm working in ReactJS. I have a form that is suppossed to be the configuration of another form. This spec... |
72,874,602 | Scrape ajax pages<p>I do not anything how to scrape ajax pages there is no pagination on website the website will be load by clicking the <code>load more button</code> these is the page link <a href="https://aaos22.mapyourshow.com/8_0/explore/exhibitor-gallery.cfm?featured=false" rel="nofollow noreferrer">https://aaos2... | <p>Okay, try the following script to get all the fields you wish to grab from there traversing all the exhibitor list:</p>
<pre><code>import scrapy
from scrapy.selector import Selector
class MapYourShowSpider(scrapy.Spider):
name = "mapyourshow"
content_url = 'https://aaos22.mapyourshow.com/8_0/ajax... | Scrape ajax pages | python|selenium|web-scraping|scrapy | 0 | 80 | 2 | 72,874,965 | 72,874,965 | 1 | true | 2022-07-05T19:29:26.997Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Scrape ajax pages<p>I do not anything how to scrape ajax pages there is no pagination on website the website will be load by clicking the <code>load more but... |
72,882,208 | Perform A Laravel Redirect with Ajax Request with Parameters<p>I'm trying to redirect to my <code>verify.blade.php</code> page with parameters using Ajax response.</p>
<p>This is my Ajax code,</p>
<pre><code>$.ajax({
url: '{{ 'signupUser' }}',
method: 'post',
data: formUserSignupData,
cache: false,
... | <p>You can use below artisan command to check if the route exists.</p>
<pre class="lang-bash prettyprint-override"><code>php artisan route:list
</code></pre>
<p>I think you need to define a route parameter.</p>
<pre class="lang-php prettyprint-override"><code>Route::view('/verify/{token}', 'auth.verify')->name('veri... | Perform A Laravel Redirect with Ajax Request with Parameters | ajax|laravel | 0 | 80 | 1 | 72,882,784 | 72,882,784 | 1 | true | 2022-07-06T10:47:15.220Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Perform A Laravel Redirect with Ajax Request with Parameters<p>I'm trying to redirect to my <code>verify.blade.php</code> page with parameters using Ajax res... |
72,899,894 | Splitting a string in an array of strings of limited size<p>I have a string of a random address like</p>
<blockquote>
<p><code>String s = "H.N.-13/1443 laal street near bharath dental lab near thana qutubsher near modern bakery saharanpur uttar pradesh 247001";</code></p>
</blockquote>
<p>I want to split it i... | <p>Find all occurrences of up to 20 chars starting with a non-space and ending with a word boundary, and collect them to a List:</p>
<pre class="lang-java prettyprint-override"><code>List<String> parts = Pattern.compile("\\S.{1,19}\\b").matcher(s)
.results()
.map(MatchResult::group)
.collect(Colle... | Splitting a string in an array of strings of limited size | java|arrays|string|algorithm|data-structures | -2 | 80 | 2 | 72,901,119 | 72,901,119 | 1 | true | 2022-07-07T14:46:23.753Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Splitting a string in an array of strings of limited size<p>I have a string of a random address like</p>
<blockquote>
<p><code>String s = "H.N.-13/1443 ... |
72,905,971 | Unity Object reference not set to an instance of an object with enums<p>Unity is saying "Object reference not set to an instance of an object" on line 23 even though the object is referenced and VS can't find any issues with my code. This is my first time using the C# getters/setters and I don't know what I'm... | <p>You have to swap the lines in your <code>Start()</code> method.</p>
<pre class="lang-cs prettyprint-override"><code>void Start() {
sprite = gameObject.GetComponent<SpriteRenderer>();
State = defaultState;
}
</code></pre>
<p>This is because when the code <code>State = defaultState</code> is read, then i... | Unity Object reference not set to an instance of an object with enums | c#|unity3d | -1 | 80 | 1 | 72,906,049 | 72,906,049 | 1 | true | 2022-07-08T02:07:03.350Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Unity Object reference not set to an instance of an object with enums<p>Unity is saying "Object reference not set to an instance of an object" on l... |
72,911,087 | How to fetch multiple records from a fetch statement in SQLRPGLE?<p>Recently in an interview I was asked how to fetch multiple record using a single fetch statement in SQLRPGLE. I would like to know is it possible to get multiple record using a single fetch statement, if yes then can some one elaborate?</p> | <p>You should take a look at the <a href="https://www.ibm.com/docs/en/i/7.4?topic=statements-fetch" rel="nofollow noreferrer">SQL Reference</a> and the <a href="https://www.ibm.com/docs/en/i/7.4?topic=cssiira-using-host-structure-arrays-in-ile-rpg-applications-that-use-sql" rel="nofollow noreferrer">Embedded SQL Progra... | How to fetch multiple records from a fetch statement in SQLRPGLE? | ibm-midrange|rpgle|rpg | -1 | 80 | 2 | 72,912,710 | 72,912,710 | 1 | true | 2022-07-08T12:01:53.393Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to fetch multiple records from a fetch statement in SQLRPGLE?<p>Recently in an interview I was asked how to fetch multiple record using a single fetch st... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.