Random snippets of all sorts of code, mixed with a selection of help and advice.
var point is not defined when it is already defined in javascript for earth engine
20 March 2026 @ 7:49 pm
Hello I am trying to get distance of a given point to the coast, code editor says point is not defined, in the line 66 , but you can see it is already defined in the line 40.
I have no idea what the problem is
Thanks in advance.
I am not a programmer
Line 66: point is not defined >> is the error msg
// 2. Load Coastline (or use a water mask)
var s2Coast = ee.FeatureCollection("projects/sat-io/open-datasets/S2COAST-2023")
.filterBounds(caribe);
// Create a panel to hold the coordinate input widgets.
var panel = ui.Panel({
style: {width: '300px', shown: true}
});
// Create text boxes for longitude and latitude.
var lonTextbox = ui.Textbox({
placeholder: 'Enter Longitude...',
style: {width: '200px'},
onChange: function(value) {
// Optional: add real-time validation or processing here.
}
});
var latTextbox = ui.Textbox({
placeholder: 'Enter Latitude...',
style: {width: '2
Why doesn't my alembic sync to my docker database but it works in production?
20 March 2026 @ 7:42 pm
I have an Alembic and SQLAlchemy defined database that's working just fine updating my database when I run
alembic -c traveler/db/alembic.ini upgrade head
Everything gets updated to the new models.
I'm trying to run this in a development environment now and creating a Postgres DB in a Docker container and syncing the SQL model with Alembic. The database starts up but when I connect to it there are no tables in the database.
services:
postgres:
image: postgres:15-alpine
environment:
POSTGRES_DB: traveler
POSTGRES_USER: traveler
POSTGRES_PASSWORD: traveler
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U traveler -d traveler"]
interval: 5s
timeout: 5s
retries: 10
volumes:
- postgres_data:/var/lib/postgresql/data
migrate:
image: python:3.11-slim
working_dir: /app
depends_on:
postgres:
How to perform asynchronous LLM inference on Kafka streams using Apache Spark, and handle high-throughput RAG ingestion?
20 March 2026 @ 7:41 pm
I’m working on a streaming pipeline where data is coming from a Kafka topic, and I want to integrate LLM-based processing and RAG ingestion. I’m running into architectural challenges around latency and throughput.
Use Case 1: LLM Inference on Kafka Payloads
I have a Kafka topic with streaming events.
For each message, I want to perform LLM inference (e.g., classification, summarization, etc.).
I am using Apache Spark (Structured Streaming) for processing.
Problem:
Spark Structured Streaming feels inherently synchronous because:
It processes data in micro-batches.
Checkpointing ensures exactly-once/at-least-once semantics, which ties execution to batch completion.
This makes the LLM inference step a bottleneck, especially since:
LLM calls are relatively slow (network + compute latency).
SpringBoot & Docker desktop & IntelliJ Idea
20 March 2026 @ 7:40 pm
I have simple example Spring Boot Web projcet. And I have Docker desktop running on my Mac (silicon).
I would like to run my spring web app on my local docker.
And I have Dockerfile in my Spring boot project:
# FROM eclipse-temurin:17
FROM openjdk:25-oracle
RUN addgroup -S spring && adduser -S spring -G spring
USER spring:spring
ARG JAR_FILE=target/*.jar
COPY ${JAR_FILE} app.jar
ENTRYPOINT ["java","-jar","/app.jar"]
I try :
docker build -t springio/gs-spring-boot-docker .
And I get this:
I used to use IntelliJ, SpringBoot and Maven 5 years ago. And deploy service (jar) to local Docker.
Just like that. No problems.
Please help.
I used to use IntelliJ, SpringBoot and Maven 5 years ago. And deploy service (jar) to local Docker.
Just like that. No problems.
Please help.command failed and signal SIGKILL on npm install that involves any sh commands
20 March 2026 @ 7:39 pm
When I run "npm install" on my work computer, if any steps on the install involve sh commands the package installation fails and I receive an error in the terminal. This is a new issue that I have not experienced on this machine before. This is happening with established repositories, included ones I was previously using. This is a fairly new machine for me which I have been setting up over the past week so I have made a number of configuration changes but I can't figure out the source of this issue.
Best way to generate an SBOM for a Flutter app?
20 March 2026 @ 7:38 pm
Keeping in mind the versatility of Flutter as a framework I'm curious if there is any tool out there that integrates well with it to auto generate Bill of Material for a multi-module multi-platform Flutter project.
I am aware of and have tried pana, flutter_oss_manager, Trivy, Syft, cdxgen, even scancode-toolkit with their dashboard to inspect scans
After playing around with all of them many work poorly or are roughly able to generate something but never a full output (finding all transitive deps, their finger
Spring Boot 4: How to define ObjectMapper based on autoconfiguration?
20 March 2026 @ 7:22 pm
In my new application, I'm using Spring Boot 4.
I noticed that ObjectMappr is now under
import tools.jackson.databind.ObjectMapper;
so I'd like to understand how to modify this bean that I was using in Spring Boot 3.
@Bean
@Primary
public ObjectMapper objectMapper(Jackson2ObjectMapperBuilder builder) {
ObjectMapper objectMapper = builder
.featuresToEnable(MapperFeature.ACCEPT_CASE_INSENSITIVE_PROPERTIES)
.build();
objectMapper.setTimeZone(TimeZone.getDefault());
return objectMapper;
}
So I'd like to create a bean that isn't entirely new, but takes the original ObjectMapper configuration and modifies it. So if I've defined any configuration in the properties/yaml file, I don't want to lose it.
In the case described above, in fact, I have the basic configuration of the ObjectMapper plus what I defined in the properties file plus the configurations mad
Why does my approach fail for LeetCode 179 "Largest Number"? [closed]
20 March 2026 @ 6:40 pm
I'm trying to solve the "largest number" problem:
Given a list of non-negative integers nums, arrange them such that they form the largest number and return it.
Since the result may be very large, so you need to return a string instead of an integer.
Example 1:
Input: nums = [10,2]
Output: "210"
Example 2:
Input: nums = [3,30,34,5,9]
Output: "9534330"
However, my approach (iterating and building the result step by step) fails for cases like:
Input: [10,2,9,39,17]
Expected: "93921710"
Got: "92103917"
Here's my code:
function largestNumber(nums) {
if ( nums.length === 1 ) return String(nums[0]);
let aux = [];
let res = [];
let count = 0;
for(let i = 0 ; i < nums.length ; i++) {
aux.p
Too many views in a scrollview
20 March 2026 @ 5:57 pm
I need some good advice please. I have a scrollview with a TableLayout. The table consists of 5 columns so every TableRow consists of 5 Textviews. It's working very well, but I would like to add more TableRows, and since I'm using:
private ActivityMainBinding binding;
there is a limit how many views it can handle. There must be a better way constructing a scrollable table with 5 columns that doesn't consume that many views?
I learned java programming by myself, so I know there is a lot of stuff I don't know. Maybe someone can point me in the right direction?
activity_main.xml:
<ScrollView
android:id="@+id/scrollview"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="@dimen/weight_main_scroll_table"
android:layout_marginStart="0dp"
android:l
How to have three HTML sliders, indicating percentage; when one slider moved, other sliders are moved proportionally so the total of sliders = 100%
20 March 2026 @ 5:00 pm
I'm working in HTML and JavaScript. I have 3 sliders that each have their own percentage values (from 0 to 100), but the sum of the 3 values must be 100. When the user increases one slider, the other two sliders must decrease proportionally to match the sum of 100.
Here's an example: Slider 1's value is 60, slider 2's value is 30, and slider 3's value is 10. The user then moves slider 3 from 10 to 73. This means that the values of the other two sliders must instantly decrease so that the sum of the values can still be 100. However, the values of those two sliders must maintain the same proportion of 60:30 (2:1). Therefore, slider 1 goes to 18 and slider 2 goes to 9.
If a decimal value occurs, the decimal value should be stored in a variable, but the actual text that appears on-screen should be rounded down to the nearest