on-internet

How to sleep comfortable at airport?

I have a layover at Dublin airport and because I will be reaching midnight I believe it will be cold and many shops closed or all of them. I am carrying an under seat bag. What is best way to have a sleep/nap? What should I carry/buy? Edit: The layover is for 13 hours.

Join the discussion →

Pra duvida de contagem de vogais vi muitas perguntas [fechada]

nome = "paralalepipedo" contador = 0 v = [] for vogais in nome.lower(): if vogais in "aeiouãéêáàíìóôòúùü": contador+=1 v.append(vogais) for letra in "aeiouãéêáàíìóôòúùü": print(letra, "=", v.count(letra), " ", end="") print("\r\n") print(f"A palavra {nome} tem {contador} vogais", ", ".join(v))

Join the discussion →

How can I check whether a lazy import has executed in Python 3.15 without triggering it?

I'm testing the new lazy imports in Python 3.15. I have a module called example.py: print("Module executed") value = 42 And this code in main.py: lazy import example print("Checking module") print(hasattr(example, "value")) print(example.value) I want to check whether the module has already been executed without causing it to execute. The problem is that hasattr() accesses the module's attributes, which appears to trigger the lazy import. I also considered checking sys.modules: import sys lazy import example print("example" in sys.modules) But I'm not sure whether this is a reliable way to che

Join the discussion →

How do I prompt for a file without uploading it in HTML

I have some legacy HTML code (actually created by a Python script) that I am maintaining that prompts the user to enter various fields in a table. Then, upon Submit, those fields are written to a MongoDB database. One of the fields is a file name. The file name entry field uses an input type="file". When the data (file name) is pulled from the form, the file starts uploading. I don't need the file, just the file name. Some of the files selected are many gigabytes long and with a slow server connection, cause the page to hang for several minutes until finished. How do I prompt for a file withou

Join the discussion →

Handling cache invalidation while a shared in-flight task is still running

I'm experimenting with an async cache where multiple callers requesting the same key share one running task. Most things seem to work fine, but I'm not sure how to handle it when a key gets invalidated before the original fetch has finished. Here's a simplified version of what I'm working with: import asyncio cache = {} pending = {} versions = {} async def fetch(key, version): await asyncio.sleep(1 if version == 0 else 0.2) return f"{key}-v{version}" async def get_data(key): version = versions.get(key, 0) if key in cache: return cache[key] if key not in pending: pending[key] = asyncio.create_t

Join the discussion →

Can flight attendants legally block me in economy class, from assisting my disabled mom in business class?

To make flying comfortable for my handicapped mom and dad, I always buy them business class. As I can't afford business class for 3 people, I sit in economy. I am my mom's primary caretaker. My mom depends on me to inject her prescription medications. During all our flights, I always get up from my economy class seat, walk up to business class a few times to tend to my mom, inject her meds, and assist her such as the lavatory. This has never raised an issue. Nobody bats an eye to this, probably as "airlines operating in Canada must accommodate passengers with disabilities to eliminate undue ob

Join the discussion →

How can I ensure anonymity in my system while storing logs? [fechada]

I am developing software to assess and measure satisfaction within an educational system, which includes an open-ended text field. Our core principle is to ensure student anonymity so that they do not fear any form of reprisal. The issue is that some malicious users are submitting messages of a criminal nature through this text field. How can I guarantee anonymity while simultaneously maintaining logs that would allow for reports to be filed with law enforcement authorities?

Join the discussion →

How to fix character falling through the floor and collider in Unity

My character keeps falling through the floor. I thought it was my collider and I think I am right. However, I don't know how to fix it because my collider is not even on my character, its so far off. I have tried to get rid of it and re-add it, but that didn't work. My collider is in the sky and far away from the actual character model. When I hit play the character falls through the floor until the collider hits the actual terrain. I don't think its caused by anything in my code. But i do have a movement script, and a look script. A screenshot of my character through the floor, and the collid

Join the discussion →

How would power-hungry implants be powered long term?

I have a world somewhat similar to cyberpunk 2077 in terms of implant tech: advanced sense augmentation, computational brain implants, weapons in arms, etc. However it is attempting to be somewhat more realistic, and so they do need (sometimes significant) power. Batteries charged at home or in public places might be ok for average people with non-essential implants, but for soldiers with artificial hearts or people with livers replaced with dialysis machines there would need to be some way to harvest energy from the human body. The only sources I could find here are bio-enzymatic fuel cells a

Join the discussion →

How can I colour the menubar background in iPadOS 27 or else make its background transparent?

Screenshot 1: Screenshot 2: On iPadOS 27.2 (& Xcode 27.2), Apple's apps in full screen have a menubar that appears integrated into the app - for example, in Notes or Mail, the colour of the sidebar continues to the very top of the screen whether the menubar is visible or not. My SwiftUI app in full screen has a coloured sidebar but its colour stops at the menubar which always appears as a white strip across the full width of the screen. It's also odd, and surely relevant, that if my app is not full screen, then a thin white strip appears along the entire width of the top edge of my app's windo

Join the discussion →

AI駆動文章作成において俺が意識しているテクニック集

はじめに 私は基本的に、「誰もわたしが書いた文章なんて読みたくない」と思っています。 みんな忙しいんです。そんな中であなたが文章を書いて、誰かがそれを読むということは、双方に何かしらの目的があるんだと思います。 しかも今は AI のおかげで、文章は一瞬でいくらでも書けるようになりました。結果として、仕事の中でも外でも AI が生成した文章が溢れかえっています。AI に書かせた長文を「で、何が言いたいの?」と思いながらスクロールした経験ってありませんか。 わたしはあります。 だからこそ、みんな忙しい中でどうやって読んでもらうか? を考えるテクニックが大事になると思います。この記事では...

Join the discussion →

Dividir datos en dos columnas

Estoy un poco atascada en un ejercicio de formularios, ya que estoy intentando aplicar CSS para crear dos columnas pero no lo consigo. <div class="container"> <div class="containerTitle"> <h1>Hotel Costa Azul</h1> <p>Solicitud de reserva</p> </div> <div class="form"> <form action="#" method="POST" enctype="application/x-www-form-urlencoded"> <div class="data"> <fieldset > <legend>Datos personales</legend> <div id="name" class="column"> <label for="name" class="label_data">Nombre* </label> <input name="name" class="input_data" type="text" required> </div> <div id="surname" class="column"> <labe

Join the discussion →

Angular library for room reservation [closed]

I've an Angular/Node.js. I would like to implement an application to give my coworker the ability to book a work room. I would like the possibility to display all the room availabilities for each day and to have to possibility to book a room for an hour, more, to be able to repeat for a time period. How to do that and with which component?

Join the discussion →

.NET にも build.cs 欲しいんじゃーーー

某 NIKKE のゲームランチャーが攻撃されるインシデントが発生しました。 協力会社(出資元?)が CDN として使っていたドメインが期限切れになり、一部のスクリプトが改ざんされたことが原因だそうです。 動的データは開発体験を上げるが・・・ いわゆる RemoteConfig 等のゲームに関連するもの「ではなく」 常に最新版をサーバーから引っ張ってくれば楽できて開発体験が上がる によって問題が起きたように見えます。 私も広く公開していないアプリで「最新版を常に GitHub.com から取得」をランタイム時に実行しているので、低リスクとは言え他人事ではないな、と。 初期の開発体...

Join the discussion →

Logical way of hospital discovering infant abduction case of a teenager

A trope I've seen before in stories is of someone who got kidnapped as a child and raised as the child of the kidnapper, without knowing of this, only to find out as a teenager/adult. In this case the situation I'm working with is that the child as a teenager ends up in the hospital, where somehow it's found out the person they assume is their mother isn't actually related to them. However, I don't know if there are any sort of routine medical tests that would actually discover a lack of biological relation, or if there are specific medical situations (injuries or illnesses) which involve stan

Join the discussion →

国際基督教大学(ICU)出身者を好きになれない理由|水風呂

のっけからヘイトを炸裂させてしまっている。 これまでに出会った国際基督教大学(ICU)出身者に、どうにも苦手な人が多かった。 筆者と同じようなモヤモヤを誰かがすでに吐き出していれば、それを読んで溜飲を下げようと思い、いろいろ検索してみた。しかし意外と見当たらない。 仕方がないので、自分で気が済むまで悪...

Join the discussion →

Slurm は Kaggle で役に立つ

1. はじめに Slurm は、スパコンや研究室の GPU クラスタでよく使われるジョブスケジューラです。投入されたジョブをキューに並べておいて、CPU・メモリ・GPU が空いたものから順に実行してくれます。 「大きなクラスタのための道具でしょ?」という印象がありますが、実は自宅の GPU 1 枚で Kaggle をするときにも、めちゃくちゃ役に立ちました!Kaggle の RSNA Knee Abnormality Detection(膝 MRI の異常検出)に RTX 3090 1 枚で参加したとき、学習ジョブの管理に Slurm を使っていたんです。41 日間で、RSNA の学...

Join the discussion →
Older stories