question_id int64 37.6M 73.2M | input_text stringlengths 88 52.4k | output_text stringlengths 37 35.6k | title stringlengths 15 150 | tags stringlengths 1 107 | q_score int64 -19 397 | view_count int64 3 879k | answer_count int64 1 21 | accepted_answer_id int64 37.6M 73.8M | answer_id int64 37.6M 73.8M | a_score int64 -5 1.29k | is_accepted bool 1
class | creation_date stringlengths 20 24 | input_text_instruct stringlengths 251 52.6k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
72,105,587 | Why might DecomposeLumpedParameters return unsimplified expressions?<p>I am trying to perform system identification on an object attached to a KUKA iiwa using Drake in Python. My goal is to do lumped parameter estimation using least squares, which involves decomposing the multibody equations using <code>symbolic.Decomp... | <p>I just checked the code (thanks for the reproduction). The <code>m</code> in the denominator is happening in the <code>MakeFromCentralInertia</code> step. If you add</p>
<pre><code>display(Math(ToLatex(inertia.CopyToFullMatrix6(), 2)))
</code></pre>
<p>right after the inertia is created, you'll see it. I think we... | Why might DecomposeLumpedParameters return unsimplified expressions? | python|drake|system-identification | 0 | 34 | 1 | 72,107,108 | 72,107,108 | 0 | true | 2022-05-03T21:20:56.110Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why might DecomposeLumpedParameters return unsimplified expressions?<p>I am trying to perform system identification on an object attached to a KUKA iiwa usin... |
72,225,619 | How Change Url Path for Jekyll Blog on a GitHub Subdirectory?<p>Good day,</p>
<p>I wrote a site builder. Source here : <a href="https://github.com/koy-odasi/core" rel="nofollow noreferrer">https://github.com/koy-odasi/core</a></p>
<p>and</p>
<p>I installed my site (<a href="https://github.com/barak-framework/blog" rel=... | <p>Trt adding this to your _config.yml: <code>baseurl: "/blog"</code> and possibly add <code>{{ site.baseurl }}</code> to your links in templates</p> | How Change Url Path for Jekyll Blog on a GitHub Subdirectory? | github|jekyll|blogs | 0 | 39 | 1 | 72,240,033 | 72,240,033 | 0 | true | 2022-05-13T07:03:23.747Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How Change Url Path for Jekyll Blog on a GitHub Subdirectory?<p>Good day,</p>
<p>I wrote a site builder. Source here : <a href="https://github.com/koy-odasi/... |
72,199,496 | How to skip an item in nested map based on When()<p>I want iterate over <code>items</code>'s <code>data</code> and create a a new list of SomeData based on <code>item.type</code> however when type is <code>UNKNOWN</code> I need skip that element and not add to list. How can I achieve it? <code>continue@map</code> is no... | <p>I have given the solution as shown below here</p>
<pre><code> fun getListOfMyItems(
items: List<SomeData>,
): List<MyItem> {
return items.groupBy {
Instant.ofEpochMilli(it.timestamp)
.toYear()
}.map { element ->
... | How to skip an item in nested map based on When() | android|loops|kotlin|data-structures|collections | 0 | 48 | 2 | 72,199,821 | 72,199,821 | 0 | true | 2022-05-11T10:33:08.280Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to skip an item in nested map based on When()<p>I want iterate over <code>items</code>'s <code>data</code> and create a a new list of SomeData based on <... |
72,198,155 | Integration of pandas timeframe<p>I want to integrate the following dataframe, such that I have the integrated value for every hour. I have roughly a 10s sampling rate, but if it is necissary to have an even timeinterval, I guess I can just use <code>df.resample()</code>.</p>
<pre><code>Timestamp Pow... | <p>You could create a new column representing your Timestamp truncated to hours:</p>
<pre><code>df['Timestamp_hour'] = df['Timestamp'].dt.floor('h')
</code></pre>
<p>Please note that in that case, the rows between hour 6.00 to hour 6.59 will be included into the 6 hour and not the 7 one.</p>
<p>Then you can group your ... | Integration of pandas timeframe | python|pandas|datetime | 0 | 125 | 3 | 72,198,394 | 72,198,394 | 0 | true | 2022-05-11T08:55:26.683Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Integration of pandas timeframe<p>I want to integrate the following dataframe, such that I have the integrated value for every hour. I have roughly a 10s sam... |
72,154,095 | Given a graph depicting a social network where anyone can also post Write a query that finds all of Dani's friends up to level 3 who also marked likes<p>Given a graph depicting a social network where anyone can also post.</p>
<p>A user can be a friend of people or just like his post.</p>
<ul>
<li><p>Types of relationsh... | <p>Welcome Epsilon 1!
EDIT: support case where Dani did not publish anything:</p>
<p>You can do something like this:</p>
<pre><code>MATCH (d:person{name:'Dani'})-[:friend*..3]-(friend:person)
WHERE friend.age > d.age
WITH d, collect(friend) AS friends
OPTIONAL MATCH (d)-[:publish]->(p:post)
WITH COUNT(p) AS count... | Given a graph depicting a social network where anyone can also post Write a query that finds all of Dani's friends up to level 3 who also marked likes | neo4j | 0 | 49 | 1 | 72,155,198 | 72,155,198 | 0 | true | 2022-05-07T15:48:17.127Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Given a graph depicting a social network where anyone can also post Write a query that finds all of Dani's friends up to level 3 who also marked likes<p>Give... |
72,186,640 | mongodb aggregation query to include a specific field<p>I have a mongodb schema which looks like</p>
<pre><code>{
post_id: {
type: mongoose.Schema.Types.ObjectId,
required: true,
ref: "Post"
},
comment_by: {
type: mongoose.Schema.Types.ObjectId,
required: true,
ref: "User"
},... | <p>Welcome heeya joshi!.</p>
<p>You can do something like this:</p>
<pre><code> db.collection.aggregate([
{
$match: {post_id: mongoose.Types.ObjectId(post_id)}
},
{
$addFields: {
parent_comment_id: {$ifNull: ["$parent_comment_id", "$_id"]}
}
... | mongodb aggregation query to include a specific field | mongodb-query|aggregation-framework | 0 | 62 | 1 | 72,187,014 | 72,187,014 | 0 | true | 2022-05-10T12:50:22.437Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
mongodb aggregation query to include a specific field<p>I have a mongodb schema which looks like</p>
<pre><code>{
post_id: {
type: mongoose.Schema.Types.... |
72,160,077 | Garbage characters at the end of my vertex shader<p>I've been trying to load my vertex shader from a file in c. Here is my code for loading the characters in a file into a string:</p>
<pre><code>char* path = "shaders/vertex_shader.glsl";
if (!fopen(path, "r")) {
printf("Could not open shad... | <p>It appears that I just had to open the file in binary mode:</p>
<pre><code>FILE* shader = fopen(path, "rb");
</code></pre> | Garbage characters at the end of my vertex shader | c|fopen | 0 | 63 | 2 | 72,164,490 | 72,164,490 | 0 | true | 2022-05-08T10:24:47.577Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Garbage characters at the end of my vertex shader<p>I've been trying to load my vertex shader from a file in c. Here is my code for loading the characters in... |
72,152,461 | django date input format is not interpreted properly<p>I am trying to setup a Model and a corresponding ModelForm with django containing a DateField/Input.</p>
<pre><code>from django.db import models
class MyModel(models.Model):
myDate = models.DateField()
from django import forms
class MyModelForm(forms.ModelFo... | <p>Specifying the format only in your widgetβs form is just used as a display, you still need to pass it to specify the field <code>myDate</code> as a <code>DateField</code> in your form:</p>
<pre><code>from django.db import models
class MyModel(models.Model):
myDate = models.DateField()
from django import forms
... | django date input format is not interpreted properly | python|django|modelform | 0 | 63 | 1 | 72,152,640 | 72,152,640 | 0 | true | 2022-05-07T12:24:01.867Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
django date input format is not interpreted properly<p>I am trying to setup a Model and a corresponding ModelForm with django containing a DateField/Input.</... |
72,195,486 | Which is the best way to build release apk with smaller size?<p>While i am building release apk with the command</p>
<p><code>flutter build apk --release</code></p>
<p>it is of size <strong>18 mb.</strong></p>
<p>While i run the command</p>
<p><code>flutter run --release </code></p>
<p>it gives me apk of size <strong>... | <p>If you're trying to upload it to Play Store the best practice is to build app bundles,if you wanted to build apk files then try splitting your apk with this command:</p>
<pre><code>flutter build apk --split-per-abi
</code></pre>
<p>or specify a target platform</p>
<pre><code> flutter build apk --target-platform &l... | Which is the best way to build release apk with smaller size? | android|flutter|mobile | 0 | 46 | 1 | 72,213,674 | 72,213,674 | 0 | true | 2022-05-11T04:36:57.253Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Which is the best way to build release apk with smaller size?<p>While i am building release apk with the command</p>
<p><code>flutter build apk --release</co... |
72,139,717 | How can I load the openai api configuration through js in html?<p>I am trying to send a request through js in my html so that openai analyzes it and sends a response, but if in the js I put the following:</p>
<pre><code>const { Configuration, OpenAIApi } = require("openai");
const configuration = new Configu... | <p>It took me a little while to figure this out.</p>
<ol>
<li>Go to <a href="https://beta.openai.com/playground" rel="nofollow noreferrer">https://beta.openai.com/playground</a> and choose the settings you want.</li>
<li>Then, click "View code" in the top right.</li>
<li>Select "curl" as the code ty... | How can I load the openai api configuration through js in html? | javascript|html|node.js|openai | 0 | 322 | 1 | 72,355,295 | 72,355,295 | 0 | true | 2022-05-06T10:05:48.950Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I load the openai api configuration through js in html?<p>I am trying to send a request through js in my html so that openai analyzes it and sends a ... |
72,026,308 | Installing MantisBT on WSL2<p>I have installed MantisBT in Ubuntu in wsl2, I had no problem following the instructions like in another ubuntu server (unless for enabling ufw), but at the moment of open the browser to proceed with the installation I just see the contents of the file index.php.
<a href="https://i.stack.i... | <p>It was due to a missing php package, so first make sure you have all the packages require, I found this thanks to the mantis-error_log file, In my case was php-fpm. but just installing it does not do the trick, yo have to install it, start the service and restart apache2</p>
<pre><code>sudo apt install php7.x-fpm
su... | Installing MantisBT on WSL2 | wsl-2|mantis | 0 | 33 | 1 | 72,038,986 | 72,038,986 | 0 | true | 2022-04-27T09:21:06.980Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Installing MantisBT on WSL2<p>I have installed MantisBT in Ubuntu in wsl2, I had no problem following the instructions like in another ubuntu server (unless ... |
72,067,821 | ASP.NET Core 6 - Cookie gets returned but not stored in browser<p>I am struggling with Cookie Authentication in Asp.Net Core 6.0</p>
<p>I have implemented and configured the Cookie Authentication and the problem I am facing is the following.</p>
<p>When sending POST request to the login Endpoint which is at <code><d... | <p>All I had to do was to add the correct CORS policy. If you expect a Cookie to be stored and included in future requests, you must add the Origins and the .WithCredentials() properties to the Cors policy.</p>
<p><strong>It might look something like this:</strong></p>
<pre><code>service.AddCors(options =>
{
... | ASP.NET Core 6 - Cookie gets returned but not stored in browser | asp.net-core|cookies|fetch|asp.net-core-identity | 0 | 516 | 1 | 72,083,555 | 72,083,555 | 0 | true | 2022-04-30T10:47:47.350Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
ASP.NET Core 6 - Cookie gets returned but not stored in browser<p>I am struggling with Cookie Authentication in Asp.Net Core 6.0</p>
<p>I have implemented an... |
72,149,528 | A date loop problem and list remove problem on JupyterLab<p><a href="https://i.stack.imgur.com/DL3O9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DL3O9.png" alt="enter image description here" /></a>
Hello everyone, I encountered a date looping problem on JupyterLab, the problem is as shown in the ... | <p>You should not modify the list <code>dates</code> while iterating over it. Please check <a href="https://stackoverflow.com/questions/6260089/strange-result-when-removing-item-from-a-list-while-iterating-over-it">Strange result when removing item from a list while iterating over it</a> for more details.</p>
<p>To re... | A date loop problem and list remove problem on JupyterLab | python|datetime|for-loop|jupyter-lab | 0 | 22 | 1 | 72,149,665 | 72,149,665 | 0 | true | 2022-05-07T04:35:24.727Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
A date loop problem and list remove problem on JupyterLab<p><a href="https://i.stack.imgur.com/DL3O9.png" rel="nofollow noreferrer"><img src="https://i.stack... |
72,198,810 | Run VS Code task on specific file/folder selectable via a drop-down list<p>I am trying to figure out how to run a VS Code task on a specific folder/file that is selectable over a drop-down list.</p>
<p>Example:</p>
<ol>
<li>open Command Palette (Ctrl+Shift+P)</li>
<li>filter on 'tasks' -> select 'Tasks: Run Tasks'<... | <p>You can use an <code>${input}</code> variable</p>
<pre class="lang-json prettyprint-override"><code>{
"version": "2.0.0",
"tasks": [
{
"label": "cpp lint",
"type": "shell",
"command": "cpplint ${input:selec... | Run VS Code task on specific file/folder selectable via a drop-down list | visual-studio-code|task|customization | 0 | 471 | 1 | 72,199,980 | 72,199,980 | 0 | true | 2022-05-11T09:43:21.257Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Run VS Code task on specific file/folder selectable via a drop-down list<p>I am trying to figure out how to run a VS Code task on a specific folder/file tha... |
72,092,932 | Azure AzApi provider in Terraform<p>I'm trying to use Azure AzApi provider to update the Azure key vault key rotation policy.
Both "Azure AzApi provider" and Key Rotation Policy are very new features, released last week.</p>
<p>I don't get any error but it is not updating the attributes.</p>
<p>Code is very s... | <p>The payload is not accurate, strongly recommended to install AzApi VSCode Extension, it provides a rich authoring experience to help you use the AzApi provider: <a href="https://marketplace.visualstudio.com/items?itemName=azapi-vscode.azapi" rel="nofollow noreferrer">https://marketplace.visualstudio.com/items?itemNa... | Azure AzApi provider in Terraform | azure|terraform|azure-keyvault | 0 | 270 | 1 | 72,141,497 | 72,141,497 | 0 | true | 2022-05-02T22:13:13.700Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Azure AzApi provider in Terraform<p>I'm trying to use Azure AzApi provider to update the Azure key vault key rotation policy.
Both "Azure AzApi provider... |
72,162,748 | I don't succeed in passing information (object) using Ajax (Jquery)<p>I'm currently struggling so as to pass information from my view to a controller (MVC model) in PHP. I am using the ajax method.</p>
<p>I would like to convey pieces of information such as strings or arrays to the controller:</p>
<pre><code> ... | <p>This reviewed version works:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>$.ajax({
url:"https://jsonplaceholder.typicode.com/users",
// url: "/olad2/project/processa... | I don't succeed in passing information (object) using Ajax (Jquery) | php|jquery|ajax | 0 | 27 | 1 | 72,162,969 | 72,162,969 | 0 | true | 2022-05-08T15:54:04.923Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I don't succeed in passing information (object) using Ajax (Jquery)<p>I'm currently struggling so as to pass information from my view to a controller (MVC mo... |
72,162,456 | VScode Extension Code Runner not working/error (python) when I run program<p>When I installed the code runner extension and I can't run the python program this error popped up:</p>
<p>[![Image][1]][1]</p>
<pre><code>Copyright Β© Microsoft Corporation. All rights reserved.
Try the new cross-platform PowerShell https://a... | <p>What means "turn off the extension its working normal". According to the error report, this should be a problem with your Python environment variable setting. Have you tried the way named "Run Python File"? This is a function in extension pylance.</p>
<p>By the way, You should have installed the ... | VScode Extension Code Runner not working/error (python) when I run program | python|visual-studio-code|vscode-code-runner | 0 | 424 | 2 | 72,166,454 | 72,166,454 | 0 | true | 2022-05-08T15:22:51.087Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
VScode Extension Code Runner not working/error (python) when I run program<p>When I installed the code runner extension and I can't run the python program th... |
72,154,117 | Call to a member function validate() on array<p>I need your help for a project Im doing at the moment.
I am using Laravel for programming and Im getting this error: 'Call to a member function validate() on array'</p>
<p>This is my store method</p>
<pre><code>public function store()
{
$data = $this->check... | <p>I see your problem
It is because you are calling validate on array <code>$data</code></p>
<pre><code>return $data->validate([
'LieferNr' => ['required', 'min:5', 'max:5'],
'Produkt' => ['required'],
'PH' => ['required', 'numeric', "min:$PHm... | Call to a member function validate() on array | php|laravel | 0 | 345 | 1 | 72,154,283 | 72,154,283 | 0 | true | 2022-05-07T15:50:48.427Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Call to a member function validate() on array<p>I need your help for a project Im doing at the moment.
I am using Laravel for programming and Im getting this... |
72,200,061 | Conditional append a element to an array<p>Here is the jq I have, it just wants to build a new element and then append it to an array,</p>
<pre><code>[.[] | . as { foo: $foo1, bar: $bar1} |
{
names: ([
$foo1 | range(0;length) as $i |
{ key: ($foo1[$i]) }
] + [{ key: $bar1 }]... | <p>You could just use <code>select</code> to filter out that case</p>
<pre class="lang-sh prettyprint-override"><code>jq '[{values: (.foo + [.bar | select(. != "")]) | map({key:.})}]'
</code></pre>
<p>If <code>.bar == "key3"</code>, it prints</p>
<pre class="lang-json prettyprint-override"><code>[
... | Conditional append a element to an array | jq | 0 | 47 | 1 | 72,200,246 | 72,200,246 | 0 | true | 2022-05-11T11:15:18.330Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Conditional append a element to an array<p>Here is the jq I have, it just wants to build a new element and then append it to an array,</p>
<pre><code>[.[] | ... |
72,217,255 | How do I group values to an array for the same field value in jq?<p>I have json data that looks like</p>
<pre><code>[
{
"session": "ffe887f3f150",
"src_ip": "81.71.87.156"
},
{
"session": "fff42102e329",
"src_ip": "143.198.... | <p>With <code>group_by</code> you can group by any criteria given, then assemble all grouped items by taking their common <code>.src_ip</code> from any of them (eg. the first), and <code>.sessions</code> as a mapped array on <code>.session</code> from all of them. Add other parts as you see fit.</p>
<pre class="lang-sh... | How do I group values to an array for the same field value in jq? | arrays|json|group-by|jq | 0 | 65 | 1 | 72,217,328 | 72,217,328 | 0 | true | 2022-05-12T14:15:32.227Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I group values to an array for the same field value in jq?<p>I have json data that looks like</p>
<pre><code>[
{
"session": "ffe8... |
72,139,781 | How to not return duplicates when comparing records in same table (A:B and B:A)<p>I have been stuck with this problem for a while now and can't resolve it, would greatly appreciate some guidance</p>
<p>I am comparing records in a persons table to see if they're possibly the same. To do this I am using a with statement ... | <p>You can get all the duplicates without a self-join by using the analytic <code>COUNT</code> function:</p>
<pre class="lang-sql prettyprint-override"><code>SELECT serialno, given, family, dob, gender, address
FROM (
SELECT serialno, given, family, dob, gender, address,
COUNT(*) OVER (PARTITION BY given,... | How to not return duplicates when comparing records in same table (A:B and B:A) | sql|duplicates|oracle-sqldeveloper|with-statement | 0 | 24 | 1 | 72,140,060 | 72,140,060 | 0 | true | 2022-05-06T10:10:22.570Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to not return duplicates when comparing records in same table (A:B and B:A)<p>I have been stuck with this problem for a while now and can't resolve it, w... |
72,177,529 | reference primary key from another table<p>I have to create 2 tables.
the first one</p>
<pre><code>CREATE TABLE orders
( order_id number(10) NOT NULL,
order_name varchar2(50) NOT NULL,
payment_id number(10) NOT NULL,
CONSTRAINT order_id PRIMARY KEY (order_id),
);
</code></pre>
<p>and when creating the second one ... | <p>You need to reference a <code>UNIQUE</code> or <code>PRIMARY KEY</code> column. The <code>payment_id</code> column does not have one of those constraints on it.</p>
<p>From the <a href="https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/constraint.html#GUID-1055EA97-BA6F-4764-A15F-1024FD5B6DFE" rel=... | reference primary key from another table | sql|oracle | 0 | 156 | 1 | 72,177,699 | 72,177,699 | 0 | true | 2022-05-09T19:53:05.810Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
reference primary key from another table<p>I have to create 2 tables.
the first one</p>
<pre><code>CREATE TABLE orders
( order_id number(10) NOT NULL,
orde... |
72,193,682 | How to update multiple rows using a sub-query and order by in the sub-query?<p>I am trying to update a table using a sub-query, however the sub-query contains multiple joins as I am getting data from multiple tables, and as a business requirement I am forced to add an Order by in the sub-query to sort elements based on... | <p>It is syntactically invalid to have an <code>ORDER BY</code> clause in the outer-most sub-query of a correlated sub-query as the order of the results does not matter as there should only be a single matching row for the sub-query. Therefore the general answer to your question is that it is impossible to have an <cod... | How to update multiple rows using a sub-query and order by in the sub-query? | oracle-sqldeveloper | 0 | 215 | 1 | 72,193,967 | 72,193,967 | 0 | true | 2022-05-10T22:47:11.590Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to update multiple rows using a sub-query and order by in the sub-query?<p>I am trying to update a table using a sub-query, however the sub-query contain... |
72,213,341 | How to using oracle distinct and order siblings by at the same time?<p>the distinct broken the order siblings by,how can i use them at the same time?
such as
select distinct * from table xxx starts with ... connect by id=pid order siblings by field
here is the test sqls executed with different results</p>
<pre><code>s... | <p>You can use <code>ORDER SIBLINGS BY</code> in an inner query and then use <code>ROW_NUMBER()</code> analytic function to find the duplicates in an outer query and maintain the order using <code>ORDER BY ROWNUM</code> in that outer query:</p>
<pre class="lang-sql prettyprint-override"><code>SELECT id, pid, order_num
... | How to using oracle distinct and order siblings by at the same time? | sql|oracle | 0 | 67 | 1 | 72,213,644 | 72,213,644 | 0 | true | 2022-05-12T09:43:03.837Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to using oracle distinct and order siblings by at the same time?<p>the distinct broken the order siblings by,how can i use them at the same time?
such as... |
72,154,002 | Bezier MxN Surface in matrix form( with Python and numpy)<p>I am trying to rewrite slow method("bezier_surf_eval") for bezier surface with quick one(in matrix form "bezier_surface_M").</p>
<p>Using this formula:</p>
<p><img src="https://i.stack.imgur.com/O6aGd.png" alt="Q(u, w) = [U][N][B][Mt][W]" /... | <p>Looks like i solved it.
Problem was in bad order for matrices (in method "bezier_surface_M") for dot product. Multiplication with per-axis matrices with correct orders do the job.</p>
<p>Replaced:</p>
<pre><code>u_vec.T.dot(BM_u).dot(cps).dot(BM_v.T).dot(v_vec)
</code></pre>
<p>With:</p>
<pre><code>cps_x =... | Bezier MxN Surface in matrix form( with Python and numpy) | python|numpy|bezier|surface | 0 | 50 | 1 | 72,154,663 | 72,154,663 | 0 | true | 2022-05-07T15:37:52.253Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Bezier MxN Surface in matrix form( with Python and numpy)<p>I am trying to rewrite slow method("bezier_surf_eval") for bezier surface with quick on... |
72,102,784 | How to perform grouping in spark scala when key is not same<p>I want to calculate the total sum of the amounts corresponding to the secondary accounts and compare its value with the primary account. In the following example, the account number that begins with "643" is the primary account and the accounts whi... | <p>You have some problems you need to solve.</p>
<ol>
<li>You aren't guaranteed order on insert. I faced this issue trying to mimic your problem and had to add a column to ensure my data looked like yours.
<ol>
<li>If your table really does have this order already you are likely ok.</li>
</ol>
</li>
<li>You need a colu... | How to perform grouping in spark scala when key is not same | scala|apache-spark|window|grouping | 0 | 35 | 1 | 72,103,676 | 72,103,676 | 0 | true | 2022-05-03T16:47:34.890Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to perform grouping in spark scala when key is not same<p>I want to calculate the total sum of the amounts corresponding to the secondary accounts and co... |
72,209,764 | SQLAlchemy mapping an existing table (IBM Db2 Issue)<p>IΒ΄ve been studying SQLAlchemy as a way to simplify some DB work that I have. The tables I work are previously created by other systems and I usually have read-only access.</p>
<p>IΒ΄ve read several questions here and some other sources to understand a little bit abo... | <p>As snakecharmerb commented, this is a bug in the the IBM_DB_SA adapter:</p>
<p><a href="https://github.com/ibmdb/python-ibmdbsa/issues/104" rel="nofollow noreferrer">https://github.com/ibmdb/python-ibmdbsa/issues/104</a></p> | SQLAlchemy mapping an existing table (IBM Db2 Issue) | python|sqlalchemy | 0 | 92 | 1 | 72,223,957 | 72,223,957 | 0 | true | 2022-05-12T03:20:09.883Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SQLAlchemy mapping an existing table (IBM Db2 Issue)<p>IΒ΄ve been studying SQLAlchemy as a way to simplify some DB work that I have. The tables I work are pre... |
72,207,199 | Get list from object, modify and set in one line<p>I need to get <code>List<Example></code> from the object, add an element to it, and attach the modified list to the object. Is there a wise way to do it <strong>in one line</strong>? Right now it looks like the following:</p>
<pre><code>List<Example> exampl... | <p>In <a href="https://en.wikipedia.org/wiki/Object-oriented_programming" rel="nofollow noreferrer">object-oriented programming</a>, you should think in terms of asking an object to "do its thing" rather than you trying to manipulate its innards from outside.</p>
<p>So rather than extract, manipulate, and re-... | Get list from object, modify and set in one line | java|collections | 0 | 144 | 2 | 72,208,720 | 72,208,720 | 0 | true | 2022-05-11T20:21:52.477Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Get list from object, modify and set in one line<p>I need to get <code>List<Example></code> from the object, add an element to it, and attach the modif... |
72,220,041 | Why is my .bat file exiting without error after line 14 (pause befor if statement)?<p>A bit embarrased that my first question is about a simple batch file, but my knowledge is quite limited in this topic.</p>
<p>I am writing a simple batch script to copy some data from a to b. For this reason i want to create destinati... | <p>When you use the point-click-and-giggle method of executing a batch, the batch window will close if a syntax-error is found or the script runs to completion. You <em>can</em> put a <code>pause</code> after statements and home in on the error, but better to <a href="https://www.howtogeek.com/235101/" rel="nofollow no... | Why is my .bat file exiting without error after line 14 (pause befor if statement)? | batch-file | 0 | 38 | 1 | 72,220,338 | 72,220,338 | 0 | true | 2022-05-12T17:43:58.200Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why is my .bat file exiting without error after line 14 (pause befor if statement)?<p>A bit embarrased that my first question is about a simple batch file, b... |
72,175,281 | mixed payload data fields in react signup form<p>I am really new to react
i created a sign up form but when posting data values are mixed
I created onchange and onsubmit to track changes and submit the to backend server
but I get badrequest because values are mixed in payload</p>
<pre><code>const Signup = ({ signup, is... | <p>Try to check the parameters order in sign up method .. or try this code <code>(e) => setFormData({...formData, property name: e.target.value})</code> in <strong>onChange</strong> method in each input.</p> | mixed payload data fields in react signup form | reactjs|react-native|web|frontend | 0 | 46 | 1 | 72,224,320 | 72,224,320 | 0 | true | 2022-05-09T16:28:11.950Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
mixed payload data fields in react signup form<p>I am really new to react
i created a sign up form but when posting data values are mixed
I created onchange ... |
72,203,821 | How to declare an array that is received like parameter in a function that also receive a pointer to a function in C?<p>How to declare an array that is received like an parameter in a function that also receive a pointer to a function in C and that function is using the values from the array?
The function that use the ... | <blockquote>
<p>int function should receive just 2 parameters, a pointer to function
find_array and the array. I should also to find a way to declare the
size of the array</p>
</blockquote>
<p>It had to be extended to three parameters in order to give the size of the array:</p>
<pre><code>#include <stdio.h>
// ... | How to declare an array that is received like parameter in a function that also receive a pointer to a function in C? | arrays|c|pointers|function-pointers | 0 | 63 | 1 | 72,207,977 | 72,207,977 | 0 | true | 2022-05-11T15:34:50.250Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to declare an array that is received like parameter in a function that also receive a pointer to a function in C?<p>How to declare an array that is recei... |
72,226,419 | Problem at startup laravel9 system after git clone<p>After I made a git clone with my project, composer install and everything and php artisan serve I'm just getting three lines of footers like this: 2022 Β© Webshooter LM AB | Du anvΓ€nder version 4.1.9 | Laravel 9.12.2
screendump: <a href="https://imgur.com/Lyt5IhS" rel... | <p>I am pretty sure it's browser dependent. The error appears every time in Mac Safari but not in Firefox and only sometimes in Chrome. I downloaded MS Edge also and Webshooter comes up without problems. So I think it's Safari that's the problem.
Thank's all for your help anyway.</p> | Problem at startup laravel9 system after git clone | php|github|laravel-9 | 0 | 37 | 1 | 72,244,208 | 72,244,208 | 0 | true | 2022-05-13T08:16:06.820Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Problem at startup laravel9 system after git clone<p>After I made a git clone with my project, composer install and everything and php artisan serve I'm just... |
72,130,698 | Convert Specific values in a column to UNIX timestamp<p>I have a column in my dataframe which is a mix of some dates and string values. I want to specifically choose the dates and convert into a UNIX timestamp and leave the string values as such. How can this be accomplished ?</p>
<p>Sample data</p>
<pre><code>|column1... | <pre><code>x = read.table(text = 'column1
2020-12-21 00:00:00
test1
test2
test3
2021-12-21 00:00:00', sep = ";", header = T)
uts = as.numeric(as.POSIXct(x$column1, format = "%Y-%m-%d %H:%M:%S", tz = "UTC"))
uts_i = which(!is.na(uts))
x$column1[uts_i] = uts[uts_i]
x
# column1
# 1 1608... | Convert Specific values in a column to UNIX timestamp | r|date|dplyr|conditional-statements|data-manipulation | 0 | 30 | 1 | 72,130,798 | 72,130,798 | 0 | true | 2022-05-05T16:35:04.437Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Convert Specific values in a column to UNIX timestamp<p>I have a column in my dataframe which is a mix of some dates and string values. I want to specificall... |
72,221,596 | How to calculate weighted average with Rstudio<p>I am going to start with an example:</p>
<pre><code>inv <- tibble::tribble(
~Date, ~Material, ~Quantity,
"2020-01-01", "nails", 10L,
"2020-01-01", "nails", 100L,
"2020-02-02", &q... | <p>Here's the <code>dplyr</code> version of your algorithm:</p>
<pre><code>library(dplyr)
inv %>%
group_by(Date) %>%
mutate(
weight = Quantity / sum(Quantity),
) %>%
summarize(
result = sum(Quantity * weight)
)
# # A tibble: 2 Γ 2
# Date result
# <chr> <dbl>
# 1 2... | How to calculate weighted average with Rstudio | r|for-loop | 0 | 43 | 1 | 72,221,825 | 72,221,825 | 0 | true | 2022-05-12T20:13:09.103Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to calculate weighted average with Rstudio<p>I am going to start with an example:</p>
<pre><code>inv <- tibble::tribble(
~Date, ~Material, ... |
72,218,851 | How to reverse the rows of the matrix, if the sum row is less than the sum last column?<p>How can I reverse rows in a matrix, which sums less than the sum last column?<br />
For example:</p>
<pre><code> 1,2,3 -> sumRow1 = 6;
4,5,6 -> sumRow2 = 15;
7,8,9 -> sumRow3 = 24;
sumLastCol = 18;
row1... | <p>Here's an easy way.</p>
<pre><code>int[][] mat = { { 1, 2, 3 }, { 4, 5, 6 }, { 7, 8, 9 } };
</code></pre>
<p>First, compute the sum of the last column.</p>
<ul>
<li>stream each row</li>
<li>map the last value in the row</li>
<li>and sum them.</li>
</ul>
<pre><code>int lastColSum = Arrays.stream(mat).mapToInt(s->s... | How to reverse the rows of the matrix, if the sum row is less than the sum last column? | java | 0 | 42 | 1 | 72,219,096 | 72,219,096 | 0 | true | 2022-05-12T16:05:47.103Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to reverse the rows of the matrix, if the sum row is less than the sum last column?<p>How can I reverse rows in a matrix, which sums less than the sum la... |
72,227,445 | Logic of for loop using with array to access elements of the array in java<p>My code to access elements of array using for loop. The output of the program is <code>[19,17,15]</code> which are the elements of array <code>int a[] = { 12, 15, 16, 17, 19, 23 }</code>. Output after following code is written:</p>
<pre><code>... | <p>Here is a step by step explanation. <code>(i % 3 != 0)</code> checks to see if <code>i is not divisible by 3</code>. Also note that in this context, your post and pre-decrements of <code>i</code> are not relevant as the outcome would be the same no matter how they are decremented.</p>
<pre><code> i = 5;
i not divis... | Logic of for loop using with array to access elements of the array in java | java|arrays|debugging|data-structures | 0 | 44 | 2 | 72,229,119 | 72,229,119 | 0 | true | 2022-05-13T09:38:26.223Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Logic of for loop using with array to access elements of the array in java<p>My code to access elements of array using for loop. The output of the program is... |
72,234,925 | Issues my method to get a 2D circle to move in a circle<p>OBS! Changed as part of the question has been answered.</p>
<p>My math has been fixed due to your help and input, the same with StackOverflowError but I still can get my head around how to make the circle move from one x,y point to another.
Currently I just repe... | <p>This should help you get started. You can modify it as you see fit. It simply has an outer circle revolve around an inner red dot at the center of the panel.</p>
<ul>
<li>First, rotate the graphics context, and not the circle location around the center. Thus, no trig is required.</li>
<li><code>Anti-aliasing</code... | Issues my method to get a 2D circle to move in a circle | java|swing|jpanel|drawing|paint | 0 | 100 | 2 | 72,236,114 | 72,236,114 | 0 | true | 2022-05-13T20:08:34.113Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Issues my method to get a 2D circle to move in a circle<p>OBS! Changed as part of the question has been answered.</p>
<p>My math has been fixed due to your h... |
72,157,673 | ArgumentException: JSON CORS data could not be loaded from: (GCP)<p>I wrote <strong>the CORS settings</strong> to <strong>"cors.json" file</strong> as shown below.</p>
<p><strong>"cors.json"</strong>:</p>
<pre class="lang-json prettyprint-override"><code>[
{
"origin": ["http... | <p>You should remove <strong>the trailing comma ","</strong> from <strong>the last element</strong> as shown below.</p>
<p><strong>"cors.json"</strong>:</p>
<pre class="lang-json prettyprint-override"><code>[
{
"origin": ["http://localhost:8000"],
"method&quo... | ArgumentException: JSON CORS data could not be loaded from: (GCP) | json|google-cloud-platform|cors|google-cloud-storage|gsutil | 0 | 94 | 1 | 72,157,674 | 72,157,674 | 0 | true | 2022-05-08T02:33:24.077Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
ArgumentException: JSON CORS data could not be loaded from: (GCP)<p>I wrote <strong>the CORS settings</strong> to <strong>"cors.json" file</strong>... |
72,225,328 | Unformatted date time in response from step function execution history<p>I am calling below method to get the execution's history of a step function as mentioned in AWS Docs .</p>
<p><a href="https://docs.aws.amazon.com/step-functions/latest/apireference/API_GetExecutionHistory.html" rel="nofollow noreferrer">https://d... | <p><a href="https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/stepfunctions.html#SFN.Client.get_execution_history" rel="nofollow noreferrer">get_execution_history</a> returns event timestamps as Python <code>datetime</code>s. Convert them to ISO strings with the <code>isoformat</code> method:<... | Unformatted date time in response from step function execution history | python-3.x|amazon-web-services|aws-step-functions | 0 | 120 | 1 | 72,226,259 | 72,226,259 | 0 | true | 2022-05-13T06:33:47.507Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Unformatted date time in response from step function execution history<p>I am calling below method to get the execution's history of a step function as menti... |
72,201,977 | Found a python bug, can someone explain?<p>I wrote a function to find the different keys in two nested dictionaries.
I was heavily inspired by this <a href="https://stackoverflow.com/a/27266178/19042386">answer</a>.</p>
<pre><code> def find_diff_keys(d1: dict, d2: dict, not_included_keys:list = [], path=""... | <p>Don't use mutable objects as default arguments.(lists, dicts, etc)</p>
<p>Do this instead.</p>
<pre><code>def append_to(element, to=None):
if to is None:
to = []
to.append(element)
return to
</code></pre>
<p>Why? Because a list or dict for example is mutable it means you're editing the same refer... | Found a python bug, can someone explain? | python|dictionary|nested | 0 | 59 | 1 | 72,202,139 | 72,202,139 | 0 | true | 2022-05-11T13:31:06.477Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Found a python bug, can someone explain?<p>I wrote a function to find the different keys in two nested dictionaries.
I was heavily inspired by this <a href="... |
72,062,277 | Python Web Scrape Query DIV data-brand<p>I'm trying to grab a div tag in an html page, but the result is showing an empty list. I've provided the code and a picture of the html. The page_text variable is an empty list.</p>
<pre><code>url = 'https://www.highspeedinternet.com/in-your-area?zip=50648'
... | <p>You are close to your goal, just add <code>True</code> as value in your <code>dict</code>:</p>
<pre><code>doc.find_all('div',{"data-brand":True})
</code></pre>
<p>As alternative you can go with <code>css selectors</code> and <code>list comprehension</code> to get all the values:</p>
<pre><code>[e.get('data... | Python Web Scrape Query DIV data-brand | python|html|beautifulsoup|python-requests | 0 | 25 | 1 | 72,062,474 | 72,062,474 | 0 | true | 2022-04-29T18:26:18.253Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python Web Scrape Query DIV data-brand<p>I'm trying to grab a div tag in an html page, but the result is showing an empty list. I've provided the code and a... |
72,137,671 | How to get text of list inside h3 tag using selnium<pre><code>import urllib3
import certifi
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver.common.keys import Keys
import requests
from bs4 import B... | <p>Your <code>xpath</code> should look like this, to get only the texts from the <code><li></code> and not from the <code><h3></code>:</p>
<pre><code>//div[@class='wuphys-ppl affiliations']/ul//li
</code></pre>
<p>To get all texts you have to use <code>find_elements_by_xpath()</code> ant iterat over <code>R... | How to get text of list inside h3 tag using selnium | python-3.x|selenium|selenium-webdriver|xpath | 0 | 25 | 1 | 72,137,817 | 72,137,817 | 0 | true | 2022-05-06T07:28:10.290Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to get text of list inside h3 tag using selnium<pre><code>import urllib3
import certifi
from selenium import webdriver
from selenium.webdriver.chrome.opt... |
72,181,670 | How to get text and value from span with div class value in beautiful soup python?<p>I have an element that is returned in the [33] position with my code below.</p>
<pre><code><span>Beli 4 :<div class="d-inline" currency-format="IDR" value="2500"></div>/ pcs</span>
... | <p>You could get the text by calling <code>.text</code> but you should be aware, that you use <code>select_one()</code> instead of <code>select</code>, cause it could not be called on a <code>ResultSet</code> and :</p>
<pre><code>item = soup.select_one('span').text
</code></pre>
<p>There is also another issue, you seem... | How to get text and value from span with div class value in beautiful soup python? | python|beautifulsoup | 0 | 114 | 2 | 72,181,839 | 72,181,839 | 0 | true | 2022-05-10T06:34:30.287Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to get text and value from span with div class value in beautiful soup python?<p>I have an element that is returned in the [33] position with my code bel... |
72,191,374 | Scraping <span> text</span> with BeautifulSoup and urllib<p>I want to scrape <strong>2015</strong> from below HTML:
<a href="https://i.stack.imgur.com/LN1TY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LN1TY.png" alt="HTML code" /></a></p>
<p>I use the below code but am only able to scrape "A... | <p>Simply try to find its next <code>span</code> that holds the text you wanna scrape:</p>
<pre><code>soup.find('span', {'class':'optionLabel'}).find_next('span').get_text()
</code></pre>
<p>or <code>css selectors</code> with <code>adjacent sibling combinator</code>:</p>
<pre><code>soup.select_one('span.optionLabel + ... | Scraping <span> text</span> with BeautifulSoup and urllib | python|web-scraping|beautifulsoup | 0 | 41 | 1 | 72,191,511 | 72,191,511 | 0 | true | 2022-05-10T18:28:22.370Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Scraping <span> text</span> with BeautifulSoup and urllib<p>I want to scrape <strong>2015</strong> from below HTML:
<a href="https://i.stack.imgur.com/LN1TY.... |
72,139,343 | OpenCL: Is 64 bit global_id() not supported?<p>I'm an OpenCL newbie and I cannot return 64 bit values from the compiled kernel. What do I wrong?</p>
<p>I have an <code>Intel(R) HD Graphics 520</code> graphics card and I wanted to write an algorithm which process 64 bit values. But when the global id exceeded 4e12 (more... | <p>I have reported the issue to Intel. They answered ><a href="https://community.intel.com/t5/GPU-Compute-Software/OnenCL-Why-get-global-id-0-returns-32-bit-value-on-a-64-bit/m-p/1383115#M457" rel="nofollow noreferrer">here</a><. The answer in short:</p>
<blockquote>
<p>some of our hardware counters that feed int... | OpenCL: Is 64 bit global_id() not supported? | c++|gpu|64-bit|opencl|intel | 0 | 90 | 2 | 72,373,986 | 72,373,986 | 0 | true | 2022-05-06T09:38:59.570Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
OpenCL: Is 64 bit global_id() not supported?<p>I'm an OpenCL newbie and I cannot return 64 bit values from the compiled kernel. What do I wrong?</p>
<p>I hav... |
72,172,149 | Iteration in JSON array mule 4 dataweave<pre><code>{
"id": "/",
"code": "/",
"typeCode": "CPC",
"timeStamp": "2021-11-16T17:00:00-06:00",
"childList": [
{
"id": "577-1-1",
"code&q... | <p>I have created a solution using recursion. It might be a bit confusing, I have put explanation in comments within the DW.</p>
<pre><code>%dw 2.0
var extnSyncTs = payload.timeStamp
// This is just a small utility function to generate the "CategoryPath"
fun appendToPath(currentPath, pathToAppend) =
if(... | Iteration in JSON array mule 4 dataweave | json|mule|dataweave|mule4 | 0 | 55 | 1 | 72,173,120 | 72,173,120 | 0 | true | 2022-05-09T12:37:39.253Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Iteration in JSON array mule 4 dataweave<pre><code>{
"id": "/",
"code": "/",
"typeCode": "CPC&qu... |
72,160,287 | Update Values in JSON Data Type Column by given key<p>My website uses mysql. Unfortunately, cuz of previous developer, there is a terrible database design and making a change in it takes a lot of time.</p>
<p>I want to explain what i want to do. I have table that is named content.</p>
<div class="s-table-container">
<t... | <p>You can perform partial update of the JSON values through use of <a href="https://dev.mysql.com/doc/refman/8.0/en/json-modification-functions.html#function_json-set" rel="nofollow noreferrer"><strong><code>JSON_SET()</code></strong></a> function such as</p>
<pre class="lang-sql prettyprint-override"><code>UPDATE per... | Update Values in JSON Data Type Column by given key | mysql|sql|json | 0 | 116 | 2 | 72,161,580 | 72,161,580 | 0 | true | 2022-05-08T10:55:14.790Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Update Values in JSON Data Type Column by given key<p>My website uses mysql. Unfortunately, cuz of previous developer, there is a terrible database design an... |
72,223,562 | JOLT split flat object into key/value array<p>I'd like to split simple flat object into array, so each key/value appear as array element. Example:</p>
<p><strong>Input</strong></p>
<pre class="lang-json prettyprint-override"><code>{
"FIRST_NAME": "John",
"LAST_NAME": "Doe"... | <p>You can determine each key-value pair through use of <strong>$</strong> and <strong>@</strong> wildcards respectively within shift transformation spec such as</p>
<pre class="lang-json prettyprint-override"><code>[
{
"operation": "shift",
"spec": {
"*": {
... | JOLT split flat object into key/value array | json|jolt | 0 | 107 | 1 | 72,223,715 | 72,223,715 | 0 | true | 2022-05-13T01:25:17.453Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
JOLT split flat object into key/value array<p>I'd like to split simple flat object into array, so each key/value appear as array element. Example:</p>
<p><st... |
72,196,911 | PayPal callback does not trigger after login to the PayPal account<p>I'm stuck with the next issue.</p>
<p>I integrated PayPal sdk into my android app.</p>
<p><code>implementation 'com.paypal.checkout:android-sdk:0.6.1'</code></p>
<p>My app has an underscore in the package name so I have to use βApp linksβ. I tested it... | <p>So solution is to add default PayPal activity to AndroidManifest.xml</p>
<p>You just copy the code below and change <code>YOUR-CUSTOM-SCHEME</code> to what you declared in ReturnUrl in the PayPal developer account.</p>
<p>No need to create this activity, it comes with the PayPal SDK.</p>
<p>It will redirect you back... | PayPal callback does not trigger after login to the PayPal account | android|paypal | 0 | 155 | 1 | 72,245,546 | 72,245,546 | 0 | true | 2022-05-11T07:18:12.340Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
PayPal callback does not trigger after login to the PayPal account<p>I'm stuck with the next issue.</p>
<p>I integrated PayPal sdk into my android app.</p>
<... |
72,237,283 | How can I create a frame with a BorderLayout and assign each space a component?<p>When I type .setLayout(new BorderLayout());
It appears me this: The method setLayout(LayoutManager) in the type JFrame is not applicable for the arguments (BorderLayout)</p>
<p>IΒ΄m a beginner and I was following a video but this does not ... | <p>That's because the name of your class is the same as <code>BorderLayout</code> layout. Change name of your class and it should work perfectly fine. Never use a keyword or something like that in naming an object/class/method etc.</p> | How can I create a frame with a BorderLayout and assign each space a component? | java|swing|jframe|jpanel|border-layout | 0 | 39 | 2 | 72,366,187 | 72,366,187 | 0 | true | 2022-05-14T04:08:50.273Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I create a frame with a BorderLayout and assign each space a component?<p>When I type .setLayout(new BorderLayout());
It appears me this: The method ... |
72,188,381 | Checking for specific value change between columns in pandas<p>I've got 4 columns with numeric values between 1 and 4, and I'm trying to see which rows change from a value of 1 to a value of 4 progressing from column a to column d within those 4 columns. Currently I'm pulling the difference between each of the columns ... | <p>You can try compare the index of 4 and 1 in <code>apply</code></p>
<pre class="lang-py prettyprint-override"><code>cols = ['a', 'b', 'c', 'd']
def get_index(lst, num):
return lst.index(num) if num in lst else -1
df['Check'] = df[cols].apply(lambda row: get_index(row.tolist(), 4) > get_index(row.tolist(), 1)... | Checking for specific value change between columns in pandas | python-3.x|pandas | 0 | 21 | 2 | 72,188,426 | 72,188,426 | 0 | true | 2022-05-10T14:38:41.897Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Checking for specific value change between columns in pandas<p>I've got 4 columns with numeric values between 1 and 4, and I'm trying to see which rows chang... |
72,231,114 | Sort columns values based on floats inside a string, then concat<p>I'm working on a pretty messy DF. Looking like this, but with 30 columns:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>a</th>
<th>b</th>
</tr>
</thead>
<tbody>
<tr>
<td>some text (other text) : 56.3% (text again: 40%)</td... | <p>You can try <code>apply</code> a customized function</p>
<pre class="lang-py prettyprint-override"><code>def concat(row):
keys = row.str.extract('(\d+\.?\d*)%')[0].astype(float).tolist()
row = [x for _, x in sorted(zip(keys, row.tolist()))]
return ' '.join(row)
df['c'] = df.apply(concat, axis=1)
</code>... | Sort columns values based on floats inside a string, then concat | python|pandas|dataframe | 0 | 35 | 1 | 72,231,269 | 72,231,269 | 0 | true | 2022-05-13T14:21:36.687Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Sort columns values based on floats inside a string, then concat<p>I'm working on a pretty messy DF. Looking like this, but with 30 columns:</p>
<div class="... |
72,231,884 | Creating new pandas columns from substrings in a list<p>I have data in a csv called 'Features' which is of this form:</p>
<pre><code>0 [Shops: Close by, Passing trade: Yes]
1 [Lift: Yes, No of Bedrooms: 1, Bedroom 1 Dims:...
2 [Lift: Yes, No of Bedrooms: 2, Bedroom 1 Dims:...
3 [No of Bedrooms: 4, B... | <p>You can try <code>.str.extract</code></p>
<pre class="lang-py prettyprint-override"><code>csvname['No of Bedrooms'] = csvname['Features'].astype(str).str.extract('No of Bedrooms: (\d+)')
</code></pre>
<pre><code>print(csvname)
Features No of Bedrooms
0 [Shops... | Creating new pandas columns from substrings in a list | python|python-3.x|pandas|dataframe|data-wrangling | 0 | 33 | 1 | 72,231,984 | 72,231,984 | 0 | true | 2022-05-13T15:17:27.927Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Creating new pandas columns from substrings in a list<p>I have data in a csv called 'Features' which is of this form:</p>
<pre><code>0 [Shops: Close by,... |
72,082,629 | How to navigate errors showing after I run React Native app on Mac with command 'react-native run-android'?<p>I run the app with the command "react-native run-android" and it worked.
But after logging in the app with user login info, it shows black error screens and following is the error message.</p>
<p><div... | <p>I found the answer here <a href="https://stackoverflow.com/questions/67840220/getting-typeerror-interpolate-is-not-a-function-in-react-native">Getting 'TypeError: interpolate is not a function' in React-Native</a></p>
<p>I replaced the <code>interpolate()</code> function to <code>interpolateNode()</code> fun... | How to navigate errors showing after I run React Native app on Mac with command 'react-native run-android'? | javascript|android|reactjs|react-native | 0 | 287 | 2 | 72,109,920 | 72,109,920 | 0 | true | 2022-05-02T05:26:36.357Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to navigate errors showing after I run React Native app on Mac with command 'react-native run-android'?<p>I run the app with the command "react-nati... |
72,228,013 | Detect all names and get their link with Selenium Python<p>I want to make a search system when we enter a word in a variable, it search between all linksβ names <a href="https://steamunlocked.net/all-games-2/" rel="nofollow noreferrer">of this page</a> (all the games) a little like a « control-FΒ Β» and display the resul... | <p>You are attempting to locate specific elements on a page and then sorting through them for a key search term. Selenium can identify elements on a page through a number of methods, <a href="https://www.lambdatest.com/blog/complete-guide-for-using-xpath-in-selenium-with-examples/" rel="nofollow noreferrer">see here fo... | Detect all names and get their link with Selenium Python | python|html|python-3.x|selenium-webdriver|selenium-chromedriver | 0 | 70 | 1 | 72,228,451 | 72,228,451 | 0 | true | 2022-05-13T10:21:53Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Detect all names and get their link with Selenium Python<p>I want to make a search system when we enter a word in a variable, it search between all linksβ na... |
72,226,062 | I'm trying to use curl with php but getting this error:Could not resolve host: Bearer<p>I'm trying to make a request using curl with php, but I'm getting the following error. Could I be using curl wrong?
I generate $jwt on top lines</p>
<pre><code>exec("curl -v -H 'Authorization: Bearer $jwt' \"https://api.st... | <p>You can use curl like this</p>
<pre><code><?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.storekit.itunes.apple.com/inApps/v1/subscriptions/{original_transaction_id}');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
$headers = array();
$headers[... | I'm trying to use curl with php but getting this error:Could not resolve host: Bearer | php|curl | 0 | 43 | 1 | 72,226,103 | 72,226,103 | 0 | true | 2022-05-13T07:43:58.687Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I'm trying to use curl with php but getting this error:Could not resolve host: Bearer<p>I'm trying to make a request using curl with php, but I'm getting the... |
72,190,090 | generating barcode for Barby gem under EAN-13<p>While attempting to render in HTML a collection of article barcodes and proceeding incrementally to view the data (relative to other objects on tha page), the controller</p>
<pre><code>require 'barby/outputter/html_outputter'
require 'barby/barcode/ean_13'
</code></pre>
<... | <p>Here's the issue:
<code>8001300303466</code> has 13 characters. It is the correct barcode.</p>
<p>I was assuming one could submit a correct barcode. However <a href="https://github.com/toretore/barby/blob/master/lib/barby/barcode/ean_13.rb" rel="nofollow noreferrer">line 54 of the gem's ean_13.rb file</a>
allows a... | generating barcode for Barby gem under EAN-13 | ruby|barcode | 0 | 96 | 1 | 72,200,672 | 72,200,672 | 0 | true | 2022-05-10T16:40:52.730Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
generating barcode for Barby gem under EAN-13<p>While attempting to render in HTML a collection of article barcodes and proceeding incrementally to view the ... |
72,062,783 | How to place an element in the navbar (on the left side) but i don't want it to get an animation?<p>I want the <em>Life's Good</em> logo on the left side in the nav bar. If I put it in the class "btn" it also gets the animation and I can't place it on the left side. Can anybody help me please? Here's my Code ... | <p>You are missing a number next to px in <code>margin-top</code> of <code>#main</code>. You may also want a <code>margin-left</code> value.</p>
<p>If you want to exclude the animation from that specific element, put the animation in a <code>:not()</code> CSS selector to deselect <code>#main</code>.</p>
<p><code>.btn:b... | How to place an element in the navbar (on the left side) but i don't want it to get an animation? | html|css|navbar | 0 | 35 | 2 | 72,062,877 | 72,062,877 | 0 | true | 2022-04-29T19:18:41.210Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to place an element in the navbar (on the left side) but i don't want it to get an animation?<p>I want the <em>Life's Good</em> logo on the left side in ... |
72,157,173 | Trying to figure out how to properly save and load a game in a save.p file using Pickle module<p><strong>Problem</strong></p>
<p>My problem consists of me trying to save the position of the player on the board that I created and then loading it when they enter a specified SENTINEL value. Though the problem that I am ge... | <p>You're not loading the game data back properly. Your <code>SaveGame)</code> function is saving a <em>dictionary</em>, so that is what <code>pickle.load()</code> will return in <code>LoadGame()</code>.</p>
<p>Here's the right way of doing it:</p>
<pre><code>def LoadGame():
with open("Save.p", "rb&q... | Trying to figure out how to properly save and load a game in a save.p file using Pickle module | python | 0 | 26 | 2 | 72,157,280 | 72,157,280 | 0 | true | 2022-05-08T00:00:17.757Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Trying to figure out how to properly save and load a game in a save.p file using Pickle module<p><strong>Problem</strong></p>
<p>My problem consists of me tr... |
72,143,054 | How to groupby a column but keep all rows as columns<p>I have a dataframe that was a result of a join operation. This operation had multiple matches, resulting in multiple rows. I want to move resulting match rows to be moved in to columns. Here is an example:</p>
<pre><code>import pandas as pd
a = pd.DataFrame([[111,2... | <p><strong>With duplicate column names:</strong></p>
<p>Solution allowing duplicate columns for multiple results per <code>id</code>:</p>
<pre class="lang-py prettyprint-override"><code>import pandas as pd
a = pd.DataFrame([[111,2,3], [222,3,4]], columns=['id', 'var1', 'var2'])
b = pd.DataFrame([[111,'999','some data']... | How to groupby a column but keep all rows as columns | python|pandas | 0 | 88 | 4 | 72,143,520 | 72,143,520 | 0 | true | 2022-05-06T14:23:48.337Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to groupby a column but keep all rows as columns<p>I have a dataframe that was a result of a join operation. This operation had multiple matches, resulti... |
72,192,266 | How do you drop rows from Dask where the value count doesn't meet a certain threshold?<p>I'm working with a fairly large dataset. The uncompressed CSV is about 20 GB. I'm trying to use Dask, but am not very familiar with it. I usually use Pandas. I'm trying to drop rows where the number of instances of a particular val... | <p>The answer to this question may depend on the definition of 'easier', but here are two alternative ways to do it:</p>
<p><strong>Strategy #1</strong>: Build <code>icao</code> series up with dummy column for groupby and count, join with initial df, then drop dummy column.</p>
<pre class="lang-py prettyprint-override"... | How do you drop rows from Dask where the value count doesn't meet a certain threshold? | python|dataframe|data-analysis|dask-dataframe | 0 | 47 | 1 | 72,193,717 | 72,193,717 | 0 | true | 2022-05-10T19:56:12.967Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do you drop rows from Dask where the value count doesn't meet a certain threshold?<p>I'm working with a fairly large dataset. The uncompressed CSV is abo... |
72,211,155 | How can i take specific Months out from a Column in python<p>I have a dataframe that has a column 'mon/yr' that has month and year stored in this format Jun/19 , Jan/22,etc.</p>
<p>I want to Extract only these from that column - ['Jul/19','Oct/19','Jan/20','Apr/20','Jul/20','Oct/20','Jan/21','Apr/21','Jul/21','Oct/21',... | <p>Using your <code>dates</code> list, if we wanted to extract just 'Jul/20' and 'Oct/20' we can do:</p>
<pre><code>import pandas as pd
df = pd.DataFrame(['Jul/19','Oct/19','Jan/20','Apr/20','Jul/20','Oct/20','Jan/21','Apr/21','Jul/21','Oct/21','Jan/22'], columns = ['dates'])
mydates = ['Jul/20','Oct/20']
df.loc[df[... | How can i take specific Months out from a Column in python | python|pandas|matplotlib | 0 | 35 | 2 | 72,212,752 | 72,212,752 | 0 | true | 2022-05-12T06:46:24.717Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can i take specific Months out from a Column in python<p>I have a dataframe that has a column 'mon/yr' that has month and year stored in this format Jun/... |
72,223,329 | How to update the timeout field in the attendance table for a given user_id, logdate and status using if else statement?<p>I have been trying to update the timeout for a given user_id, logdate, and status but my update statement is not working or may be my other if else are not correct. The first thing that I do is to ... | <p>Instead of using if else use if elseif else as follows</p>
<pre><code>public function timeclock(Request $request, $id){
$date = carbon::today() ;
$time = Carbon::now();
$user = DB::table("users")
->where("id", "=", $id)
->get();
if(... | How to update the timeout field in the attendance table for a given user_id, logdate and status using if else statement? | sql|eloquent|laravel-8 | 0 | 65 | 1 | 72,611,056 | 72,611,056 | 0 | true | 2022-05-13T00:28:38.307Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to update the timeout field in the attendance table for a given user_id, logdate and status using if else statement?<p>I have been trying to update the t... |
72,150,788 | Text in front of looped video<p>I have a looped video with this css code</p>
<pre><code>.bg video{
position: absolute;
top: 80px;
left: 0;
width: 100%;
height: 91.4%;
object-fit: cover;
</code></pre>
<p>This is the HTML code</p>
<pre><code><div class="bg">
<video src="videos/S22-Ultra-un... | <ul>
<li>Make your <code>.bg</code> set to <code>position: relative;</code> in order to</li>
<li>place your <code><p></code> text with elevated <code>z-index: 1;</code> and <code>position: absolute</code></li>
<li>Set <code>top</code> and <code>right</code> properties for your <code><p></code> text as desir... | Text in front of looped video | html|css | 0 | 29 | 1 | 72,150,802 | 72,150,802 | 0 | true | 2022-05-07T08:27:44.260Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Text in front of looped video<p>I have a looped video with this css code</p>
<pre><code>.bg video{
position: absolute;
top: 80px;
left: 0;
width: 100%;
heigh... |
72,187,259 | Vue 3 Composition API: Update Child components props dynamically when values update from the parent component<p>I am trying to update a prop value when the data from the parent component gets updated and passes through the prop. The parent value always updates but does not update or re-renders in the child component wh... | <p>I ended up solving the solution by using a v-if to rerender the child component.</p>
<pre><code><script setup>
import { inject, watchEffect, ref } from "vue";
import ChildComponent from "@/components/ChildComponent.vue"
const { state } = inject("store");
const cart = ref(state.car... | Vue 3 Composition API: Update Child components props dynamically when values update from the parent component | vuejs3|vue-composition-api|vue-props | 0 | 2,331 | 2 | 72,287,402 | 72,287,402 | 0 | true | 2022-05-10T13:29:37.963Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Vue 3 Composition API: Update Child components props dynamically when values update from the parent component<p>I am trying to update a prop value when the d... |
72,230,629 | java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/core/view/MenuHost;<p>I'm making a google sign in process in my app.</p>
<p>Whenever I open my app it crashes and gives <code>NoClassDefFoundError</code></p>
<p>I checked the logcat and found this:-</p>
<pre><code> --------- beginning of crash
2022-05-1... | <p>I found the problem while debugging.</p>
<p>The problem was in andoidx.appcompat class not found</p>
<p>In app build.gradle,
I changed this line of dependencies:</p>
<pre><code>implementation 'androidx.appcompat:appcompat:1.4.1'
</code></pre>
<p>To:</p>
<pre><code>implementation 'androidx.appcompat:appcompat:1.3.1'
... | java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/core/view/MenuHost; | java|android|build.gradle|classnotfoundexception|noclassdeffounderror | 0 | 946 | 1 | 72,257,673 | 72,257,673 | 0 | true | 2022-05-13T13:47:28.887Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/core/view/MenuHost;<p>I'm making a google sign in process in my app.</p>
<p>Whenever I open m... |
72,193,230 | Calculating if a year is a leap year<p>On HackerRank, I'm attempting to solve a leap year challenge, and when I submit the code, it passes five test cases but fails one: when it tries to check whether 1992 is leap year or not. I'd appreciate it if someone could assist me with this. Here is the question below:</p>
<bloc... | <h2>Solution A</h2>
<p>The wording in the specifications is doing this thing where it says check this condition to know if it's a leap year. And then it says I can change my mind if... But then once again I can change my mind if...</p>
<p>We can do the same thing in our code. We can save if it is a leap year, change ou... | Calculating if a year is a leap year | python|function|leap-year | 0 | 881 | 2 | 72,243,092 | 72,243,092 | 0 | true | 2022-05-10T21:39:47.443Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Calculating if a year is a leap year<p>On HackerRank, I'm attempting to solve a leap year challenge, and when I submit the code, it passes five test cases bu... |
72,182,178 | Converting a Console Program into an MFC app (Thread issues) (Pleora SDK)<p>Back to stackoverflow with another question after hours of trying on my own haha.
Thank you all for reading this and helping in advance.</p>
<p>Please note the console program has following functionalities:</p>
<blockquote>
<ol>
<li>connect to ... | <p>Worker threads do not have message-queues, the (typically one and only) UI one does. The message-queue for a thread is created by the first call of the <code>GetMessage()</code> function. Why use messages to control processing in a worker thread? You would have to establish a special protocol for this, defining cust... | Converting a Console Program into an MFC app (Thread issues) (Pleora SDK) | c++|multithreading|callback|mfc|dialogbasedapp | 0 | 105 | 1 | 72,183,940 | 72,183,940 | 0 | true | 2022-05-10T07:24:11.113Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Converting a Console Program into an MFC app (Thread issues) (Pleora SDK)<p>Back to stackoverflow with another question after hours of trying on my own haha.... |
72,179,745 | Sum a column value of all the previous observations<p>I have a table that contains client_id, order_number and revenue. The idea is to sum the revenue up until each order number.</p>
<p>So, for example, a client has 3$ revenue in his first order and 2$ in his second. For his first loan it should return 3$ as revenue, b... | <p>By the description you want a window sum(revenue) function partitioned by client_id and ordered by client_id and order_number</p>
<pre><code>select client_id, order_number,revenue,
sum(revenue) over (partition by client_id ORDER BY client_id,order_number) as sum
from your_table
order by client_id
</cod... | Sum a column value of all the previous observations | sql|databricks | 0 | 32 | 1 | 72,181,728 | 72,181,728 | 0 | true | 2022-05-10T01:20:30.903Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Sum a column value of all the previous observations<p>I have a table that contains client_id, order_number and revenue. The idea is to sum the revenue up unt... |
72,140,887 | Facing an issue while displaying a stored data in a .txt file into my bootstrap card<p>I have a simple issue in my PHP project I made a small application that gives you the possibility to fill the form fields and stored all the data inside a <code>.txt</code> file at the same time the data show up below the form with s... | <p>It seems you're stuck on how to parse the data you've stored in your text file and retrieve specific pieces of information such as the first name.</p>
<p>To solve this easily we need to take a step back. Instead of the arbitrary format which you've stored the data in, I would recommend using a recognised format such... | Facing an issue while displaying a stored data in a .txt file into my bootstrap card | php|html|bootstrap-5 | 0 | 36 | 1 | 72,142,192 | 72,142,192 | 0 | true | 2022-05-06T11:40:07.797Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Facing an issue while displaying a stored data in a .txt file into my bootstrap card<p>I have a simple issue in my PHP project I made a small application tha... |
72,212,368 | Xamarin SQLite deserialize list<p>I need to store a list inside my Xamarin Forms App. For the ticket model i converted the JSON to C# via json2csharp. Also added the TextBlob otherwise it would tell me: SQLite cant read the data type (list). With the current code i dont get an error but notes wont be added into the dat... | <p>I don't known whether you use the nuget package SQLite-net pcl or not. It seems that the package doesn't support to insert the list into the datebase.</p>
<p>At first, you can add a break point to the <code>Api api = JsonConvert.DeserializeObject<Api>(responseBody);</code> to check the value of the list is nul... | Xamarin SQLite deserialize list | json|list|sqlite|xamarin.forms | 0 | 47 | 1 | 72,212,679 | 72,212,679 | 0 | true | 2022-05-12T08:31:25.503Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Xamarin SQLite deserialize list<p>I need to store a list inside my Xamarin Forms App. For the ticket model i converted the JSON to C# via json2csharp. Also a... |
72,158,656 | How to Remove the form value After Submit in React from below code?<p>How can I remove the Input data after submitting the form?</p>
<pre><code>import React from 'react';
import { Form } from 'react-bootstrap';
const AddItem = () => {
const handleItemSubmit = (event) => {
event.preventDefault();
... | <p>reset the form like this:</p>
<pre><code>const handleItemSubmit = (event) => {
event.preventDefault();
const carName = event.target.carName.value;
const companyName = event.target.companyName.value;
console.log(carName, companyName);
event.target.reset(); //add this line
}
</code></pre> | How to Remove the form value After Submit in React from below code? | javascript|reactjs|forms|form-submit|reset | 0 | 342 | 3 | 72,158,719 | 72,158,719 | 0 | true | 2022-05-08T06:30:41.540Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to Remove the form value After Submit in React from below code?<p>How can I remove the Input data after submitting the form?</p>
<pre><code>import React ... |
72,066,518 | jquery fading in/out a confirmation text<p>I have a div on the page which is empty (and/or hidden) by default and where a confirmation text after different actions is supposed to be printed out for a while and then disappear.</p>
<p>I wanted to do this with jquery but got stuck with fading in and out.</p>
<p>I used thi... | <p>You can use jQuery .stop() for that. Can be that you need to change the location of them to create the perfect sequence but I hope you get the idea. βοΈ</p>
<p><strong>Edit: forgot to add clearQueue true command. You can find more intel on <a href="https://api.jquery.com/stop/" rel="nofollow noreferrer">https://api.j... | jquery fading in/out a confirmation text | jquery|fadein|fadeout | 0 | 33 | 1 | 72,066,707 | 72,066,707 | 0 | true | 2022-04-30T07:25:28.407Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
jquery fading in/out a confirmation text<p>I have a div on the page which is empty (and/or hidden) by default and where a confirmation text after different a... |
72,232,573 | Hide or show input on dropdown selection<p>I am trying to create a sign-up page for my app. All the code works, but when I try to hide input box based on dropdown select, it doesn't work.
I tried this:</p>
<pre><code><script>
var select = document.getElementById("card");
select.onchange = function()... | <p>It does work, you only need to place the script underneath the form tags. It can't execute the script on elements that it can't find, because they are underneath it. Keep in mind that scripts get executed from top to bottom. I also added <code>selected</code> to the Yes value so when you click No the script starts w... | Hide or show input on dropdown selection | javascript|php|html | 0 | 44 | 1 | 72,232,745 | 72,232,745 | 0 | true | 2022-05-13T16:15:13.707Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Hide or show input on dropdown selection<p>I am trying to create a sign-up page for my app. All the code works, but when I try to hide input box based on dro... |
72,149,140 | TypeError: iter() returned non-iterator of type 'NoneType'<pre><code>from collections.abc import Iterable
from collections.abc import Iterator
class MyList(object):
def __init__(self): self.Container = [11, 22, 33]
def add(self, item): self.Container.append(item)
def __iter__(self): return MyIterator
cl... | <p>You need parenthesis after <code>MyIterator</code> here in order to instantiate a MyIterator object:</p>
<p><code>def __iter__(self): return MyIterator()</code></p>
<p>You were returning a "type" object (MyIterator) instead of an actual instance of the MyIterator class.</p>
<p>A simple example:</p>
<pre cl... | TypeError: iter() returned non-iterator of type 'NoneType' | python-3.9 | 0 | 111 | 1 | 72,149,207 | 72,149,207 | 0 | true | 2022-05-07T02:58:41.733Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
TypeError: iter() returned non-iterator of type 'NoneType'<pre><code>from collections.abc import Iterable
from collections.abc import Iterator
class MyList... |
71,972,817 | JLabel Is not showing up when its supposed to<p>I have a rough idea why the <code>JLabel</code> is not showing up. I cannot figure out how to make it show up, however. Where it says <code>add(tf1);</code> it's not opening in the <code>JFrame</code>.</p>
<p>(<code>tf1</code> & <code>2</code> are labels & not a t... | <p>The code is missing</p>
<pre><code>String score = String.valueOf("Total Clicks: " + totalClicks);
tf1.setText(score);
</code></pre>
<p>And</p>
<pre><code>String avg = String.valueOf("Average: " +finalClicks);
tf2.setText(avg);
</code></pre>
<p>The final code should be:</p>
<pre><code>class CPS ex... | JLabel Is not showing up when its supposed to | java|swing|jlabel | 0 | 15 | 1 | 72,037,121 | 72,037,121 | 0 | true | 2022-04-22T17:50:41.373Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
JLabel Is not showing up when its supposed to<p>I have a rough idea why the <code>JLabel</code> is not showing up. I cannot figure out how to make it show up... |
72,173,030 | Using sed command in shell script for substring and replace position to need<p>Iβm dealing data on text file and I canβt find a way with sed to select a substring at a fixed position and replace it.</p>
<p>This is what I have:</p>
<pre><code>X|001200000000000000000098765432|1234567890|TQ
</code></pre>
<p>This is what I... | <p>If you want to put the quotes in, I'd still use <code>awk</code>.</p>
<pre><code>$: awk -F'|' 'BEGIN{q="\047"} {print q $1 q","q substr($2,17,14) q","q $3 q","q $4 q"\n"}' <<< "X|001200000000000000000098765432|1234567890|TQ"
'X','00000098765432','... | Using sed command in shell script for substring and replace position to need | bash|shell|sed|substring | 0 | 264 | 6 | 72,173,862 | 72,173,862 | 0 | true | 2022-05-09T13:46:34.147Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Using sed command in shell script for substring and replace position to need<p>Iβm dealing data on text file and I canβt find a way with sed to select a subs... |
72,193,202 | Numpy find identical elements from list of arrays and another array<p>Suppose I have two lists <code>a</code> and <code>b</code>, <code>a</code> is 1D array with sub-arrays, b is 2D array without sub-arrays. How can I find the elements in <code>a</code> identical with <code>b</code> with keeping the structure of sub ar... | <p>Assuming <code>a</code> is a list of arrays, you can use broadcasting to perform the comparisons of all elements:</p>
<pre><code>out = [x[(x == b[:,None]).all(2).any(0)] for x in a]
</code></pre>
<p>Output:</p>
<pre><code>[array([[3, 4, 5]]),
array([[5, 5, 5],
[9, 3, 3]])]
</code></pre>
<p>Indices:</p>
<pre... | Numpy find identical elements from list of arrays and another array | python|arrays|numpy|identity | 0 | 70 | 1 | 72,193,310 | 72,193,310 | 0 | true | 2022-05-10T21:35:21.503Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Numpy find identical elements from list of arrays and another array<p>Suppose I have two lists <code>a</code> and <code>b</code>, <code>a</code> is 1D array ... |
72,198,926 | why pandas.replace inplace = True doesnt work<p>i have a Data Frame with the following columns</p>
<pre><code> A B C D
0 1.0 1.0 cob 3.0
1 1.0 1.0 hello 3.0
2 1.0 1.0 3.0
3 1.0 1.0 c 3.0
</code></pre>
<p>i am trying to replace the values in column 'D' corresponding to column '... | <p>If you want to replace any starting value by a specific value:</p>
<pre><code>df.loc[df['C'].isin(['cob', 'c']), 'D'] = 5
</code></pre>
<p>if you also want to ensure that the starting value is <code>3</code>:</p>
<pre><code>df.loc[df['C'].isin(['cob', 'c'])&df['D'].eq(3), 'D'] = 5
</code></pre>
<p>output:</p>
<p... | why pandas.replace inplace = True doesnt work | python|python-3.x|pandas|dataframe | 0 | 39 | 1 | 72,199,000 | 72,199,000 | 0 | true | 2022-05-11T09:50:49.113Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
why pandas.replace inplace = True doesnt work<p>i have a Data Frame with the following columns</p>
<pre><code> A B C D
0 1.0 1.0 cob 3.0... |
72,160,770 | How to use multiple proxies with requests library, python?<p>I have a list of proxies which I want <code>requests</code> <code>lib</code> to use it. Because some of them don't work I want to change the proxy each time one doesn't respond.</p>
<p>I have this code(I just tried if it would work this way it's not final)</p... | <p>I solved the issue in this way:</p>
<pre><code>import requests
HTTP = [List of http proxies...]
HTTPS = [List of https proxies]
def try_proxies(http_proxies, https_proxies):
for proxy_http_element in http_proxies:
http_proxy = proxy_http_element
yield http_proxy
for proxy_https_element in... | How to use multiple proxies with requests library, python? | python|python-requests|proxy | 0 | 97 | 1 | 72,162,848 | 72,162,848 | 0 | true | 2022-05-08T11:58:23.457Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to use multiple proxies with requests library, python?<p>I have a list of proxies which I want <code>requests</code> <code>lib</code> to use it. Because ... |
72,168,460 | Scroll while dragging<p>I have some <code>TextViews</code> with drag and drop implemented in Kotlin and I what I would like to do is when I drag one TextView at the bottom of the screen, where a <code>ScrollView</code> is located, for it to <strong>scroll</strong> downwards.</p>
<p><a href="https://i.stack.imgur.com/HW... | <p>So to answer my own question, the solution i found is this:</p>
<pre><code>lowerLimForScroll = (Resources.getSystem().displayMetrics.heightPixels * 0.8).toInt()
textView.setOnDragListener { boxContentView, dragEvent ->
val boxesLayoutCoords = intArrayOf(0, 0)
// this calculates the x, y of ... | Scroll while dragging | android|kotlin|scroll|drag-and-drop|scrollview | 0 | 134 | 1 | 72,390,755 | 72,390,755 | 0 | true | 2022-05-09T07:37:44.120Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Scroll while dragging<p>I have some <code>TextViews</code> with drag and drop implemented in Kotlin and I what I would like to do is when I drag one TextView... |
72,166,579 | how to compute the float nuber in Linux?<p>I expect to compute the answer of the expression <code>a=0;b=0.055;echo $((a * 60 + b))</code></p>
<p>however the output is as follows:</p>
<p><code>syntax error: invalid arithmetic operator (error token is ".055")</code></p>
<p>I expect the output is <code>0.055</co... | <p>You were pretty close. Use <code>$a</code> and <code>$b</code> instead of just a and b like this:</p>
<pre><code>a=0;b=0.055;echo "scale=3; (($a * 60 + $b)*100)/100"|bc
</code></pre>
<p>or in a file like this:</p>
<p>test.sh</p>
<pre class="lang-sh prettyprint-override"><code>#!/bin/bash
a=0
b=0.055
resul... | how to compute the float nuber in Linux? | linux|math | 0 | 30 | 1 | 72,166,665 | 72,166,665 | 0 | true | 2022-05-09T03:01:25.843Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to compute the float nuber in Linux?<p>I expect to compute the answer of the expression <code>a=0;b=0.055;echo $((a * 60 + b))</code></p>
<p>however the ... |
72,151,031 | Flutter: Updating the more recent value while the user in viewing the page with streams<p>Am I thinking about this the right way?</p>
<p>I created a function that takes in a value from firebase, value in seconds, and convert it into hours:minutes:seconds, this works fine. I've used Streams for my function and a StreamB... | <p>No need to call <code>setState</code>, <code>StreamBuilder</code> builds itself on the latest update. Try something like this.</p>
<pre><code> Stream<String> timeActive(String userUid) {
return FirebaseFirestore.instance
.collection("users")
.doc(userUid)
.snapshots()
.ma... | Flutter: Updating the more recent value while the user in viewing the page with streams | firebase|flutter|dart | 0 | 20 | 1 | 72,154,445 | 72,154,445 | 0 | true | 2022-05-07T09:04:13.640Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Flutter: Updating the more recent value while the user in viewing the page with streams<p>Am I thinking about this the right way?</p>
<p>I created a function... |
72,209,892 | For loop not stopping and random generated number not being saved (number guessing game)<p>I'm doing a number guessing game in an Android app. You have three tries to guess the number. If you run out of trials, then you loose.</p>
<p>I added a <code>for</code> loop so that each time the user inputs then it adds one mor... | <blockquote>
<p>You do not have to break as that should be handled by the for loop -- @mkjh</p>
</blockquote>
<p>This is already the reason that the for-loop is ending, so placing it afterward instead of as a test/break condition will be more efficient. Also,</p>
<blockquote>
<p>Try changing it to trials <= maxTrial... | For loop not stopping and random generated number not being saved (number guessing game) | java|android|for-loop | 0 | 71 | 2 | 72,209,952 | 72,209,952 | 0 | true | 2022-05-12T03:41:11.913Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
For loop not stopping and random generated number not being saved (number guessing game)<p>I'm doing a number guessing game in an Android app. You have three... |
72,071,754 | How to get the text of the message to which the person has put a reaction. Discord.py<p>How to get the text of the message to which the person has put a reaction? Is it possible?</p>
<pre><code>@client.event
async def on_raw_reaction_add(payload):
emoji = payload.emoji.name
if emoji == "":
pri... | <p>Yes, <a href="https://discordpy.readthedocs.io/en/latest/api.html?highlight=on_raw_reaction#discord.RawReactionActionEvent" rel="nofollow noreferrer"><code>payload</code></a> allows you to <a href="https://discordpy.readthedocs.io/en/latest/api.html?highlight=on_raw_reaction#discord.RawReactionActionEvent.message_id... | How to get the text of the message to which the person has put a reaction. Discord.py | python|discord.py | 0 | 21 | 1 | 72,071,928 | 72,071,928 | 0 | true | 2022-04-30T19:58:23.660Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to get the text of the message to which the person has put a reaction. Discord.py<p>How to get the text of the message to which the person has put a reac... |
72,160,076 | decouple member variables of a struct in variadic function accordingly<p>I have posted a question before, <a href="https://stackoverflow.com/questions/72153701/unpack-variadic-arguments-and-pass-its-elements-accordingly">unpack variadic arguments and pass it's elements accordingly</a>. However, it didn't quite addr... | <pre><code>template<class... COORDs>
Outcome get_out_from_coords() {
return std::apply(
[](int x, int y, auto... args){ return cal_out(cal_out(x, y), args...); },
std::tuple_cat(std::make_tuple(COORDs::valueX, COORDs::valueY)...)
);
}
</code></pre>
<p>This just concatenates all of the <code>valueX</co... | decouple member variables of a struct in variadic function accordingly | c++|templates|metaprogramming|variadic-templates | 0 | 43 | 1 | 72,160,258 | 72,160,258 | 0 | true | 2022-05-08T10:24:30.693Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
decouple member variables of a struct in variadic function accordingly<p>I have posted a question before, <a href="https://stackoverflow.com/questions/721537... |
72,211,526 | PowerBI Period Slicers (QTD/YTD) not slicing<p>I am trying to create period slicers for QTD/YTD/Last 12 Month (LTM) to create an interactive report dashboard.</p>
<p>I've set up all the Measures I think are required based on "Actual" data.</p>
<pre><code>AC = SWITCH([PeriodSelect], 1, [AC Select], 2, [AC QTD]... | <p>As mentioned, date slicers should be based on the calendar table, not actual dates.
Once you fix it, your formulas work correctly.</p>
<p>It might look like periods are not slicing, but that's not correct - they are. The reason you see the same numbers is because in your data sample, for March 2022, the results are ... | PowerBI Period Slicers (QTD/YTD) not slicing | powerbi|dax | 0 | 100 | 1 | 72,215,148 | 72,215,148 | 0 | true | 2022-05-12T07:20:28.837Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
PowerBI Period Slicers (QTD/YTD) not slicing<p>I am trying to create period slicers for QTD/YTD/Last 12 Month (LTM) to create an interactive report dashboard... |
72,187,543 | Kotlin multiline-string annotation parameters<p>In Java, now that it supports text blocks, you can do this:</p>
<pre><code>@Schema(description = """
Line one.
Line two.
""")
public void someMethodName() { ... }
</code></pre>
<p>In Java, text blocks are c... | <p>Unfortunately for your use case, I don't think so. The point of the triple quote is to provide a way to write "Formatted" text into a string. If Java doesn't behave the same way as Kotlin, then technically it's the odd one out as any other language I've used behaves the same way as Kotlin. Your best altern... | Kotlin multiline-string annotation parameters | kotlin|java-text-blocks | 0 | 157 | 1 | 72,188,796 | 72,188,796 | 0 | true | 2022-05-10T13:47:22.150Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Kotlin multiline-string annotation parameters<p>In Java, now that it supports text blocks, you can do this:</p>
<pre><code>@Schema(description = ""... |
72,170,689 | Android: How to hide or close topmost activity?<p>In my app, I need to start the built-in camera application using the action <a href="https://developer.android.com/reference/android/provider/MediaStore#INTENT_ACTION_STILL_IMAGE_CAMERA" rel="nofollow noreferrer">INTENT_ACTION_STILL_IMAGE_CAMERA</a>. The reason of this ... | <p>Thanks to @DavidWasser finally it works!!!</p>
<p>Solution is to add a new <em>dummy</em> activity calling <em>Finish()</em> from its <em>OnCreate()</em> and finally call following from broadcast receiver's <em>OnReceive()</em>:</p>
<pre><code>var i = new Intent(context, typeof(Dummy));
context.StartActivity(i);
</c... | Android: How to hide or close topmost activity? | android|android-intent|android-activity|broadcastreceiver | 0 | 71 | 1 | 72,234,065 | 72,234,065 | 0 | true | 2022-05-09T10:42:02.067Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Android: How to hide or close topmost activity?<p>In my app, I need to start the built-in camera application using the action <a href="https://developer.andr... |
72,196,207 | Set page number in controller in pagination CakePHP 4.x<p>Is it possible to set the page number programatically within the controller?
I have a searchform on a paginated index page.
Each time the user send a new search I want to reset the page number to 1.</p>
<p>In the request params there is 'page' with the current n... | <p>In controller try overwrite page number. Not very pretty, but effective:</p>
<pre><code>if ($this->getRequest()->is('post')) {
$queryParams = $this->getRequest()->getQueryParams();
$queryParams['page'] = 1;
$this->setRequest($this->getRequest()->withQueryParams($queryParams));
}
</co... | Set page number in controller in pagination CakePHP 4.x | cakephp-4.x | 0 | 114 | 1 | 72,215,672 | 72,215,672 | 0 | true | 2022-05-11T06:16:28.460Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Set page number in controller in pagination CakePHP 4.x<p>Is it possible to set the page number programatically within the controller?
I have a searchform on... |
72,183,176 | Validate current_user if it is already in DB<p>I can't get validation error to be displayed, only IntegrityError from SQLAlchemy</p>
<p><em>(sqlalchemy.exc.IntegrityError: (sqlite3.IntegrityError) UNIQUE constraint failed: Booking.username).</em></p>
<p>I have two tables in DB, one is a list of registered users, anothe... | <p>I don't see the error. You could add a <code>print (user)</code> in the validation function to see what's in there.</p>
<p>Anyway this is still open to a race condition: if the same user books in another request between the check ("validation")and the commit. As a general rule, I'd rather try to commit and... | Validate current_user if it is already in DB | python|flask|sqlalchemy | 0 | 41 | 1 | 72,183,586 | 72,183,586 | 0 | true | 2022-05-10T08:41:29.073Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Validate current_user if it is already in DB<p>I can't get validation error to be displayed, only IntegrityError from SQLAlchemy</p>
<p><em>(sqlalchemy.exc.I... |
72,096,773 | Plotting time series directly with Pandas<p><a href="https://i.stack.imgur.com/pivso.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pivso.png" alt="enter image description here" /></a></p>
<p>In the above dataframe, all I want to create a line plot so that we have info on trends per year for each of... | <p>Welcome to stackoverflow, <a href="https://meta.stackoverflow.com/questions/285551/why-should-i-not-upload-images-of-code-data-errors-when-asking-a-question">please do not use image of code and data</a></p>
<p><strong>Quick Answer</strong></p>
<pre><code># change the type of non numeric
piv['second_col'] = piv['seco... | Plotting time series directly with Pandas | python|pandas|plot|time-series | 0 | 34 | 1 | 72,097,084 | 72,097,084 | 0 | true | 2022-05-03T08:36:36.433Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Plotting time series directly with Pandas<p><a href="https://i.stack.imgur.com/pivso.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pivso... |
72,202,623 | Problems with RMI Server; rmiregistry on windows<br>
So we haft to use a RMI Server and Client for some exercice in class. Our professor don't want us to use `LocateRegirstry.createRegistry()`, instead we shall start the rmiregistry from within either intellij external tools, or the cmd. I tried several things, nothing... | <p>So I just found a workaround. I used the javac command to compile it over cmd, started the rmiregistry and than the server... and it worked. So I assume it is a Problem of intellij, because .class and .java are in different dictionary and therefore the exception "class not found" makes sense. Now i just ne... | Problems with RMI Server; rmiregistry on windows | java|windows|cmd|rmi|rmiregistry | 0 | 153 | 2 | 72,216,488 | 72,216,488 | 0 | true | 2022-05-11T14:13:17.200Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Problems with RMI Server; rmiregistry on windows<br>
So we haft to use a RMI Server and Client for some exercice in class. Our professor don't want us to use... |
72,145,438 | Pivot rows into columns Firebird 2.1<p>I have a table containing several kilometers about 100
<a href="https://i.stack.imgur.com/ZJ12M.png" rel="nofollow noreferrer">table of kilometers</a></p>
<p>I need to rotate rows into columns like this
<a href="https://i.stack.imgur.com/m0Hxc.png" rel="nofollow noreferrer">pivot ... | <p>As I mentioned in the comments, this is probably something better solved in your presentation layer, instead of through a query. I'm not sure if this can be solved with a (recursive) CTE, but I can offer you a solution in PSQL using <code>EXECUTE BLOCK</code> (this can also be done in the form of a stored procedure)... | Pivot rows into columns Firebird 2.1 | sql|pivot|pivot-table|firebird|firebird2.1 | 0 | 39 | 1 | 72,150,733 | 72,150,733 | 0 | true | 2022-05-06T17:36:47.010Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pivot rows into columns Firebird 2.1<p>I have a table containing several kilometers about 100
<a href="https://i.stack.imgur.com/ZJ12M.png" rel="nofollow nor... |
72,228,696 | Prometheus metric value compared to "crawl Time" in grafana<p>I have metric that exports "current time" from the device in UNIX time, now I would like to compare that time with "crawling time", but I seem to have some problems with that.</p>
<p>I tried multiple ways:</p>
<ol>
<li>Get "instant&q... | <pre><code>timestamp(my_device_time) - my_device_time()
</code></pre>
<p>timestamp() will return crawl time in unixtime, so found the solution on my own.</p> | Prometheus metric value compared to "crawl Time" in grafana | prometheus|grafana|metrics|promql | 0 | 74 | 1 | 72,255,888 | 72,255,888 | 0 | true | 2022-05-13T11:17:08.530Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Prometheus metric value compared to "crawl Time" in grafana<p>I have metric that exports "current time" from the device in UNIX time, now I would l... |
72,231,357 | How to make a method that finds every object by id in angular<p>Please help,</p>
<p>I want to make a method <code>findChildByIdInData(data:any, childId:string)</code> where the data is any JSON main node that has children with Ids.</p>
<p>Simply, how to make a method that receives JsonNode and its child Id as parameter... | <p>Got the result by using the Recursively Traverse an Object method:
this link helps me: <a href="https://cheatcode.co/tutorials/how-to-recursively-traverse-an-object-with-javascript" rel="nofollow noreferrer">https://cheatcode.co/tutorials/how-to-recursively-traverse-an-object-with-javascript</a>.</p>
<p>the backend... | How to make a method that finds every object by id in angular | javascript|json|angular | 0 | 73 | 2 | 72,238,641 | 72,238,641 | 0 | true | 2022-05-13T14:39:13.780Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to make a method that finds every object by id in angular<p>Please help,</p>
<p>I want to make a method <code>findChildByIdInData(data:any, childId:strin... |
72,199,715 | BigQuery stored for loop as Array<p>I want the result that concatenates items generate by for loop to store in ARRAY or String</p>
<p>Here is my code that can generate list of string that I want but I don't know how to use this list since I cannot store it as Array or Concat it</p>
<pre><code>FOR record IN (SELECT colu... | <p>You can declare a variable to store the result of the script you wrote.
I'm not sure I understood the requirement, but if you just want to store formatted strings as an array, you don't need to use a loop and following query would be enough. You can refer the variable in your stored procedure afterward.</p>
<pre cla... | BigQuery stored for loop as Array | sql|google-cloud-platform|google-bigquery | 0 | 143 | 1 | 72,201,953 | 72,201,953 | 0 | true | 2022-05-11T10:50:27.200Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
BigQuery stored for loop as Array<p>I want the result that concatenates items generate by for loop to store in ARRAY or String</p>
<p>Here is my code that ca... |
72,225,266 | Syntax error: Unexpected keyword UNNEST at [12:8] while using unnest<p>I want to use unnest in the following function to use <code>IN</code>keyword but it is throwing error unexpected keyword UNNEST while using unnest.</p>
<pre><code> CREATE TEMPORARY FUNCTION CUSTOM_JSON_EXTRACT(json STRING, json_path STRING)
... | <p><code>UNNEST</code> should be used together with an UDF which returns an array. Try this one instead.</p>
<pre class="lang-sql prettyprint-override"><code>CREATE TEMPORARY FUNCTION CUSTOM_JSON_EXTRACT(json STRING, json_path STRING)
RETURNS ARRAY<STRING>
LANGUAGE js AS """
try {
var parsed... | Syntax error: Unexpected keyword UNNEST at [12:8] while using unnest | google-bigquery|bigquery-udf | 0 | 348 | 1 | 72,225,353 | 72,225,353 | 0 | true | 2022-05-13T06:26:34.987Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Syntax error: Unexpected keyword UNNEST at [12:8] while using unnest<p>I want to use unnest in the following function to use <code>IN</code>keyword but it is... |
72,185,226 | How can I convert this lakh into actual price with int datatype<p>I was trying to convert this column values into actual numbers so that I can used this number for machine learning algorithm.
This label is actually what I want to predict from my machine learning algorithm, so I wanted to give this as input to my model ... | <p>I didn't had a minimum reproducible example, I created a demo dataframe similar to yours.</p>
<pre><code>import pandas as pd
df = pd.DataFrame({'selling_price' : ['5.5 Lakh*', '5.7 Lakh*', '3.5 Lakh*', '3.15 Lakh*'],
'new-price':['Rs.7.11-7.48 Lakh*','Rs.10.14-13.79 Lakh*','Rs.5.16-6.94 Lakh*','Rs... | How can I convert this lakh into actual price with int datatype | python | 0 | 63 | 1 | 72,185,536 | 72,185,536 | 0 | true | 2022-05-10T11:05:42.557Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I convert this lakh into actual price with int datatype<p>I was trying to convert this column values into actual numbers so that I can used this numb... |
72,164,828 | Ploting perpendicular line to normal of (x,y) coordinates on xy plane?<p>I want to plot points, which lie in xy plane. The thing is the points are with their given x, y, and z coordinates. I want a plane, not a 3d object. So the planes would be xy, xz, yz. But others can be exemplified from xy plane. What I am asking i... | <p>If you want a projection onto the xy plane, you just need to use the first two coordinates of the points:</p>
<pre class="lang-py prettyprint-override"><code>A_xy = [A[0], A[1]]
</code></pre>
<p>Projection on the xz plane is</p>
<pre class="lang-py prettyprint-override"><code>A_xz = [A[0], A[2]]
</code></pre>
<p>and... | Ploting perpendicular line to normal of (x,y) coordinates on xy plane? | python|jupyter-notebook | 0 | 104 | 1 | 72,165,241 | 72,165,241 | 0 | true | 2022-05-08T20:24:13.287Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Ploting perpendicular line to normal of (x,y) coordinates on xy plane?<p>I want to plot points, which lie in xy plane. The thing is the points are with their... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.