Random snippets of all sorts of code, mixed with a selection of help and advice.
StrInternetToDateTime can't find day month values
21 February 2025 @ 11:52 pm
I get serverdate value from server and tried to convert it to DateTime by using StrInternetToDateTime. My serverdate is like
Fri, 21 Feb 2025 22:11:34 GMT
On windows platform there is no problem. It works correct.
But on Android 32 phone gives exception on EncodeDate.
Project Myproject.apk raised exception class EConvertError with message 'Invalid argument to date encode'.
When i debug it saw that on ParseMonth and ParseDayOfMonth procedures the month and day values are wrong.
How to use bolt.new with openai API key
21 February 2025 @ 11:52 pm
I am trying to use bolt.new locally by cloning the repo from github (https://github.com/stackblitz/bolt.new/). Successfully running bolt.new, but according to the documentation, only Anthropic API seems to be used as API Key.
https://github.com/stackblitz/bolt.new/blob/main/CONTRIBUTING.md
ANTHROPIC_API_KEY=XXX
But I want to use it with Chatgpt, how can I use bolt.new with OpenAI API Key?


Timeseries Crossvalidation in R: using tsCV() with tslm()
21 February 2025 @ 11:52 pm
I am trying to evaluate a tslm-model using time series cross validation
I am using the very simple code below (based on what Rob Hyndman posted on here some years ago), but I only get NAs as a result.
What is the issue with the code? I must be missing something on how the tscv() function works
y = ts(rnorm(336),frequency=12)
fc <- function(y, h, xreg)
{
if(NROW(xreg) < length(y) + h)
stop("Not enough xreg data for forecasting")
X <- xreg[seq_along(y),]
fit <- tslm(y ~ X)
X <- xreg[length(y)+seq(h),]
forecast(fit, newdata=X)
}
pred <- ts(rnorm(length(y)), start=start(y),
frequency=frequency(y))
tsCV(y, fc, xreg=pred)
Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
1 NA NA NA NA NA NA NA NA NA NA NA NA
2 NA NA NA NA NA NA NA NA NA NA NA NA
3 NA NA NA NA NA NA NA NA NA NA NA NA
4 NA NA NA NA NA NA NA NA NA NA NA NA
5 NA NA NA NA NA NA NA NA NA NA
"Cannot recover key" while doing Flutter release. What I can do to solve this, please?
21 February 2025 @ 11:51 pm
All my information inside key.properties and and build.gradle is correct. But I can't do the app release I keep getting "Cannot Recover Key".
The console shows me this message:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:signReleaseBundle'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.FinalizeBundleTask$BundleToolRunnable
> Failed to read key upload from store "D:\flutter_projects\first_project\rock_paper_scissors_2\android\app\upload-keystore.jks": Cannot recover key
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
BUILD FAILED in 1s
Running Gradle task 'bundleRelease'... 1,899ms
Gradle task bundleRelease failed with exit code 1
I don't know
Why is SSIS Script Task unable to return a precise error indication on missing DLL?
21 February 2025 @ 11:50 pm
We figured out that to use libraries in Script Task of SSIS packages, we need to manually add the DLL to GAC (global assembly cache) and add a reference to the DLL file in the Script Task's code editor. See more in this post.
However, we still wonder how to get precise indication in SSIS's Script Task if missed other DLLs in future.
How to produce the test scenario
Taking AWSSDK.Core.dll, only as an example, we can produce a missing DLL error by either:
Going to directory C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn\ and rename AWSSDK.Core.dll to AWSSDK.Core.dll.bak. In this way, the system cannot find the DLL for linking.
Or call gacutil -u AWSSDK.Core to unregister. In this way, we can produce the error for testing on Visual Studio, but not on SQL Server deployment.
Details of the issue
How do I cause VEGA to resize in response to input changes in a VEGA Visualization
21 February 2025 @ 11:50 pm
I am creating a VEGA visualization with an input bound to a signal. As I change the input, the height of the graph on the web page on the webpage may get larger, but VEGA does not resize the canvas so the rows beyond the original height do not display.
Weibull Predictions using R and current component hours
21 February 2025 @ 11:48 pm
I have failure data for tire removals that I have fitted to a weibull distribution, which has parameters beta = 1.09 and eta = 2750. Using the weibull parameters I would like to apply this to another data set, which has the current hours for 1427 tires. I am interested in predicting when these components will fail based on their current hours, and the weibull parameters over the next three months.
So for example if I have a tire that is at 1000 hours, and follows this weibull distribution, how can i predict the hours where it will fail? I am using the weibull parameters to randomly generate failure times, and then creating a monte carlo simulation to calculate the numbers and overall failure predictions over the next three years. But it is just the thought process set up I am struggling with.
Can you estimate the failures times using Weibull parameters, and the current hours will be shifted from 0, so there has to be some kind of conditional analysis. Please let me kno
Palantir Foundry - Archiving and versioning big data
21 February 2025 @ 11:47 pm
I am looking for the best option in Palantir Foundry comparable to Databricks Delta time travel - we need to version big data so we can access historical versions of it.
We have used a few strategies in Foundry for smaller datasets including the list below, but I would like to know if these will hold up to bigger data in the terabytes.
Using endpoints to copy specific transactions to a branch
Using endpoints to copy specific transactions to a CSV and save in a dataset file system
Incremental transforms, adding a new copy of the data each day to one dataset, with a timestamp
Copying an entire dataset to a new dataset each time it builds
Extending retention policies and using Contour to pull historical transactions
Am I wrong to be concerned about any of the above options or are there better options in Foundry?
VSCode Kqlmagic Authentication Errors
21 February 2025 @ 11:47 pm
I am using Kqlmagic in a VSCode Jupyter notebook setting and everything has been working smoothly ... except the need for Device Code authentication upon execution of every individual notebook. I've been querying data in both ADX and Sentinel (LAW), and I would like to streamline the auth process.
Reading documentation and the output of %kql --help, there appears to an option for try_vscode_login. I'm hoping there can be an initial login step where all subsequent notebooks in the token's lifetime will not require additional authentication. I have attempted to authenticate to Azure using the bundled Microsoft extension, as well as the
Double scrollbars in Fluent UI React - DetailsList & Modal
21 February 2025 @ 11:46 pm
<div>
<Modal
isOpen={isModalOpen}
onDismiss={handleCloseModal}
styles={{main: classNames.modal}}
>
<div className={classNames.header}>
<IconButton
iconProps={{ iconName: 'Cancel' }}
ariaLabel={strings.close}
onClick={handleCloseModal}
/>
</div>
<div className={classNames.detailsList}>
<DetailsList
columns={columns}
items={items}
/>
</div>
</Modal>
</div>
header: {
display: 'flex',
justifyContent: 'flex-end'
},
modal:{
maxHeight: '80vh',
overflowY: 'auto'
},
detailsList: {
overflowY: 'auto',
maxHeight: '100%'
}
I see 2 vertical scrollbars - one for detailslist, one for modal. How to update so that it shows one scrollbar