we are using the Apollo client to generate our data classes in Kotlin. Our classes, e.g. Car and Person have a property MetaData that looks exactly the same for both classes. The client now generates two classes, MetaData for Car, and MetaData1 for Person. Can I take influence on the naming or even force Car and Person to refer the same MetaData class? Thanks in advance.
I am wondering if you can use PHP for form handling in Astro? The only resource I could find for form handling in Astro is an example from their reference page, where they build a registration form But is it possible to use php to let the form send an email to me instead? How would I have to implement that?
I am trying to write an sphinx-gallery example for a module that uses sympy. I cannot find a way to get the output formatted like math. For example, in jupyter notebooks, the output of a sympy expression is rendered in mathmode. In an example rendered with sphinx using sphinx-gallery, just the string is shown. I tried using the functions in sympy.printing.mathml and monkey patching the expressions to show, e.g. #%% # Should show this # # .. math:: # \dot{x} = x y^2 - \frac{\sqrt{x}}{y} # from sympy.printing.mathml import mathml from sympy.core.evalf import EvalfMixin def print_html(expr): retu
I'm working on a Flutter application and I'm interested in implementing an over-the-air (OTA) update feature similar to the one used in Blinkit. My goal is to allow users to receive and install updates seamlessly without needing to go through the app store. I've researched various resources and documentation related to OTA updates in Flutter, but I'm looking for more specific guidance on how to implement this feature efficiently and securely. Shorebird is also available but it is chargeable looking for free one. Here are some questions I have: What are the best practices for integrating OTA up
Consider a bucket array containing sorted and/or empty buckets, and the goal is to extract the longest possible sequence in sorted order, under the following conditions: Only one element in each bucket can be used per construction, and the same element cannot be reused if encountered in another bucket. Buckets cannot be rearranged, reordered, or repositioned, and must be treated incidentally in the provided order. Empty buckets can be skipped. This is a problem that was formulated in the middle of solving a different problem with an entirely different objective. I have decided to call this Lon
I want to measure the energy consumption of a python code which is running on a traditional cpu. For example, the code is a = np.random.randn(1000, 1000) b = np.random.randn(1000, 1000) # this is the code I want to measure: c = a @ b I wonder if there is a method that can tell me the duration and energy consumption of c = a @ b, such as duration = 2ms and energy consumption = 1.38mJ. I have tried a tool called pyJoules as below, it says it can measure the energy footprint of python code: from pyJoules.energy_meter import measure_energy import numpy as np x = np.random.randn(1000, 1000) y = np.
I've created a simple scorecard app, that sums users scores while they're playing games (card games, golf etc). I've added in the ability to share the result of their game to WhatsApp and I'd like it to appear a bit like a table, with the player name and then the player score, each player on a new line. I'm trying to make the scores line up vertically, which is challenging given the player names will differ in length. I did this successfully in my IDE on my laptop by working out the length of the longest name and adding the correct amount of whitespace to the shorter names. This prints out to
I am trying to model a closed kinematic chain in Simulink, and I get problems with having a meaningful initialization. MATLAB ignores the joint limits for some joints. What I have done I imported a URDF (which itself doesn't close the chain) and added a bushing joint to close the chain at the required point. There are 5 links, but only three of them are independent (and actuated), thus I have set a position target for those with high priority (to set the desired initial conditions). In the bushing joint, for all the DOFs I want to constrain, I have set a position target of zero with low priori
This is what I tried. Content is in markdown but I don't have the page by page separation. On the other hand if I go into the pages attribute, there is no markdown. document_intelligence_client = DocumentIntelligenceClient(endpoint=endpoint, credential=AzureKeyCredential(key)) poller = document_intelligence_client.begin_analyze_document( "prebuilt-layout", analyze_request=AnalyzeDocumentRequest(base64_source=doc_bytes), output_content_format=ContentFormat.MARKDOWN ) As mentioned above. I also tried with the "pages" attribute - document_intelligence_client = DocumentIntelligenceClient(endpoint=
I'm trying to hide a file called "hello_world.pdf" inside of an image file "kitten.png". The code I'm using is: original_image_file = File.read("kitten.png") hidden_file = File.read("hello_world.pdf") output_file = "output.png" separator = "*----------[#{hidden_file}]----------*" output = [original_image_file, separator, hidden_file] File.open(output_file,'wb') do |f_out| output.each do |f| f_out.puts f end end I'm supposed to be able to click on output.png and see the original image (kitten.png), but then if I change the file extension to .pdf and click on output.pdf, it's supposed to show me
I have a graphql controller in a reactive application using Webflux. The graphql controller is working fine, but I need to add standard cursor pagination as indicated here: https://graphql.org/learn/pagination/#slicing After reading spring graphql 1.2.6 documentation: https://docs.spring.io/spring-graphql/reference/controllers.html#controllers.schema-mapping.subrange I updated my springboot version to 3.2.4, and I worked my way through the necessary modifications. I modified my root query from: users(count: Int, offset: Int, companyId: ID): [User]! to: users(first:Int, after:String, last:Int,
I have this input with CRLF line endings: 1019 1020 1028 1021 I want to remove CRLF at end of each lines using sed, (or awk) from Gnuwin32 using a Windows 10 batch script, (not Powershell). I want to get the following result inside a text file, without any semicolon or CRLF at the end: 1019;1020;1028;1021 It doesn't work with the following lines in the batch file, (it seems there is a problem with GNUwin32 sed that adds new CRLF at end of each processed line): REM This to generate the input example : (echo 1019& echo 1020& echo 1028& echo 1021) > test_in.txt REM This is the first try for getti
I am working on a Laravel project with vanilla Blade templates, jQuery & Bootstrap. After the recent update, I am no longer getting CSS class auto-completions for Bootstrap in my Blade view: I have tried the following: Invalidate the cache Reset the .idea folder (fresh import) Marked the resource root folder correctly Checked to see if power save mode is disabled Tried installing the Laravel plugin The CSS files are brought into my view/layout using the Laravel's asset() helper like this: <link href="{{ asset('plugins/bootstrap/css/bootstrap.min.css') }}" rel="stylesheet" /> <link href="{{ ass
const version = indexHtml.match(/manifest-([\d.]+).json/)[1]; ^ TypeError: Cannot read properties of null (reading '1') at LocalWebCache.persist (/Users/abc/Desktop/haba/node_modules/whatsapp-web.js/src/webCache/LocalWebCache.js:29:69) at /Users/abc/Desktop/haba/node_modules/whatsapp-web.js/src/Client.js:744:36 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) Node.js v20.11.1 once the code is run the second time, it always brings this error. i was using nodemon so I did: npx nodemon index.js smooth running
My mom arrived to the U.S. today on a B1/B2 visa. At the airport the CBP officer chided her for spending a lot of time in the US in the past 12 months (though never in excess of official limits) and told her she must leave the U.S. within 30 days. However when I checked her I-94 it showed the expected 6 months, with an Admit Until date of October 1st. Her passport was not stamped so that’s the only date we can cross check. Is there a provision in U.S. immigration law for a CBP officer to verbally require a shorter length of stay? Or can this verbal warning be safely ignored and one should just
I am sure would like to see the if-then-else-endif sections connected by line id. I.e., if xxx; B01 endif; E01 I am not sure what to try. Is there an extension or a setting to make this appear? Sure it would be helpful to see the connectivity between if/endif sections. I believe RDi has this.
I have developed a chatbot using Azure OpenAI ChatGPT as LLM and AWS as the cloud provider for hosting the entire application, more details can be consulted in the image below. Now, as the topology of my chatbot is a RAG (Retrieval Augmented Generation), the maximum amount of tokens per minute (80K tokens per minute) is easily reached when I have 6 or 7 users using the chatbot in parallel, this because due to the RAG topology, each input prompt of each user is always around 10K tokens. Architecture: As you can see from the image above, it is a multicloud architecture, indeed, the infrastructur
I've inherited a large data science workflow (in python) that uses many functions scattered across many modules. Luckily for me, around 50% of these functions already have pytest coverage and make use of a conftest.py file which sets up tons of fixtures and mock objects for testing (dfs, dicts, lists, etc. with fake data). I'm responsible for creating the other 50% of tests. However, most fixtures call a maze of other fixtures from within conftest or functions/classes from internal modules, and I'm having a very hard time reverse engineering a given fixture to see how it interacts with the oth
I need the bot to understand that they left a reaction in the post and display in the console what type of reaction they gave, for example, heart, like, dislike, and I need this to work through the telebot library in python, please help, I don’t understand at all how this can be done. I tried to read data from a message, something like "message.reaction", but I got an error saying that there is no "reaction". import telebot bot = telebot.TeleBot('token') @bot.message_handler(func=lambda message: True) def handle_reaction(message): print(message.reaction) bot.polling() AttributeError: 'Message'
Previously I installed Chrome driver version 103.0.5060.53 on the conda virtual environment but now Chrome is updated with the newer Version 123.0.6312.86 so the script is not working I want to update new stable Chrome driver version 123.0.6312.86. Can anyone please guide me, How I can install the new Chrome driver version on my virtual environment? I am getting the following errors: selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 103 Current browser version is 123.0.6312.86 with binary path C:\Progr
I recently encountered a problem while learning about iterators. I attempted to convert a list of numbers into a Vec, but when I changed the type to HashMap, no error occurred. For example: type Test = Vec<(usize, Vec<usize>)>; // type TestHashMap = HashMap<usize, Vec<usize>>; ... fn make_heavy_things() -> Test { let x = (1..=10).map(|v| (v, vec![v])).collect(); x } // x can be a HashMap or Vec depending on the return type Both types seem to work without any issues, and common methods like len() work as expected. I'm curious about the reason behind this behavior.
I just started to look at the documentation of Angular Signals and I am not able to make heads or tails of how to use it in the Authentication Service that I have made previously. import { Injectable } from '@angular/core'; import { User, UserCredential, createUserWithEmailAndPassword, getAuth, signInWithEmailAndPassword, } from '@angular/fire/auth'; import { LoginUser, SignUpUser } from '../models/user.model'; import { catchError, from, map, of, switchMap, tap, throwError } from 'rxjs'; import { HttpErrorResponse } from '@angular/common/http'; import { Auth, authState } from '@angular/fire/au
I receive input from the mouse with the New Input System, but I do not want to receive input while the mouse is on any UI object, regardless of it being over or under any non-UI object. I tried EventSystem.current.IsPointerOverGameObject(). It seems to work, but it also gives a warning every time input is received. Calling IsPointerOverGameObject() from within event processing (such as from InputAction callbacks) will not work as expected; it will query UI state from the last frame UnityEngine.EventSystems.EventSystem:IsPointerOverGameObject () ... Here is my code: private void OnEnable() { mo
I have a C++ project that I previously built using CMake. Now I need to rebuild it as Debug so that I can profile it with Valgrind to find code bottlenecks. However, I have a problem with the rebuild. I go to the root directory with the project: cd MyProj Later I start the process of building and installing the project: mkdir build cd build cmake -DCMAKE_INSTALL_PREFIX=/home/user/Desktop .. make -j4 install After that I rebuild the project as a Вebug in the following way: cd .. mkdir Debug cd Debug cmake -DCMAKE_BUILD_TYPE=Debug .. make After rebuilding, I run the project for profiling with Va
When delayed variable expansion is enabled, why do we require two escape characters for literal exclamation marks? ^^! vs ^! I checked a lot of forums, and there's no explanation for it.
I am new to making apps live in Play console, I have an app that uses firebase phone auth. to remove recaptcha i need to enable app integrity API in cloud console that i did already then in play console i linked my app with my google cloud project and added implementation 'androidx.browser:browser:1.3.0' implementation 'com.google.android.play:integrity:1.3.0' in my build.gradle as well now the main issue I am having is this 3rd step on setting up play integrity api in Play console. "Integrate the play Integrity API" and "Integrate Integrity API" both take me to documentation which I am not ab
I see this in wiki: Y' = SSK(S(K(SS(S(SSK))))K) And I understand why it corresponds to this lambda expression Y' = (λab.aba) (λab.a(bab)) But I don't know how can this be the same as X = λa.(λx.xx)(λx.a(xx)) or X = λa.(λx.a(xx))(λx.a(xx)). Can Y' be transformed to X by β-reductions or some other way, and how ? Thanks ...
Hi team, I have concerns regarding the location permissions policy issue it's been a long month solving this problem, but I still experience rejection for these errors. Google Response: (Bundle Version: 7) is not compliant with the Location Permissions policy, or we were unable to review and verify your in-app experience for compliance with this policy. Feature not eligible for background location access Based on your declaration, we determined that you can use foreground location access instead of access to location in the background to function. Please remove access to location in the backgr
I'm writing an app that has 3 different types of windows, plus a settings window. Some of the menu commands affect only one of the window types. In AppKit, you give your menu items a selector as an action, and a target of nil. The system then walks the responder chain looking for a responder that responds to that selector. If it finds one, it enables the menu item. If not, it disables the menu items. That's all you have to do.