Quando o usuário efetuar o LOGIN o Sistema Autentica e Disponibiliza para todo o sistema, como faço para capturar o idUsuario de cada usuário logado no sistema ? Servlet - Autenticação Usuário public class AuthControlador extends HttpServlet { //Identificador único de versão em classes Java private static final long serialVersionUID = 1L; private UserDAO authDao = new UserDAO(); private final String PagLogar = "login.jsp"; private final String PagHome = "home.jsp"; protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { res
Is it possible to use ast to parse a single line so that an ast.Name node can be identified and modified? At the moment this falls over when there is white-space at the beginning of the line. Obviously I could strip this out, modify the AST and then add it back in again but is there a better, more "Pythonic" way of doing this? Example2 below shows how ast.parse(..., mode='single') doesn't appear to work correctly, or at least not as expected. Couldn't find much documentation explaining how it is supposed to work though. import ast line = " x = 1; # test comment" ast_tree = ast.parse(line) modi
I'm trying to compare words present within sentences in one column, to the first n words in a wordlist (in another column), and return the words in the sentences that don't exist in that subset of the wordlist (to a new column). The "n" amount should be dynamically determined by the index of the sentence being currently compared. More specifically, n should be determined by the index position of the sentence divided by some scaling factor as follows: n = index/scaling_factor Rounded down to the nearest integer, so that it is a valid index position: n = math.floor(index/scaling_factor) In the e
Le Capitole du Libre est un week-end dédié au Logiciel Libre et à la culture libre en Occitanie. Cette année, la treizième édition se tiendra les samedi 14 et dimanche 15 novembre 2026 à l’INP-N7 en centre‐ville de Toulouse. lien nᵒ 1 : Site web du Capitole du Libre lien nᵒ 2 : Le programme du week-end lien nᵒ 3 : Inscription (gratuite) au Capitole du Libre 2026 lien nᵒ 4 : Vidéos des années précédentes lien nᵒ 5 : Article de la presse locale sur l'édition 2025 Comme chaque année, Toulouse va connaitre les 14 et 15 novembre un week-end placé sous le signe du partage communautaire, autour du nu
Years ago (2015-2020) I created a few hobby projects. The setup was extremely simple via: tiangolo/uwsgi-nginx-flask:latest docker image, a slim docker image with a production ready webserver simple requirements from /app/requirements.txt which were installed via pip in the Docker file a prestart.sh which did some flask database migrations if necessary It was of good performance due to having nginx. I had an ansible script which build the docker image, made a local tarbar with docke save, send it over to my VPS and ran the image at specified domain. With Traefik, I could ran dozens of projects
Beaucoup de Rust par-ci… Un peu de Go par-là… Saupoudrez de LLM selon vos goûts et vous aurez une bonne photographie des sujets qui préoccupent les développeurs sur l'Internet d'aujourd'hui. Alors, n'est-ce pas le meilleur moment pour se rafraîchir l'esprit avec des langages plus discrets ? Je vous propose ici une présentation accélérée d'Elixir. lien nᵒ 1 : Site officiel du langage Elixir Sommaire Un langage de programmation fonctionnelle Correspondance de motifs (ou Pattern matching) Module, fonctions et clauses de garde Listes et récursivité L'opérateur pipe L'exercice sympa qui utilise tou
I have this generic class: class Box[T]: def __init__(self, val: T): self.val = val In Python < 3.12, that would be written: from typing import TypeVar, Generic T = TypeVar('T') class Box(Generic[T]): def __init__(self, val: T): self.val = val According to the docs, I can instantiate it like this: box = Box[int](42) However, I don't understand why this even works. If I print the type of Box[int]: klass = Box[int] print(type(klass)) # <class 'typing._GenericAlias'> According to the docs and this Q&A, a generic alias is supposed to represent a type annotation by storing the original type and typ
I have this generic class in Python 3.12: class Box[T]: def __init__(self, val: T): self.val = val I can instantiate it in 3 ways: box: Box[int] = Box(42) box = Box[int](42) box = Box(42) What's the difference? Do different type checkers (pyright, pyrefly, etc) interpret them differently? How about in legacy Python (<3.12), where the example would be: from typing import TypeVar, Generic T = TypeVar('T') class Box(Generic[T]): def __init__(self, val: T): self.val = val
Device Hub for Xcode 27.2 includes simulator for iPhone Duo running iOS 27.2. The controls for the simulator have obvious settings to open the display showing the inner screen, or closing the display to show the outer screen. It also includes controls for rotating the device. When open and showing the inner screen a rotation will change the orientation between portrait, landscape, etc. These various combinations are known as poses. However there is an additional pose Apple tells us about called Tent mode or Stand by mode (the second of the above images). In this case the phone is half opened a
Device Hub for Xcode 27.2 includes simulator for iPhone Duo running iOS 27.2. The controls for the simulator have obvious settings to open the display showing the inner screen, or closing the display to show the outer screen. It also includes controls for rotating the device. When open and showing the inner screen a rotation will change the orientation between portrait, landscape, etc. These various combinations are known as poses. However there is an additional pose Apple tells us about called "Tent mode" or "Stand by mode" (the second of the above images). In this case the phone is half open
I'm writing some code that I want to make use of lazy imports, which were introduced in Python 3.15. However, I want the code to run fine on Python < 3.15 too, albeit without lazy imports. Just running the following code would raise a SyntaxError on previous Python versions: lazy import numpy as np I tried using a conditional: import sys if sys.version_info >= (3, 15): lazy import numpy as np else: import numpy as np But it still raises a syntax error on Python 3.10. And it would be cumbersome anyway to have to write that in every file.
I have a MAUI app running on .NET 8. The app is a Windows-only app. I have Microsoft.Maui.Essentials version 8.0.100, and it appears to be the latest version for .NET 8 at the moment. It has a button for uploading files: <ImageButton Command="{Binding GetFilesCommand}" HeightRequest="90" HorizontalOptions="Start" Source="Assets/icon-add-pink.png" /> In the ViewModel, I have this line in the constructor: GetFilesCommand = new Command(async () => await GetFilesCommandAsync()); This is the command method: private async Task GetFilesCommandAsync() { try { IEnumerable<FileResult> file = await FileP
I have individuals (birds) who are identified via a 3-letter system, e.g. BBO, BOB, PPG, PGP, etc. The order in the code corresponds to the position on the individual, e.g. BOB has Blue on its head, Orange on its cheek, and Blue on its neck. I want to create a data frame that takes the individual ID code and populates "head", "cheek", and "neck" columns with the colors like below: bird <- c("BOB", "OOP", "GBG") head <- c("blue", "orange", "green") cheek <- c("orange", "orange", "blue") neck <- c("blue", "purple", "green") power <- c(1, 2, 3) data <- data.frame(ID = bird, Head = head, Cheek = c
My visa was approved from Sweden embassy in India. I will enter Sweden via connecting flight from Zurich. So I will have visa control or border control check at Zurich correct? 2nd Question - Since Zurich will be transit only, main entry will be in Sweden, so I hope that fulfills entry criteria for visa issuing country. 3rd Question- In original itinerary submitted for visa , we had 8 nights in Sweden and 6 nights in Finland. Now itinerary is being changed so it would be 6 nights in Sweden and 6 nights in Finland while arrival and departure will happen from Sweden. So wanted to check if it wil
Estou lendo sobre headers X-Forwarded-* e tentando entender o que são esses headers deste tipo X-Forwarded-<example> e qual a relação esses headers tem com uma requisição HTTP e qual seria a finalidade deles para minha aplicação no servidor. Entretanto, não consigo visualizar na minha mente sua finalidade. Identifiquei que existem alguns headers X-Forwarded-For, X-Forwarded-Proto, X-Forwarded-Host, X-Forwarded-Port, X-Forwarded-Prefix, X-Forwarded-Server, X-Forwarded-Ssl mas não achei um "padrão" e também não sei dizer se poderia existir um header customizado como X-Forwarded-Custom e qual ser
One of my aunt got settled status as her husband is a Portguese national. They want to travel to Pakistan from UK via Qatar or Etihad Airways. My question is what is she entitled to as a settle status. The BRP is expired as renewal stopped a long timr back.
Joyeux anniversaire Emacs ! Comme Slashdot l’a opportunément relevé, ce bel éditeur a maintenant un demi-siècle, ce qui semble complètement dingue. J’avais déjà clamé mon admiration ici il y a quelques années, alors c’est l’occasion de revenir sur ce beau morceau de logiciel, qui ne fait pas son âge (comme moi, donc), et sur ce qu’on peut encore faire avec aujourd’hui. Il a eu une vie un poil mouvementée, né à partir de TECO, réécrit complètement par Richard Stallman pour devenir GNU Emacs, forké vers XEmacs… On pourra bien entendu rappeler les innombrables flame wars avec Vim, les aphorismes
submitted by thymos to books 14 points | 0 comments https://www.hebban.nl/heelnederlandleest Vanaf vandaag is het boek Het diner van Herman Koch gratis verkrijgbaar in alle openbare bibliotheken in Nederland als onderdeel van de campagne Heel Nederland Leest. Today, the CPNB (Collective Promotion for the Dutch Book) has started their annual campaign to promote reading called Heel Nederland Leest, or One Book, One Country. Every year they publish one book that they distribute freely in public libraries, and this year it’s The Dinner by Herman Koch.
According to Wikipedia: Python 3.0 was released on 3 December 2008, and was a major revision and not completely backward-compatible with earlier versions, with some new semantics and changed syntax. What does that actually mean? Was it just the syntax which has changed, for example: print vs. print(), so that you can get an old Python 2 script running with some modifications? Or was there something deeper? Because of the usage of Unicode, etc.
Within my setting (suppose near-ish future), antibiotic resistant bacteria have become the new norm, with almost all currently available antibiotics being ineffective at dispatching infections. Due to this, bacteriophages are used to treat bacterial infections instead. I am curious if there is any way to prevent the bacteriophages from undergoing natural selection, or just naturally occurring mutations in general as to avoid them perhaps beginning to hunt the bacterial strains humans need to live. How could this be achieved, disregarding any technological constraints?
submitted by misericordiae to books 35 points | 20 comments Hey everyone, we’re now halfway through our third annual community book bingo challenge! What is book bingo, you ask? Basically, read something for each of five squares in a line on this year’s card, and you’re done! (That’s five works total, or more if you want to.) You don’t even have read books: any type or length of literary work, including comics, audiobooks, poems, short-form nonfiction, etc., will do. There’s still plenty of time (six whole months, in fact). Plus, anything you’ve read since May is eligible, so if you haven’t jo
I'm making a grid based game in c++ with SDL3. My rooms are a 2D array of Tile objects stored in an array in DungeonCrawler (think of dungeoncrawler as my game settings .cpp and .h). I have a GetNeighbour() function that returns a pointer to a tile's neigbour depending on its direction (an enum of north, south, east and west, or null if it's at the edge of the room). Instead of calling GetNeighbour() every time I need a tile to know its neighbour, I want to loop over all the tiles once and cache their neighbours so an individual tile can later easily access its neighbour. I've started the cach