2,133 questions
2
votes
0
answers
147
views
Why do my QT application's tabs cause lag and then cause a hang after I move, create, or close them? [closed]
The tabs in my application start to lag terribly after a short while and the entire application stops.
This happens when I move tabs around, create (it's enough to interact with at least two of them a ...
0
votes
0
answers
45
views
Every time I switch between frames on my bottom navigation view their is lag, How do i get rid of it?
I have an (android studio) garden app that uses multiple image/video views that sometimes change depending on the data. For example if the pressure is low the sky changes to a rainy day(if high it is ...
2
votes
1
answer
433
views
Laggy Android Studio revisited
I never had lag problems with Android Studio (AS) until last year, when I began to experience GUI lag problems: menus take around 2 seconds to open (freezing AS during that time). Also when hovering ...
0
votes
2
answers
72
views
SAS: Conditionally summing a column without having the lead funtion
I cannot conditionally sum a column where the condition looks at rows further down the table. Below is what I am expecting:
Identifier
MONTH
Sum_Me_Pls
On_Off_Flag
focus
seq
Need
1
May-23
0
0
0
1
1
...
-2
votes
1
answer
48
views
Cursor to update 2 columns based on percentage increase on relevant data on same table
EmployeeName
Date
Salary1
Salary1_Percentage
Salary2
Salary2_Percentage
Alex A
2025-01-01
50
0 %
25
0 %
Alex A
2025-02-01
100
100 %
50
100 %
David C
2025-01-01
50
0 %
10
0 %
David C
2025-02-01
100
100 ...
3
votes
3
answers
146
views
Nested LAG function (kind of)
I have this table
MachineCode
DoCreation
MachineStateCode
DM139
2024-04-03 00:32:17.377
99
DM139
2024-04-03 00:32:49.080
0
DM139
2024-04-03 01:51:14.427
99
DM139
2024-04-03 01:51:45.643
0
DM139
2024-...
1
vote
3
answers
88
views
How to get difference value (delta) between to rows after query in Mariadb
Helo,
this is my query:
MariaDB [PV_Anlage]>
SELECT created_at, verbrauch_ges
FROM pv_metrics
group by DATE(created_at)
ORDER BY ID DESC limit 20;
+---------------------+---------------+
| ...
0
votes
0
answers
19
views
How to restrict kafka stream messages consumption (to avoid external resource starvation)
I created a Kafka stream-based application that performs processing (whatever it is) on files.
The application basically receives "in real time" messages in a topic, and every message ...
0
votes
3
answers
95
views
SQL window functions
I've been playing around with dense_rank, LAG, LEAD, ... all kinds of sorting but don't seem able to get this one solved.
Here's a sample of my data and the result I expect/need:
pk_id
pk_id_row_num
...
0
votes
1
answer
76
views
Python Ursina: way to disable entities far away to decrease the lag?
I wouldn't call it much of a problem, but it really affects a project I'm working on.
Now, I do understand that running a Minecraft clone with 1900 blocks isn't a good idea if you want high FPS, but ...
1
vote
1
answer
149
views
Track Latest Changes of a Column
Here is the desired outcome: when a sale is created, it is considered a 'Lead', and we have a different LeadStage. Once a Lead is secured, it will be converted to an Opportunity with an alternative ...
0
votes
0
answers
35
views
Changing width and position of my div element using JavaScript and a transition style becomes very laggy
monthlyButton.addEventListener('click', () => {
if (planTerm === 1) {
basicPrice = prices.monthly.basic;
essentialsPrice = prices.monthly.essentials;
premiumPrice = prices....
0
votes
1
answer
75
views
Tkinter lagging when data received from Arduino using serial module
I am trying to receive data from Arduino with a simple loop, sending data every 100 ms. I am trying to pull the same thing using Tkinter and display it on Canvas. but data is lagging. I tried queue ...
1
vote
2
answers
94
views
R Iteratively modify values based on previous row if a condition is met
Here is a sample of my df:
library(dplyr)
# Create the dataframe
df <- data.frame(
id = c('A', 'A', 'A', 'B', 'C', 'C', 'C', 'C', 'D', 'D', 'D'),
supply_start_date = as.Date(c('2024-01-01', '...
0
votes
0
answers
70
views
How to pick change values from a column other than using window functions in Snowflake
I have a Snowflake table with data like below:
Table1
Col1 Col2 Col3
G1 1 9:15
G1 1 9:16
G1 2 9:17
G1 1 9:18
G2 1 9:15
G2 2 9:16
I want to ...
0
votes
1
answer
66
views
R: difftime with lag to create another column
I have a dataset where each row is a cluster, and I want to know which clusters fall within the previous cluster, or 12h after the previous cluster ended.
My dataset looks like this:
cluster_id ...
1
vote
0
answers
316
views
Methods of real time/online time series smoothing/filtering/noise removal that have low lag ( or no lag if possible )
I have a time series data that's generated by a random function and streamed over to my other script. This script has a task of smoothing/filtering/removing noise from this streamed data in real time. ...
0
votes
2
answers
74
views
Postgres group rows based on data in one row
I am trying to group rows on a postgres query. I have one row of data that has a field with a line number in it. The next 3 rows are null. I want to set them to the same value as the first row. Then ...
1
vote
1
answer
59
views
strange behavior of lag() in R
I am using a code to filter out a smaller dataset from a larger dataset. I am selecting children under the age of 24 months and another variable (b9) which says if child is living with mother or not.
...
1
vote
1
answer
54
views
Consolidated Date window
I am attempting to create a formula, that will create a string of consolidated dates by the minimum and maximum, separated by cells containing single digits.
The formula I've been attempting to ...
1
vote
1
answer
450
views
In DuckDB, Is it possible to change a value based on the previous value ordered by another column without using UDFs?
I have a column A which I want to increment or decrement according to columns B and C.
The logic is this:
if lag(A) = 0 and if B = 1 then A=1
if lag(A) = 1 and if C = 1 then A=0
the lag(A) is from ...
1
vote
1
answer
43
views
GAM predictors structure: matrix vs long data.frame format
I am fitting a typical GAM with lagged structure. The gam has the general form:
g1<-gam(y~te(e, l), data=df)
Specifically:
#exposure
e <- matrix(rnorm(2500, mean = 100, sd = 25), ncol=50)
#lag
...
1
vote
0
answers
44
views
I have 2 lazyrows with cards , scrolling first is smooth , but scrolling the 2nd one starts recomposition and hangs the row
Jetpack compose
In my app's homescreen there are 2 lazyrows containing same itemCards and same content , when testing on my phone when i scroll right on the first row its smooth and ok but when i ...
-1
votes
1
answer
172
views
lag function in R does not work as expected [duplicate]
I have a panel dateset on the distict level from Germany with three different years (2013, 2017, 2021). I want to lag one of my variables but the lag function form R only provides the same variable ...
0
votes
0
answers
66
views
Snowflake - calculated column referring to itself
I have this data set:
DAY
STATUS
OPEN_BAL
CLOSE_BAL
1
C
159
158
2
F
158
0
3
F
205
205
4
F
205
204
5
F
204
203
I need to update the OPEN_BAL and CLOSE_BAL columns based on specific rules when the ...
0
votes
2
answers
85
views
SQL group multiple transactions into one based on time between (LAG function?)
I am working with forecourt machine data (e.g. jet wash / air) that accepts coins to operate. Each coin is a transaction line. However, I want to group up multiple rows into one 'transaction' if the ...
0
votes
0
answers
86
views
No Active Consumers and lag in all partitions of a topic in one datacenter
Sometimes I run into a situation where I had to restart my API to consume messages from a datacenter
Here is the
We have 3 data centers (DC1, DC2 and DC3) and each datacenter has about 4 to 8 brokers. ...
0
votes
0
answers
36
views
Fill null values in BigQuery table with next non-null value from specific column [duplicate]
I have a BigQuery table with the following structure:
[
{
"case_id": "1234567890",
"reply_date": "2024-06-25 13:31:07.000000 UTC",
"next_reply_target"...
0
votes
1
answer
49
views
Dynamically perform calculation down column in R
I have data that looks like this:
library(tidyverse)
df<-tibble(date = as.Date("2024-07-01"), starting_n = 100, growth_rate = 0.05)%>%
bind_rows(
tibble(date = seq.Date(as.Date("...
-3
votes
1
answer
187
views
MySQL Lead function returns NULL
I have this MySQL table:
id
Name
1
Spanish
2
French
3
German
I am using this statement:
SELECT id, Name, Lead(Name) OVER (ORDER BY id) AS 'next' from MyTable WHERE Name='French'
The expected result ...
0
votes
2
answers
65
views
Postgresql select nearest max value row within 30 seconds timestamp
I need to extract data from a postgres table, where I want to look at nearby records within a 30 seconds of timesstamp with two columns match and fetch the value which is having max value.
id | ...
1
vote
1
answer
53
views
pandas : sum with lagged param
in sql request, i have a chance to sum with lagged param on the fly, like:
CASE
WHEN dt_rep.fcr = 0::numeric THEN 0::numeric
ELSE (dt_rep.fcr - lag(dt_rep.fcr) OVER (...
0
votes
0
answers
106
views
Transparent / Absolute Canvas above animation causes GPU glitches
I made a small one pager which uses framer for scroll animations. I wanted to add a small smoke effect when scrolling past over a certain section.
The overall effect seems to function but it wrecks ...
0
votes
1
answer
52
views
Multi-Column Conditional Highlighting with KableExtra and ifelse statement
Solution Below
Original Question: I am attempting to highlight the text of a KableExtra table to indicate where group observations increase or decrease by year. However, I am receiving an error about ...
0
votes
2
answers
872
views
Snowflake get previous value that was different
I have a table that tracks location by id along with dates a devices was issued and the product/accessory that has been associated to the device. The location can only have 1 device at a time, and the ...
1
vote
2
answers
75
views
Calculate Beginning and Ending Balances Using R
I am trying to follow a process where I make a contribution to an investment every period, that investment grows or shrinks over time and then I have an ending balance. The next period I take that ...
2
votes
1
answer
798
views
Roblox Physics Calculation Lag
In my roblox game, you use a rocket launcher to destroy parts, but when a large amount of parts are being calculated at the same time, it causes immense lag to all physics-based items (including ...
1
vote
0
answers
58
views
How can I resolve lag while writing Spring Boot with Eclipse?
I am a student majoring in coding in South Korea.
As shown in the picture, I am writing code using Spring Boot, but the message 'computing...' keeps popping up and the program lags...
It doesn't even ...
1
vote
1
answer
37
views
imputing NA with combination of previous values without loop
continuing on last question, i need to impute missing last couple of years as combination of previous years in R. In the data below, i need to impute 2020 as linear combination of 2019,2018 and 2017, ...
1
vote
3
answers
59
views
Nested for loop alternative for comparing a value to the value of previous year for each ID
I have a data frame with 45k+ rows with the values of a variable SE441 by ID NUM_EXPLOTACION and year ANO.
I want to calculate the difference of the variable for every ID between every year and the ...
0
votes
1
answer
90
views
Game lags, what is wrong?
The white square lags when it moves. I do not see anything wrong with the code and since the application is very simple, i don't think the hardware is the issue either.
Video demonstrating the issue: ...
2
votes
1
answer
78
views
lagged cumsum in R
I have data that looks like the following:
df <- tibble(
date= seq.Date(as.Date("2021-01-01"), as.Date("2022-02-01"), by = "month"),
val1 = c(100, 100, 105,...
1
vote
1
answer
563
views
Optimizing Pose Detection in React.js with TensorFlow.js: Addressing Lag and Hanging Issues
In my React.js code, I'm using the TensorFlow.js PoseNet model to detect multiple poses. When I get all the pose keypoints, I draw lines on each point pair (jointPairs).
It's working, but after 25 ...
0
votes
1
answer
49
views
Lag function - issue
I have data like that :
Year
Value
2022
1000
2023
500
and I want to create column with previous values like that:
Year
Value
Value_PY
2022
1000
null
2023
500
1000
2024
null
500
The LAG() function isn'...
0
votes
1
answer
335
views
LAG() and LAST_VALUE in snowflake
I have a table that has data looks like:
date
qlfd_lvl
actv_ind
last_value
20230301
4
1
4
20230302
2
1
2
20230303
3
0
2
20230304
1
0
2
20230305
3
1
3
20230306
2
0
3
20230307
1
0
3
we have 2 conditions ...
0
votes
1
answer
260
views
Lag function conversion into MS Access SQL
I am trying to convert the lag function to use in access-sql, which simply doesn't have the function. So I have a table A with columns Type (a,b or c),Decider (1 or 2), Dates and Values..I would like ...
1
vote
1
answer
61
views
Extract rows with consecutive zero values if they are preceded by significant values in R
I'm working with a dataset in R called "data," originating from data collection on a Fronius inverter. This dataset contains one record per minute and a column named "pac_w," which ...
0
votes
2
answers
102
views
How to Retain Date value Using SAS datastep
I have a SAS dataset with STS and CHGDATE. I would like to create a New Date variable NEWCHGDATE while retaining the same Date until the same STS=03 continues.
ID CHGDATE STS
...
0
votes
2
answers
143
views
Teradata query to Calculate Start and End dates Based on a condition
I have a dataset for certain STS codes and I need to retain the Start and End Date When Status =03
I have the following Data
HAVE
ID CHGDATE STS
101 11/21/2022 ...
0
votes
0
answers
34
views
Mouse hook with non-English language results in extremely laggy mouse
I am developing an app in C# Winforms .Net Framework and am using this global mouse hook code:
internal class GlobalMouseHook
{
#region events
// declare hook events:
...