instruction
stringlengths
0
30k
I have node.js app running on virtual host via openlitespeed and i have issues with redirecting. I decide to have example.eu as main. when i type http://example.com into URL it redirect to https://example.com (correct) but when i type http://www.example.com into URL it gave me DNS_PROBE_FINISHED_NXDOMAIN ...
You can use the [**`__icontains`** lookup&nbsp;<sup>\[Django-doc\]</sup>](https://docs.djangoproject.com/en/stable/ref/models/querysets/#icontains) for *case-insensitive substring* search: <pre><code>City.objects.filter(<b>title__icontains='Hamilton'</b>)</code></pre> While using the [**`__icontains`** lookup&n...
Try turning the `FormData` object into a plain old JS object before using it as a value in the SWR key. It's unclear from [`useSWR`'s "Passing Objects" docs](https://swr.vercel.app/docs/arguments#passing-objects), but it might not be serializing it as expected and therefore seeing a new object on every render and alway...
I also faced same issue yesterday. I updated the windows with latest available updates and restarted the system. this solved the issue for me. If your are still facing this issue you can try this solution.
I am looking at this svg icon: https://www.iconfinder.com/icons/352263/cancel_icon How do I give the x inside of the circle a color other than transparent? [Screenshot][1] [1]: https://i.gyazo.com/d476c3ae90fd11ec86d167c61d3e4178.png
How to colorize the 'x' in a cancel svg icon
|css|svg|
I forgot to run `docker login` as `sudo`. `sudo docker login ghcr.io -u Nevah5`
Multioutput regression using GPU
|multidimensional-array|random-forest|cuml|
On the app router, you should use version 5 of `next auth` which is currently in beta. I will show you step-by-step to how migrate your code to V5. ##### Step 1: Update next-auth dependency ```bash npm install next-auth@5.0.0-beta.16 ``` ##### Step 2: Change the code in the `route.js` file ###### util/aut...
How to Nest a TelerikGrid inside TelerikForm with Blazor
|forms|blazor|telerik|telerik-grid|
``` bundle.js:10677 Uncaught TypeError: Unable to determine current node version at versionIncluded (bundle.js:10677:9) at isCore (bundle.js:10694:28) at 71../core.json (bundle.js:15883:21) at o (bundle.js:1:265) at bundle.js:1:316 at 67../lib/async (bundle.js:15523:14) at o (bundl...
{"Voters":[{"Id":1491895,"DisplayName":"Barmar"},{"Id":4154375,"DisplayName":"pjh"},{"Id":298607,"DisplayName":"dawg"}],"SiteSpecificCloseReasonIds":[13]}
If you want to fix your for-loop, you need to pass `!!sym(temp.name)` to `dplyr::filter()`: ``` library(dplyr) df.mirna.pv <- structure(list("let-7a-5p" = c("no", "yes", "yes", "no"), "let-7a-1-3p" = c("yes", "yes", "yes", "yes"), "let-7b-5p" = c("no", "no", "yes...
While working on binary image classification, the class mode set to binary incorrectly labels the images, but does it correct on categorical
|machine-learning|deep-learning|classification|image-classification|data-augmentation|
null
There are a couple of ways of dealing with your problem. The first (and IMO preferable) solution is just to pass a function to your `eulers_method` function i.e. ```python def eulers_method(x, y, diff_eq, h, n): #empty solution and x_value lists to be used in the euler function solutions = [] x_values ...
My project have the following structure: [![enter image description here][1]][1] [1]: https://i.stack.imgur.com/439AC.png I want to add eureka to my fastapi applicaction, I´'m trying to do that in the __init__.py file: import py_eureka_client.eureka_client as eureka_client from fastapi import F...
null
I am writing a workflow that downloads a CSV from S3, performs an action using a docker container (convert to another file), and then uploads the converted file back to an S3 bucket. AWS EKS K8S version: 1.29 Helm chart: ``` helm chart: argo-workflows targetRevision: 0.40.14 # Version of Argo Workflow...
Argo workflow container or/and script cannot read CSV downloaded from s3
|kubernetes|amazon-s3|argo-workflows|
when i'm trying to build CRUD using nest.js with postgres sql using TypeOrm this error appears to me which prevent me from making a new row in database and crash my nest.js application and told me `"no overload matches this call"` ``` async createUser(createUserDto: CreateUserDto): Promise<User> { const newUser...
Separate Legend Entries for Individual Outlined Overlapping Bars
I think what you're looking for is the client credentials flow which is pretty similar to ROPF meaning your clients will have a password (Client Secret) for authentication. https://learn.microsoft.com/en-us/entra/identity-platform/v2-oauth2-client-creds-grant-flow The initial permission grant can be done in the Az...
Is possible to have repeated document IDs in the same collection group but in different parents? Ex. Collecctions: - Collection `user` - Collection group `whishlist` under collection called Documents: - Doc1 => `user/USER_ID_1/whishlist/DEFAULT_LIST` - Doc2 => `user/USER_ID_2/whishlist/DEFAULT_LIST`
|firebase|google-cloud-platform|google-cloud-firestore|
null
I am trying to extend UI on some instances of JButton. The text and my test lines are visible, but no standard JButton border nor background for system LaF. For default LaF, metal, I get the border and shadows but no background. JButton m_button = new JButton (); QButtonUI m_ui = QButtonUI.createUI(m_button...
WWW and non-WWW HTTPS redirect
|node.js|virtualhost|openlitespeed|
null
{"Voters":[{"Id":1255289,"DisplayName":"miken32"},{"Id":2756409,"DisplayName":"TylerH"},{"Id":466862,"DisplayName":"Mark Rotteveel"}]}
The issue is in your PHP code. The `openssl_encrypt` function takes a `passpharse` argument: > If the passphrase is shorter than expected, it is silently padded with NUL characters; if the passphrase is longer than expected, it is silently truncated. For AES 256, this should be 32 characters. Your `$key` variabl...
I need to send a binary file through axios post request- ``` let data= await axios.post(url, formDataObj,config) ``` here formDataObj is object of [FormData](https://developer.mozilla.org/en-US/docs/Web/API/FormData) and config is an object that contains headers for API This is working fine for me But I wa...
fastapi adding eureka is throwing RuntimeError: Cannot run the event loop while another loop is running
|python|fastapi|netflix-eureka|
{"Voters":[{"Id":3689450,"DisplayName":"VLAZ"},{"Id":2756409,"DisplayName":"TylerH"},{"Id":16217248,"DisplayName":"CPlus"}],"SiteSpecificCloseReasonIds":[16]}
1. Make your root `app/layout.tsx` shared for the app as basic as: ```js export default function RootLayout({children}) { return ( <html> <body>{children}</body> </html> ) } ``` 2. Create a folder with `(this-structure)` in app then add `login` and `register` to it. This is called Rou...
{"Voters":[{"Id":3689450,"DisplayName":"VLAZ"},{"Id":213269,"DisplayName":"Jonas"},{"Id":16217248,"DisplayName":"CPlus"}]}
I'm in the middle of building an ecommerce website using NextJS (Typescript) and Stripe. Everything is going really well besides this one point... I have my entire application wrapped in an Elements component:- ``` return ( <div className='main-container'> <Analytics /> <GoogleReCaptchaProvi...
null
null
How to assign a value to a string variable, that includes embedded '=' in the value
s = replace("https://xxx.yyy.com/oauth2/v1/token?grant_type=client_zzzz", "=", "&#061") This will replace all occurrences of '=' with '&#061' in your string 's'. You can use similar approach for other special characters as well.
I have a query I’m attempting to optimise. table1 has 300,000 rows and table2 has 100,000 rows Each table has key columns (key1..key15) I am attempting to select all rows in table1 and LEFT JOINing table2 on these matching keys. I also have wildcard keys in table2 (designated ‘all’) Here is a partial e...
Is there an indexing strategy in Postgres which will operate effectively for JOINs with ORs
|jquery|sql|postgresql|performance|query-optimization|
I'm using `next.js 14`. I want to wrap all of my `<tr>` tags in `<Link>`. But doing so gives me `Hydration error`. I could do something like `onclick={() => doThing()}` but in that case, I have to make my component client side. (which I hardly want to) Here's a minimal reproduceable code: ```next.js import Link...
null
Same as `Colors` class instead of enum: ```dart abstract final class Colors { static const Color transparent = Color(0x00000000); } ```
I have two endpoints, one for downloading files and the other for normal JSON responses. Now, I want to automatically cache the responses of the endpoint that returns files in Nginx. Upon inspecting the responses in Postman, I noticed that the file endpoint returns a content-disposition header. Hence, I intend to use t...
Asking code suggestions about data structure and algorithm
|c++|c|algorithm|data-structures|stack|
null
I know it is older post but I personally do use 2 MaterialApps. I have my main App() inside MultiBlocProvider which provides only the AuthenticationBloc and RegistrationBloc and based on AuthenticationState I return specific MaterialApp for that state. For example, when user is Authenticated, I return 'main' Mat...
In your application properties add the below: spring.boot.enableautoconfiguration = true This is based on this input: https://github.com/spring-projects/spring-boot/issues/35682
In order for Jackson to deserialize a Json, it either needs a default constructor or a method annotated with `@JsonCreator`. Without any of these two methods, Jackson is not able to instantiate an instance and raises an `InvalidDefinitionException`. With a default constructor, Jackson first creates a default instanc...
I took a look at the opcodes generated by these assembly codes : ``` xor rsi, rsi mov sil, 0xFF ``` and ``` mov rsi, 0xFF ``` The first code turns into `48 31 F6 40 B6 FF` and the second into `48 C7 C6 FF 00 00 00 `. 1. Is code with more instructions slower? 2. Is what matters more the size taken up by ...
Move immediate 8-bit value into RSI, RDI, RSP or RBP
|assembly|64-bit|cpu-registers|
Please can you help me with this exercise: Half Sum Element: Write a program that inputs n integers and checks whether there is a number among them, which is equal to the sum of all the rest. If there is such an element, print "Yes" + its value, otherwise print - "No" + the difference between the largest element ...
I developed a small stand alone webserver in Delphi. The procedure is as below: function sum(a,b:string):string;stdcall; begin result:=a+b; end; How can I call it in Vue JS? The web service URL is http://127.0.0.1:8080/soap/iservice1 the WSDL document: <definitions xml...
You can splice the concatenated values of the left and right columns. The following Apps Script should work: ```js const __spliceAndMap = (rows, index, mapFn) => rows.map((row) => { const left = row[index], right = row[index + 1]; return row.toSpliced(index + 1, 0, mapFn(left, right)); }); con...
NextJS Stripe Question regarding multiple use cases of Elements
|next.js|stripe-payments|
{"OriginalQuestionIds":[74239579],"Voters":[{"Id":4518341,"DisplayName":"wjandrea"},{"Id":7175713,"DisplayName":"sammywemmy","BindingReason":{"GoldTagBadge":"pandas"}}]}
If you look closely at your `inference_func()`: # im = cv2.imread(image) im = torch.tensor(image) def inference_func(model, image): inputs= [{"image": image}] return model.inference(inputs, do_postprocess=False)[0] wrapper= TracingAdapter(predictor, im, inference_func...
Why is ubuntu 18.4 still showing as a linux subsystem when I have uninstalled it? How do I remove it? Uninstalled through windows app store. But I did a manual install first so I think that may be the issue but an unsure how to rectify. Still new to this
why is ubuntu 18.4 still showing as a linux subsystem when i have uninstalled it?
|windows|ubuntu|subsystem|
null
You can use the following code to achieve the same result in both Python 3 and Python 2: from Crypto.Random import get_random_bytes from Crypto.Protocol.KDF import PBKDF2 from Crypto.Hash import SHA256 def get_random_bytes_py2(size): return bytearray(get_random_bytes(size)) ...
I used a ready-made template for my ASP.NET Core project. I don't know much about html and Css, I just deleted and customized some of the code by trial and error. To test mobile response, I minimized my web browser on the PC. Everything was fine... Now I encountered this when I tested it on my phone. This is ...
Html + Css good response on computer (even in minimized mode) but bad on mobile
Further to my comment, creating an `emptyDir` creates an empty folder. You need to create `text.py` in the folder referenced by `emptyDir` before you can interact with it. By way of example: `app.yaml`: ```YAML kind: Deployment apiVersion: apps/v1 metadata: name: app labels: app: test spec: ...
Thanks @Amelie. This looks like a bug, follow up at https://github.com/statnet/ergm.multi/issues/27
I'm beginning some research in 3D position finding using cameras. I would like to try the technique where I take a picture of a known 2D symbol and work out camera position from the size, scale and skew of that symbol. I know this technique is used in Augmented Reality to determine where the camera is and where to pl...
I have an app where i show the user a qr code and when they scan the qr code it takes them to my google reviews page and what i want to do is if they comment on my reviews page i want to give them a gift in my app (%10 off, free gift basket etc.) i considered google places api but i dont know how i can verify the perso...
How can i get the reviews in google maps via API
|google-api|google-places-api|
null
If you `start` MainActivity from the PlayerList activity, which was started from MainActivity then the original instance of MainActivity will be destroyed to allow for an instance of MainActivity to be started and then a new instance of MainActivity will be started in place of the original instance (and hence issues)....
{"Voters":[{"Id":505088,"DisplayName":"David Heffernan"},{"Id":9214357,"DisplayName":"Zephyr"},{"Id":4267244,"DisplayName":"Dalija Prasnikar"}]}
I was given this hypothetical block of code, where although the language used is Java, and Java uses call by value, in this case `call by reference` had to be used for every method call, and I had to give an output in the format: ```none y:[result]; y: [result]; y:[result]; x:[result]; a:[result] ``` ```java p...
It's trickier than it seems. It is trivial to modify the template as it would just be the case of overriding the file "modal.tpl" in the ps_shoppingcart module i.e. in your theme, create the file 'modules/ps_shoppingcart/modal.tpl' and then copy the original from the module and customise it. Adding something like this ...
Finding 3D camera location from a known 2D symbol inside an image
|computer-vision|augmented-reality|
I am trying to create a network Load Balancer in OCI but i am getting the error below: ``` │ Error: 404-NotAuthorizedOrNotFound, Authorization failed or requested resource not found. │ Suggestion: Either the resource has been deleted or service Network Load Balancer need policy to access this resource. Policy refe...
{"Voters":[{"Id":5625547,"DisplayName":"0stone0"},{"Id":2802040,"DisplayName":"Paulie_D"},{"Id":13302,"DisplayName":"marc_s"}]}
My own research led me to believe that the right library to use would be [Kombu][1], as this is also what Celery (mentioned by @SteveMc) has transitioned to. I am also using RabbitMQ and have used Kombu with the default amqplib backend successfully. Kombu also supports [other transports][2] behind the same API. Us...
null
This is a sample code. I want to build a heat map with values limited from 0.5 to 0.6, but with a linear color scale ranging `[(0, 'yellow'), (0.25, 'orange'), (1, 'darkred')]`. However, since there are not values near 0 and 1, it compresses the color scale to be from 0.5 to 0.6 (shown below in the images). ``` imp...
We're currently big users of Dataflow batch jobs and wanting to start using Dataflow streaming if it can be done reliably. Here is a common scenario: We have a very large Kafka topic that we need to do some basic ETL or aggregation on and a *non idempotent* upstream queue. Here is an example of our Kafka data:...
I got this data with Nulls in original_eur column. | | event_id | category | rounds_bot_date | original_eur | |---:|:-------------------------------------|:-----------|:--------------------|---------------:| | 0 | 43ee085d-40b4-44f7-bdf5-c9e649284527 | Category 1 | 2024-03-2...
{"Voters":[{"Id":6600207,"DisplayName":"J.Memisevic"}],"DeleteType":1}
I have been attempting to set-up mission_control-jobs to a rails 7 app using SolidQueue, but I keep running in to the following error when accessing http://localhost:3000/jobs Propshaft::MissingAssetError at / The asset 'mission_control/jobs/application.css' was not found in the load path. The set-up is ...