on-internet

Passing through Jiangxi province with China's 240-hour visa-free transit

China has a 240-hour visa-free transit policy. It is only eligible to citizens of certain countries, for people arriving at certain major airports, and importantly, it is restricted to certain provinces. It also requires your onward destination to be in a different country to your origin, so it is clearly intended to allow people to take an extended break in certain parts of the China en route. I am contemplating using this to break a journey between Taipei (in Taiwan, which counts as a separate country for the purposes of this policy) and London at Shanghai in order to visit the Zhangjiajie N

Join the discussion →

How to build Nuxt 4 static SPA once and deploy under any sub-path (no per-path rebuild)?

I have a client-only Nuxt 4 app (ssr: false) that I build once with nuxt generate and distribute as a ZIP (the contents of .output/public). When unpacking it on a custom Apache server the app can end up at the web root or in any subfolder (/, /myapp/, /a/b/), sometimes next to other apps on the same server. Problem: In a sub-folder the page loads, but the browser requests /_nuxt/*.js from the server root. Apache answers with the SPA fallback (index.html), so I get: Loading module from "http://192.168.10.44/_nuxt/XXXX.js" was blocked because of a disallowed MIME type ("text/html"). Goal: One bu

Join the discussion →

Computing li(x) the logarithmic integral accurately in double precision when x ~ 10^16

I have two series and one continued fraction method. They all give slightly different answers when x gets large and disagree with OEIS A057754 about Li(10^16) when computed in double precision. Compiled to long double precision all the algorithms agree to a few ULP on the 64 bit significand and OEIS is correct. The logarithmic integral is defined as: They all have the zero at 1.45136923488338105 to within 1 ULP in double precision and out to 10^16 are in pretty good agreement. The first series seems slightly off when evaluated in double precision no matter how hard I try to help it be more acc

Join the discussion →

How to record system sound with mciSendString

I try to record system sound with mciSendString but no sound that it records. How to fix this? Imports System.Runtime.InteropServices Public Class Form1 ' Importeer de mciSendString functie uit winmm.dll <DllImport("winmm.dll", EntryPoint:="mciSendStringA", CharSet:=CharSet.Ansi, SetLastError:=True, ExactSpelling:=True)> Private Shared Function mciSendString(lpstrCommand As String, lpstrReturnString As String, uReturnLength As Integer, hwndCallback As IntPtr) As Integer End Function Private Sub btnStart_Click_1(sender As Object, e As EventArgs) Handles btnStart.Click ' ' Open en start de opnam

Join the discussion →

Mini, spoiler free review of *Where the Axe is Buried*, by Ray Nayler

submitted by AFKBRBChocolate to books 18 points | 0 comments cross-posted from: lemmy.ca/post/73113357 Set in a future in which there are basically two types of governments: the Eastern countries have formed into a brutal autocracy called “The Federation,” which is ruled by a president who gets copied into a new body when the old one fails, and the Western countries have each turned to AI Prime Ministers, programmed to make the most beneficial decisions without human influence, with less than utopian results. We follow the stories of dissidents of the former, and cabinet members of the latter,

Join the discussion →

Reverse data which contains duplicates

I have data as such: Person Color 1 Color 2 Color 3 Bob Red Blue Jack Red Orange Amy Green Yellow Blue Is there a formula which can produce something like the following: Color Person 1 Person 2 Red Bob Jack Blue Bob Amy Green Amy Yellow Amy Orange Jack which has each unique colour in a single column, and all the names that are associated with them in additional columns?

Join the discussion →

How to deploy paladins in war? [closed]

I have a setting which is essentially a high fantasy world with dwarves, elves, magic, etc. It also has technology, mid-20th century around WW2, although magical assistance has accelerated the development of some tech and slowed that of some other. Most of the nations shown deploy "war mages" in their armies, which are highly trained magic users who can serve as versatile medics, powerful combat casters, or deploy in groups to cast ritual spells with effects such as protecting an entire area from enemy fire. One nation, essentially a religious state on a holy crusade, uses paladins, which are

Join the discussion →

How to fake torture/ mistreatment

In my world there are two groups that don't get along, but aren't actively hostile or in conflict with each other. For simplicity I'll call them Group A and Group B. There's someone in Group B, I'll call them Instigator, who would have the opportunity to greatly benefit if Group A and Group B were to be in active conflict with each other, but lacks the influence within Group B to actually start anything. When a member of Group A is detained/ captured by Group B, Instigator decides to fake evidence of the captured group A member being mistreated/ tortured and send it to Group A in the hope that

Join the discussion →

Getting duplicate records with offset pagination in Python

I'm pulling records from an API into BigQuery using Python. The API only has limit and offset, so I'm just fetching 100 records, adding 100 to the offset and doing the same thing until there are no more records. This is the part I'm using: offset = 0 records = [] while True: r = requests.get(url, params={"limit": 100, "offset": offset}) data = r.json()["records"] if not data: break records.extend(data) offset += 100 I noticed some duplicate IDs in BigQuery and checked the responses. A few IDs were actually returned on different pages. The API sorts by newest first, and records get added all th

Join the discussion →

Left my visa at home, difficulty returning to work country?

I am a US citizen with a long-term residence permit in Czechia. I recently traveled to the US for a short-term stay, and am in the US now. When traveling, I forgot my residence permit, though brought my passport. The border agent at exit control let me through after I presented a photo of my permit and return flight, but almost did not, and said that it was very important I remember the permit next time. Will I have difficulty re-entering Czechia, and is there anything I can do beforehand to mitigate?

Join the discussion →

Multi Language project on school Ipad [closed]

Platform: iPad Requirement: project supporting two languages, I.e. a c++ function called from Python What I've tried so far: Web IDE that compiles C++, but I don't think it supports two languages. I would like it if I could use just one app to compile, but if not, please explain how I would go about combining the 2 languages. What tooling would fill my needs?

Join the discussion →

How to deal with this `torch.AcceleratorError: CUDA error: device-side assert triggered` error?

I am trying to compute the diagonal of the Fisher information matrix. I found this code that appears to do just that, but there are some issues with the code. First consider the code in its original form: estimated_fisher = {} for n, p in model.named_parameters(): estimated_fisher[n] = torch.zeros_like(p) model.eval() for i, (input, target) in enumerate(dl, 0): model.zero_grad() output = model(input.to(device)) label = target.to(device) loss = F.nll_loss(F.log_softmax(output, dim=1), label) loss.backward() # populate grad data # accumulate all the gradients for n, p in model.named_parameters()

Join the discussion →

What is your go-to server stack for PHP? [closed]

Over the years I've been using mostly Apache, then I've moved to Nginx, but lately I dabble with Litespeed. I think Apache was left behind, I really can't see any/much reason to use it anymore. Nginx's main strength is that it's well known and pretty easy to work with. Litespeed is fast and lightweight. What do you choose - what server and why?

Join the discussion →

Can I make Pyright catch unnecessarily broad type annotations?

Pyright warns me when the annotated return type of a function is narrower than the actual return type. However, it doesn't warn me when it's broader. Example: class User: def __init__(self, id: int) -> None: self.id = id users: list[User] = [] def get_user(id: int) -> User | None: # forgot to remove `| None` user = next((u for u in users if u.id == id), None) if user is None: raise ValueError(f"user {id} not found") return user I'd changed the body of get_user() to always return a User, but had forgotten to update the annotation. Pyright doesn't warn me that User | None could be narrowed to Us

Join the discussion →

Clarksworld Magazine: SciFi short stories published monthly

submitted by apftwb to books 25 points | 2 comments Monthly SciFi short story publication since 2006. Each month they release about 6-8 short stories (and a few non-fiction articles). The stories always feel fresh and varied from authors around the world. They don’t shy away from modern topics, but try not to play the same old dystopian tropes. It can be lighthearted or heavy you never know what you will get. Even if the rare story doesn’t hit, I never finished a story and felt like I regretted reading it. Its free on the website, but if you want the epub or a physical copy, it costs a few buc

Join the discussion →

Stylus Extension css important don't work

I have this script in my personal stylus CSS yet it still doesn't work at least for the case with reddit upvote and comment, and search button * { border-radius: 0 !important; } .button { border-radius: 0 !important; } so I tried to make my border radius 0 for the blocky feeling but for some reason this one doesn't work. I thought it was the canvas problem like Instragram story circle around profile, but as I inspect this one is just css border radius in .button but my css should've override it!

Join the discussion →

Does AutoCAD's managed SymbolTable API support enumerating AcDbFontTable and AcDbVXTable?

I am inspecting a newly created database in Autodesk Platform Services AutoCAD Automation. Two resident objects are identified as AcDbFontTable and AcDbVXTable. Both have the managed wrapper Autodesk.AutoCAD.DatabaseServices.ImpSymbolTable. Does the managed SymbolTable API support enumerating these two concrete classes? If not, what supported public inspection method should be used? Environment APS engine: Autodesk.AutoCAD+25_0 Managed SDK: AutoCAD.NET.Model and AutoCAD.NET.Core, version 25.0.0 Target: .NET 8, Windows x64 Database created using new Database(true, true) Insunits set to UnitsVal

Join the discussion →

How to enable logging for PHP-FPM inside a container

I have a multi-container WordPress setup consisting of php fpm + nginx + mariadb + redis. I need to be able to easily log in php fpm but do not know where the logs go to try to mount a host file on it for inspection or how to modify the log path. Using a php.ini in the root web directory does not seem to work. Here's my compose file: services: db: image: docker.io/library/mariadb:13.0.1-rc env_file: env.ini volumes: - dbvol:/var/lib/mysql - ./data:/docker-entrypoint-initdb.d:Z restart: always redis: image: docker.io/library/redis:latest web: image: docker.io/library/nginx:1.31.4 volumes: - ./.

Join the discussion →

CodeIgniter 4: date_default_timezone_set() and the .env timezone don't store the time correctly with the configured timezone

I'm working on a project using CodeIgniter 4, PHP 8.2 and MariaDB 10.11, all running in Docker. The container uses UTC as its default timezone, and I need dates and times to be stored correctly for Guatemala. Since the project is open source, I don't want to hardcode the Guatemala timezone in the code. Instead, I want to read it from a .env variable like this: app.timezone = America/Guatemala First, I tried setting the timezone in CodeIgniter's configuration, in app/Config/Constants.php, like this: date_default_timezone_set(env('app.timezone', 'UTC')); But I got a fatal error saying "undefined

Join the discussion →

Why can one equal-priority FreeRTOS task repeatedly win a non-blocking UART write?

I am using FreeRTOS on an ATSAMC21 (single-core Cortex-M0+) with Harmony non-blocking/interrupt-driven UART (SERCOM4_USART_Write). I have two FreeRTOS tasks with the same priority trying to print using the same UART protected by a mutex. Task 2: (Same structure using msg2) (same code is working in blocking mode of execution) void APP_Tasks ( void ) { switch (appData.state) { case APP_STATE_INIT: appData.state = APP_STATE_SERVICE_TASKS; break; case APP_STATE_SERVICE_TASKS: xSemaphoreTake(xPrintMutex, portMAX_DELAY); // SERCOM4_USART_Write returns false if UART is still busy transmitting // beca

Join the discussion →

How can search engines crawl dynamic page content when JavaScript is disabled?

My website uses Vue 3, and I have two types of dynamic pages: blog articles and company profiles. Currently, the page content is fetched through API calls in the Vue components after the page loads. As a result, when JavaScript is disabled, the actual content isn't present in the HTML. I already use prerendering for fixed public pages, but my company profile URLs number around 70–80k and may grow to millions, so generating static HTML for every URL doesn't seem practical. My Express server already fetches blog data for SEO metadata. What's the recommended approach to make the actual content of

Join the discussion →

pgvector always returns top-k rows even when the question is unrelated to the documents

I'm building a RAG chatbot for the public website of a water billing office. The goal is that customers can ask about rates, how to pay their bill, or what to do in case of a water leak, and the chatbot answers only with information from the office's own documents. The documents are split into chunks, and each chunk is stored with its embedding in Postgres using the pgvector extension. The table looks like this: CREATE TABLE fragmentos ( id SERIAL PRIMARY KEY, texto TEXT NOT NULL, fuente VARCHAR(255), embedding vector(1536) ); When a user asks a question, the API generates the embedding of the

Join the discussion →

Help me pick from four sci-fi series to read next…

submitted by daychilde to books 15 points | 36 comments I know people hate AI, but I find it to be a good starting place on things like this where ultimately, even if it hallucinates, little damage is done. I was discussing with it about some literary preterences. I grew up reading a lot of Asimov, although I’d never finished the Foundation series, so I’d been doing that - but I hadn’t remembered how it just got completely bogged down in convesation with so little action… it got annoying. Well, I have four recommendations I’m considering. I’d love your opinions on which one you think I should

Join the discussion →

The legendary crossing of the strait: could it have actually happened?

In my worldbuilding project, one of the cultures has a legend about an invading army fording a strait on horseback to reach them. I am wondering if this is a plausible event to in include in the world's history, or if it is best left as one of this culture's myths. This event occurs on a planet identical to earth in most ways, with the main difference being the configuration of continents. The moon and its orbit it the same. This strait is one of two places where a shallow inland sea connects to the panthalassic ocean. The strait is about 40km wide at its narrowest. Is it conceivable that this

Join the discussion →

I am getting error messages for a Core Data fetch request that is new since Xcode 27.1

Since I moved to XCode 27.1 all my older Core Data apps are now getting error messages: Two Apps; App A and App B With variations for data set names both apps have same AppDelegate, SceneDelegate and CoreDataStack. App A func importJSONPlaceSeedDataIfNeeded() { let fetchRequest: NSFetchRequest<Places> = Places.fetchRequest() let count = try? coreDataStack.context.count(for: fetchRequest) guard let placeCount = count, placeCount == 0 else { return } importJSONPlaceData() } App B func importBirdsJSONSeedDataIfNeeded() { let fetchRequest: NSFetchRequest<Birds> = Birds.fetchRequest() let count = t

Join the discussion →

Amadeus Fare_MasterPricerTravelBoardSearch: how to interpret two cabinProduct elements in one groupOfFares?

I am integrating with the Amadeus Web Services SOAP API (Fare_MasterPricerTravelBoardSearch). Sometimes, 2 cabinProduct elements are returned inside groupOfFares/productInformation in the API response. The response below, trimmed to the relevant parts, shows a case where two elements come back: <paxFareProduct> <paxReference> <ptc>ADT</ptc> </paxReference> <fareDetails> <segmentRef><segRef>1</segRef></segmentRef> <groupOfFares> <productInformation> <cabinProduct> <rbd>D</rbd> <cabin>C</cabin> <avlStatus>8</avlStatus> </cabinProduct> <cabinProduct> <rbd>O</rbd> <bookingModifier>T</bookingModifi

Join the discussion →

What book(s) are you currently reading or listening to? October 27

submitted by dresden to books 47 points | 69 comments Reading Fated by Benedict Jacka, first book in his urban fantasy series Alex Verus. It is interesting to see how different Alex is from Dresden, both are very different kind of mages, though both have their own issues with their respective councils. What about all of you? What have you all been reading or listening to lately? Check Official Bingo Challenge Post and the accompanying Recommendations Post for our Bingo for 2026!

Join the discussion →
Older stories