on-internet

Cloud Run validateOnly: how do I verify success?

I am using Cloud Run Admin API v2 projects.locations.services.patch with validateOnly=true, allowMissing=false and forceNewRevision=true. The request returned HTTP 200. The response had the following structure; identifiers are replaced with placeholders and most metadata is omitted: { "name": "projects/PROJECT/locations/REGION/operations/OPERATION_ID", "metadata": { "@type": "type.googleapis.com/google.cloud.run.v2.Service", "name": "projects/PROJECT/locations/REGION/services/SERVICE" } } The metadata contained the proposed Service configuration. The top-level done, response and error fields w

Join the discussion →

How to test rate limit in Rails?

How can I test with RSpec I'm using rate_limit method on my Rails 8 app? class SessionsController < ApplicationController rate_limit to: 10, within: 3.minutes, only: :create end

Join the discussion →

Can setting/retrieving properties on any HTML element be a security risk?

When assigning properties to a HTMLElement directly (so [Element].someProperty), it looks like anything goes. You would expect that invalid properties either throw some error or are weeded out silently on assigning them. This seems to be not the case. In the snippet is a minimal example, where after appending an element with a property that is function, that property can be referenced (and even invoked). Retrieving the value of it using getAttribute null is returned. Retrieving it directly however returns the property value (a function). I can't get my head around that. Will this constitute a

Join the discussion →

How can I optimize my database setup program?

I've written a web page in php that sets up a database locally for my site to pull from while I'm working on it, and I'm struggling to find a generally accepted standard for this sort of thing. It's my first time messing with this sort of thing, and I would like to check if I've done it the 'right' way and not a really messy roundabout way that adds 70% more lines of code to the page. I'm using mysql and php to do all this. Here is the code: <?php $host = "localhost"; $user = "root"; $password = ""; // Connect to MySQL server $conn = new mysqli($host, $user, $password); if ($conn->connect_erro

Join the discussion →

Rust in Visual Studio - Console closes automatically

When writing rust programs with Visual Studio 2026 I have the problem that the console immediately closes after program exit (all different modes: debugging, release, test - with and without Debugging) . I use the "Rust Development Pack" Extension (based on rust-analyzer.vs). It does not work based on solution but on "open folder" mode - so there is no project settings to edit. The Debug-Setting "Auto close Console window" is already switched off. I first used another rust-extension (SourceGear Rust) and there it worked, but it has other issues that make it unusable for me. How to force VS to

Join the discussion →

Tabulator with nested tables jumping to top when updating a sub-table

I have a very long non-paginated (deliberate) tabulator table designed to create a quotation price list. I don't want a scrollbar inside the table, so I have set the height to 100%. The main table holds the categories and under each category is a nested table using a custom rowformatter that holds the items and their pricing details. On each row of the main table i have a button that adds a new row to its related sub-table. When you click add on a row part way down the page, it automatically scrolls back to the top of the page, as opposed to keeping the new row in view. If i set the table to a

Join the discussion →

Facebook Page Plugin No Longer Loads; Can't Generate New Code

For some reason, FaceBook Page Plugin has stopped working today. Even if you go to their website, you can't generate new page plugins via the official generator. See here to reproduce this issue: https://jsfiddle.net/vnkbthf3/ <div><strong>data-tabs="timeline"</strong></div> <div class="fb-page" data-href="https://www.facebook.com/facebook" data-tabs="timeline" data-small-header="true" data-adapt-container-width="true" data-hide-cover="false" data-show-facepile="true"> <blockquote cite="https://www.facebook.com/facebook" class="fb-xfbml-parse-ignore"><a href="https://www.facebook.com/facebook"

Join the discussion →

Facebook Page Plugin Stopped Working w/o Deploying [closed]

For some reason, FB Page Plugin has stopped working today: See all errors here: WHTZSNYgAZx.js:84 ErrorUtils caught an error: Could not find element "u_1_u_If" [Caught in: Module "_elem_a588f507_1_0+J"] Subsequent non-fatal errors won't be logged; see https://fburl.com/debugjs. Object errorListener @ WHTZSNYgAZx.js:84 WHTZSNYgAZx.js:84 ErrorUtils caught an error: DataStore.get: namespace is required, got undefined Subsequent non-fatal errors won't be logged; see https://fburl.com/debugjs. Object errorListener @ WHTZSNYgAZx.js:84 WHTZSNYgAZx.js:84 ErrorUtils caught an error: Could not find elem

Join the discussion →

FCM send to iOS fails with 'Invalid APNs credential' despite valid, verified APNs Auth Key

I'm sending push notifications via the Firebase Admin SDK (Python) to a registered, valid iOS device token, and every single send fails with "Invalid APNs credential." This happens 100% of the time, across multiple distinct device tokens, over several days — including after completely replacing the APNs Authentication Key. Setup: Spark plan, iOS, sent via Firebase Admin SDK (Python). Send code: message = messaging.Message( notification=messaging.Notification(title=title, body=body), data={k: str(v) for k, v in data.items()}, token=token, apns=messaging.APNSConfig( payload=messaging.APNSPayload

Join the discussion →

Panama transit for an Indian passport holder travelling to the Bahamas

I’m an Indian passport holder planning to travel from Mumbai to Nassau, Bahamas, and I currently hold a valid Bahamas work permit/entry authorisation. I’m trying to understand Panama’s transit requirements under Resolution No. 24430 dated 9 August 2023, particularly the provision concerning travellers transiting to a country where they hold a valid visa or residence permit. My main concerns are: If I arrive at Panama City (Tocumen Airport) with one airline and depart with a different airline within 12 hours, would I need a Panama transit visa? If I have separate tickets and need to collect my

Join the discussion →

Filtering polars using a dictionary

I work on python with polars. I have: A dataframe df with columns mc1 and mc2 and A dictionary dico. I would like to filter on df to keep only the rows for which mc1 is an existing key of dico and dico[mc1] == mc2. Is it possible? I firstly tried something like this: import polars as pl import numpy as np df = pl.DataFrame({'mc1':[1,2,3,4], 'mc2':[5,6,7,8]}) dico = {1:5,2:2,4:8} df.filter(pl.col('mc1').is_in(dico.keys()) & (dico[pl.col('mc1')] == pl.col('mc2'))) But it didn't work. I also tried to produce a list of booleans indicating which row to keep, like it would work using pandas, doing t

Join the discussion →

Linux Kernel 6.19+ / 7.0 & SERVER-121912: Is disabling glibc rseq and patching isKernelVersionSafeForTCMallocPerCPUCache safe for production?

We are running MongoDB in Kubernetes on worker nodes that were recently updated to newer Linux kernels (specifically Ubuntu 24.04 with AWS 7.0.0-1011-aws and Azure 7.0.0-1014-azure). Linux 6.19+ or 7.x kernels is the range where this problem occurs. Upon host reboot, MongoDB (both 8.3.1 and the latest 8.3.11) immediately crashes on container startup with exit code 1: { "s": "F", "c": "CONTROL", "id": 12257600, "msg": "MongoDB cannot start: Linux kernel versions 6.19 and newer has a known incompatibility with this version of MongoDB. See https://jira.mongodb.org/browse/SERVER-121912 for more in

Join the discussion →

Copas + Lua-Websocket server not seeing clients

I'm trying to set up a relay server for my computercraft world, using Docker, Lua, lua-websocket and hosted using render.com (free tier). It seems that the server isn't seeing any client connections and I'd rather have it see them I've tried connecting from CraftOS PC using http.websocket() but what about happened is: ws, err = http.websocket("wss://(app).onrender.com") ws becomes a handle, I can write, receive and close it (none do anything) Server log does not register a connection No response from server either Server doesn't error or log anything upon connection I've tried a ton of differe

Join the discussion →

Error with Permissions-Policy header: Unrecognized feature: 'run-ad-auction'

I am getting the following 4 warnings whenever I navigate or reload an iframe - document.querySelector('iframe').src = document.querySelector('iframe').src: Error with Permissions-Policy header: Unrecognized feature: 'run-ad-auction'. Error with Permissions-Policy header: Unrecognized feature: 'join-ad-interest-group'. Error with Permissions-Policy header: Unrecognized feature: 'private-aggregation'. Error with Permissions-Policy header: Unrecognized feature: 'attribution-reporting'. I noticed it on our site, but this happens even in third-party sites that have an iframe, such as in our Jira.

Join the discussion →

How do I enforce that an LLM only cites chunk IDs from the retrieved set, when the IDs come back as free text?

I'm building a RAG app with LangChain. Retrieval returns a list of chunks, each with an ID such as doc_3. The model answers with citations like [doc_3], but sometimes it cites an ID that was never retrieved. I already check every cited ID against the retrieved list in code and reject unknown IDs. That catches invented IDs, but it does not catch a real ID attached to a claim the chunk does not support, and it fails when the model paraphrases instead of quoting. What is the robust way to close those two gaps in code? Specifically: (1) constrain the model's citation output to an enum of the retri

Join the discussion →

How to get confidence for the user’s audio transcription before the response is generated?

I'm building a phone voice agent with the OpenAI Realtime API (gpt-realtime). On noisy calls it sometimes mishears the caller (e.g. it hears «عندك مطبخ؟» "do you have a kitchen?" when the caller said «عندك مسبح؟» "do you have a pool?") and answers the wrong question. I want to check how confident the transcription of the caller's turn was, and only let the model respond if confidence is high enough. Otherwise I'll play a fixed "could you repeat that?" message. My session config: { "type": "session.update", "session": { "model": "gpt-realtime", "input_audio_transcription": { "model": "gpt-4o-tr

Join the discussion →

Is it impossible to add a second checked bag on a Lufthansa flight ticket that includes a non-Lufthansa leg?

I read on https://www.lufthansa.com/fr/en/common/baggage-conditions.html: Adding additional baggage is not valid for: [...] flights offered or operated by airlines other than the Lufthansa Group. Does that mean it is impossible to add a second checked bag on a Lufthansa flight ticket that includes a non-Lufthansa leg? I am surprised by the blanket restriction so I wonder whether I missed something.

Join the discussion →

API Product Ads de Mercado Libre: error 401 "User does not have permission to write" al pausar/activar anuncios (la lectura funciona)

Estoy integrando la API de Product Ads (Mercado Ads) de Mercado Libre. Puedo leer sin problema (campañas, métricas, estado de los anuncios), pero al pausar o activar un anuncio siempre obtengo un error de permiso. Lo que hago: PUT https://api.mercadolibre.com/marketplace/advertising/MLA/product_ads/ad_groups/{ad_group_id} Headers: Authorization: Bearer <token> api-version: 2 Content-Type: application/json Body: {"status":"paused","campaign_id":123456789} Lo que obtengo: HTTP 401 {"message":"User does not have permission to write.","error":"unauthorized","status":401} (En el endpoint de campaña

Join the discussion →

How do I indicate the weekday for a specific month and year in C++?

I am building a calendar in the terminal using C++ 14, and I want to indicate the week day (Mon - Sun). Basically, the user inputs a month and a year. Example Input: October 2026 What I want is for the program to output the numbers of days associated with the day of the week. Example Output: October 2026 1 Thursday 2 Friday 3 Saturday So far, I am only able to output the days (1 - 31) and input month and year using ctime calendar, but how do I indicate the weekday? I've been looking through the Cppreference, Youtube, and https://www.tutorialspoint.com/c_standard_library/c_function_mktime.htm,

Join the discussion →

How to get (total) delay (in picoseconds) from yosys?

I can get delay (in picoseconds) from benchmark_main: ./bazel-out/k8-opt/bin/xls/dev_tools/benchmark_main --delay_model=asap7 xxx.ir ... Total delay: 9387ps How to get delay (in picoseconds) from yosys? What I tried in .ys file: read_verilog -sv xxx.v hierarchy -top custom_vector_instruction proc; opt; fsm; opt; memory; opt; techmap; opt; # suggested by AI: # -script "+strash; &get -n; &dch -f; &nf -D 500; &ps -m; &put" # -script "+strash; &get -n; &dch -f; &nf -D 500; &if -g -v; &put" # -script "+strash; &get -n; &dch -f; &nf -v -D 500; &put" # -script "+strash; &get -n; &dch -f; &nf -D 500;

Join the discussion →

Why does PowerShell throw error 1053 instantly when launching powershell.exe as a service?

Editor's note, to clarify why this question is programming-related: The premise is an existing PowerShell script that aims to implement a Windows service using the appropriate .NET APIs. However, using the PowerShell CLI (powershell.exe) in the service definition in order to call said script unexpectedly fails, before the script is even invoked, and the question is why. I'm trying to figure out why the service control manager can't launch PowerShell. When I try this with cmd.exe, it works. Of course it throws error 1053 when the process terminates after 10 seconds but that's normal because it'

Join the discussion →

Testing a 2 Component MatMenu Menu/Sub-menu system

I’m using Angular/Material version 22. I’m trying to build a reference application with all of the things I need in an application. I’ve built a menu with the combination of a MatToolbar and a MatMenu in separate components. The menu works as expected. I’m having trouble testing the rendering of sub-menu items in the MatMenu component. The MenuBar (menu-bar) component contains the MatToolbar and renders the horizontal main menu items. // File: menu-bar.ts import {Component} from '@angular/core'; // @Component({ selector: 'app-menu-bar', standalone: false, styles: `.menubar-align-icon { vertica

Join the discussion →

How can a Spring Security OAuth2 failure handler access the token used by the failed request?

My custom OAuth2AuthorizationFailureHandler can load the current cached token, but I need the token used by the request that failed so that invalidation does not remove its replacement. These can differ when a replacement is stored while a request is in flight. In a non-servlet client_credentials application, concurrent callers share an OAuth2ClientHttpRequestInterceptor, a client registration and a principal. The ordering I need to handle is: A resource request is sent with T1. Another caller stores T2 for the same registration/principal while that request is in flight. The request using T1 r

Join the discussion →

How realistic or efficient is a clockwork powered tank?

That topic has been itching me since I introduced a specie of clock powered constructs that started their civilization after being abandoned by their creators. They have the industrial level to make many modern weapons such as tanks and artillery or vehicles, and since their biology lets them "merge" with any machinery by locking their own gears into the machine to control it. And since these creatures are magical, their gears will provide the appropriate power to run it. How weight efficient would those tanks be, and if they would be probably a nightmare to maintain or keep working due to fin

Join the discussion →

Menu bar app not relaunched after a Mac App Store update

I have a macOS app that is only displayed in the menu bar as a MenuBarExtra (SwiftUI), and it's not relaunched after an update from the app store. I've tried some things: LSUIElement is set to true. ProcessInfo.processInfo.disableAutomaticTermination( "Resident menu bar utility" ) ProcessInfo.processInfo.disableSuddenTermination() I checked the macOS logs and found these messages from appstoreagent : App was running before termination (visible=0): 'file:///Applications/ExampleApp.app/' The termination reason reported by runningboardd was: explanation:Installing application update Then, after i

Join the discussion →

Nubra NubraDataSocket: code after keep_running() never executes, and option subscriptions return nothing

Two problems with the realtime feed: socket = websocketdata.NubraDataSocket(client=nubra, on_market_data=on_tick, on_connect=print, on_close=print, on_error=print) socket.connect() socket.subscribe(["NIFTY"], data_type="index", exchange="NSE") socket.subscribe(["NIFTY24JUN23400CE"], data_type="option", exchange="NSE") socket.keep_running() run_strategy_loop() # never reached Index ticks arrive, but the option subscription stays silent, and my strategy loop never starts. I also want to subscribe to several hundred instruments. Is there a limit?

Join the discussion →

らーめん再遊記・第147杯 | ビッコミ(ビッグコミックス)

『ラーメン発見伝』『らーめん才遊記』…日本のラーメンブームを牽引してきた伝説の「ラーメン×ビジネス」漫画、待望の新シリーズ!今度の主人公は…シリーズ屈指の名キャラクター・芹沢達也!歯に衣着せぬその毒舌ぶりと、憎らしいけど天才と言わざるを得ない創作ラーメンの圧倒的カリスマ…その彼が再びラーメン業界に嵐...

Join the discussion →

Is ApplicativeDo with irrefutable pattern matches a performance pitfall?

It is common to write code like data FileHierarchy = FileHierarchy { .. } -- only one constructor getUserAttributes :: IO (String, [Permission]) getCurrentDirectoryInfo :: IO FileHierarchy countUserWritableFiles :: IO Int countUserWritableFiles = do (name, permissions) <- getUserAttributes FileHierarchy{directoryName=dirName, directoryContents=dirConts} <- getCurrentDirectoryInfo return $ length [{- Those of `dirConts` that user `name` is allowed to write with the `permissions` -}] Observe that none of the matched variables are used in a subsequent IO action, so this can be written with only A

Join the discussion →

Does importing modules which are only used for type-checking have any runtime overhead?

At the moment I am excluding all the type-checking imports from runtime as code below but now wondering if this is necessary and whether these actually get compiled into the .pyc and used at runtime anyway? import os interactive_mode: bool = True if os.getenv('PYCHARM_HOSTED') else False if interactive_mode: from typing import Iterator, Any import types from types import FrameLocalsProxyType from wsgiref.types import StartResponse Does Python type hint (annotations) cause some run-time effects? doesn't really answer the question; it is about the annotations, not the imports. The root question

Join the discussion →
Older stories