Random snippets of all sorts of code, mixed with a selection of help and advice.
Google CustomSearch JSON API — persistent 403 "This project does not have the access to Custom Search JSON API" despite API enabled and billing active
3 June 2026 @ 1:22 am
Every call to the Custom Search JSON API returns a 403 with the message "This project does not have the access to Custom Search JSON API" (status: PERMISSION_DENIED), and I've exhausted every fix I can find.
Calling
https://www.googleapis.com/customsearch/v1?key=YOUR_KEY&cx=YOUR_CX&q=test&num=1 returns HTTP 403 regardless of which key or cx I use.
What I've verified:
customsearch.googleapis.com is enabled — confirmed via gcloud services list --enabled
Billing is active on the project
The API key belongs to this project — confirmed via gcloud services api-keys list
Key is restricted to customsearch.googleapis.com, no referrer or IP restrictions
Programmable Search Engine is active with the correct cx
No org policy layer (personal project)
What I've tried:
Sendi
matrix type cannot be assigned as a table column, how to store matrix data in a table?
3 June 2026 @ 1:16 am
I'm computing a matrix in DolphinDB and trying to assign it as a new column in an existing table, but it fails.
Reproducible example:
m = matrix(1..95, 96..190) // 95x2 matrix
t = table(1..95 as id)
t[`a] = m
// Error: matrix cannot be used as a column directly
I tried fixedLengthArrayVector(m) but the output wasn't what I expected. I also have a single-column matrix (95×1) that I want to flatten into a 1D vector:
m2 = matrix(1..95) // single-column matrix
// How to convert to a plain vector?
Can a DolphinDB matrix ever be stored as a table column, and if so what's the correct syntax?
What is better: Cursor or Claude Code for vibecoding?
3 June 2026 @ 1:07 am
I am using Cursor for writing my pet project, but I heard from my friends that Claude Code is better then Cursor.
I decided to resolve this issue there. Sorry for my bad English, I learn it.
What do you think about this question?
Avoiding a LIKE '%value%' in a JOIN
3 June 2026 @ 1:01 am
I have a reference table that contains a computed, delimited hierarchy column for items in a parent-child-grandchild relationship. For example if item #11 is under item #1, it's ancestry is "~1~11~". The lookup table is a relatively small and stable table (~150 rows) with typically 2-3 levels of depth, while the data table that references it is rather large. (~5m rows and growing at ~1m/year).
If I want to find any items associated with lookup row ID #1, I want to return rows from #1 and it's children (#11, etc.) and grandchildren, down the chain. From the application I keep the lookup data cached so I fetch the applicable IDs by doing:
var lookupIds = _lookupCache.Where(x => x.Ancestry.Contains($"~{id}~").Select(x => x.LookupId).ToList();
var data = _context.Items.Where(x => lookupIds.Contains(x.LookupId))
// further filtering, pagination, etc...
This avoids doing a text sea
Best practices for configuring HikariCP with OceanBase (OBProxy) to prevent stale connections and "Connection reset" errors
3 June 2026 @ 12:46 am
Following up on our team's ongoing migration from a standalone MySQL to a distributed OceanBase cluster, we are now fine-tuning our connection pool settings at the application tier. Our backend is a Spring Boot service using HikariCP, and we connect to the OceanBase nodes via OBProxy (OceanBase Database Proxy).
Recently, during off-peak hours when traffic drops, we've started noticing occasional `java.net.SocketException: Connection reset` and `Communications link failure` warnings in our application logs. This usually happens when HikariCP attempts to borrow an idle connection from the pool.
In our standard MySQL setup, we typically set HikariCP's `maxLifetime` to 1800000 ms (30 minutes) and it worked flawlessly. However, it seems OBProxy might have a different default mechanism or timeout configuration for dropping idle TCP connections.
My specific questions are:
1. Does OBProxy handle `wait_timeout` or `interactive_timeout` differently than vanilla MyS
How do I look into https://raw.githubusercontent.com/python-visualization/folium/master/examples/data to see available data?
3 June 2026 @ 12:39 am
I am learning how to create maps using python and a lot of the examples I learn from use
https://raw.githubusercontent.com/python-visualization/folium/master/examples/data
as an example dataset. However, I would like a full list of data columns and categories which are found in this URL and cannot use a web browser to open this website. How do I use a pandas function so see everything in this URL?
Thanks!
Unable to Get Polly CircuitBreaker to Spend All Retries
3 June 2026 @ 12:30 am
I've been trying to learn how to combine Polly strategies and whilst I've mostly had success, there one thing I cannot reconcile.
With the CircuitBreaker Strategy, when used in conjunction with the Retry strategy, as I understand it, the Retry will keep retrying until:
(a) it maxes out its retries because the circuit is open; or
(b) it succeeds after the circuit closes again and it gets back a 200.
I can't replicate this. I set a massive number of retries (100) and it always stops retrying after about 80.
The code looks like this
services.AddHttpClient<SomeAppClient>()
.ConfigureHttpClient(c => c.BaseAddress = new Uri("https://localhost:7143/"))
// .AddStandardResilienceHandler();
.AddResilienceHandler("app-pipeline", pipelinebuilder =>
{
pipelinebuilder.AddRetry(new HttpRetryStrategy
Algorithm to bucket a set of elements in parallel?
3 June 2026 @ 12:29 am
Assume the following problem, you have a set of buckets, defined as a grid, and a set of points spread in that grid.
Each point is inside a cell, some cells contain multiple points. What you seek to do is sort the array of points, such that all points that are inside the same cell are in contiguous memory and for each cell you can tell the range in the points array that correspond to it.
A naive single threaded version in pseudocode would be:
for p in points:
cell_id = cell_id(p)
cell_counts[cell_id] += 1
cumulative_counts = add_cumulative_integers(cell_counts)
starts = cumulative_counts
for p in points:
cell_id = cell_id(p)
new_points[cumulative_counts[cell_id]] = p
cumulative_counts[cell_id] += 1
ends = cumulative_counts
Basically each point sees which cell it belongs to, then the points array can be easily reordered based on these counts.
There is a naive way to map this directly into a multi threaded setting
What is this and being said? [closed]
3 June 2026 @ 12:26 am
class="_2ph__a6-p"><d iv><div><div>katlehov maj ola</div><div></div></div> </div><div></div><div></di v><div></div><div></div>< div></div></div><footer cl ass="_3-94_a6-0"><a targe t="_blank" href="https://w ww.facebook.com/dyi/!/?l =aydkwaiqfrflkahxjnuq xncne2i_w1oaenlmlvi5e8t b4exrfru_wwiwg-mwosvo 4qumjmiiiixys4mby-9of3v 8_fsufbmqzivtwwqk"><div class="_a72d">nov 14, 202 1 8:40:38 pm</div></a></f ooter></section></div><di v><section class="_a6-g">< div class="_2ph__a6-p"><d 97.1%
Is RevenueCat enough to offer manual card entry, or do I need to migrate to Stripe? [closed]
3 June 2026 @ 12:11 am
I'm working on a 100% digital product (subscription) and I handle my purchases through RevenueCat. Right now I only offer payment via native wallets (Apple Pay / Google Pay through the stores), and I'm worried I'm losing a good chunk of users who don't have a card saved on their phone, or who drop off at the moment of payment.
I'd like to give them the option to enter a card manually if they want to. The thing is, I gathered that RevenueCat doesn't allow this directly, because it would mean handling the card details yourself (PCI and all that).
So my real question is: can I, while staying on RevenueCat, offer manual card entry (via Web Billing or something else)? Or do I actually need to migrate everything over to Stripe for that?
I should mention that going 100% Stripe holds me back a bit, since it's a digital product (store rules on IAP, review/validation, etc.), so if there's a solution on the RevenueCat side, I'm all for it.
Concrete feedback from peo