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,937,493 | How does parent tag Attributes in the "apply templete" when it is in "group by"<p>Here is the Sample XML which I am using</p>
<p><strong>XML.xml</strong></p>
<pre><code><root>
<main>
<docum year="2022" month="2022.01">1</docum>
<docum year="2021&qu... | <p>I think you want something along the following lines:</p>
<pre><code><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="3.0"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="#all"
expand-text="yes">
<xsl:te... | How does parent tag Attributes in the "apply templete" when it is in "group by" | xslt | 0 | 45 | 1 | 72,948,875 | 72,948,875 | 1 | true | 2022-07-11T11:01:21.463Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How does parent tag Attributes in the "apply templete" when it is in "group by"<p>Here is the Sample XML which I am using</p>
<p><strong>XML.xml</strong></p>... |
72,949,118 | What's the proper way to find the last parcel of an array?<p>I'm doing some codewars and <code>arr[index]</code> keeps returning <code>nil</code>. I've done this a few different ways, and I'm sure the array exists, as well as the index. What's wrong here, is it syntax?
As I've mentioned in the title, I want to find the... | <p>I see two issues with your code:</p>
<h1>Edge case: Empty array</h1>
<p>If <code>arr = {}</code>, the loop <code>for i, v in pairs(arr) do</code> won't execute at all and <code>index</code> will remain at <code>0</code>. Since <code>arr</code> is empty, <code>arr[0]</code> will be <code>nil</code> and <code>arr[inde... | What's the proper way to find the last parcel of an array? | lua|lua-table | 0 | 45 | 2 | 72,949,489 | 72,949,489 | 1 | true | 2022-07-12T08:20:11.577Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What's the proper way to find the last parcel of an array?<p>I'm doing some codewars and <code>arr[index]</code> keeps returning <code>nil</code>. I've done ... |
72,938,933 | Is it possible to save a value to CoreData using key path?<p>In a parent view, I have this:</p>
<pre><code>LongPressEditableText(contents: "\(workout.name ?? "")", context: workout, keyPath: \WorkoutEntity.name)
</code></pre>
<p>referencing a string field of a WorkoutEntity in CoreData.</p>
<p>The L... | <p><em>"Generics isn’t my primary concern..."</em>, yes it is because it is a very helpful solution here that tells the compiler and runtime what type of object is used in the text field.</p>
<p>First of all since this is Core Data we shouldn't use NSObject but instead NSManagedObject so lets make the view ge... | Is it possible to save a value to CoreData using key path? | core-data|swiftui|nsobject | 0 | 45 | 1 | 72,953,378 | 72,953,378 | 1 | true | 2022-07-11T12:53:45.377Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is it possible to save a value to CoreData using key path?<p>In a parent view, I have this:</p>
<pre><code>LongPressEditableText(contents: "\(workout.na... |
72,953,712 | Can i override the navigator getUserMedia and use my own custom modal?<p>I'm doing a next.js application that will behave like a progressive app, it should be usable on a mobile.</p>
<p>I want the user to be able to take pictures with his phone from the app.</p>
<p>It's all working fine until now, i am just wondering i... | <p>You can't customize the permission request dialog but you can make a modal where you can insert and customize whatever you want and make a listener for a "grant" button where you launch the default one.</p> | Can i override the navigator getUserMedia and use my own custom modal? | reactjs|next.js|getusermedia|navigator | 0 | 45 | 1 | 72,953,827 | 72,953,827 | 1 | true | 2022-07-12T14:08:35.703Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Can i override the navigator getUserMedia and use my own custom modal?<p>I'm doing a next.js application that will behave like a progressive app, it should b... |
72,953,697 | Text to column task in Python<pre><code>;
;
ACHTUNG;Dies ist das Ergebnis einer Testversion. Alle Ergebnisse ohne Gewaehr.
;Bei Rueckfragen oder Unstimmigkeiten wenden Sie sich an aron.proebsting@mwtest.de;
;
;
;
PSD4_Status;|;
PSD5_Status;|;
mux;<-;PSD6_CAN;PSD6_Status;
PSD6_Status;|;
cycle_state;<-;PSD6_Status;... | <p>Do you have to keep every row in your csv file? This will be a slight problem because you do not have enough delimiters per row to account for each column. This code will open your file, check how many delimiters each row needs, add the appropriate number of delimiters, save the new csv file with those delimiters, t... | Text to column task in Python | python|pandas|csv | 0 | 45 | 3 | 72,954,184 | 72,954,184 | 1 | true | 2022-07-12T14:07:34.230Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Text to column task in Python<pre><code>;
;
ACHTUNG;Dies ist das Ergebnis einer Testversion. Alle Ergebnisse ohne Gewaehr.
;Bei Rueckfragen oder Unstimmigkei... |
72,947,368 | Material Form Field and TextFieldRoot overwrite theme with useStyles / jss<p>How do I override Material themes for FormControl? It is usually html parent above a Textfield. I want the margin bottom to be 8px, instead of 4px. Below is not working. Currently using MUI version 4</p>
<p><a href="https://i.stack.imgur.com/r... | <p>Below is a simplified version of the html structure shown in your screenshot:</p>
<pre><code><div class="MuiFormControl-root MuiTextField-root">
<div class="MuiOutlinedInput-root">
<input type="text" class="MuiOutlinedInput-input"/>
</div>
&... | Material Form Field and TextFieldRoot overwrite theme with useStyles / jss | reactjs|material-ui | 1 | 45 | 2 | 72,955,166 | 72,955,166 | 1 | true | 2022-07-12T05:22:19.233Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Material Form Field and TextFieldRoot overwrite theme with useStyles / jss<p>How do I override Material themes for FormControl? It is usually html parent abo... |
72,944,172 | ReferenceError: ToolBar in not defined, how do I resolve?<p>Started a new nextjs project about three days ago. Just updated everything then added the following dependencies:</p>
<pre><code>yarn add @material-ui/core
yarn add @mui/icons-material
yarn add @mui/material
</code></pre>
<p>Got this code:</p>
<pre><code>impor... | <p><a href="https://www.w3schools.com/js/js_syntax.asp#:%7E:text=All%20JavaScript%20identifiers%20are%20case%20sensitive." rel="nofollow noreferrer">JavaScript is case-sensitive</a>.</p>
<p>You wrote <code><ToolBar></code> instead of <code><Toolbar></code>, but React doesn't know what the <code><ToolBar&... | ReferenceError: ToolBar in not defined, how do I resolve? | reactjs|next.js | -1 | 45 | 2 | 72,955,794 | 72,955,794 | 1 | true | 2022-07-11T20:13:59.223Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
ReferenceError: ToolBar in not defined, how do I resolve?<p>Started a new nextjs project about three days ago. Just updated everything then added the followi... |
72,914,889 | Using a Word2Vec Model to Extract Data<p>I've used gensim Word2Vec to learn the embedding of monetary amounts and other numeric data in bank transaction memos. The goal is to use this to be able to extract these amounts and currencies from future input strings.</p>
<p><strong>Design</strong>
Our input strings are somet... | <p>Word2vec's fuzzy, dense embedded token representations don't strike me as the right tool for what you're doing, though they might perhaps be an indirect contributor to a hybrid approach.</p>
<p>In particular:</p>
<ul>
<li>The word2vec algorithm originated from, & has the most consistent public results, when appl... | Using a Word2Vec Model to Extract Data | machine-learning|nlp|data-science|word2vec|word-embedding | 0 | 45 | 1 | 72,958,456 | 72,958,456 | 1 | true | 2022-07-08T17:21:37.263Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Using a Word2Vec Model to Extract Data<p>I've used gensim Word2Vec to learn the embedding of monetary amounts and other numeric data in bank transaction memo... |
72,958,305 | Google test error: '*' can only follow a repeatable token<p>Trying to create some unit tests with EXPECT_EXIT where the error message contains a '*'.
The test fails but not with expected error. <strong>What am I missing here?</strong></p>
<p>Here a very simple example to reproduce the issue:</p>
<pre><code>void test_De... | <p>The character <code>*</code> is reserved by the <a href="https://en.wikipedia.org/wiki/Regular_expression" rel="nofollow noreferrer">regular expression</a> grammar to indicate matching zero or more of the previous tokens or groups.</p>
<p>Some simple examples:</p>
<ul>
<li><code>.*</code> matches zero or more of <em... | Google test error: '*' can only follow a repeatable token | c++|unit-testing|googletest | 1 | 45 | 1 | 72,958,636 | 72,958,636 | 1 | true | 2022-07-12T20:57:51.043Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Google test error: '*' can only follow a repeatable token<p>Trying to create some unit tests with EXPECT_EXIT where the error message contains a '*'.
The tes... |
72,953,337 | CreateFeatureSelector for nested state (combineReducers)<p>The store for the app i am working on looks like this:</p>
<pre><code>export const reducers: ActionReducerMap<State> = {
auth: authReducer,
settingsSlice: settingsReducer,
incidentsSlice: incidentListReducer,
networkStatus: networkStatusReducer,
... | <p><code>createFeatureSelector</code> can only be used for top-level slices from the state tree. In your case, <code>auth</code>, <code>settingsSlice</code>, <code>incidentsSlice</code>, <code>networkStatus</code>, and <code>incidentSlice</code>.</p>
<p>To select state from the <code>incidentSlice</code>, the code s... | CreateFeatureSelector for nested state (combineReducers) | angular|state|ngrx|store | 0 | 45 | 1 | 72,962,098 | 72,962,098 | 1 | true | 2022-07-12T13:43:37.523Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
CreateFeatureSelector for nested state (combineReducers)<p>The store for the app i am working on looks like this:</p>
<pre><code>export const reducers: Actio... |
72,962,480 | Using sympy cxxcode on Heaviside function fails<p>I am using sympy version 1.10.1 and numpy version 1.20.0. Can someone please explain why the following simple code results in an error?</p>
<pre><code>import sympy as sp
from sympy.printing import cxxcode
T = sp.symbols('T', real=True, finite=True)
func = sp.Heaviside(... | <p>If I were you I would open an issue on SymPy.</p>
<p>To solve your problem you might want to modify the function in order to get <code>cxxcode</code> to work:</p>
<pre><code>func = func.rewrite(Piecewise)
# modify the last argument to insert the True condition
args = list(func.args)
args[-1] = [args[-1][0], True]
# ... | Using sympy cxxcode on Heaviside function fails | python|python-3.x|numpy|sympy | 1 | 45 | 1 | 72,962,711 | 72,962,711 | 1 | true | 2022-07-13T07:31:48.270Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Using sympy cxxcode on Heaviside function fails<p>I am using sympy version 1.10.1 and numpy version 1.20.0. Can someone please explain why the following simp... |
72,951,467 | Wix: "Found mismatched entry point <Product> for specified output package type .exe"<p>I'm creating a Wix installer and in its properties I set the Output type to "Windows Installer Package (.msi)"</p>
<p>When I do that, the package builds without any problems or warnings. But the package needs to execute a C... | <p>If you want an exe installer you would have to create a WIX setup bundle and call your msi there. But you can also run an elevated custom action from your msi.</p>
<pre><code>// State that your msi needs to be run elevated.
<Package ... InstallPrivileges="elevated"/>
// Pass properties to the ele... | Wix: "Found mismatched entry point <Product> for specified output package type .exe" | wix | 2 | 45 | 1 | 72,964,809 | 72,964,809 | 1 | true | 2022-07-12T11:19:26.103Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Wix: "Found mismatched entry point <Product> for specified output package type .exe"<p>I'm creating a Wix installer and in its properties I set the Output ty... |
72,920,439 | Transform columns on Talend using TMAP<p>So I have this table as an input:</p>
<p><a href="https://i.stack.imgur.com/5uD9s.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5uD9s.png" alt="enter image description here" /></a></p>
<p>The "numero" column is either of "Type" 7 or 2.
Wh... | <p>If row1.Type is an integer, the condition in the expression that defines your variables should use the == operator and not the .equals("") method. For Var.Portable, <code>row1.Type == 2 ? row1.Numero : null</code></p> | Transform columns on Talend using TMAP | mapping|talend|tmap|data-integration | 0 | 45 | 1 | 72,970,909 | 72,970,909 | 1 | true | 2022-07-09T09:58:06.760Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Transform columns on Talend using TMAP<p>So I have this table as an input:</p>
<p><a href="https://i.stack.imgur.com/5uD9s.png" rel="nofollow noreferrer"><im... |
72,983,839 | Pass argument to readable store in Svelte<p>is there someway to pass an argument to readable store in svelte ? I have the next code:</p>
<pre><code>export const worker = readable(
[], async (set) => {
const response = await fetchAPI()
set(response)
const interval = setInterval(a... | <p>You can access any variables that are in scope, so you can "pass" a variable from outside the <code>readable</code>'s function.</p>
<pre class="lang-js prettyprint-override"><code>export function worker(arg) {
return readable([], async set => {
const response = await fetchAPI(arg); // arg is in... | Pass argument to readable store in Svelte | javascript|svelte|svelte-store | 1 | 45 | 1 | 72,984,020 | 72,984,020 | 1 | true | 2022-07-14T16:32:15.877Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pass argument to readable store in Svelte<p>is there someway to pass an argument to readable store in svelte ? I have the next code:</p>
<pre><code>export co... |
72,984,106 | Why can't I return the form with cond as I can with if-else?<p>Inspired by the syntax of <code>if</code> from the exercise 1.4 <a href="https://stackoverflow.com/questions/tagged/sicp+scheme">from SICP</a>,
I tried to code something similar but with <code>cond</code>:</p>
<pre><code>#!/usr/bin/env racket
#lang racket/b... | <p>In your <code>if</code> version you are ending the <code>if</code> form aplying the result with <code>s</code> as the operand. In the <code>cond</code> version you don't. It should be like this:</p>
<pre><code>(define (formatted-printer s)
((cond
((equal? s "You have to be bold to do it.\n") b)
... | Why can't I return the form with cond as I can with if-else? | scheme|racket|control-flow | 0 | 45 | 1 | 72,985,515 | 72,985,515 | 1 | true | 2022-07-14T16:53:12.480Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why can't I return the form with cond as I can with if-else?<p>Inspired by the syntax of <code>if</code> from the exercise 1.4 <a href="https://stackoverflow... |
72,985,756 | Move jittered points to align with dodged boxplots but the points have different shapes<p>Tons of answers for dodging points and boxplots at the same time but what if I want different shaped points by a 3rd factor?</p>
<pre><code> data<-cbind(expand.grid(trt=factor(1:4), block=factor(1:2), year=factor(c(2013, 202... | <p>You can use the <code>group</code> aesthetic</p>
<pre class="lang-r prettyprint-override"><code>ggplot(data, aes(x = trt, y = value, color = year)) +
geom_boxplot(outlier.size = 0, alpha = 0.7, size = 2) +
geom_point(alpha = 0.4, position = position_jitterdodge(jitter.width = 0.8),
size = 3, a... | Move jittered points to align with dodged boxplots but the points have different shapes | r|ggplot2|jitter | 1 | 45 | 1 | 72,985,859 | 72,985,859 | 1 | true | 2022-07-14T19:31:04.013Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Move jittered points to align with dodged boxplots but the points have different shapes<p>Tons of answers for dodging points and boxplots at the same time bu... |
72,985,173 | In javascript, is there an efficient way to write this function that converts a timestamp to local time?<p>I've written a function that will get the first line of an "Activity Array" because it holds the timestamp within the response.</p>
<p>That timestamp looks like this: <code>20220714.1757</code></p>
<p>Th... | <p>You can extract the date parts nicely with a regular expression. Then you can feed those as separate arguments to <code>Date.UTC</code>, so you avoid string parsing. Only have to take care to make the month number zero-based:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel... | In javascript, is there an efficient way to write this function that converts a timestamp to local time? | javascript|arrays|function|time | 0 | 45 | 3 | 72,985,871 | 72,985,871 | 1 | true | 2022-07-14T18:30:41.227Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
In javascript, is there an efficient way to write this function that converts a timestamp to local time?<p>I've written a function that will get the first li... |
72,992,386 | SyntaxError: Named export 'express' not found<p>I have a CRUD project based on react and nodejs. when I try to index.js, I recieve the following error: <a href="https://i.stack.imgur.com/xWe3W.png" rel="nofollow noreferrer">Named export 'express' not found</a> ( please open the image to see the error)</p>
<p>The index.... | <pre><code>import express from "express";
</code></pre> | SyntaxError: Named export 'express' not found | node.js|reactjs|phpmyadmin | 0 | 45 | 2 | 72,992,418 | 72,992,418 | 1 | true | 2022-07-15T10:09:58.177Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
SyntaxError: Named export 'express' not found<p>I have a CRUD project based on react and nodejs. when I try to index.js, I recieve the following error: <a hr... |
72,993,132 | Display 1 when no data is exist in database<p>I am trying to generate incremental id whenever I am adding new data in my model. here I am getting the the next number whenever I am adding new data. but If there is no any data in my table its giving me error. <strong>'NoneType' object has no attribute 'tax_id'</strong></... | <p>You are trying to do too much in too few lines of code. Wherever you use queryset <code>.last()</code> or <code>.first()</code> you must explicitly handle the case where it returns <code>None</code>!</p>
<p>You need code of the form:</p>
<pre><code>o = Tax_Settings.objects.last()
if o is not None:
tax_id = o.tax... | Display 1 when no data is exist in database | python|django|object|orm|not-exists | 0 | 45 | 5 | 72,993,293 | 72,993,293 | 1 | true | 2022-07-15T11:15:06.447Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Display 1 when no data is exist in database<p>I am trying to generate incremental id whenever I am adding new data in my model. here I am getting the the nex... |
72,982,711 | Cloudinary upload image from Django admin panel from two or more databases<p>everyone. I decide to use Cloudinary for storing images.
This is my model field with image:</p>
<pre><code>avatar = models.ImageField(upload_to='avatar/', default='avatar/default.png', blank=True)
</code></pre>
<p>All works fine for me, but I ... | <p>By default, if you don't supply a public_id in the upload API call, a random string is assigned to the asset. You can read more here: <a href="https://cloudinary.com/documentation/upload_images#public_id" rel="nofollow noreferrer">https://cloudinary.com/documentation/upload_images#public_id</a>.</p>
<p>It sounds lik... | Cloudinary upload image from Django admin panel from two or more databases | django|django-models|cloudinary | 0 | 45 | 1 | 72,996,115 | 72,996,115 | 1 | true | 2022-07-14T15:04:16.763Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Cloudinary upload image from Django admin panel from two or more databases<p>everyone. I decide to use Cloudinary for storing images.
This is my model field ... |
72,996,806 | How to aggregate a column based on values of other columns - PostgreSQL<p>Say I have a table:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>date</th>
<th>fruit</th>
<th>status</th>
<th>numberOfFruits</th>
</tr>
</thead>
<tbody>
<tr>
<td>2022-01</td>
<td>apple</td>
<td>ripe</td>
<td>3</td>... | <p>Aggregation functions are employed to aggregate rows (combining rows to get aggregated values). In your case you should rather use window functions, that compute values over windows (partitions/groups of rows), though without aggregating the rows.</p>
<pre><code>SELECT *,
AVG(numberOfFruits) OVER(PARTITION BY... | How to aggregate a column based on values of other columns - PostgreSQL | sql|postgresql|group-by|case|aggregate-functions | 1 | 45 | 1 | 72,996,945 | 72,996,945 | 1 | true | 2022-07-15T16:06:17.013Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to aggregate a column based on values of other columns - PostgreSQL<p>Say I have a table:</p>
<div class="s-table-container">
<table class="s-table">
<th... |
72,985,052 | How do I curl my elasticsearch on AWS EC2<p>I installed elasticsearch(docker) 8.2 on aws ec2(ubuntu 20.04.)</p>
<p>Everything is working.My only problem is that I can't reach(curl) it from other instances and my backend server(it is on same vpc).</p>
<p>I added my node to its discovery node, and also set network.host:... | <p>Looks like you forgot to bind the docker container port to host port, you need to add below config, to your Elasticsearch container docker yml</p>
<pre><code>ports:
- "9202:9200" (bind 9200 port of host to docker port of 9200, 9200 is the Elasticsearch port by default)
</code></pre>
<p>After that you... | How do I curl my elasticsearch on AWS EC2 | elasticsearch|curl|amazon-ec2|docker-compose|elastic-stack | 1 | 45 | 1 | 73,002,961 | 73,002,961 | 1 | true | 2022-07-14T18:18:54.857Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I curl my elasticsearch on AWS EC2<p>I installed elasticsearch(docker) 8.2 on aws ec2(ubuntu 20.04.)</p>
<p>Everything is working.My only problem is ... |
73,004,085 | I'm getting this error "The operator '[]' isn't defined for the type 'Future<dynamic>'." can someone please help me fix my code? flutter/dart<p>I am getting these two errors when building a listview.</p>
<p>The getter 'length' isn't defined for the type 'Future'.
The operator '[]' isn't defined for the type 'Future'.</... | <p>Future builder takes a future. You can assign the future to Futurebuilder and check its data. Assuming ReadCache.getStringList is a future you can write it like this.</p>
<pre class="lang-dart prettyprint-override"><code>FutureBuilder(
future: ReadCache.getStringList(key: "cahce3"),
builder: (... | I'm getting this error "The operator '[]' isn't defined for the type 'Future<dynamic>'." can someone please help me fix my code? flutter/dart | flutter|flutter-listview|flutter-http | 0 | 45 | 1 | 73,004,137 | 73,004,137 | 1 | true | 2022-07-16T12:10:48.467Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I'm getting this error "The operator '[]' isn't defined for the type 'Future<dynamic>'." can someone please help me fix my code? flutter/dart<p>I am getting ... |
73,010,826 | How can I enter numbers in the bar on the django form?<h1>What you want to achieve</h1>
<p><img src="https://ddjkaamml8q8x.cloudfront.net/questions/2022-07-15/d6004ac3-79db-4bb3-b5c6-94ad4b73a185.png" alt="イメージ説明" /></p>
<p>I want to input numbers in the django form like this.</p>
<h1>Current code</h1>
<pre><code>class... | <p>Easy way is:</p>
<pre><code>attrs = {'type':'range', ...
</code></pre>
<p>but it is not works everywhere <a href="https://www.w3schools.com/tags/att_input_type_range.asp" rel="nofollow noreferrer">https://www.w3schools.com/tags/att_input_type_range.asp</a></p> | How can I enter numbers in the bar on the django form? | javascript|html|django|django-views | 1 | 45 | 1 | 73,011,226 | 73,011,226 | 1 | true | 2022-07-17T09:57:25.237Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I enter numbers in the bar on the django form?<h1>What you want to achieve</h1>
<p><img src="https://ddjkaamml8q8x.cloudfront.net/questions/2022-07-1... |
73,010,911 | How can I spawn an object on the opposite side of mesh(wall) I'm clicking on in unity3d?<p>I'm new to unity and I'm using unity3d. So if I'm clicking on a mesh, for example a wall. I want to spawn an object on the opposite side of the wall I'm clicking on. It should work on x,y,& z axis.</p> | <p>You can simply draw a vector from where you are to the wall <code>(wallPosition) - (YourPosition)</code>. <code>Normalizing</code> this vector will give you the <code>direction</code> you need to go to be on the other side of the wall. By knowing the direction then based on the thickness of the wall, its position, a... | How can I spawn an object on the opposite side of mesh(wall) I'm clicking on in unity3d? | c#|unity3d | -1 | 45 | 1 | 73,012,109 | 73,012,109 | 1 | true | 2022-07-17T10:11:23.163Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I spawn an object on the opposite side of mesh(wall) I'm clicking on in unity3d?<p>I'm new to unity and I'm using unity3d. So if I'm clicking on a me... |
73,014,049 | Regex that allows " ' " only in word ex. "won't" would be allowed but ''' should not be allowed<p>I have a code here</p>
<pre><code>Regex regex = new Regex(s);
if (s.Length > 0 && Regex.IsMatch(s, "^\'?"))
{
s = Regex.Replace(s, "[^a-zA-Z']+", " ").ToLower();
</c... | <p>I would just loop over the characters and test whether every ' character is adjacent with two letters</p>
<p>otherwise you can use the regex way (there must be a better alternative):</p>
<pre><code>bool allowed = (Regex.IsMatch("don't", "^([^']|([a-zA-Z]'[a-zA-Z]))*$"));//true
bool allowed = (Reg... | Regex that allows " ' " only in word ex. "won't" would be allowed but ''' should not be allowed | c# | 0 | 45 | 2 | 73,014,225 | 73,014,225 | 1 | true | 2022-07-17T17:46:25.053Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Regex that allows " ' " only in word ex. "won't" would be allowed but ''' should not be allowed<p>I have a code here</p>
<pre><code>Regex regex = new Regex(s... |
73,014,834 | How to create subscripts in the names of variables in R?<p>I'm trying to create a plot with five variables, three of which are air pollutants: PM2.5, NO2, and O3. I want the numbers to be subscripts, which is how these are written in most literature, but I've been trying every variation I can think of using square brac... | <p>Obviously, we don't have your data, so here's a random set with the same names / structure:</p>
<pre class="lang-r prettyprint-override"><code>risks <- data.frame(
variable = c("O3","PM2.5","NO2", "Diethyl","Dimethyl"),
est = c(10, 12, 15, 6, 9),
... | How to create subscripts in the names of variables in R? | r|variables|ggplot2|subscript | 0 | 45 | 2 | 73,015,205 | 73,015,205 | 1 | true | 2022-07-17T19:39:18.247Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to create subscripts in the names of variables in R?<p>I'm trying to create a plot with five variables, three of which are air pollutants: PM2.5, NO2, an... |
73,014,563 | How to move the first N elements in a char array to the end in Java<p>I have to take a sentence from a document and separate each word and if the word is even, take the first half and put them at the end of the word. If it is odd, take the first half + 1 and put them at the end of the word. I have figured out for the m... | <p>This can be done much simpler using substring and taking advantage of integer division.</p>
<pre><code>int x = (word.length() + 1) / 2;
word = word.substring(x) + word.substring(0, x);
</code></pre>
<p>The reason it works is because if the word length <code>l</code> is even then <code>l/2</code> is the same as <code... | How to move the first N elements in a char array to the end in Java | java | 0 | 45 | 1 | 73,015,303 | 73,015,303 | 1 | true | 2022-07-17T18:59:41.290Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to move the first N elements in a char array to the end in Java<p>I have to take a sentence from a document and separate each word and if the word is eve... |
73,015,554 | R: automatically assigning all colors<p>I am working with the R programming language. I have this data:</p>
<pre><code>letters = replicate(52, paste(sample(LETTERS, 10, replace=TRUE), collapse=""))
values = rnorm(52, 100, 100)
my_data = data.frame(letters, values)
</code></pre>
<p>I am trying to plot this da... | <p>You can use a vector of 53 colors using a palette function such as <code>scales::hue_pal()(53)</code> (note I have had to alter the way the input data is used, since your unmodified example data and code simply returns an error)</p>
<pre class="lang-r prettyprint-override"><code>waffle(setNames(abs(round(my_data$val... | R: automatically assigning all colors | r|ggplot2|data-visualization | 0 | 45 | 1 | 73,015,756 | 73,015,756 | 1 | true | 2022-07-17T21:41:10.860Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
R: automatically assigning all colors<p>I am working with the R programming language. I have this data:</p>
<pre><code>letters = replicate(52, paste(sample(L... |
73,013,743 | for loop in recursive function python<p>I tried to use for loop in a recursive function to find all path that the child class related to its parents.</p>
<pre><code>class A:
pass
class B(A):
pass
class C(A):
pass
class F(A):
pass
class L(C,B):
pass
class D(B,F):
pass
class M(L,D):
pass
def... | <p>Try the following implementation using recursion:</p>
<pre class="lang-py prettyprint-override"><code>class A:
pass
class B(A):
pass
class C(A):
pass
class F(A):
pass
class L(C,B):
pass
class D(B,F):
pass
class M(L,D):
pass
def bases(cls):
if cls.__bases__ == (object, ): # if "r... | for loop in recursive function python | python|for-loop|recursion | 0 | 45 | 1 | 73,015,827 | 73,015,827 | 1 | true | 2022-07-17T16:59:58.730Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
for loop in recursive function python<p>I tried to use for loop in a recursive function to find all path that the child class related to its parents.</p>
<pr... |
73,015,927 | How to spawn characters in certain area like a spawn point instead of inside circle<p>i'm working on a 2D game and i want to make characters spawn from the door to enter the store the script i have keeps spawning them in circle unit which is not what i want. i want them to spawn from the door then i will assign movemen... | <p>If you want to just spawn the characters at a specific point, you should be able to just remove the <code>spawnPos += Random.insideUnitCircle.normalized * spawnRadius; </code> line from the <code>SpawnAnEnemy</code> IEnumerator.</p>
<p>To spawn them randomly inside a rectangular area, I would use the <code>Random.Ra... | How to spawn characters in certain area like a spawn point instead of inside circle | c#|unity3d | 2 | 45 | 2 | 73,016,309 | 73,016,309 | 1 | true | 2022-07-17T23:00:15.213Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to spawn characters in certain area like a spawn point instead of inside circle<p>i'm working on a 2D game and i want to make characters spawn from the d... |
73,020,920 | Display first true and then false<p>In my SQL table, I have records. Some of them have FLAG Y/N. Now, when I run my query, I want to display first all the Y values and then N.</p>
<p><strong>Table details</strong></p>
<p><strong>StuID .... StuFlag</strong></p>
<p>1 .... N</p>
<p>2 .... N</p>
<p>3 ..... | <p>The clean way would be:</p>
<pre><code>CREATE TABLE table1 (
stuid INTEGER NOT NULL ...
, stuflag BIT
, [.. OTHER COLUMNS .. ]
);
INSERT INTO table1 VALUES (42,TRUE);
INSERT INTO table1 VALUES (42,FALSE);
SELECT * FROM table1 ORDER BY stuflag DESC;
-- FALSE is less than TRUE ...
</code></pre> | Display first true and then false | sql|sql-server|sql-server-2012 | 0 | 45 | 2 | 73,021,230 | 73,021,230 | 1 | true | 2022-07-18T10:33:48.180Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Display first true and then false<p>In my SQL table, I have records. Some of them have FLAG Y/N. Now, when I run my query, I want to display first all the Y ... |
73,025,032 | React-native MapViewer causes You likely forgot to export your component from the file it's defined in<p>I am using MapView of react-native-maps as shown below but when I try to run my code I get the error <code> ERROR Error: Element type is invalid: expected a string (for built-in components) or a class/function (for... | <p>can you try importing all of react-native-maps together?</p>
<p>like</p>
<pre><code>import MapView, {Marker} from 'react-native-maps'
</code></pre> | React-native MapViewer causes You likely forgot to export your component from the file it's defined in | react-native|google-maps|export|mapview | 0 | 45 | 2 | 73,025,108 | 73,025,108 | 1 | true | 2022-07-18T15:42:18.787Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
React-native MapViewer causes You likely forgot to export your component from the file it's defined in<p>I am using MapView of react-native-maps as shown bel... |
73,029,435 | Download tar file using Axios<p>I have an API-endpoint that gives me a tar file with the <code>Content-Type: application/x-tar</code>, which is then being served to my frontend app using Express. I tried fetching this file using Axios with the <code>responseType: 'blob'</code> but I cannot open the binary without an er... | <p><strong>Problem #1</strong> - Axios only supports <code>responseType: "blob"</code> in the browser.</p>
<p>If your Express app needs to retrieve a binary file, use this</p>
<pre class="lang-js prettyprint-override"><code>const axiosRes = await axios.get(`${API}/file`, {
headers: { Authorization: `Bearer ... | Download tar file using Axios | node.js|express|axios | 0 | 45 | 1 | 73,029,573 | 73,029,573 | 1 | true | 2022-07-18T22:56:42.987Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Download tar file using Axios<p>I have an API-endpoint that gives me a tar file with the <code>Content-Type: application/x-tar</code>, which is then being se... |
73,029,190 | c# Regex to remove single characters and orphaned spaces when input is unknown and can contain multiple words<p>This is almost similar to this <a href="https://stackoverflow.com/questions/15986187/or-condition-in-regex">OR condition in Regex</a> and many others close ...</p>
<p>I have an OCR Program that is reading lab... | <p>try this <code> .(?= )|(?<= ). |^. | .$</code>:</p>
<pre><code>str = Regex.Replace(str2, @" .(?= )|(?<= ). |^. | .$","", RegexOptions.Multiline);
</code></pre> | c# Regex to remove single characters and orphaned spaces when input is unknown and can contain multiple words | c#|regex | 0 | 45 | 2 | 73,029,688 | 73,029,688 | 1 | true | 2022-07-18T22:17:53.690Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
c# Regex to remove single characters and orphaned spaces when input is unknown and can contain multiple words<p>This is almost similar to this <a href="https... |
73,030,557 | ReactJS add component to Javascript object<p>I'm using a Javascript object to hold the info for a side menu (e.g. name, path), then using a couple of nested maps to build the actual menu composed of <a href="https://mui.com/" rel="nofollow noreferrer">MUI</a> components. This works for info that is stored as JS primiti... | <p>Did you mean <code><InboxIcon /></code>? Since I cannot see where you opened it, so I believe that's the problem.</p> | ReactJS add component to Javascript object | javascript|reactjs | 2 | 45 | 1 | 73,030,614 | 73,030,614 | 1 | true | 2022-07-19T02:44:04.080Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
ReactJS add component to Javascript object<p>I'm using a Javascript object to hold the info for a side menu (e.g. name, path), then using a couple of nested ... |
73,028,968 | adf test in Julia<p>This is my FTSE column</p>
<p><a href="https://i.stack.imgur.com/TFfCr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TFfCr.png" alt="enter image description here" /></a></p>
<p>To calculate log return of the FTSE; R code is given below.</p>
<pre><code>log_return = diff(log(FTSE)... | <p>I assume you want to use <code>ADFTest</code> from HypothesisTests.jl, here is how you should use it (I picked some example parameters for the test; this assumes you want to run a test for unit root in log returns of <code>FTSE</code>):</p>
<pre><code>julia> using HypothesisTests
julia> FTSE = rand(20);
juli... | adf test in Julia | r|julia | 1 | 45 | 1 | 73,032,391 | 73,032,391 | 1 | true | 2022-07-18T21:47:27.383Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
adf test in Julia<p>This is my FTSE column</p>
<p><a href="https://i.stack.imgur.com/TFfCr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com... |
72,962,302 | Bug in actionStartActivity by using Row or Column in GlanceAppWidget<p><strong>Component used:</strong> GlanceAppWidget</p>
<p><strong>Library & Version used:</strong> androidx.glance:glance-appwidget:1.0.0-alpha03</p>
<p>In the Row and Column if we have more than 1 button onClick and if we use actionStartActivity ... | <p>IssueTracker : <a href="https://issuetracker.google.com/issues/238793260" rel="nofollow noreferrer">https://issuetracker.google.com/issues/238793260</a></p>
<p>I think this is happening due to the fact that we request a PendingIntent for each actionStartActivity, and they will get conflated if the underlying intents... | Bug in actionStartActivity by using Row or Column in GlanceAppWidget | android|android-jetpack-compose|android-jetpack|glance-appwidget|glance | -2 | 45 | 1 | 73,108,049 | 73,108,049 | 1 | true | 2022-07-13T07:16:50.637Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Bug in actionStartActivity by using Row or Column in GlanceAppWidget<p><strong>Component used:</strong> GlanceAppWidget</p>
<p><strong>Library & Version ... |
72,836,890 | Show different images, based on percentage of page scrolled<p>I'm looking to fade-in different images, based on the percentage of the total page scrolled.
The idea is that an image is shown at an even interval along the entire page.</p>
<p>Right now, I have the following code which is based on the amount of pixels scro... | <p>Ah, I see now ok, so I believe this should work for you, it uses the methods from</p>
<p><a href="https://stackoverflow.com/questions/2863547/javascript-scroll-event-for-iphone-ipad?answertab=trending">javascript scroll event for iPhone/iPad?</a></p>
<p>I tested it using browserstack.com's mobile emulators on androi... | Show different images, based on percentage of page scrolled | javascript|jquery|image | 0 | 45 | 2 | 72,849,374 | 72,849,374 | 1 | true | 2022-07-02T06:14:13.660Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Show different images, based on percentage of page scrolled<p>I'm looking to fade-in different images, based on the percentage of the total page scrolled.
Th... |
72,768,530 | Transform Pandas DataFrame to custom JSON format<p>I currently have a Python Pandas DataFrame that I would like to convert to a custom JSON structure. Does anyone know how I can achieve this? I'd love to hear it, thanks in advance!</p>
<p>Current Pandas DataFrame structure:</p>
<pre><code>ArticleNumber | Brand | Stock ... | <p>Use list with dict comprehension for custom format:</p>
<pre><code>import json
L = df.to_dict('records')
df['DICT'] = [{"Attributes":[{'Key':k,'Values':[v]}
for k, v in x.items()]} for x in L]
df['JSON'] = [json.dumps({"Attributes":[{'Key':k,'Values':[v]}
for ... | Transform Pandas DataFrame to custom JSON format | python|json|pandas | 1 | 45 | 1 | 72,768,669 | 72,768,669 | 1 | true | 2022-06-27T07:40:20.790Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Transform Pandas DataFrame to custom JSON format<p>I currently have a Python Pandas DataFrame that I would like to convert to a custom JSON structure. Does a... |
72,907,091 | Align value counts of two dataframes side by side<p>If I have two dataframes - df1 (data for current day), and df2 (data for previous day).</p>
<p>Both dataframes have 40 columns, and all columns are object data type.</p>
<p>how do I compare Top 3 value_counts for both dataframes, ideally so that the result is side by ... | <p>You can compare if same columns names in both DataFrames - first use lambda function with <a href="http://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.value_counts.html" rel="nofollow noreferrer"><code>Series.value_counts</code></a>, top3 and create default index for both DataFrames and then join... | Align value counts of two dataframes side by side | python-3.x|pandas | 1 | 45 | 1 | 72,907,164 | 72,907,164 | 1 | true | 2022-07-08T05:41:23.960Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Align value counts of two dataframes side by side<p>If I have two dataframes - df1 (data for current day), and df2 (data for previous day).</p>
<p>Both dataf... |
72,838,451 | Wordpress - Why if I put the js script at the top of the page it doesn't load?<p>I'm trying to edit woocommerce settings page, everything works fine in a way, but for some reason if I load my custom js file on top of the template it doesn't load. Below is the template ...</p>
<p>If the script <code><script type=&quo... | <p>Try adding <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script#attr-defer" rel="nofollow noreferrer">defer</a>. It will ensure that the html elements are parsed BEFORE your script tries to act upon them. If the script runs before the page has loaded it won't accomplish what you're wanting.</p>
... | Wordpress - Why if I put the js script at the top of the page it doesn't load? | javascript|php|html|wordpress|include | 1 | 45 | 1 | 72,838,684 | 72,838,684 | 1 | true | 2022-07-02T10:48:45.397Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Wordpress - Why if I put the js script at the top of the page it doesn't load?<p>I'm trying to edit woocommerce settings page, everything works fine in a way... |
72,853,917 | How to use NotificationListenerService to block notification in android<p><strong>NOTE:</strong> I'm aware that this question somehow can be a duplicate. Still I'm asking this as I found no tutorial or any proper answer for the above question.</p>
<p>I'm making an app which has a feature that user can block the notific... | <p>I found a way! Obviously I created a <code>NotificationListener</code> class which extends the <a href="https://developer.android.com/reference/android/service/notification/NotificationListenerService" rel="nofollow noreferrer"><code>NotificationListenerService</code></a> class and then override the <a href="https:/... | How to use NotificationListenerService to block notification in android | java|android|notifications | 1 | 45 | 2 | 72,920,998 | 72,920,998 | 1 | true | 2022-07-04T08:41:48.713Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to use NotificationListenerService to block notification in android<p><strong>NOTE:</strong> I'm aware that this question somehow can be a duplicate. Sti... |
72,815,547 | Change Text (translation) on other UserControl form, VB.NET Question<p>I need to use labels, and also popups with text. This text needs to be translated in any language, and that's what I did, using a database reference of translations in various .resx files: any label/object has its ID, which I associate the translati... | <p>Is the comboBox nescessary? Can't you let the Current Culture decide which language to use?</p>
<p>My VB.Net is a bit rusty but I think this should work similar to how you would do it in C#, see <a href="https://stackoverflow.com/questions/1142802/how-to-use-localization-in-c-sharp">How to use localization in C#</a>... | Change Text (translation) on other UserControl form, VB.NET Question | .net|vb.net | 0 | 45 | 1 | 72,817,404 | 72,817,404 | 1 | true | 2022-06-30T12:07:30.887Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Change Text (translation) on other UserControl form, VB.NET Question<p>I need to use labels, and also popups with text. This text needs to be translated in a... |
72,840,722 | Only print on the first column of csv<p>So I have this code but I am having issues when the data I am scraping has commas. I want it only show on the first column but when there's a comma, the data appears on the 2nd column. Is it possible to scrape and print it on the first column only of csv without using panda? Than... | <p>CSV files have rules for escaping commas within a single column so that they are not mistakenly interpreted as a new column. This escaping can be applied automatically if you use the <code>csv</code> module. You really only need to open the file once, so with a few more tweaks to your code</p>
<pre><code>import csv
... | Only print on the first column of csv | python|pandas | 0 | 45 | 1 | 72,840,810 | 72,840,810 | 1 | true | 2022-07-02T16:33:45.413Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Only print on the first column of csv<p>So I have this code but I am having issues when the data I am scraping has commas. I want it only show on the first c... |
73,017,117 | How to disallow increment operator when operated multiple times on a object?<p>How do I overload the increment operator so that this code becomes invalid -</p>
<pre><code>Point p(2, 3);
++++p;
</code></pre>
<p>while allowing the following -</p>
<pre><code>Point p(2, 3), a(0, 0), b(1, 4);
a = ++p + b;
</code></pre>
<p>L... | <p>One way you <em>could</em> do this is to make your <code>operator++()</code> return a <code>const</code> reference. That would prevent subsequent modification of the returned value, as in a 'chained' <code>++++p;</code>.</p>
<p>Here's an outline version that also includes the required binary addition operator, imple... | How to disallow increment operator when operated multiple times on a object? | c++|operator-overloading|increment|lvalue-to-rvalue | -1 | 45 | 1 | 73,017,238 | 73,017,238 | 1 | true | 2022-07-18T03:49:29.320Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to disallow increment operator when operated multiple times on a object?<p>How do I overload the increment operator so that this code becomes invalid -</... |
72,913,006 | Query for getting countable matching entries between dates and join them to read states of user<p>i would like to count the entries of my record table, filtered by a given period by valid_from and valid_till <strong>or</strong> if valid_till is null</p>
<p><strong>Records</strong></p>
<div class="s-table-container">
<t... | <p>The first thing you will need to do is to concatenate the input dates as in the <code>selected_range</code> subquery.</p>
<p>In my understanding the following query is the correct one, because if a record has <code>valid_till = null</code> it means that it is still valid until <code>NOW</code> right? So in your exam... | Query for getting countable matching entries between dates and join them to read states of user | mysql|sql | 2 | 45 | 1 | 72,932,945 | 72,932,945 | 1 | true | 2022-07-08T14:35:21.057Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Query for getting countable matching entries between dates and join them to read states of user<p>i would like to count the entries of my record table, filte... |
72,950,606 | How do I group by two variables in R and arrange them in the right order using ggplot?<p>Having trouble grouping by two variables and having a correct descending order.</p>
<p>I'm using a modified Iris df for this, This is my script:</p>
<pre><code>iris_new <- iris %>%
mutate(number_petals = sample(1:10, size ... | <p>Here is one way using <code>factor</code>ed approach -</p>
<p>We create two new columns <code>n</code> and <code>n1</code> where <code>n1</code> is <code>sum</code> of <code>n</code> values in each <code>number_petals</code>. <code>arrange</code> the data by <code>n1</code> and create factor levels according to thei... | How do I group by two variables in R and arrange them in the right order using ggplot? | r | 1 | 45 | 1 | 72,950,751 | 72,950,751 | 1 | true | 2022-07-12T10:11:32.373Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I group by two variables in R and arrange them in the right order using ggplot?<p>Having trouble grouping by two variables and having a correct descen... |
73,013,185 | Opengl GLSL value changes for no reason<p>I recently decided to make my own voxel game with opengl in C++ (using glfw).</p>
<p>I'm looking to add textures to the blocs (I already done the chunk system).
To do this, I add for every bloc added to the vertices array and ID for the texture (1 = cobblestone, 2 = dirt, ...) ... | <blockquote>
<p>"I have the impression that the value of the ID of the bloc changes for no reason between the vertex shader and the fragment shader"</p>
</blockquote>
<p>Of course, the value of the fragment shader input is interpolated between the outputs of the vertex shader associated with the primitive. If... | Opengl GLSL value changes for no reason | c++|opengl|glsl|glfw | 0 | 45 | 1 | 73,013,265 | 73,013,265 | 1 | true | 2022-07-17T15:46:35.370Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Opengl GLSL value changes for no reason<p>I recently decided to make my own voxel game with opengl in C++ (using glfw).</p>
<p>I'm looking to add textures to... |
72,878,923 | Why does position=sticky not work for an element next to AgGrid?<p>I am trying to stick a button to the top of its parent element.</p>
<p>I have followed this <a href="https://www.w3docs.com/tools/code-editor/9895" rel="nofollow noreferrer">tutorial</a> which works fine.
Unfortunately, sticky will no longer work, when ... | <p>You can try adding a <code>z-index: 1;</code> to your style to make the element come to to the front, see the snippet below:</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>... | Why does position=sticky not work for an element next to AgGrid? | html|css|ag-grid | 0 | 45 | 1 | 72,879,154 | 72,879,154 | 1 | true | 2022-07-06T06:41:08.913Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why does position=sticky not work for an element next to AgGrid?<p>I am trying to stick a button to the top of its parent element.</p>
<p>I have followed thi... |
72,987,292 | mapping day of week to number python<p>I need to iterate through a dataframe and generate a column that transposes a weekday into its related number.</p>
<p>I've came up with the following:</p>
<pre><code> inputData['DOW'] = ""
for i in range(0,len(inputData)):
if 'Sunday' in inputData.iloc[i]['da... | <p>I am not going to break down why this is wrong - but it is on many levels. You can simply remap by using replace</p>
<pre><code>import pandas as pd
mapping = {
'Sunday': 0,
'Monday': 1,
'Tuesday': 2,
'Wednesday': 3,
}
df = pd.DataFrame(data=['Monday', 'Tuesday', 'Wednesday', 'Monday'], columns=['day_... | mapping day of week to number python | python|pandas|dataframe|date|conditional-statements | 2 | 45 | 1 | 72,987,343 | 72,987,343 | 1 | true | 2022-07-14T22:32:53.517Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
mapping day of week to number python<p>I need to iterate through a dataframe and generate a column that transposes a weekday into its related number.</p>
<p>... |
72,862,237 | MATLAB string to integer conversion<p>I am a newbie at matlab. I have deployed a machine learning model(developed using python) using flask. From matlab, I have called the API and received a string response. The response is like: '[0.8]'. but matlab is showing the size of the string is 1. I need only the value 0.8. My ... | <p>If <code>ans='[0.8]'</code> then <code>length(ans)</code> would be equal to 5 (because there are 5 characters in this char array). I suspect that you actually have <code>ans={'[0.8]'}</code>, i.e. a cell array of length 1 which contains a single char array. Otherwise you are using single quotation marks <code>'_'</c... | MATLAB string to integer conversion | string|matlab | 1 | 45 | 1 | 72,865,287 | 72,865,287 | 1 | true | 2022-07-04T21:38:43.587Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
MATLAB string to integer conversion<p>I am a newbie at matlab. I have deployed a machine learning model(developed using python) using flask. From matlab, I h... |
72,911,419 | Transport QML Image via Bridge<p>I have at the moment a simple PySide6 app which uses <code>qml</code> for image capturing. I want to transport the image to our app but cannot figure out how. I am not sure, if <a href="https://stackoverflow.com/questions/11011391/saving-qml-image">saving QML image</a> is an attempt in ... | <p>You should use the <code>imageCaptured</code> signal.</p>
<p>Change:</p>
<pre><code>imageCapture: ImageCapture {
id: capture
}
</code></pre>
<p>To:</p>
<pre><code>imageCapture: ImageCapture {
id: capture
onImageCaptured: function(req_id, preview){bridge.capture(req_id, preview)}
}
</code></pre>
<p>And ch... | Transport QML Image via Bridge | qt|qml|pyside6 | 1 | 45 | 1 | 72,924,346 | 72,924,346 | 1 | true | 2022-07-08T12:27:15.600Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Transport QML Image via Bridge<p>I have at the moment a simple PySide6 app which uses <code>qml</code> for image capturing. I want to transport the image to ... |
72,928,040 | Why is not the entire line read from a file used as search string with my batch file?<p>Can someone have a look at this mess please?</p>
<p>I have in the file <code>test.txt</code> a line with the search string <code>Coupon (%)</code>, but <strong>FINDSTR</strong> searches just for <code>Coupon</code>. I have tried ano... | <p>You need</p>
<pre><code>... for /f "delims=" %%t in ...
</code></pre>
<p>Stands out. Your code will select the first token by default, using the default delimiters (<Kbd>Space</kbd> or <Kbd>Tab</kbd>) hence "Coupon". Using "delims=" selects the entire line for <code>%%t</code></p> | Why is not the entire line read from a file used as search string with my batch file? | windows|batch-file|findstr | 0 | 45 | 1 | 72,928,892 | 72,928,892 | 1 | true | 2022-07-10T11:10:54.763Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why is not the entire line read from a file used as search string with my batch file?<p>Can someone have a look at this mess please?</p>
<p>I have in the fil... |
72,836,792 | Remove Leading and Trailing Single Quote when String Formatting in Python<p>I'm trying to learn python so I decided to implement a Singly Linked List but I stumbled upon a weird problem.</p>
<p><a href="https://i.stack.imgur.com/Lr7IR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Lr7IR.png" alt="Sc... | <p>I made some notes in your code that will hopefully help with identifying why your outputs are not consistent.</p>
<pre class="lang-py prettyprint-override"><code>class LinkedList:
def __init__(self):
self.head = None < - node or None
self.tail = None < - node or None
def search_node(self, key): ... | Remove Leading and Trailing Single Quote when String Formatting in Python | python|python-3.x|data-structures|string-formatting|string-concatenation | 1 | 45 | 1 | 72,836,951 | 72,836,951 | 1 | true | 2022-07-02T05:53:24.267Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Remove Leading and Trailing Single Quote when String Formatting in Python<p>I'm trying to learn python so I decided to implement a Singly Linked List but I s... |
72,821,397 | Why does the Application.AdvancedSearch method fail to operate?<p>The below subroutine runs upon Outlook application startup with the Application level event "Startup". The sub accesses an Outlook <code>NoteItem</code> with a time stamp used to filter all items in the Outlook account parent folder received s... | <p>The filter is "urn:schemas:httpmail:datereceived >= " & "'" & utcdate & "'"</p>
<pre class="lang-vb prettyprint-override"><code>Option Explicit
' Code in ThisOutlookSession
Public blnSearchComp As Boolean
Private Sub Application_AdvancedSearchComplete(ByVal SearchObject... | Why does the Application.AdvancedSearch method fail to operate? | vba|outlook | 0 | 45 | 1 | 72,829,811 | 72,829,811 | 1 | true | 2022-06-30T20:00:05.503Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why does the Application.AdvancedSearch method fail to operate?<p>The below subroutine runs upon Outlook application startup with the Application level event... |
72,994,364 | E/SQLiteLog: (1) no such column: rushi<p>When I try to run my application, it crashes again and again.
below is the method that I have created in DBHandler.java file</p>
<pre><code>public Cursor CheckUsername() {
SQLiteDatabase db = this.getReadableDatabase();
String query = "SELECT * FROM register... | <p>check out with this query</p>
<pre><code>String query = "SELECT * FROM register WHERE Username = '"+ MainActivity.getValue() +"' and password = '"+MainActivity.getpassword()+"';";
</code></pre>
<p>note <code>'</code> character before and after every <code>String</code>. this should prod... | E/SQLiteLog: (1) no such column: rushi | java|android|android-sqlite | -1 | 45 | 1 | 72,995,144 | 72,995,144 | 1 | true | 2022-07-15T12:57:25.710Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
E/SQLiteLog: (1) no such column: rushi<p>When I try to run my application, it crashes again and again.
below is the method that I have created in DBHandler.j... |
73,028,749 | Deleting certain part of file names<p>I have a set of file names I am looping over to delete one aspect at the end of all file names. Currently I have some code that will search for a string in the filename and delete it. However the part of the file I want to get rid of changes a little. I was looking to use some char... | <p>You could use a matching pattern instead and replace with an empty string.</p>
<pre><code>\.Ni\d*Nj\d*
</code></pre>
<p>The pattern matches:</p>
<ul>
<li><code>\.Ni</code> Match <code>.Ni</code></li>
<li><code>\d*</code> Match optional digits</li>
<li><code>Nj</code> Match <code>Nj</code></li>
<li><code>\d*</code> M... | Deleting certain part of file names | python|string|for-loop | 1 | 45 | 1 | 73,028,821 | 73,028,821 | 1 | true | 2022-07-18T21:18:20.757Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Deleting certain part of file names<p>I have a set of file names I am looping over to delete one aspect at the end of all file names. Currently I have some c... |
72,786,751 | Why doesn't my UI properly rerender my deleted object?<p>I have a parent component that maps over a <code>list</code> state using an <code>Input</code> component</p>
<pre><code>import "./styles.css";
import { useState, useEffect } from "react";
import Input from "./Input";
export default ... | <p>This happen because you used index as a key in map.</p>
<p>You can read more about it <a href="https://dev.to/shiv1998/why-not-to-use-index-as-key-in-react-lists-practical-example-3e66" rel="nofollow noreferrer">here</a>.</p>
<p>Long story short, for example you have 3 items, you delete second that has key "2&q... | Why doesn't my UI properly rerender my deleted object? | javascript|reactjs|arrays|react-hooks | 1 | 45 | 2 | 72,787,451 | 72,787,451 | 1 | true | 2022-06-28T12:50:42.010Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why doesn't my UI properly rerender my deleted object?<p>I have a parent component that maps over a <code>list</code> state using an <code>Input</code> compo... |
72,845,020 | Pandas dataframe calculate average of n-columns for each row<p>Given following <code>pandas</code> dataframe of <code>248 rows x 101 cols</code>, I need to calculate a new column containing the average of all the <code>sim-*</code> columns only (exclude the <code>Date</code> column).</p>
<p><a href="https://i.stack.img... | <p>here is one way to do it. if you post the data as text, I can add the result here</p>
<pre><code>df.filter(like='sim-', axis=1).mean(axis=1)
</code></pre> | Pandas dataframe calculate average of n-columns for each row | python|pandas|dataframe | 0 | 45 | 1 | 72,845,079 | 72,845,079 | 1 | true | 2022-07-03T08:35:24.810Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pandas dataframe calculate average of n-columns for each row<p>Given following <code>pandas</code> dataframe of <code>248 rows x 101 cols</code>, I need to c... |
72,994,782 | I wanted to return the obtained function output into a variable that I added into the RECORD using TRANSFORM. What does this error in image here mean?<pre><code>distcomp (REAL4 lat1, REAL4 lon1,REAL4 lat2, REAL4 lon2, REAL4 dist) := FUNCTION
REAL4 lo1 := lon1/57.29577951;
REAL4 lo2 := lon2/57.29577951;
REAL4 la1 := la... | <p>This error usually means that the syntax check has found definitions in your code that have not been defined before they were referenced in the code. In your case, it appears that the third (i.e, "latitude"), fourth (i.e., "longitude"), and fifth (i.e., "distance") input parameters of y... | I wanted to return the obtained function output into a variable that I added into the RECORD using TRANSFORM. What does this error in image here mean? | ecl|hpcc|hpcc-ecl | 0 | 45 | 1 | 72,995,045 | 72,995,045 | 1 | true | 2022-07-15T13:28:28.677Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I wanted to return the obtained function output into a variable that I added into the RECORD using TRANSFORM. What does this error in image here mean?<pre><c... |
72,974,429 | I'm creating a 2D array in Javascript. How do I skip creating a part of it?<p>What I'm doing:
I need to create a ~400x400 grid of waypoints. I have the coordinates. Each waypoint is 9 blocks from the previous. Each waypoint is its own file.</p>
<p>The issue:
There's a ~100x100 hole in the grid. Those waypoints should n... | <p>I got it. That "different approach" part.</p>
<ol>
<li>create an array in the code and set the middle to an unused value</li>
<li>for each non-unused value, make a file.</li>
</ol>
<p>Edit: fixed the original code. Wrapped "write file" in an "if within range".</p>
<pre><code>for (curren... | I'm creating a 2D array in Javascript. How do I skip creating a part of it? | javascript|arrays|loops | 0 | 45 | 1 | 72,980,941 | 72,980,941 | 1 | true | 2022-07-14T02:06:39.073Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I'm creating a 2D array in Javascript. How do I skip creating a part of it?<p>What I'm doing:
I need to create a ~400x400 grid of waypoints. I have the coord... |
72,867,506 | Replace column values between two dataframes according to index<p>I have a dataframe named calls, each call is recorded by a date (calls)[datetime]. each call has an answer status (calls)[Status].</p>
<pre><code>a = {'datetime':['2021-11-22 18:47:02','2021-01-08 14:18:11','2021-06-08 16:40:45','2021-12-03 10:21:31','2... | <p>You could do it like this:</p>
<p><strong>UPDATE</strong>
Be aware that <a href="https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.update.html" rel="nofollow noreferrer"><code>pd.update</code></a> works <code>inplace</code>.</p>
<pre><code>calls= calls.set_index('datetime')
calls.update(NewStatus.set_ind... | Replace column values between two dataframes according to index | python|pandas|merge | 0 | 45 | 1 | 72,868,140 | 72,868,140 | 1 | true | 2022-07-05T10:01:33.900Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Replace column values between two dataframes according to index<p>I have a dataframe named calls, each call is recorded by a date (calls)[datetime]. each cal... |
72,993,665 | Fit a object into interface dynamically<p>I would like to get a data from a <code>:any</code> object and insert it into the <code>:iInterface</code> in typescript</p>
<p>This example obj:</p>
<pre><code> name: "Gulherme",
Query: "test",
id: 2,
namespace: "Test"
</code></pre>
<p>Insert a... | <p>Yes you can. I made it a bit more dynamic so you can choose the keys you want.</p>
<pre><code>// takes any object and keys of the specified generic.
function pick<T>(obj: any, ...keys: (keyof T)[]): Pick<T, typeof keys[number]> {
// object into which the key-value pairs will be added
let object: ... | Fit a object into interface dynamically | typescript | 0 | 45 | 1 | 72,994,049 | 72,994,049 | 1 | true | 2022-07-15T12:00:32.033Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Fit a object into interface dynamically<p>I would like to get a data from a <code>:any</code> object and insert it into the <code>:iInterface</code> in types... |
72,956,339 | How can i get transactionHash by blockNumber?<p>How to get the transactionHash by blockNumber?</p>
<p>I entered block.transactions.0.transactionHash but that didn't catch it (empty string). How can i get the transactionHash?</p>
<p><a href="https://i.stack.imgur.com/WqoEs.png" rel="nofollow noreferrer"><img src="https:... | <p>3 errors in your approach.</p>
<p><strong>First</strong>, a <code>find()</code> on the blocks collection returns complete documents, not just the block documents (being the <code>block</code> field). So unmarshal results into a value of type that describes the complete documents, e.g.:</p>
<pre><code>type Doc struct... | How can i get transactionHash by blockNumber? | mongodb|go | 0 | 45 | 1 | 72,957,422 | 72,957,422 | 1 | true | 2022-07-12T17:37:38.987Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can i get transactionHash by blockNumber?<p>How to get the transactionHash by blockNumber?</p>
<p>I entered block.transactions.0.transactionHash but that... |
72,904,774 | CHAI - See if two objects are the same where one attribute has a different order<p>I have two object arrays:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>array1 = [
{ nam... | <p>Well they are not equals since they have different values in the array. You can sort the array and check if they are equal then.</p>
<pre class="lang-js prettyprint-override"><code>const getSortedAtKey = (array, key = 'otherNames') => {
return array.map(value => ({
...value,
[key]: value[key].sort()
... | CHAI - See if two objects are the same where one attribute has a different order | javascript|equals|chai|equality | 0 | 45 | 2 | 72,904,864 | 72,904,864 | 1 | true | 2022-07-07T22:12:55.237Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
CHAI - See if two objects are the same where one attribute has a different order<p>I have two object arrays:</p>
<p><div class="snippet" data-lang="js" data-... |
73,030,832 | How To Validate Form Through JavaScript Before Entering To The Next Page?<p>This is a register form I'm currently working on it. The problem is that the JavaScript only validates the first field in the form which is the "username" field only, but not the rest of it. If i change the code by moving the password... | <p>You have duplicated <code>IDs</code> so I add 's' for each ID in signup form also when you use <code>return</code> It's something like you break the function. This should work for you</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre ... | How To Validate Form Through JavaScript Before Entering To The Next Page? | javascript|eclipse|validation | -1 | 45 | 1 | 73,030,961 | 73,030,961 | 1 | true | 2022-07-19T03:39:27.237Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How To Validate Form Through JavaScript Before Entering To The Next Page?<p>This is a register form I'm currently working on it. The problem is that the Java... |
72,814,545 | difference between `-- and +-- after running npm list<p>Whilst addressing GitHub dependabot updates, I've been looking through the dependencies list created after running <code>npm ls -a</code>.</p>
<p>I (think I) understand the nesting involved: a pipe indicates that packages below are part of the dependencies list, a... | <p>Yep, it just means "the last one at this level". Depending on your locale, <code>npm</code> draws a nice little Unicode box drawing "end hook" thing, or the approximation you were seeing:</p>
<pre><code>/tmp/example > LC_ALL=en_US.UTF-8 npm ls -a
example@ /tmp/example
└─┬ string-width@5.1.2
... | difference between `-- and +-- after running npm list | npm|package-lock.json | 1 | 45 | 1 | 72,814,594 | 72,814,594 | 1 | true | 2022-06-30T10:53:40.853Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
difference between `-- and +-- after running npm list<p>Whilst addressing GitHub dependabot updates, I've been looking through the dependencies list created ... |
72,828,536 | THREEjs create an intersection plane for a raycast with negative origin<p>I have a THREEJS scene with an object that 'looks at my mouse'. This works fine and I am using a raycast to get the mouse position like so:</p>
<pre><code>this.intersectionPlane = new THREE.Plane(new THREE.Vector3(0, 0, 1), 10);
this.raycaster = ... | <p>When you perform <code>renderer.render(scene, cam)</code>, the engine updates the transformation matrices of all objects that need to be rendered. However, since your camera and plane are not descendants of the scene, you'll have to manually update these matrices. The plane doesn't know that it's parent <code>camera... | THREEjs create an intersection plane for a raycast with negative origin | three.js | 1 | 45 | 1 | 72,833,201 | 72,833,201 | 1 | true | 2022-07-01T11:24:28.530Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
THREEjs create an intersection plane for a raycast with negative origin<p>I have a THREEJS scene with an object that 'looks at my mouse'. This works fine and... |
72,952,618 | Error message through data readout of an OPC UA node - AttributeError: 'str' object has no attribute 'time_low'<p>I want to read data from nodes via OPC UA.
The ns and id are correct but when trying to read data from the node it throws an error during converting python UUID 6 field format to OPC UA 4 field format.
The ... | <p>You used the wrong identifier g= is GUID and s= is String Identifier</p>
<pre><code>forceAS = client.get_node("ns=3;s=V:0.3.0.0.1")
</code></pre> | Error message through data readout of an OPC UA node - AttributeError: 'str' object has no attribute 'time_low' | python-3.x|opc-ua|node-opcua | 1 | 45 | 1 | 72,963,370 | 72,963,370 | 1 | true | 2022-07-12T12:49:38.540Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Error message through data readout of an OPC UA node - AttributeError: 'str' object has no attribute 'time_low'<p>I want to read data from nodes via OPC UA.
... |
72,910,223 | I want to search a keyword in a log file and get the value of that keyword<p>I have a logfile with one of the lines similar to this: "2 Keyword".
I want to look for the line with the keyword and get the number (there also could be 2 digits).</p>
<p>I tried to stay as close as possible to the official document... | <p>You were close. You just need to change your regex and add object extraction.</p>
<p>The end code would look something like this:</p>
<pre><code> Dim log
Set log = CreateObject("Scripting.FileSystemObject")
const ForReading = 1
Set ReadLogFile = log.OpenTextFile("C:\Folder\test.log&quo... | I want to search a keyword in a log file and get the value of that keyword | vbscript | 0 | 45 | 1 | 72,911,000 | 72,911,000 | 1 | true | 2022-07-08T10:40:49.277Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I want to search a keyword in a log file and get the value of that keyword<p>I have a logfile with one of the lines similar to this: "2 Keyword".
I... |
72,882,451 | what is meaning of sed -e 's|PATH="\(.*\)"|PATH="/opt/man/common/bin:\1"|g' -i /etc/environment line<p>what is meaning of following command?</p>
<pre><code>sed -e 's|PATH="\(.*\)"|PATH="/opt/man/common/bin:\1"|g' -i /etc/environment
</code></pre> | <p>It substitutes all the instances of</p>
<pre><code>PATH="somestring"
</code></pre>
<p>with</p>
<pre><code>PATH="/opt/man/common/bin:somestring"
</code></pre>
<p>in the file <code>/etc/environment</code></p>
<p>In detail</p>
<ul>
<li><code>s|string1|string2|</code> substitutes <code>string1</code>... | what is meaning of sed -e 's|PATH="\(.*\)"|PATH="/opt/man/common/bin:\1"|g' -i /etc/environment line | linux|bash|shell | 1 | 45 | 1 | 72,884,046 | 72,884,046 | 1 | true | 2022-07-06T11:03:01.477Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
what is meaning of sed -e 's|PATH="\(.*\)"|PATH="/opt/man/common/bin:\1"|g' -i /etc/environment line<p>what is meaning of following command?</p>
<pre><code>s... |
72,845,710 | Issue with socket.io-stream during install<p>Im trying to implement the package <code>socket.io-stream</code> in my Angular project, but after I import it, when I start the project I have this error :</p>
<pre><code>index.js:13 Uncaught ReferenceError: Buffer is not defined
at 5421 (index.js:13:15)
at __webpack... | <p>There's an Angular wrapper for the library called <code>ngx-socket-io</code></p>
<ul>
<li><a href="https://www.npmjs.com/package/ngx-socket-io" rel="nofollow noreferrer">https://www.npmjs.com/package/ngx-socket-io</a></li>
</ul>
<p>Good tutorial on getting it up and running</p>
<ul>
<li><a href="https://www.digitalo... | Issue with socket.io-stream during install | angular|socket.io | 1 | 45 | 1 | 72,846,348 | 72,846,348 | 1 | true | 2022-07-03T10:27:21.070Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Issue with socket.io-stream during install<p>Im trying to implement the package <code>socket.io-stream</code> in my Angular project, but after I import it, w... |
72,942,058 | I am trying to use VBA to Print to PDF and am receiving a 1004 runtime Error<p>Could someone sell me why I am getting a runtime error here?? I have almost this identical code in another project that works, and I cant figure out the issue.</p>
<pre><code>Sub Create_PDF()
' Create and save .pdf
Dim pdfName As String
Dim ... | <p>Try this:</p>
<pre class="lang-vb prettyprint-override"><code>Option Explicit
'use Const for fixed values
Const EXPORTS As String = "P:\Public\Generated Letters\LTXN Export Spreadsheets\"
Sub Create_PDF()
Dim ws As Worksheet, myRange As Range
Dim AccountNumber As String, dt As String, FullNa... | I am trying to use VBA to Print to PDF and am receiving a 1004 runtime Error | excel|vba | 0 | 45 | 1 | 72,942,596 | 72,942,596 | 1 | true | 2022-07-11T16:55:50.103Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I am trying to use VBA to Print to PDF and am receiving a 1004 runtime Error<p>Could someone sell me why I am getting a runtime error here?? I have almost th... |
72,797,262 | How do I set up my Linux server to connect to repository?<p>I am a relatively inexperienced developer trying to take over the development of a website from the previous coders.</p>
<p>The code exists on a repository on Github and the website is hosted on a Linux server. I can log remotely into the server as a non-root ... | <p>If you run the command with sudo, you are using credentials stored in <code>/root</code>.<br />
Make sure that:</p>
<ul>
<li>The command <code>git remote -v</code> executed in the repository folder shows you an SSH URL (<code>git@github.com:aUser/aRepository</code>)</li>
<li>The SSH keys are in /root/.ssh</li>
<li>T... | How do I set up my Linux server to connect to repository? | git|ssh|server | 1 | 45 | 1 | 72,797,313 | 72,797,313 | 1 | true | 2022-06-29T07:16:49.733Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I set up my Linux server to connect to repository?<p>I am a relatively inexperienced developer trying to take over the development of a website from t... |
72,839,040 | Why are my CSS class settings overwritten?<p>I'm creating a github page. I use the theme "midnight", but I like the top button from the Hacker theme, so I overwrote its style.</p>
<pre><code>---
---
@import "{{ site.theme }}";
#header nav ul li a {
all: unset;
}
#header nav ul li {
line-height: ... | <p>When you import the 3rd party theme with <code>@import "{{ site.theme }}";</code> this adds a stylesheet full of rules e.g.</p>
<pre><code>#header nav ul li a {
font-size: 14px;
box-shadow: inset 0px 1px 0px rgb(255 255 255 / 30%), 0px 3px 7px rgb(0 0 0 / 70%);
...
}
</code></pre>
<p>When you t... | Why are my CSS class settings overwritten? | css|jekyll | 0 | 45 | 1 | 72,839,163 | 72,839,163 | 1 | true | 2022-07-02T11:57:06.150Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why are my CSS class settings overwritten?<p>I'm creating a github page. I use the theme "midnight", but I like the top button from the Hacker them... |
72,887,877 | How update state in parent component from child, child component?<p>(sory for my english)</p>
<p>Hi, this code working half to half. I can delete product but i must go to another page , and back , to rerender. i dont know why ?</p>
<p>Code:
Parent Component:</p>
<pre><code>function ShoppingCard() {
const shoppingCar... | <h1>Issue</h1>
<p>You are mutating the state when deleting from the <code>shoppingCard2</code> array, and then never creating a <em><strong>new</strong></em> array reference for React so reconciliation works. In other words, React doesn't "see" that the <code>shoppingCard2</code> array is a <em><strong>new</s... | How update state in parent component from child, child component? | reactjs|react-router | 1 | 45 | 2 | 72,887,945 | 72,887,945 | 1 | true | 2022-07-06T17:46:26.160Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How update state in parent component from child, child component?<p>(sory for my english)</p>
<p>Hi, this code working half to half. I can delete product but... |
72,881,696 | Pandas: concat multiple dicts to a single dataframe with values as columns and inner keys as sub columns<p>I have a stream of messages produced by Kafka and I'm in need to create mini-batches based of the content on the messages.</p>
<p>Well, to make it simple, consider the empty dataframe below:</p>
<pre><code>import ... | <p>Here is a solution using pandas <code>explode</code>, <code>pop</code> and <code>set_index</code>.</p>
<p>For the <code>data dict</code> you have only one data in the <code>ohlcv</code> list. Hence you won't be able to visualize the data properly. I have added some more values to your list <code>ohlcv</code> so that... | Pandas: concat multiple dicts to a single dataframe with values as columns and inner keys as sub columns | pandas|dataframe|dictionary|concatenation | 0 | 45 | 1 | 72,886,703 | 72,886,703 | 1 | true | 2022-07-06T10:13:45.447Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pandas: concat multiple dicts to a single dataframe with values as columns and inner keys as sub columns<p>I have a stream of messages produced by Kafka and ... |
73,017,602 | Adding " / ", "or", and "and" text after joining the arrays<p>I have an array of nested arrays and need to join them using the " / ", " or " and " and " text.</p>
<p>If within the same array then joined by " and ".</p>
<p>If sibling then joins by " or ".</p>
<p>Otherwis... | <p>Simply iterate over the array and differentiate between the three cases for <code>and</code>, <code>or</code> and <code>nothing</code>. Finally join the result on <code>/</code>. I have also added <code>,</code> to make the given data a valid array.</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-c... | Adding " / ", "or", and "and" text after joining the arrays | javascript|arrays|formatting | -1 | 45 | 1 | 73,018,640 | 73,018,640 | 1 | true | 2022-07-18T05:16:48.730Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Adding " / ", "or", and "and" text after joining the arrays<p>I have an array of nested arrays and need to join them using the " / ", " or &qu... |
72,900,312 | Find multiple elements that are equal to a condition in array?<p>I am a new to SwiftUI, so I apologise if this a dumb question but I came upon a problem that I cant find a solution to.</p>
<p>I am searching something similar to this code below, but instead of finding the first element I would like to retrieve all eleme... | <p>Swift collections have a <code>filter</code> method which allows you to select all elements that match a given condition. You already have a matching condition, so to adapt your example text you'd write:</p>
<pre class="lang-swift prettyprint-override"><code>let newItems = array.filter { $0.status == 0 }
</code></pr... | Find multiple elements that are equal to a condition in array? | ios|swift | -1 | 45 | 1 | 72,900,604 | 72,900,604 | 1 | true | 2022-07-07T15:13:17.940Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Find multiple elements that are equal to a condition in array?<p>I am a new to SwiftUI, so I apologise if this a dumb question but I came upon a problem that... |
72,982,766 | How can I pass my dictonary into class with function?<p>I want to declare a class using a dictionary and the ValueOrderedEnum library.</p>
<p>I have a dictionary</p>
<pre><code>my_dict{'Blood':'4','Phlegm':'3','YellowBile':'2','BlackBile':'1'}
</code></pre>
<p>But I am totally clueless of how to set it as variables int... | <p>You can simply call <code>ValueOrderedEnum</code> with your <code>dict</code> as an argument to create the desired enumerated type.</p>
<pre><code>>>> from ordered_enum import ValueOrderedEnum
>>> my_dict = {'Blood':'4','Phlegm':'3','YellowBile':'2','BlackBile':'1'}
>>> Humor = ValueOrdere... | How can I pass my dictonary into class with function? | python|class|dictionary | 0 | 45 | 1 | 72,982,842 | 72,982,842 | 1 | true | 2022-07-14T15:07:25.180Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How can I pass my dictonary into class with function?<p>I want to declare a class using a dictionary and the ValueOrderedEnum library.</p>
<p>I have a dictio... |
72,392,752 | For loop with desired output in Python<p>I am trying to write a for-loop. The desired output is attached.</p>
<pre><code>import numpy as np
for i in np.arange(0,5,1):
sigma(0)=10
sigma(i+1)=sigma(i)+1
print(sigma)
</code></pre>
<p>The desired output is</p>
<pre><code>sigma=np.array([10,11,12,13,14])
</code>... | <p>Here's the correct loop:</p>
<pre><code>In [78]: sigma = [10]
...: for i in range(4):
...: sigma.append(sigma[-1]+1)
...: sigma
Out[78]: [10, 11, 12, 13, 14]
</code></pre>
<p>But if you want to set values in an array:</p>
<pre><code>In [79]: sigma = np.zeros(5,int) # initialize
...: sigma[0] = ... | For loop with desired output in Python | python|numpy | -1 | 45 | 2 | 72,394,338 | 72,394,338 | 1 | true | 2022-05-26T13:38:10.970Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
For loop with desired output in Python<p>I am trying to write a for-loop. The desired output is attached.</p>
<pre><code>import numpy as np
for i in np.arang... |
72,380,165 | separate a DAG into a forest of level-ordered topological sorted subgraphs<p>I have a DAG where an edge represents a dependency between two nodes and a node represents a task that is to be executed on a machine. There are multiple machines. For each (task,machine) pair there is an estimated runtime.
Now, I would like t... | <p>Separate the graph into components using a depth-first search which traverses both child and parent links. Then you can do a topological sort on each component. Both algorithms are O(N+E) (for N nodes and E edges); that could be O(N²) but for typical dependency graphs where the number of dependencies is generally sm... | separate a DAG into a forest of level-ordered topological sorted subgraphs | algorithm|depth-first-search|directed-acyclic-graphs | 0 | 45 | 1 | 72,395,201 | 72,395,201 | 1 | true | 2022-05-25T15:10:18.980Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
separate a DAG into a forest of level-ordered topological sorted subgraphs<p>I have a DAG where an edge represents a dependency between two nodes and a node ... |
72,395,105 | Map Coloring Prolog<p>I wrote this code to solve the map coloring problem using prolog:</p>
<pre><code>coloring([A,B,C,D,E,F]):-
maplist(=\=(A),[B,C,D,E]),
maplist(=\=(B),[C,D,F]),
C=\=D,
maplist(=\=(D),[E,F]),
E=\=F.
</code></pre>
<p>I try to get solutions using the query:</p>
<pre><code>?- colorin... | <p>Use <code>#\=/2</code> instead of <code>=\=/2</code>, and fix the domain in <code>ins/2</code>:</p>
<pre><code>:- use_module(library(clpfd)).
coloring([A,B,C,D,E,F]):-
maplist(#\=(A),[B,C,D,E]),
maplist(#\=(B),[C,D,F]),
C#\=D,
maplist(#\=(D),[E,F]),
E#\=F.
</code></pre>
<p>Sample runs:</p>
<pre>... | Map Coloring Prolog | prolog|clpfd | 1 | 45 | 1 | 72,395,344 | 72,395,344 | 1 | true | 2022-05-26T16:31:50.793Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Map Coloring Prolog<p>I wrote this code to solve the map coloring problem using prolog:</p>
<pre><code>coloring([A,B,C,D,E,F]):-
maplist(=\=(A),[B,C,D,E]... |
72,384,775 | Fetch from hash with either Singular or Plural<p>I get the following input hash in my ruby code</p>
<pre><code> my_hash = { include: 'a,b,c' }
</code></pre>
<p>(or)</p>
<pre><code> my_hash = { includes: 'a,b,c' }
</code></pre>
<p>Now I want the fastest way to get 'a,b,c'</p>
<p>I currently use</p>
<pre><code> def my_in... | <h2>Caveats and Considerations</h2>
<p>First, some caveats:</p>
<ol>
<li>You tagged this Rails 3, so you're probably on a very old Ruby that doesn't support a number of optimizations, newer Hash-related method calls like <a href="https://ruby-doc.org/core-3.1.2/Hash.html#method-i-fetch_values" rel="nofollow noreferrer"... | Fetch from hash with either Singular or Plural | ruby|ruby-on-rails-3 | 0 | 45 | 2 | 72,400,665 | 72,400,665 | 1 | true | 2022-05-25T22:28:40.273Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Fetch from hash with either Singular or Plural<p>I get the following input hash in my ruby code</p>
<pre><code> my_hash = { include: 'a,b,c' }
</code></pre>
... |
72,401,590 | How to make /etc writable inside user namespace for kubelet in userns<p>In the kubernetes documentation for running kubelet in user namespace, <a href="https://kubernetes.io/docs/tasks/administer-cluster/kubelet-in-userns/" rel="nofollow noreferrer">https://kubernetes.io/docs/tasks/administer-cluster/kubelet-in-userns/... | <p>The part of the documentation right above where you quoted explains that:</p>
<blockquote>
<p>After unsharing the user namespace, you will also have to unshare other namespaces such as mount namespace.</p>
<p>You do <em>not</em> need to call <code>chroot()</code> nor <code>pivot_root()</code> after unsharing the mou... | How to make /etc writable inside user namespace for kubelet in userns | kubernetes|linux-namespaces | 0 | 45 | 1 | 72,401,701 | 72,401,701 | 1 | true | 2022-05-27T06:57:52.383Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to make /etc writable inside user namespace for kubelet in userns<p>In the kubernetes documentation for running kubelet in user namespace, <a href="https... |
72,396,053 | How to surface different Workshop pages to different user groups?<p>I have a Workshop module that addresses different user groups. Hence I would like to surface different pages to different groups by default. Indeed I see an option to control the default page selection based on a variable.</p>
<p>My first thought was t... | <p>The Foundry security primitives for resource visibility (as opposed to data visibility) are largely aligned at the <em>resource level</em> rather than <em>within</em> a given resource. (The one exception I know of that's relevant is within the Object View configuration, where you can set visibility on different Tabs... | How to surface different Workshop pages to different user groups? | palantir-foundry | 2 | 45 | 1 | 72,402,251 | 72,402,251 | 1 | true | 2022-05-26T17:51:43.157Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to surface different Workshop pages to different user groups?<p>I have a Workshop module that addresses different user groups. Hence I would like to surf... |
72,401,362 | Map not working when trying to get by entity name<p>I am using Telosys tool to generate entity classes and it is doing wonders for me.
However I have a specific requirement to change some attributes of entities.</p>
<p>I have loaded all the attributes that need to be changed in a map and parsed it in my entity template... | <p>In Velocity the error “<code>: no attribute '['</code>” ( or "<code>no method 'get'</code>" ) occurs when the key doesn’t exist in the map.</p>
<p>So, I suppose that in your case you try to get an “entity.name” that is not defined in the map.</p>
<p>To check if a key is defined in a map you can use : <cod... | Map not working when trying to get by entity name | java|telosys | 0 | 45 | 2 | 72,446,359 | 72,446,359 | 1 | true | 2022-05-27T06:33:39.917Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Map not working when trying to get by entity name<p>I am using Telosys tool to generate entity classes and it is doing wonders for me.
However I have a speci... |
72,285,732 | DialogFlow "preview intent" without causing fulfilment<p>Is there a way to preview the intent response with confidence score without actually triggering parameters to be filled, possible fulfilment web hooks to be called, etc.</p>
<p>I know Amazon Lex has a "preview intent" call that lets you preview what the... | <p>Dialogflow as of today, does not provide an option to predict the response of an intent before it is being triggered.</p>
<p>Dialogflow ES has <a href="https://cloud.google.com/dialogflow/es/docs/intents-matching" rel="nofollow noreferrer">Intent matching</a>, and you might be able to do something like the <a href="... | DialogFlow "preview intent" without causing fulfilment | dialogflow-es | 0 | 45 | 1 | 72,476,289 | 72,476,289 | 1 | true | 2022-05-18T08:32:41.063Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
DialogFlow "preview intent" without causing fulfilment<p>Is there a way to preview the intent response with confidence score without actually triggering para... |
72,338,661 | Interfacing external C code with duplicate method names using Cython<p>I want to provide a native interface to some C code from my Python code. For this I decided on <em>Cython</em>.</p>
<p>In this specific case, I have some C files which have duplicate names, resulting in compilation issues. Is there any way I can cir... | <ul>
<li><p>Generally <code>static</code> is used to restrict functions to a single complication unit, and so you need to modify your C files and make the duplicate functions <code>static</code>. Defining the functions as <code>static</code> would allow you to create <em>separate</em> Cython modules wrapping the functi... | Interfacing external C code with duplicate method names using Cython | python|c|gcc|cython | 0 | 45 | 1 | 72,338,998 | 72,338,998 | 1 | true | 2022-05-22T14:53:33.263Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Interfacing external C code with duplicate method names using Cython<p>I want to provide a native interface to some C code from my Python code. For this I de... |
72,303,925 | Pandas finding index of string in one column in a df in a list of strings in another df<p>I have a data frame that looks like this:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th style="text-align: left;">id</th>
<th style="text-align: center;">tag</th>
<th style="text-align: right;">cnt</... | <p>Use <a href="http://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.explode.html" rel="nofollow noreferrer"><code>DataFrame.explode</code></a> with <code>rename</code> for possible add <code>Rank</code> column by <a href="http://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.core.group... | Pandas finding index of string in one column in a df in a list of strings in another df | python|pandas | 1 | 45 | 2 | 72,304,008 | 72,304,008 | 1 | true | 2022-05-19T11:42:01.957Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pandas finding index of string in one column in a df in a list of strings in another df<p>I have a data frame that looks like this:</p>
<div class="s-table-c... |
72,359,197 | Map values of a column to another column if condition<p>This is my dataframe:</p>
<pre class="lang-python prettyprint-override"><code> text from_id to_id position
0 NaN NaN NaN [nan, nan]
1 albumin NaN NaN [0.0, 23.0]
2 hepatoma NaN NaN [93.0, 101... | <p>In your solution apply mapping for <code>id</code> columns from list <code>cols1</code>, is necessary same ordering like <code>col</code>, last replace missing values by list <code>[np.nan, np.nan]</code>:</p>
<pre><code>nan = np.nan
full_df_normalized = pd.DataFrame({'text': [nan, 'albumin', 'hepatoma', nan], 'from... | Map values of a column to another column if condition | python|pandas|dataframe | 1 | 45 | 2 | 72,359,266 | 72,359,266 | 1 | true | 2022-05-24T07:57:19.757Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Map values of a column to another column if condition<p>This is my dataframe:</p>
<pre class="lang-python prettyprint-override"><code> text from_i... |
72,264,743 | I am having a hard time getting data from an nested object in a json map using dart/flutter<p>As the title states, I am trying to pull data from a nested object with a json MAP. I hope I am describing this correctly. I am new to dart and still growing as a programmer. Here is the code for my model.</p>
<pre><code>class... | <p>The error is most likely caused by this:</p>
<pre><code>if (json['ports'] != null) {
ports = <Ports>[];
json['ports'].forEach((v) {
ports.add(new Ports.fromJson(v));
});
}
}
</code></pre>
<p>You are conditionally initializing the ports field of your model if the json response contains po... | I am having a hard time getting data from an nested object in a json map using dart/flutter | json|flutter|dart|object|nested | 0 | 45 | 1 | 72,266,861 | 72,266,861 | 1 | true | 2022-05-16T19:40:14.370Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
I am having a hard time getting data from an nested object in a json map using dart/flutter<p>As the title states, I am trying to pull data from a nested obj... |
72,335,697 | How to customize the round off in flutter?<p>How to customize round off in flutter when the decimal is 0.1 it will automatically round up but when the decimal is below 0.1 it will automatically round down</p>
<p>For example:</p>
<pre><code>double roundUp = 0.1;
double roundedUp = roundUp.round() // it will become round... | <p>The information you provide in your question is incorrect. As per the docs:</p>
<pre><code>int round ()
Returns the integer closest to this.
Rounds away from zero when there is no closest integer: (3.5).round() == 4 and (-3.5).round() == -4.
</code></pre>
<p>Also your code snippet, as it is, won't even run. Try run... | How to customize the round off in flutter? | flutter|math | 0 | 45 | 1 | 72,336,401 | 72,336,401 | 1 | true | 2022-05-22T07:43:41.440Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to customize the round off in flutter?<p>How to customize round off in flutter when the decimal is 0.1 it will automatically round up but when the decima... |
72,328,307 | PostgreSQL INNER JOIN AND OUTER JOIN WITH SOME NULL VALUES LOGIC<p>I have these 2 tables:</p>
<pre><code>games_during_trial
+---------------------------------+
|account_id |game |
+---------------------------------+
| 1 | Minecraft |
| 1 | Overwatch |
| 2 ... | <p>You want a full outer join here:</p>
<pre class="lang-sql prettyprint-override"><code>SELECT COALESCE(gd.account_id, ga.account_id) AS account_id,
gd.game AS games_during_trial,
ga.game AS games_after_trial
FROM games_during_trial gd
FULL OUTER JOIN games_after_trial ga
ON gd.account_id = ga.accoun... | PostgreSQL INNER JOIN AND OUTER JOIN WITH SOME NULL VALUES LOGIC | sql|postgresql|join|left-join|outer-join | 3 | 45 | 1 | 72,328,341 | 72,328,341 | 1 | true | 2022-05-21T09:32:25.823Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
PostgreSQL INNER JOIN AND OUTER JOIN WITH SOME NULL VALUES LOGIC<p>I have these 2 tables:</p>
<pre><code>games_during_trial
+--------------------------------... |
72,358,241 | Why an inline style for an element cancels a `:hover` for the same?<p>I know if I set an inline style for example for the <code>color</code>, it cancels style about color in the style tag or a CSS file (to reason the priority order). But why does it cancel setting a color for <code>:hover</code> for the same element?
W... | <p>You are right the but if need to make the color change while hovering the text you must do like this(just Added The Important Tag):</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-css lang-css prettyprint-overrid... | Why an inline style for an element cancels a `:hover` for the same? | html|css|hover|inline-styles | 0 | 45 | 2 | 72,358,283 | 72,358,283 | 1 | true | 2022-05-24T06:39:28.733Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why an inline style for an element cancels a `:hover` for the same?<p>I know if I set an inline style for example for the <code>color</code>, it cancels styl... |
72,360,284 | Creating a 2D list of recursive patterns without slicing or list()<p>I need to write a function or a for-loop that receives or loop through a list of strings and returns this pattern:</p>
<blockquote>
<p>[['alpha'], ['alpha', 'beta'], ['alpha', 'beta', 'gamma'], ['alpha',
'beta', 'gamma', 'delta']]</p>
</blockquote>
<p... | <p>A hack to finish with pretty accumulate (<a href="https://tio.run/##RY2xDgIhEET7/YrtgITY2Nj4JYQCT/RIgN1wS@HXc/FOQzcv8zLDH1mpXm/cxng1KpgkNiHKG6bC1ATDsvTSc5AIkCp3wTs6p0LmNSjrvLfo1CPKhHcoZdIz5l/nAXLaRJfA@hsuTGzx2DQGqMs5fjjzVf8F4Jaq6NMzY@w" rel="nofollow noreferrer" title="Python 3.8 (pre-release) – Try It Online">Try i... | Creating a 2D list of recursive patterns without slicing or list() | python | -1 | 45 | 2 | 72,360,722 | 72,360,722 | 1 | true | 2022-05-24T09:17:37.410Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Creating a 2D list of recursive patterns without slicing or list()<p>I need to write a function or a for-loop that receives or loop through a list of strings... |
72,243,981 | How do I prevent an event from triggering during a GSAP animation?<p>I have a GSAP animation like this:</p>
<pre><code>window.addEventListener('keydown', ()=>{
GSAP.to(this.box, {
x: this.box.position.x + 4,
duration: 1,
}
});
</code></pre>
<p>I want to increment the box's <code>x</code> position ... | <p>This should work:</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>class Test {
constructor(el) {
this.box = el
window.addEventListener('keydown', () => {
... | How do I prevent an event from triggering during a GSAP animation? | javascript|events|dom-events|gsap | 0 | 45 | 1 | 72,244,283 | 72,244,283 | 1 | true | 2022-05-14T21:28:39.387Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I prevent an event from triggering during a GSAP animation?<p>I have a GSAP animation like this:</p>
<pre><code>window.addEventListener('keydown', ()=... |
72,375,600 | Combine list elements into a dataframe r<p>I currently have a list with columns as individual elements.</p>
<p>I would like to combine list elements with the same column names <strong>(i.e. bind rows)</strong> and merge across the different columns <strong>(i.e. bind columns)</strong> into a single data frame. I'm havi... | <p>In this solution, first the elements of <code>l</code> are grouped by name and then are combined using <code>c</code>. Finally, the resulting list is converted to a dataframe using <code>map_dfc</code>.</p>
<pre class="lang-r prettyprint-override"><code>library(dplyr)
library(purrr)
cols <- c("est", &q... | Combine list elements into a dataframe r | r|list|data-binding | 0 | 45 | 2 | 72,375,909 | 72,375,909 | 1 | true | 2022-05-25T10:04:03.360Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Combine list elements into a dataframe r<p>I currently have a list with columns as individual elements.</p>
<p>I would like to combine list elements with the... |
72,362,515 | Pass a variable to .x$ in a formula of a map function<p>The first example works, but I'd like to move more of the repetitive code inside a function along the lines of example 2. I haven't found the right rlang approach to deal with the <code>.x$x</code>.</p>
<pre class="lang-r prettyprint-override"><code>library(tidyve... | <p>To get the code working in the second version, your <code>slope</code> function will need to take a data argument as well as the name of the column you wish to regress. The column name then needs to make it into the formula of the <code>lm</code> call, which can be done in a few ways, perhaps the easiest being with ... | Pass a variable to .x$ in a formula of a map function | r|tidyverse|rlang | 1 | 45 | 1 | 72,362,735 | 72,362,735 | 1 | true | 2022-05-24T11:58:16.403Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pass a variable to .x$ in a formula of a map function<p>The first example works, but I'd like to move more of the repetitive code inside a function along the... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.