Random snippets of all sorts of code, mixed with a selection of help and advice.
How to access public Facebook posts using an API (Open Source) My goal is to retrieve real-time
31 March 2026 @ 6:49 am
public posts (text) for use in our system. The best lead I have found so far is the Meta Content Library (MCL) API. Is this the right approach, or is there a better technique for implementing this? Please note that this is for educational research.
Migrating Delphi application to .NET: Framework 4.8 vs .NET 6+ for COM/Hydra interop
31 March 2026 @ 6:39 am
We're planning a phased migration of a large Delphi application to C#/.NET. The migration strategy involves:
Running Delphi and C# side-by-side during transition (12-24 months)
Using RemObjects Hydra (or COM interop) for Delphi ↔ C# communication
Gradually replacing Delphi modules with C# equivalents
Our dilemma: Should we target .NET Framework 4.8 initially or go directly to modern .NET (6/8/10)?
Option A: .NET Framework 4.8 → Later upgrade
Pros:
Well-documented Delphi interop patterns
Proven Hydra support
Lower risk during pilot phase
Cons:
Requires migration to modern .NET later
Creates temporary technical debt
Double deployment/testing effort
Option B: Mo
How to have a CorsConfigurationSource in an Autoconfiguration in Spring Boot?
31 March 2026 @ 6:31 am
I am building a company-specific Spring Boot autoconfiguration. The code looks something like this:
@AutoConfiguration
@AutoConfigureBefore(SecurityAutoConfiguration.class)
@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET)
@ConditionalOnClass(JwtAuthenticationConverter.class)
public class WebMvcSecurityAutoConfiguration {
@Bean
public JwtAuthenticationConverter jwtAuthenticationConverter() {
JwtAuthenticationConverter converter = new JwtAuthenticationConverter();
converter.setJwtGrantedAuthoritiesConverter(ClaimsToRolesConverter::convert);
return converter;
}
@Bean
@ConditionalOnMissingBean
CorsConfigurationSource corsConfigurationSource(WebMvcSecurityProperties properties) {
CorsConfiguration configuration = new CorsConfiguration();
Cors cors = properties.cors();
configuration.setAllowedOrigins(cors.origins());
configuration.setAllowedHeaders(
cors.allowedHeaders() != null ? cors.allowedHead
Vertical Stacking cards animation
31 March 2026 @ 6:31 am
Currently I am using vertically stacked card animation by the framer motion. The animation it self is perfect user reaches the section, the section becomes sticky and page normal scroll stops and the cards are scrolled after the six cards page normal flow runs but for the larger screens the animating section acts as h-screen due to the one dvh value. But I dont want that h-screen for this section as the whole page is small and one page is big that will disturb the UX. I put a deep research on this and I found that such animations need h-screen because without it the section could not stop at one place. I want this animation but that one space below the section is killing my page. Used almost all AI tools also claude, chat, blackbox but all in vein. Working in next js tailwind css.
CSS properties can't use measurement units other than pixels on Chrome
31 March 2026 @ 6:27 am
When I try to create a <length> type property in my CSS, Chrome complains if I don't use pixels as the unit of measurement:
@property --my-width {
syntax: "<length>";
inherits: true;
initial-value: 2em;
}
Firefox seems OK and the summarized docs say yes but Chrome says "No!".
Is my syntax OK?
I'm trying to transition on the width of the scrollbar (which works) but am stuck if I don't use pixels.
Firefox seems OK and the summarized docs say yes but Chrome says "No!".
Is my syntax OK?
I'm trying to transition on the width of the scrollbar (which works) but am stuck if I don't use pixels.Expo React Native: How to play notification sound for 30 seconds on Android?
31 March 2026 @ 6:18 am
I am working on a React Native app using Expo (managed workflow), and I need to implement an emergency alert feature.
The requirement is:
When a push notification is received, a sound should play for around 30 seconds, even if the app is in the background or killed.
Currently, I am using expo-notifications and a custom notification sound. However, I noticed that:
The sound only plays for a few seconds (around 3–5 seconds)
It does not continue for the full duration of the audio file
Behavior varies across Android devices
What I want to know:
Is it possible to play a notification sound for ~30 seconds on Android using Expo (managed workflow)?
If not, what are the limitations imposed by Android or Expo?
Are there any workarounds to achieve a longer or continuous alert sound (for emergency use cases)?
Sparkle not updating app name in Finder/Dock after macOS rename when using Flutter auto_updater
31 March 2026 @ 6:18 am
I’m working on a Flutter desktop application for macOS and using the auto_updater package (which internally uses Sparkle) for handling OTA updates.
We recently introduced a change where the app name (bundle display name) has been updated. The update flow works fine, the new version downloads and installs successfully. However, after the update:
The application name does not change in the /Applications directory (Finder)
The Dock still shows the old app name
From the Sparkle repository, I found that properly handling app renaming during updates requires (reference):
Updating SUBundleName
Enabling the SPARKLE_NORMALIZE_INSTALLED_APPLICATION_NAME flag
In a typical native macOS setup, this flag is co
Esecuzione Query in Rider [closed]
31 March 2026 @ 6:14 am
Come faccio ad eseguire un file .sql su Rider? , Mi fa eseguire solo la console. Io sono connesso al DB che è in un container dove c'è SQL Server 2022. Quando creo un file .sql e scrivo una query, il pulsante / freccettina verde per eseguire la query è grigia e non me la fa eseguire (ovviamente sono connesso al db)
Is php relevant today?
31 March 2026 @ 6:03 am
I am a FULL STACK DEVELOPER , my tech stack is MERN, but I am curious about jQuery , php . I do not know why but I just feel like I should know about these like how jQuery works and how reactjs overcome jQuery etc. so my question is learning (for my shake ) jQuery and php like technologies in these so called vide coding era still relevant or not ? will it be waste of time or make me slow ? just need suggestions . Thank you.
What are the recommended tools for managing environment variables in a Node.js project?
31 March 2026 @ 4:52 am
I'm building a mid-sized Node.js application and I want to manage environment variables properly across development, staging, and production environments.
Currently I'm using a basic .env file with the dotenv package, but I'm running into issues:
The problems I'm facing:
No type validation or default values
No clear separation between environments
Secrets accidentally committed to Git
No schema enforcement
I've seen libraries like dotenv-safe, envalid, and zod (with z.object for env), but I'm not sure which approach is recommended .
What are the best tools or patterns for:
Validating required environment variables at startup
Providing type safety (especially with TypeScript)
Managing multiple environments (dev/staging/prod)
Is the zod approach the current best practice, or are there better alternatives I shoul