I am using PolarSearch and want to run a k-NN vector search with a filter. The index is built as follow. PUT test_index { "settings": { "index": { "knn": true } }, "mappings": { "properties": { "category": { "type": "text" }, "embedding": { "type": "knn_vector", "dimension": 2, "method": { "name": "hnsw", "engine": "faiss", "space_type": "l2" } } } } } After that, I wrote one document: PUT /test_index/_doc/1 { "category": "Soft Drink", "embedding": [1.0, 1.0] } The following query is normal and returns the data I have added: POST /test_index/_search { "size": 2, "query": { "knn": { "embedding"
How do I use enum to pass-in a position 1D array and output a preset position name (e.g. 1, 4 returns Town)? How can I smoothly set these values to my location names? How I'm doing it: public static String check(int x, int y){ if (x == 0 && y == 0){ //1,1 return "Home"; } else if ((x == 1 && y == 1) || //2,2 (x == 0 && y == 5) || //1,6 (x == 5 && y == 6)){ //6,7 return "Lake"; } else if ((x == 4 && y == 0) || //5,1 (x == 5 && y == 1) || //6,2 (x == 6 && y == 2) || //7,3 (x == 7 && y == 2)){ //8,3 return "River"; } else if ((x == 3 && y == 0) || //4,1 (x == 4 && y == 1) || //5,2 (x == 6 && y ==
I have a world building thing set on a tidally locked planet with sulfuric acid oceans and organisms that use it as a solvent. I was planning to have them be carbon based just because I didn't have a reason to do anything else. However while researching how that would affect their development, nothing was very helpful because everyone made the assumption they were silicon based as well. Is that just because they wanted to do that? Or is carbon/sulfuric acid based life unviable for some reason (I honestly barely know any chemistry so I really don't know, I just did this for vibes before worryin
I'm migrating a (.NET 10) project from CsvHelper 33.1 to 34.0. Using the migration guide I've updated a CSV-specific class, that's used only for writing a CSV file, from the following: public class CsvTargetFrameworkResult(TargetFrameworkResult targetFrameworkResult) { public string? ProjectName { get; set; } = targetFrameworkResult.Project?.Name; public string? RepositoryName { get; set; } = targetFrameworkResult.Repository?.Name; public string? Path { get; set; } = targetFrameworkResult.Path; public string Version { get; set; } = string.Join(';', targetFrameworkResult.TargetFrameworks); } to
I have been working on an ASP.NET Core MVC web app project based on the Visual Studio project template (.NET 10.0.403 latest version I am using. Did not start with this. I can look back to see what version I started with, but might not be the case for now). I have come across Blazor components and I would like to use just a few for specific functionality. To be more specific, I am currently trying to render Login functionality done with Microsoft Identity taken and customized from a Blazor web app template project. I have successfully rendered the component into its corresponding view, but I a
submitted by RotemT to science 80 points | 4 comments cross-posted from: lemmus.org/post/26646894 a website to help students visualize the electromagnetic field I’ve been building this simulator as a side project aimed to help students understand and visualize electromagnetic phenomena such as radiation, near field effects, polarization, wave interference and diffraction. You can: place multiple, diffrent radiation sources and set their parameters (geometery, amplitude, phase and more) place perefect wire conductors, PEC plane and poke slots in the plane to create diffraction patterns observe
submitted by dresden to books 52 points | 70 comments Didn’t get time to read anything this week. What about all of you? What have you all been reading or listening to lately? Book Bingo midpoint is also up, check it out!
I have a pivot table with a date field as a filter. I want to filter the date for a specific range specified by the user. I found this code: VBA Pivot Filter - Date Range and I am trying to recreate the method, but I'm not getting results. My pivot is based on a merge query that I loaded into the data model, and then I created the pivot from the data model. In the code below, .ClearAllFilters works, but PivotItems.Count returns 0, and I get an error when trying to return PivotItems(1). The error is: Unable to get the Item property of the PivotItems class. If I view locals and try to click on t
I am trying to save an entity consumed inside a queue using rabbit mq. I have encountered some problems. First of all : The consumed event will give me an entity which already has an id. My user entity has an automatic generation ID annotation on UUID id attribute. How should I approach this? For example I know I could implement Persistable interface, but won't this have compatibility issues with the already implemented methods which depend on that automatic id generation? Second: How do you check correctly if the toPersist entity was actually saved in db ? I used a try catch but I found out I
I am wondering whether it is possible to change the font size of the content within the Agent panel in Android Studio (only that panel). I tried the accessibility settings, but the font size changes for all elements.
How can I implement centralized role-based access control for multiple Django REST Framework API endpoints without adding permission checks individually to every API view? @extend_schema(tags=[schema.LOCATION]) class LocationViewSet(mixins.ListModelMixin, mixins.CreateModelMixin, mixins.RetrieveModelMixin, mixins.UpdateModelMixin, mixins.DestroyModelMixin, UtilGenericViewSet): ''' LocationList pagination, search, filter, order ''' model = Location queryset = Location.objects.all() filterset_class = LocationListFilter permission_classes = (IsAdminPermission,)
I'm using OOP to code my pygame visual novel project for school, but i've run into a problem where my code is working but it's not doing what i want it to do, which is to display a background illustration. right now the display surface is just a black screen but its supposed to display a file called loveiscruel_illust//backgrounds//titlescreen.jpeg. When trying to solve this by myself, i changed some things based on solutions to similar issues that i found, but it wasn't enough to make it work properly, and i'm just stuck. Is there any way i can correct this?. code for class: class illust: def
I’m considering booking this itinerary from Seattle to Munich: SEA → SFO: 15:30–17:43, United Airlines (UA 2478) Connection at SFO: 2 hours 22 minutes SFO → MUC: 20:05–16:10 (+1 day), Lufthansa (LH 459) The itinerary specifically mentions a terminal change at SFO. I’d really appreciate some advice from people familiar with SFO. How does the terminal change actually work in this case? Do I need to leave the secure/airport area, go outside, and take a bus or AirTrain to another terminal, or can I simply transfer inside the airport by walking between the terminals without having to exit and go th
I am working through some React internals and here in "Suspense with Transitions" states when Suspense would show fallback and when it would not. I could read this: When a render suspends, React asks one question: "Would showing the fallback HIDE content the user can already see?" Then it applies the rule: Yes, it would hide existing content, and this update is a transition (or a retry of one) → React does not commit the fallback. It keeps the current screen fully alive and lets the new render finish in the background. The user sees the old UI until the new UI is completely ready. No existing
Body Environment: Flutter Version: [e.g., Flutter 3.19.0 / 3.47.9] Dart Version: [e.g., Dart 3.3.0] Target Platforms: [e.g., Web, Windows Desktop, Android] (Multi-platform / responsive layout) Description I am encountering an issue where typing into my search bar TextField either lags heavily or the typed characters do not appear at all. In my code, I have a responsive search bar that handles filter dropdown states (_isFilterDropdownOpen), custom border radii that change dynamically, and a search controller binding. When typing rapidly or interacting with the search field, the characters fail
submitted by gedaliyah to science 177 points | 11 comments https://www.sciencedaily.com/releases/2026/10/261031221211.htm Quark–gluon plasma (QGP) is an unusual state of matter that appears under tremendous pressure and heat. At temperatures exceeding 100,000 times those at the Sun’s center, particles such as protons and neutrons can no longer maintain their normal structure. Instead, they break apart into quarks and the gluons that ordinarily bind them together. Physicists believe that this was the state of matter throughout the universe during the first millionths of a second after the Big B
Scenario: At long last in the near future astronomers using the Vera Rubin Observatory have finally detected the elusive Planet Nine/Ten/[insert number]*. However, for the purposes of the story, either its existence or nature needs to be kept secret by the discovery team. After reading this question, I like the idea of somehow disguising the identity of a planet or dwarf planet. My question is: is it possible to cover up the existence of such a planet from the public for a target located within the Solar System, and if so, for how long and how would it be accomplished logistically? *This story
I'm attempting to connect a local Python application to a Google Workspace mailbox using an internal Web application OAuth client, authorization-code flow with PKCE, and a loopback callback. Consent succeeds and the callback receives a code, but POST https://oauth2.googleapis.com/token returns HTTP 401 with invalid_client. This occurs before ID-token verification or refresh-token storage. Below is a reduced version of the token request from my application. The command-line prompts replace the application's runtime values and Keychain lookup. To use it, the code and PKCE verifier must come from
A character I'm writing was once poisoned and, as a result, a chunk of their hair changed colour. Specifically, after unknowingly ingesting a poisoned drink, they were left in shock, probably feverish and shaking. They did not die, since they realised their drink had been poisoned midway through drinking it, thus they didn't ingest a lethal amount of poison. However, I would like to know in what ways such an event could affect their hair colour in this way. Since the character belongs to a race of mostly white-haired individuals, I immediately thought that inverting the phenomenon of sudden ha
I'm getting started working with "modules (since C++20)" and before to start with a whole new project based on modules, I've been making some testing with free C++ files (.cpp and .cppm, but also with .ixx, cxx), compiling with a terminal command (without CMake). So, in any folder with multiple C++ files, specifying the corresponding files, for example: g++ -std=c++23 -fmodules main.cpp module_1.cppm -o main && ./main g++ -std=c++26 -fmodules main.cpp module_1.cppm -o main && ./main For now, the compilation seems to be working as should, from the main(), calling a function in a module file "mo
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