text
string
meta
dict
Q: Get an error when trying to implemeting "ProtectedRoute" I'm trying to prevent user that not login to access specified page. function App() { const isAuthenticated = true; // Replace with actual authentication check return ( <Routes> <Route path="/login" element={<Login />} /> <ProtectedRoute is...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555533", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What is the appropriate way to implement diverse callbacks? class Base{ template <typename F> void Foo(int x, int y, F callback) { int z, w; std::string str; /* do a lot of works get value of str, z and w */ callback(); /* or callback(z, w); or callback(str); */ } ...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555535", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: how do i get to successfully run the below query WITH longest_used_bike AS ( SELECT bikeid, SUM(duration_minutes) AS trip_duration FROM bigquery-public-data.austin_bikeshare.bikeshare_trips GROUP BY bikeid ORDER BY trip_duration DESC LIMIT 1 ) find the station at which longest bikeshare ride started SELECT trip.star...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555538", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to start a service on 'Windows Server 2019' with 'start parameters' automatically? How to start a service on 'Windows Server 2019' with 'start parameters' automatically? That is, whenever 'Windows Server 2019' is restarted, this service will run and should read the 'start parameter' automatically. I already info...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555539", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Rotated shape points after resizing inside canvas I am working on an application in which I have an Canvas control and user can add one or more line and/or a rectangle shapes and group them. After grouping user can resize the parent group using mouse events. Something similar to how Microsoft powerpoint allows user ...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555542", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Repeat user info on every page in html to pdf I am using NReco PdfGenerator for developing customer statement. For that html is prepared and then converted to PDF. In the generated pdf there is User Information section and Statement section. Currently Statement section is repeated to other pages when number of rec...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555543", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to log-in with encrypted passwords I made a login and register system, it works, it encrypts the password using bcrypt, but when I go to login it only works with the encrypted password so I have to go to the database and copy it. This is my login and to help next is Register. I tried to put the password_hash in ...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555544", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-4" }
Q: A user mapped to verifyPhone and VerifyEmail via OneToOneField using fastapi tortoise-orm. but if I run the server. It'll pop error show in the pix main fastapi The error it displays I tried to Map User to its EmailVerify and PhoneVerify using OneToOneField as shown in here and also this is the modelenter image desc...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555545", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-3" }
Q: Upgrade React 18 failed tests (Jest & Testing Library) I'm having an issue trying to upgrade my React 17 version to React 18. My tests are failing with this error: Test suite failed to run Jest encountered an unexpected token Jest failed to parse a file. This happens e.g. when your code or its dependencies...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555548", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: how to update table columns with 50 string text having a specific prefix I'm trying to update two columns (UserName and FullName) of the following table: table I want to update the table so that the UserName column has 50 values in the form of 'UN1', 'UN2', 'UN3', etc... and that the FullName column has 50 values in...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555549", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: How can I solved the returning function in python program? I write a program with min, max function with two loop. largest = None smallest = None while True: try: list=[] while True: x = (input("Enter a number: ")) list.append(int(x)) larges...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555550", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to subscribe to keycloak events? I should implement user_temporarily_disabled handling in my local service. For example, a user entered the password incorrectly 10 times, in keycloak, this user becomes DISABLED. In this case, I need to do some logic on the side of our service. Is it possible to subscribe to noti...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555551", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Converting Specfic column into Date Format I'm hoping you can help me with a formula that I'm using in Google Sheets. I'm encountering an error with the formula and I'm not sure how to resolve it. Here's the formula that I'm using: =QUERY(IMPORTRANGE("Sheetlink","Emp. Leave Setup!B4:K"), "SELECT Col1, Col2, Col3, Co...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555552", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to Loop Through SQL Rows and increment and update running totals with respect to PARTITION BY groups I'm trying to arrive at a SQL Loop iteration that will help me produce values such as those within the IterationRange while observing some operational constraints. A slice of my dataset looks like below. Input: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555556", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: how to merge multiple images into one according to an offset in each image using python? in my case i want to join this two images 1st input image 2nd input image to get one image after I detect aruco code (id and the 4 corners)of each image and I get the difference between the same aruco code i can merge image with...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555559", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why does this error appear when i try to run my react app? I am trying to run my react app and i keep getting this error : configFactory is not a function npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! purple-react-free@1.1.0 start: react-scripts start npm ERR! Exit status 1 npm ERR! I tried updating node but it...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555560", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: WPF - Passing mouse event args to multiconverter I'm writing some app in WPF using mvvm pattern (so no code-behind). I have an ObservableCollection myCol. Objects are added dynamically into it (say by clicking on some button) The MyClass object contain a WritableBitmap mySource, that I'm using to draw an image. I wa...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555562", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I download Twilio on Android? What does node test mean in Twilio? How can I do that in an app called termux? I'm not sure what exactly twilio and node test mean there, and how to run it like that. I'm not familiar with the development side, so please kindly explain.
{ "language": "en", "url": "https://stackoverflow.com/questions/75555566", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: There is a problem about identification activity services in Location Kit project After running the Location kit android project in android studio, it stopped running the identification classes for a while. device is Huawei PPA-LX2 I checked the supported device for identification function. EMUI version should 9.0 o...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555567", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Pass route parameter with form submit ASP.NET MVC 5 I am building an ASP.NET MVC 5 application (.NET 4.8) and I'm trying to pass an additional route parameter with form submit to a controller method. Why am I doing it like this? In short, as it is a side note – I am setting up SSO in a multi-tenant system and have t...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555570", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Log in with paypal by @paypal/react-paypal-js Our users need to verify their PayPal accounts in order to receive payments. The more information about log in with paypal is described here : https://developer.paypal.com/docs/log-in-with-paypal/ To implement this feature, we are using @paypal/react-paypal-js, but thei...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555574", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to call the very first (top level) coroutine in C++ program? We can not co_await from non-coroutine, so, we can not do something like that: void main(void) { co_await my_coroutine(); } Let suppose that my_coroutine is something that we don't control directly and can not create its callback-based version. So h...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555575", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to get sum of SWITCH measure within the same week and compare? I currently have a measure that splits a project's total work hours evenly across the lifespan of the project on a daily basis. And dates outside of the project's start and end dates will be 0 hours. Table: Project ID Total Work Hours Start Date ...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555577", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to get packet data/payload captured through pyshark in python import pyshark as py cap=py.LiveCapture(interface="Wi-Fi") for i in cap: cap.sniff(timeout=5) print(cap.payload) print(i.payload) In print(i.payload) and print(cap.payload) I am getting error I want to check the payload or data of a captured packet.
{ "language": "en", "url": "https://stackoverflow.com/questions/75555579", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I access "Microsoft 365 Defender" -> Streaming API through Portal.Azure.com? In my company I administrer many diffrent Azure tenants. I log into my customers using a MyCustomer Portal. When I click a customer in the portal I am transfered to https://portal.azure.com and logged in to the customer. If I open a...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555580", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: I want to split a text file into equally sized lists, I can use using try I want to split a file with the contents of https://gist.githubusercontent.com/deekayen/4148741/raw/98d35708fa344717d8eee15d11987de6c8e26d7d/1-1000.txt into a lists of 100 lines and make them into a list I would just like to know how this woul...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555583", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-2" }
Q: user device detection with javascript my html: <li data-memberId="{$row['member_id']}"></li> I want to show user device Icon behind of usernames. for this I write below javascript code but I don't know how to implement that. my javascript: if (window.matchMedia("(max-width: 768px)").matches) { document.write("fa-...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555584", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Finding the width of an image based on height if aspect ratio stays the same wpf I want to offset an image by negative half it's width in the x direction, and negative its height in the y direction so that the origin is on the bottom middle of the image. My original image is 512 x 256 I know the height of the image ...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555586", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-2" }
Q: What can cause AddFontMemResourceEx (gdi32.dll) to fail on some systems? I have some C# code running in a service that takes Windows Printer Spool files and renders them into images. To do this, it has to load the embedded fonts. This is deployed on numerous computers, and goes back 10+ years. It has, as far as I...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555587", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: how to implement rewarded ads in flutter How to implement rewarded ad in flutter.I am trying to implement rewarded ad in flutter but getting this error. RewardedAd failed to load: LoadAdError(code: 3, domain: com.google.android.gms.ads, message: No ad config., responseInfo: ResponseInfo(responseId: null, mediationAd...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555588", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Bootstrap Multiselect showing "None selected" I am using this plugin inside a bootstrap modal. I am binding the data from server. when opening the modal once the page loads for the very first time, multiselect showing all options selected with title "All Selected (4)". But when closing the modal and opening again, t...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555590", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Physics simulation of 3D rigid body rotation for Tennis Racket Theorem fails to obey energy conservation I'm trying to build a physical simulation of 3D rotation, and, in particular, of the Tennis Racket Theorem behavior. I'm following the equations in these robotics course notes from Carnegie Mellon. I'm simulating...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555592", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: React-router-dom v6. How do I route child components on a page by parameters? We need to display a PageA with one child component depending on the "documentType" parameter ("ActsTable" or "ContractsTable") using the URL: "/worker/:documentType/:workerID". Without the "*" symbol, the child components are not rendered...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555594", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Can I limit width of an elemend beyond its padding? .foo { box-sizing: border-box; width: 10px; overflow: hidden; padding: 20px; background: red; } <div class="foo"> lorem ipsum </div> Expected: 10px wide red box Actual: 40px wide red box Can I somehow limit size just with css below padding (or borde...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555595", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Make python class more efficient, extracting info from .xml files I have written a class to extract type-string info from .xml files and stores them within a dataframe. The class itself processes one file, and is called within a loop to process 100k+ files. Which needs like half a week. I would like to ask you guys,...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555597", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to add Iphone screen support on my C# application My app interface doesn't fit on IOS, but works well on Computer (support Windows, Linux and MAC). Does anyone got a solution for this issue ? public unsafe void Run(int currentFrameIndex, int imageIndex, Semaphore waitSemaphore, Semaphore signalSemaphore, Fence s...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555599", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to solve overflow issues in alert dialog flutter I'm using flutter and unable to solve the overflow issues in alert dialog. Here is my implementation of code: AlertDialog( title: Text('$action Account'), content: SingleChildScrollView( child: Form( key: formKey, child: Column( ...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555602", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Django: How to calculate the uptime and downtime of a shop in the last hour, day, and week based on its business hours and status updates? I have a Shop model that represents a ecommerce store. Each shop has ShopHour objects that define its business hours for each day of the week. The ShopHour model has the followin...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555605", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Walletconnect integration with flutter enter image description here I tried to integrate Walletconnect in my flutter app. When users will go to use premium features after pressing a buttion user will see a popup like the attached image. then system will check their crypto token is avilable or not in wallet. i tried ...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555606", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: How to create a plus-sign-seperated-string of all columns between two given columns? I need to sum all of the columns between two given columns in a query. So, I need to figure out how to create a plus-sign-seperated list of all columns letters, between two given columns letters. The formula should take two inputs, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555607", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Iterating through a custom object of lists I have created a custom object so that I can save/load data from my Unity game into a Firebase Database. The custom object Result consists of a list of tuples List<int,int,int)>. public class Result { public List<(int,int,int)> results; public Result(List<(int,int,...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555609", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Vue 3 resolveComponent returns [object Object] I'm trying to replace a (WordPress) shortcode string that comes from a REST API. Now I want to replace '[faq]' with a Vue 3 component called 'FAqItem'.For this, I use the function resolveComponent(). REST API data: { "flow": "col", "subtitle": "Programma", "title"...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555611", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: The import com.paulhammant cannot be resolved The gradle Build is successful but ngwedriver is not imported I have tried to add ngwebdriver dependency from both mavenCental and downloaded jar implementation group: 'com.paulhammant', name: 'ngwebdriver', version: '1.2' implementation files('dependency/ngwebdriver.jar...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555613", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: fetching data form strapi with bearer token using SWR on next js hi there im using strapi for cms and next js for frontend, and using swr and axios for data fething im trying to fetch data from strapi backend using bearer token , and here is my code const address = `${process.env.NEXT_PUBLIC_API_URL}/products` cons...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555614", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Problem with castle.proxies.objectproxy in a datagridview I have a group project where we shall build an easy library program using EF with Winforms. We currently have a problem showing a child-object property. See picture for errormessage... We have solved the showing of a members booking with the books related to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555615", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Visual Studio 17.5 ViewComponents not being invoked anymore Yesterday I updated Visual Studio 2022 Community edition from 17.4 to 17.5 (MS Windows) All of a sudden the ViewComponents in my #NET 7 web application are not invoked and not rendered anymore. I didn't make any changes to my code. Before going into details...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555621", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Python: Return pre stored json file in response in Django Rest Framework I want to write an API, which on a GET call , returns pre-stored simple json file. This file should be pre-stored in file system. How to do that? register is app name. static is folder inside register. There I keep stations.json file. register/...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555623", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: User does not have delivery config set to turn on SOFTWARE_TOKEN_MFA Cognito I tried to enable MFA OTOP for the Cognito user pool user adminSetUserMFAPreference method but it is throwing the below error, I have configured MFA as optional User does not have delivery config set to turn on SOFTWARE_TOKEN_MFA ...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555624", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: PyTorch memory allocation too high compared to model/batch size? I have an NVidia RTX 3060 (6GB VRAM) which I am trying to fine tune a CLIP model with, but I am running out of memory I have a custom library telling me the model weighs approximately 350 MB with 177 M trainable parameters. My dataset, containing 200 r...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555625", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Problem of initialization of values in Flutter I'm trying to select a value in a dropdown menu and transfer that value to the dropdown menu title when it closes, but an error message appears when I try to do this, but the value does appear in the dropdown menu title: Unhandled Exception: A S2SingleSelection was used...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555630", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Code for Object detection and distance calculation Can someone write a code to detect an object and find its distance from the camera in centimeters using OpenCV. It should use tensorflow model to detect the objects. I tried for about 15 days but I still can't make the program. I need to submit it tomorrow :(
{ "language": "en", "url": "https://stackoverflow.com/questions/75555634", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-3" }
Q: Unable to persist servers configuration I m using pgadmin as a deployment in my k8s cluster. Im attaching a PVC to it. `resource "kubernetes_persistent_volume_claim" "pgadmin_volume" { metadata { name = "pgadmin-volume" } spec { access_modes = ["ReadWriteOnce"] resources { requests = { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555635", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Preserve a websocket connection in such way that the connection is taken over by another healthy upstream? We run Kubernetes websocket server pods. Between the clients and the services we want envoy proxy to take care of the connection lifecycle. More precisely, the idea is to "preserve" a websocket connection in su...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555638", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Continue asking user for input until condition is met in two way process I continue to ask for user input until a negative number is entered. One user enters a positive number, the parent reads it and passes the input to the child. The child replies back with square root of input, then the parent displays it and ask...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555643", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Authentication using firebase Implement a single page called 'home' that needs authentication to be accessed. Use firebase authentication to implement auth. Add a profile management page(update name and profille picture), login, logout and forgot password. Would be nice if you add a Dockerfile to it for deployment. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555646", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-2" }
Q: Train GPT-2 on custom data I was looking for a way to train my own textual data using GPT-2 & I have found a blog post here: https://www.kaggle.com/code/ashiqabdulkhader/train-gpt-2-on-custom-language Everything works fine, the model building, dataset building, but it shows very weird texts as output... from transfo...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555647", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Failed to load image Python extension Hello I am getting this error I tried different torch and torchvision versions and nothing worked. Any suggestion please? env/lib/python3.10/site-packages/torchvision/io/image.py:13: UserWarning: Failed to load image Python extension: libtorch_cuda_cu.so: cannot open shared obje...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555648", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Throw an exception without printing stack trace I should modify a code like this. if (condition) { //my code } else { throw new Exception("My message"); } Currently the code, when it goes into exception, after printing "My message", also prints the stack trace. I should modify it so that...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555651", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-3" }
Q: Typing for a Python function that takes a generic class and returns a specific instance of that class Suppose I have a class definition like this: T = TypeVar('T') class Collection(Generic[T]): ... I want to create a function like this (Data is some container type): T = TypeVar('T') def get_data(typ: Type[T])...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555655", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Can I access file on local with React.js? Can I access a file on the local disk with React.js? If I want to get a file on (C:\Users\Admin\Documents) in my PC then read the file, file type ex. png or pdf and create a date by javascript or React.js. A: You will need to share it through some http server like node.js. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555657", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Redshift Serializable isolation violation in glue postactions We have multiple glue jobs that start at the same time and execute the following postaction - All the glue jobs reference different 'glue_job_unique_table'. BEGIN; CREATE TEMPORARY TABLE glue_job_unique_table_inc AS SELECT * FROM glue_job_unique_table WH...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555658", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: .NET C#: How to get Windows default "vector" icon for file type I want to retrieve the default icon Windows Explorer is using for a file type (i.e. TXT file). I have already implemented http://stackoverflow.com/a/28530403/1572750 (using GetJumboIcon() method which delivers a 256x256 icon) and it is almost perfect. O...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555660", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to export a C project from VisualStudio@Win10 and import it in Codeblocks@Ubuntu 18.04 First of all, I don't know much about project building / compiling in c, so please, bare with me. I have a c project in Visual Studio 2022 on my Windows, and I want to export that project to my Ubuntu 18.04 VBox. I installed C...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555662", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: I have two buttons in a row, both containing icons, but if one of the icons is larger, the other button gets pushed down despite same height. Why? I am using Web Components on Stencil.js. I have an icon component, and a button component. I have nested the icon component inside the button component, but I have notice...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555673", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Ordering items in Flexbox I'm trying to order 5 items inside a container, How much ever I try I'm not able to fit "Item 5" inside the container, it's overflowing. I want it to fill the empty space in the container and stop overflowing. Here's the Code Snippet: body { display: flex; height: 100vh; align-items...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555677", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I stop Google Maps from reload/refresh? I'm trying to use Google maps api. https://developers.google.com/maps/documentation/javascript/examples/places-searchbox I get the location from the map that I want. But when I want to save it in my form with a addEventListener the whole page refresh and the position ...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555680", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-2" }
Q: Required DEM specifications by UgCS We have a lot of clients that want to import DEM files from various sources in the GeoTIFF format but there are many variables to consider, coordinate systems, colour models and whether gdal can run it. Do we have a list of DEM specifications that are supported by UgCS or whether ...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555681", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to apply multiple where condition on laravel eloquent having mutliple models I have a model with four relations like as below public function custform_formfields() { return $this->hasOne(FormFieldMapping::class,'field_id','field_id'); } public function custform_fieldtype() { ret...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555686", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Converting .txt to .csv using Pandas not working I am starting to learn about Pandas. I am trying to export some data from a .txt file to .csv I have tried everything that I found on the web (which is usually always the same method) import pandas as pd read_file = pd.read_csv (r'file name.txt') #in my pc i have the...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555688", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Selenium JavascriptExecutor: Invalid or unexpected token When trying to use this format of selector with SeleniumJavascriptExecutor: js.executeScript("arguments[0].textContent=${value}", driver.findElement(By.cssSelector('div.stb-LazyChosenDropdown div.tiles div.input:nth-child(1)'))) The following error is thrown:...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555689", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Can't select language code in web-scraping script (RSelenium, Chrome) First of all it's important to know that I received the script I will be talking about, I did not create it myself. In fact, I am very new to R and don't have any programming background at all. So very simple explanations or direct changes would b...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555692", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: The flutter tool cannot access the file or directory. import window project in mac I create a flutter project on windows, Now I want to do some changes but i have only macbook m1. I import project in mac and try to run it. I am getting this error. What is the reason? How to solve this issue? Full error is: Exception...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555693", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: SQL Server : select if multiple rows because of one column, only return one with comma seperated values I have a table address and another addressline. One address can have multiple address lines. I want a select statement that returns one row per address, and if there are multiple address lines, I still only want o...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555700", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: html2canvas external image not showing I am using html2canvas library to convert HTML to canvas/base64. On my webpage, there are some external source images which are not loaded by html2canvas. I have tried : html2canvas(document.querySelector('#item'), { allowTaint: true, useCORS: tr...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555701", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is there a way to convert SwiftUI with animation to a video? Long story short, the goal I'm trying to achieve is to convert a series of SwiftUI with animation to a video. So far, I understand that we could get swiftUI view as an image. As well as using AVFoundation to render images as a video. The thing is that doin...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555702", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: R markdown not knitting to HTML? I cannot get both the markdown document to knit to html and the shiny code to function simulaneously. Here is my code: --- title: "Report" author: "Name" date: "`r Sys.Date()`" output: html_document: df_print: paged runtime: shiny editor_options: markdown: wrap: 72 ...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555703", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Sorting Cube Surfaces Lambda Syntax Error I'm trying to sort the surfaces of a rotating cube in python and but I'm running into a syntax error using inline Lambda. I've not used Lambda before so I'm struggling here. sorted_faces = sorted(cube_faces, key=lambda face: sum([(cube_points_rotated[i][k] - camera_position[...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555706", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What causes a VBA program to behave differently depending on order of subroutines? I have 25 subroutines for one big task. Ideally, one click/shortcut should call all of them, so I wrote a sub for that: Sub callAllMacros() macro1 macro2 ... macro25 End sub If I run each sub separately one after the other, the cod...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555707", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-3" }
Q: How can I set last selected item as default for a combobox? I want to set the last selected item from a combobox as its default, meaning when I close this form and reopen it, the combobox shows and selects the last selected item again. I have tried to save the SelectedIndex as an INT and use it like this: public For...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555708", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Salesforce - SOQL - Unknown error parsing query I have 2 SOQL Queries when ran independently work great Query 1 SELECT Id, Name, District_Name__c FROM Public_School_District__c where District_Name__c = 'AL' Query 2 SELECT District_Name_Formula__c FROM Community_Interest__c where District...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555710", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is it possible to implement some pre-process or something to check if it bean name present in Enum Is it possible to check bean name by Enum name which was delivered from resources? There is Eanum where declared all available bean names which were configured in the project public enum ClientBeanNames { DIRECT("d...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555711", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Yarn publish and autocommit to Git Following How to support subpath imports using React+Rollup+Typescript I try to publish library with structure like that: mylib |--components |--Header To be able to import Header as import { Header } from "mylib/components". I created a build command "publishLib": "ro...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555712", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to create nextjs app without github repository So I have a repo for my project and I want to create a next 13 app for the frontend. How should I go about? A: You just need to run npx create-next-app@latest. You don't need a github repository to create a project A: thanks for nothing. The reason I asked is that...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555716", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: NUXT JS: Cannot find module node:fs I get the following error while calling run npm run dev on local development internal/modules/cjs/loader.js:638 throw err; ^ Error: Cannot find module 'node:fs' A: I had this problem after I created a new nuxt-app and after I run npm run dev. my node version was 14.x an...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555718", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: gRPC C++ grpc::Status::error_message does not report failure reason I am implementing a gRPC C++ client with both TCP and TLS support. My server is a simulator written in Go. My problem is that in all the following cases, the error message is the same and that it is very generic, not indicating the failure reason: M...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555720", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: how to convert undecimal to decimal using python? I was asked to convert undecimal (base 11 number system) to decimal, how to do it? I tried a different variation from youtube but none work
{ "language": "en", "url": "https://stackoverflow.com/questions/75555721", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-2" }
Q: In a Visual Studio C# project, is it possible to enforce Microsoft Learn's Best Practice Naming convention for tests? Microsoft Learn suggests the best way to name unit test methods is like Add_SingleNumber_ReturnsSameNumber. I would like to force project contributors to follow this convention, making it an error if...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555722", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to subset two data frames based on the common values in two columns in R I have two data frames and I need to find the rows that are common across both based on the values in two columns (i.e., V1, and V2). df1 <- V1(X,X,Y,Z,Z) V2(Q,E,W,Q,Q) V3(D,D,Y,V,J) V4(O,Z,A,Q,E) df2 <- V1(X,B,Y,A,Z) ...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555724", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: regular expression to match only json output I need to extract valid JSON from various output. Sometimes it is: [ { "parameter1" : "value1", "parameter2" : "value2" } ] /* bla bla */ Sometime it is different: { "parameter3" : "value3", "parameter4" : "value4"} /* another blah */ BUT sometimes it has no comment sec...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555726", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to import maven dependancies 2022.3.2 ( Mac OS ) I've tried all the answers mentioned under Import Maven dependencies in IntelliJ IDEA but none of them worked till now. I tried both options from inside IntelliJ as well running commands from command line.
{ "language": "en", "url": "https://stackoverflow.com/questions/75555727", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: redis set default Sliding Expiration in ASP.NET Core 7 I'm installed Microsoft.Extensions.Caching.Redis in ASP.NET Core 7, and I'm trying to set default SlidingExpiration in program.cs: I'm not seeing any option for this even in configurationOptions. A: Redis Cache does not support setting the global expiration ti...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555732", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Azure: find App Service for Role Instance I'm trying to find the source for some log entries that I find in Application Insights. One of the properties of these entries is the "Role Instance" (a 13 character long id). Can I use this to find out which App Service was the source of this log entry?
{ "language": "en", "url": "https://stackoverflow.com/questions/75555733", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can pthread_atfork make child process ensure lock state but not changing parent process lock state? I'm having some problems in understanding how can pthread_atfork make the child process ensure the mutex states. The mannual tells me that use prepare to acquire lock before a child process is created and use pare...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555746", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I fix a wordpress jetpack fatal error please? Fatal error: Uncaught TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, function "jetpack_boost_admin_missing_files" not found or invalid function name in C:\Users\hp\Local Sites\enfants-prcieux-bijoux\app\public\wp-includes\clas...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555747", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Getting 'Nsight Systems did not detect any NVTX traces' while running dlprof with pytorch I am getting the following error while running dlprof with pytorch. Nsight Systems did not detect any NVTX traces. Please check that you imported and initialized nvidia_dlprof_pytorch_nvtx in your script and try again. Refer t...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555749", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to add text next to an image with Pillow or OpenCV? I am trying to add some text next to and under a QR code. The problem is that I am struggling on how to edit the image into a QR Code + text. The image below is what I would like to have as a result. The function signature can be changed too. This is the code...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555751", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Can't bind to 'ngModal' since it isn't a known property of 'input' when also FormsModule added in app.module.ts The issue was I am using rest and angular and in angular I want to show first name in my input field , I am using [(ngModal)] . I am also used formsModule in app.module.ts, But I get same error , thanks I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555752", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: becoming root in dockerfile for oracle container I need to create the below directory in the oracle container as root but for some reason,the entire command is omitted. Any ideas why? FROM oracle21c:21.3.0.0 USER root RUN mkdir -p /u01/app/oracle RUN oracle:oinstall /u01/app/oracle/ RUN chmod 775 /u01/app/oracle th...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555753", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Can you get a folder name without the user needing to upload the files? I want to enable the user of my webpage to use the file browser to select a folder and get its name. The only way I have found so far is to use <input type="file" webkitdirectory/> and then get the folder name from the files. However, you still ...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555755", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: I need to compare two Strings , but get their keys and values from hashmap The problem is in the tittle , i don't know how to solve this problem enter image description here I have to compare if name and name1 are the same , one is cyrillic and the other is latin , and if they are the same after the translation = t...
{ "language": "en", "url": "https://stackoverflow.com/questions/75555758", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }