instruction
stringlengths
0
30k
I'm trying to integrate a map into my project via openlayer. I followed different tutorials but I can't do it: - I have a div displayed but not the map - I have no errors in the console - I installed npm install --save ol please help me find a solution Mon ficher : App.component.ts ``` import { Component...
You could use text annotations, using the `annotate` method on the `ax` (`matplotlib.axes.Axes`) attribute of the `FaceGrid` object returned by `seaborn.catplot`. For example, the code below annotates the observations that are greater than .5 on a normal sample by using Boolean selection in the dataframe, `df[df.y > .5...
Hi I had the same problem, You have to put in the Vercel environment variables: ``` NEXTAUTH_URL="yourdomainevercel" ``` And above all, you have to redeploy your app so that it takes the variable into account. It's not dynamic. You must also have `Automatically expose System Environment Variables` checked ...
Streamlit nested button not displaying the result on clicking
|python|python-3.x|streamlit|
I have some existing project and used both unique =true at column level and @UniqueConstraints at entity class level for the same column as below. I am currently doing code refactor so need suggestion to improve the code. ```@Entity @Table(name = "sales_order", uniqueConstraints = @UniqueConstraint(columnNames = "ord...
Which annotation need to use for unique constraint in JPA entity, unique=true or @UniqueConstraints at class level with single unique column
|jpa|spring-data-jpa|
I have a mapping between index with component: ```ts const mappingComponent = [ { index: 0, component: Information, }, { index: 1, component: Data, }, { index: 2, component: UseCase, }, { index: 3, component:...
Here it worked for me: Step 1 : Go to Windows -> Device and Simulators Step 2 : Click on Simulator Tab and click the add button at the bottom Step 3 : Add new Simulator. Select the Device Type, Select OS version as Download more simulators. Click Create. Step 4 : Install at least one iOS version from all th...
I am trying to create a regular expression for the IP subnet 192.168.224.0/22. The valid IP range is 192.168.224.1 to 192.16.227.254. I can use this in Sentinel KQL query. Is the below correct? 192\.168\.(22[4-7]|23[0-6])\.(25[0-4]|2[0-4][0-9]|[01]?[0-9][0-9]?)
type ErrorResponse = { message: string; }; const error: ErrorResponse = { message: 'Ups' }; Another alternative as [explained here][1]: const error = <ErrorResponse>{ message: 'Ups' }; [1]: https://stackoverflow.com/questions/43314791/how-to-instantiate-an-object-in-typescrip...
System and OS : Apple Silicon Mac M3, Sonoma OS Trying to install neo4j with docker and getting below errors: ERROR Failed to start Neo4j: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@2b037cfc' was successfully initialized, but failed to start. Please see the attached caus...
This command facilitates restoration but may be time-consuming: ``` sudo mongod --verbose --port 80 --bind_ip 10.0.0.1 --keyFile /root/mongo_key_pair.pem --storageEngine wiredTiger --dbpath /db/data/ --repair --directoryperdb ``` For further details, refer to the [MongoDB documentation](https://www.mongodb.com/...
char *w = "Artîsté"; printf("%lu\n", strlen(w)); int z; for(z=0; z<strlen(w); z++){ //printf("%c", w[z]); //prints as expected printf("%i: %c\n", z, w[z]);//doesn't print anything } If I run this, it fails at the `î`. How do I print a multibyte char and how do I know when a...
How to get the characters from a UTF-8 string?
|c|character|multibyte-characters|
in way of optimization i decide to init push in other process, its works well in android 10 and higher but push isnt showen in lower versions of android i need it works well in all android versions this is my manifest code ``` <receiver android:name="com.google.firebase.iid.FirebaseInstanceIdRece...
Firebase push doesnt receive after init in other process
You can do the following: - Wrap your `Dialog` with a `Center` and then a `SizedBox`. - Set the desired with to the `SizedBox`. - Add a `Padding` widget below the `Dialog`. Code: ```dart Widget build(BuildContext context) { return Center( child: SizedBox( width: MediaQuery.of(context).s...
To understand what `Context: http` [documentation means][1] ```shell events { # ... } http { upstream name { # ... } # HERE log_format custom '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' ...
You can fix this by installing [Redis Insight](https://redis.io/docs/connect/insight/) to make requests in the graphical environment.
[`requestAnimationFrame`](https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame) should be suitable for most use cases and it's much cleaner imho: ````js el.style.transition = 'none'; requestAnimationFrame(() => { el.style.transition = 'all 1s ease'; }); ````
I'm trying to process multiple messages, from a queue with sessions enabled, in parallel. I've tried setting MaxConcurrentCallsPerSession to 5 for example but I am still receiving 1 message at a time. I wrote a console application to demonstrate what I'm trying to do: ``` static void Main() { ...
|.net|entity-framework-core|interface|t4|scaffolding|
null
I have the problem, in the previuos code I was calling the availableOn as argument that's why it didn't work, here is the correct code: @script <script> $wire.on('appointment-modal', async (event) => { let data = await event.availableOn; console.log(data); const modalBody = document.getE...
{"Voters":[{"Id":207090,"DisplayName":"Alex"},{"Id":466862,"DisplayName":"Mark Rotteveel"},{"Id":16217248,"DisplayName":"CPlus"}],"SiteSpecificCloseReasonIds":[18]}
Context ------- Edit: note it is quite hard to share my `pom.xml` file since it is 800+ lines and around 50+ other modules with they own `pom.xml` files too, on which you can add some confidential information in some of these. I have Maven commands run on a GitLab CI like this: ``` my_job: ... script: ...
|javascript|typescript|riot.js|riotts|
So the problem is your code stops running when a row is missing The solution is to skip that row, here is how: Check if there is a blank cell and delete them by looping through your desired range ```dim cell as range set SelectedRange = R:R 'you can change this to your preference for each cell in SelectedR...
I'm creating small startup project. I own one public server. At this server I will use docker compose to run my project. I want to pass sensitive data to my containers like db password etc. I have 3 options: - docker secrets (anyone who can break into container can read this file) - vault (too much effort, I don't...
Is there a way to play a notification sound as fast as a button click? I feel like there is a delay of a few hundred milliseconds! Im using this ``` public void btn_Click(object sender, eventargs e) { SystemSounds.Exclamation.Play(); } public void playExclamation() { SystemSounds.Exclamation....
C# play sound instantly
|c#|.net-4.8|
null
Just run this command in root directory: `npx expo install expo-router react-native-safe-area-context react-native-screens expo-linking expo-constants expo-status-bar`
I'd suggest using [ConciseDateFormatter][1] and using the auto locator for more ticks if you really want every month located: ```python fig, ax=plt.subplots(1, 1, figsize=(8, 4), constrained_layout=True) plt.rcParams['date.converter'] = 'concise' ax.xaxis.set_major_locator(mdates.AutoDateLocator(minticks=12, max...
Azure service bus - processing multiple messages in parallel (MaxConcurrentCallsPerSession)
|azure|azureservicebus|azure-servicebus-queues|
null
I have three lists #### Example Data ``` data <- list("A-B", "C-D", "E-F", "G-H", "I-J") data_to_replace <- list("A-B", "C-D") replacement <- list("B-A", "D-C") ## Note: The length(data_to_replace) and length(replacement ) are always equal. Which may range from 1 to 200 ``` This is just a minimal example...
How to get new text input after entering a password in a tab?
I'm new to Fortran and I already have a hard time understanding the concept of broadcasting of arrays in Python, so it is even more difficult for me to implement it in Fortran Fortran code: ``` program test implicit none integer,parameter::N=6,t_size=500 real,dimension(t_size,N,2)::array1 ...
Regular Expression for IPv4 subnet
|regex|kql|ipv4|subnet|
I am trying to write an alert message in TradingView's PineScript that contains a string variable I made myself My attempt: var my_variable = "" if(longCondition) strategy.entry("Long", strategy.long) my_variable = "open" if(shortCondition) strategy.close("Long") my...
I use a IActionResult to get a List<Object>. If I have a list, the result is ok. If I use a List<User>, the elements of the result are empty. If I use a generic List, it works: ``` public IActionResult GetData() { var erg1 = _database.table.Select(x => new { x.Id, x.firstname, x.lastname }); return Ok(...
There are several ways to benchmark Python scripts. One simple way to do this is by using the **timeit** module, which provides a simple way to measure the execution time of small code snippets. However, if you are looking for a more comprehensive benchmark that includes memory usage, you can use the **memory_profiler*...
|android|firebase|push-notification|push|
null
A proper approach would be to use the built-in functionality - Jenkinsfile syntax has a block specifically dedicated for your use case: From [Pipeline Syntax][1]: > The `post` section defines one or more additional steps that are run upon the completion of a Pipeline’s or stage’s run (depending on the location of...
System and OS : Apple Silicon Mac M3, Sonoma OS Trying to install neo4j with docker and getting below errors: ERROR Failed to start Neo4j: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@2b037cfc' was successfully initialized, but failed to start. Please see the attached caus...
i had this kind of issue with my windows and linux devices, >created new app from widows made sure fresh app is running fine >moved all myproject files to this new app (issued project configured in new app) >then pushed to git, its was working fine in the other device as-well. I felt like wasted lot of time lo...
null
This command facilitates restoration but may be time-consuming: ``` sudo mongod --verbose --port 27017 --bind_ip 10.0.0.1 --keyFile /root/mongo_key_pair.pem --storageEngine wiredTiger --dbpath /db/data/ --repair --directoryperdb ``` For further details, refer to the [MongoDB documentation](https://www.mongodb.c...
{"OriginalQuestionIds":[39972256],"Voters":[{"Id":11107541,"DisplayName":"starball","BindingReason":{"GoldTagBadge":"visual-studio-code"}}]}
I have seen similar topic with answers about size in % or vh, but its a bit different. I have a set of different plots with sizes 900x600 by default using this CSS: ``` .chartbox { display: flex; flex-wrap: wrap; background-color: DodgerBlue; justify-content: space-around; } .chart { background-color: ...
Getting distances of points in 2D space in an array in Fortran using the concept of broadcasting (Python)
|multidimensional-array|fortran|array-broadcasting|
null
I am trying to learn time series prediction and forecasting in Python. I have plotted the ACF and PACF of my total electron content which has a seasonality i.e. TEC value gets maximum at day time and min at night time. Overall the data has no upward or downward trend and the test statistics from Adfuller test is -3.67 ...
What kind of ARIMA model would be best fit for this data?
|python|machine-learning|time-series|signal-processing|arima|
null
A list of data frames: my_list <- list(structure(list(id = c("xxxyz", "xxxyz", "zzuio"), country = c("USA", "USA", "Canada")), class = "data.frame", row.names ...
It seems like your `MyInput` component is not handling the `onChange` event correctly. In your `CreatePost` component, you are passing the `onChange` function to `MyInput` like this: ```jsx <MyInput placeholder="Enter title" onChange={(e) => setPost({ ...post, title: e.target.value })} value={post.ti...
I have a two column csv file. Column 1 is string values, column 2 is integer values. If a term is found in a string in Column 1 I want to return the corresponding value in Column 2. Col1 Col2 Green 5 Red 6 If Col1 contains "ed" return the corresponding row value in Col2, in this case 6. Thanks....
How do you return a value from an imported csv if a condition is met using python?
|python|pandas|dataframe|csv|
null
One possibility is to use flex a shorthand property that combines flex-grow ,flex-shrink and flex-basis. As it is not possible to keep your div width and the gap constant and still fill the container, this what I suggest if your div width is not constant but the gap is to fullfill the whole container <!-- begin snip...
Since the last 3-monthly renewal of my **Let's Encrypt** certificate (happened 3 days ago), **Android devices** with OS version earlier than 7.1.1 (**Android API < 25**), are not able to connect to my servers anymore. The reason seems to be that the 3-year cross-sign agreement to bridge the new *Let's Encrypt*'s "**...
i have microservice architecture which works on spring cloud api gateway with eureka instances as clients and i need some help with forwarding websocket connection [enter image description here](https://i.stack.imgur.com/vW3RD.png) while connecting to websocket service directly through localhost on port 8085 ever...
websocket sockJS connection on spring cloud gateway eurekaproblem
|spring|api|websocket|cloud|gateway|
null
There was nothing *technically* wrong with the way that I was using the Stack widget. The problem was that the Stack widget paints renders each child widget from first to last, or from bottom to top > The stack paints its children in order with the first child being at the bottom ([link](https://api.flutter.dev/flut...
The current CRAN version of easyPubMed has a 10,000 record limit from Entrez. I have experienced this a lot and the workaround is to cut the queries into small chunks until you get under the 10,000 limit. The [old package readme][1] on Github stated the following: > At this moment, `easyPubMed` only supports retr...
|python|seaborn|scatter-plot|categorical-data|plot-annotations|
I'm writing some tests for an AWS lambda that handles and routes notifications from a SNS topic, and if a specific feature flag is off, then it returns immediately. However one of the test's implementation carries over to the next test, and it makes the handler fails when it should not. **MWE for the handler:** ```...
One-time implementation with Jest's mockResolvedValueOnce within test remains from one test to another
|javascript|unit-testing|jestjs|
The way i achieved it is also with implementing the UnmarshalBSON interface. Translated to your example it would be: ``` type foo struct { Type string `bson:"type"` Act ActivationInterface `bson:"credential,omitempty"` } type ActivationInterface interface{ // Placeholder TODO: Replace with useful fun...
{"Voters":[{"Id":1007220,"DisplayName":"aynber"},{"Id":4294399,"DisplayName":"General Grievance"},{"Id":2109233,"DisplayName":"lagbox"}]}
Basically, `SKFunction` became `KernelFunction` and `SKContext` was renamed to `KernelArguments`. The first one is straightforward renaming, and if you want to explore more in-depth why and how `SKContext` turned into `KernelArguments`, you should explore the commits from the [dotnet-1.0.0-rc1][1] release. I selected s...
First you can make a connection test from your client. tnsping UWBSDBPROD If this was successful try to connect with sqlplus sqlplus whatsappdb/whatsapp@orcl or sqlplus whatsappdb/whatsapp@10.70.236.30/UWBSDBPROD If you can connect with sqlplus, than there is a problem with the Laravel confi...
From all the good answers I have learned that the same string can't be passed to a function and returned again, because `r=decode_hex(r)` causes the pointer to original malloc'd data to be lost. I see there are two solutions to avoid the problem. Either I can use one string as input to the function and another for t...
null
null
I have created a custom WP Bakery element called "Custom Title." This element allows users to input text and align it. The alignment section should have a default dropdown with options such as "left," "center," and "right," as shown in the image. How can I implement this alignment section? Your advice would be appre...
null
WPBakery Page Builder | Create custom element and align
|wordpress|builder|wpbakery|
null
null
{"Voters":[{"Id":-1,"DisplayName":"Community"}]}
Ubuntu 20.04 Python 3.8 I'm using a python file (not written by me) with a U-Net and custom Loss functions. The code was written for tensorflow==2.13.0, but my GPU cluster only has tensorflow==2.2.0 (or lower). The available code isn't compatible with this version. Specifically the 'if' statement in update_state. ...
Well, in general, I'm doing a small project on django and I decided to implement a convenient search for any parameter from my form. all js was written to me by chatgpt and I don't understand it at all at all, and in general I'm working with "search" for the first time. also, what worries me now is that it is actually ...
Key takeaways: 1. Use vectorization. 1. **Speed profile** your code! Don't assume something is faster because you _think_ it is faster; speed profile it and _prove_ it is faster. The results may surprise you. ## How to iterate over Pandas `DataFrame`s without iterating After _several weeks_ of working on this...