instruction
stringlengths
0
30k
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.168.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]?)
I really excited to using Ant Design library, it saves me a lot of time, but there's some flaws or I just misunderstood something. I am using TreeSelect with async loading. ``` const onLoadData = () => { ... // Some api call which changes state "treeData" } <TreeSelect value={value} onChang...
Ant Design TreeSelect async load
|reactjs|antd|
You can fill your `LineSeries` with a JavaScript function. Small example: ChartView { id: chart anchors.fill: parent property var list1: [1,2,3,4,5,6,7] property var list2: [11,12,13,14,15,16,17] Component.onCompleted: { for (let i = 0...
I am using code to read file from AWS s3 bucket, throwing error "Not a gzipped file (b'\xef\xbb')" even if filename is ends with .gz and the content type is also application/x-gzip, it throwing erorr to uncompress the input file how can i handle this. job.file_bucket = 'upload-bucket' job.file_path = '...
If I were to answer, I would try to be as efficient as possible and not create a "one-liner," as it likely doesn't do what you expect. I know you mention not looping, but for those who see your question and do not mind looping, I would do the following: uses System.SysUtils, System.RegularExpressions; ...
we have used msal-browser for Azure AD B2C login in the react application with vite & RTK. We want to refresh the token once the main access token expires. But inside the react application, we couldn't receive a refresh token by calling any method of @azure/msal-browser. By calling the acquireTokenSilent method,...
This already existys in `stringi::stri_replace_all_regex`. > data[] <- stringi::stri_replace_all_regex(data, data_to_replace, + replacement, + vectorise_all=FALSE) > data [[1]] [1] "B-A" ...
The difference in execution speed is likely due to running the code in debug mode, plus the overhead of the additional debugging and diagnostic tools running in Visual Studio. While I haven't measured the difference in performance, I can say anecdotally that I do notice that running automation code (or any code) while ...
It has been two days trying to add payment method to google cloud console but continue getting the error bellow please is there any body know how to by pass the error bellow This action couldn’t be completed. Try again later. [OR_BACR2_34] I was trying to add payment method to my cloud console account but it cont...
I am trying to add payment method to google cloud console getting the error This action couldn’t be completed. Try again later. [OR_BACR2_34]
|google-cloud-platform|google-developers-console|google-pay|
null
{"Voters":[{"Id":13288265,"DisplayName":"jksevend"}],"DeleteType":1}
Remove the following : `app:itemRippleColor="@color/white"`
null
First, some observations: 1. The string size is exponential in n so a(n) takes 10000 bits. The largest number type in C++ is uint64_t with 64 bits. 2. Luckily, the restriction on k means we only have to consider the first 10^15 digits, which is 35 bits and thus fits in a uint64_t. 3. a(49) is the last digit st...
### TL;DR ``` from yfinance import download # Prepare data similar to the original symbol_df = ( download(tickers="AAPL", period="7d", interval="1m") .rename_axis(index='Date') .reset_index() ) # Calculate Relative Volume Ratio volume = symbol_df.set_index('Date')['Volume'] dts = volume.ind...
The size of a `ZStack` is determined by the size of its contents. Since you are scaling the image to fill, the full image is (probably) going to be larger than the screen (unless the aspect ratio of the image exactly matches the aspect ratio of the screen). This is the size being adopted by the `ZStack`. The `.fr...
I'm trying to scrape from Linkedin hrefs to better filter the results. However, for some reason the code will only return results 1-7 only. Results 8 or more will not return, even if explicitly stated. I have included sleep timers to help the website complete the load, but still only 1-7. Is there a bug, a security mea...
we have a use case where we need to issue one additional warning (in a pop up) to customers right before they finalize their order, but **after** all checkout field validations (form fields filled in, payment method fields validated, etc). Essentially, we want the PLACE ORDER button to behave exactly like it already...
This answer should work with a single page push-state app, or a multi-page app, or a combination of the two. *(Corrected to fix the `History.length` bug addressed in Mesqualito’s comment.)* ### How it works ### We can easily listen for new entries to the history stack. We know that for each new entry, the [speci...
I am creating MLM (multi-level marketing) system in PHP and MYSQL database. I want to fetch the child user ID based on the parent ID. I have found a solution https://stackoverflow.com/questions/45444391/how-to-count-members-in-15-level-deep-for-each-level-in-php but am getting some errors. I have created a class...
Error in reading .gz file in python using gzip
|gzip|python-3.9|
null
hope you are well. My code is not working properly and I have no idea what is wrong or how to fix it. I only know that when I add the numbers for a square or rectangle it shows that my shape is a parallelogram. I have tried my code and the output is showing incorrectly. I have also looked at you tube videos but...
This should work: ```yaml components: schemas: Mammals: type: array items: anyOf: - $ref: '#/components/schemas/AquaticMammals/items' - $ref: '#/components/schemas/LandMammals/items' ``` <br/> Alternatively, you can create named schemas for the initial `an...
I have a JSON: ```json { "error" : { "code" : "validation_failed", "message" : "Validation failed", "fields" : { "date_end" : { "code" : "min_value", "message" : "Value is less than minimum allowed" } } } } ``` `date_end` can be `date_start`, `name`, `geo`....
{"Voters":[{"Id":23845872,"DisplayName":"Rollo"}],"DeleteType":1}
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 ...
I'm building an api in golang using chi. I created a wrapper in my handler functions to intercept and identify errors ``` func BuildHandler(db *sql.DB) *chi.Mux { // Repositories userRepository := user.NewRepository(db) // Api Handlers authHandler := auth.NewAuthAPIHandler(userRepository) r := chi....
Curious behavior with errors.As in go
|go|
null
how about: ```java String hql = "select ln " + "from Document ln " + "left join Data cd on ln.documentId = cd.dataId and ln.status = 'Active' " + "where ln.status = 'Active' and cd.dataId is null"; List<Document> documents = session.createQuery(hql).list(); ```
This command facilitates restoration but may be time-consuming: ``` sudo mongod --verbose --port 27017 --bind_ip 10.0.0.1 --keyFile /key_pair.pem --storageEngine wiredTiger --dbpath /db/data/ --repair --directoryperdb ``` For further details, refer to the [MongoDB documentation](https://www.mongodb.com/docs/man...
I can't comment, so I'm answering here. You should refer to `url` property of your `listing.image` object rather than the object itself: `<img class="image1" src="{{ listing.image.url }}">`
I'm encountering an issue with React Router where I'm trying to implement authentication for my application using React Router's Route components. I have an Auth component that checks the user's authentication status by making an asynchronous request to my server's /users/check-auth endpoint. If the user is authenticat...
null
Error while reading japanese character name file.without japanese characters, file can be read import matplotlib.pyplot as plt import cv2 image_path = r"FAX注文0004.tif" image = cv2.imread(image_path) plt.imshow(image) plt.axis('off') plt.show() Note: while renami...
null
Error while reading japanese character name file. Without japanese characters the file can be read. import matplotlib.pyplot as plt import cv2 image_path = r"FAX注文0004.tif" image = cv2.imread(image_path) plt.imshow(image) plt.axis('off') plt.show() Note: After r...
I know this is too late to help OP, but for anyone else with this problem, you can force Qt Creator to recognize the latest Xcode by going to the Build directory and doing: rm -rf .qmake.stash rm -rf .qmake.cache This can happen when upgrading Xcode, for example. You can confirm what's going on by showing ...
As soon as changes are detected, you could disable scrolling and use a `DragGesture` to detect a swipe. Then you can prompt for confirmation. Something like this: ```swift struct ContentView: View { struct FormValues: Equatable { var aFlag = false var text = "" } @State priva...
You just have to unload it function unloadSplitScreen() { let ext = viewer.getExtension('Autodesk.SplitScreen'); ext.unload(); }
Here is an approach using multiple mono-color colormaps, together with a legend: ```python import matplotlib.pyplot as plt from matplotlib.cm import ScalarMappable import seaborn as sns import pandas as pd import numpy as np fig, ax = plt.subplots(figsize=(6, 6)) cmaps = ['Blues', 'Oranges', 'Greens', 'Reds...
I'm not sure why but I was sure that `Ctrl+f` can find all occurences of a string in a file. Say I want to find all occurences of variables that ends with `_cfg` or all imports ending with `time` in a file and it turns out that `Ctrl+f` is not able to find it. It can only find full strings such as `user_cfg` or `...
Pycharm: Ctrl+F not able of finding substrings (only full strings)
|pycharm|jetbrains-ide|
null
I'm trying to calculate row or column means of a SpatRaster/SpatRaster stack using the R terra package in order to make a Hovmoller plot, but am finding myself stumped. I'd typically just use something like this: ``` # Test matrix A = matrix(seq(1,6,1),4,3,byrow = TRUE) # Usually lots of NAs in the data ...
Calculate row-wise or column-wise means using R terra functions
|r|raster|terra|
null
for anyone with these questions, the database is overwritten and the themes and plugins are loaded with the restore process (by the updraftplus plugin)
Add json object key as value
|jolt|
The class VariableMap is part of the following maven artifact: <groupId>org.camunda.commons</groupId> <artifactId>camunda-commons-typed-values</artifactId> So if you include that in the correct version in your maven pom, this class should be found.
There is currently an open issue about this problem on Github since August 2023. Currently there is only a temporarly fix to downgrade the notebook package with: `pip install notebook==6.5.6` After that it worked for me again. See the issue for reference: https://github.com/django-extensions/django-extensions/issues/18...
pip install --upgrade pip pip install --upgrade setuptools pip install pandas
How do I convert a 16-bit, single-channel image to a 16-bit, three-channel image in the HSV color space? I aim to maintain a 16-bit depth throughout the process. Firstly, I converted the image to an 8-bit single channel. Then, I applied the COLOR_GRAY2BGR conversion, followed by the COLOR_BGR2HSV transformation. Sub...
opencv HSV colorspace
|c++|opencv|
null
I recommend using `df.at[row, column]` ([source](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.at.html)) for iterate all pandas cells. For example: ``` for row in range(len(df)): print(df.at[row, 'c1'], df.at[row, 'c2']) ``` The output will be: ```lang-none 10 100 11 110 12 120 ```...
|webpack|babeljs|tailwind-css|twin.macro|rspack|
Widget customSnackbar({ required String message, Color backgroundColor = Colors.black, Color borderColor = Colors.red, double borderWidth = 4.0, double cornerRadius = 12.0, }) { return ClipRRect( borderRadius: BorderRadius.circular(cornerRadius), chil...
The problem with taking a screenshot is that the canvas is divided into several sections: ![enter image description here](https://i.stack.imgur.com/p7xKE.png) I am using Angular and I don't see a way to capture it, I have tried to create a single canvas combining the existing ones but the styles are not maintaine...
### Context I am trying to add a gui to the mapping script of the [concept-graphs mapping system](https://github.com/concept-graphs/concept-graphs/tree/c52043b177ee10816dfd9a1509e2ee746ae459b7). The code is ugly at the moment but you can have a look [here](https://github.com/concept-graphs/concept-graphs/blob/c52043...
How to add another panel or window to the open3d.visualization.O3DVisualizer class? (In python open3d)
|python|3d|point-clouds|open3d|
null
I use vanilla extract in next.js project. When i configure vanilla extract in storybook, i meet this error. ``` Cannot find module '@vanilla-extract/css/recipe' at webpackMissingModule (vendors-node_modules_vanilla-extract_recipes_dist_vanilla-extract-recipes_esm_js-node_modules-2b7443.iframe.bundle.js:1960:50)...
React Router: Authenticated Route Redirection Issue
|reactjs|authentication|react-router-dom|
null
{"Voters":[{"Id":3858472,"DisplayName":"CharlyCM"}],"DeleteType":1}
You need to define the client details correctly both in the Keycloak client and in the angular app. For my app redirect uri is kept as `/` then it gets redirected by my routing startegy, you'll have to update as per your strategy You should define in this format [![enter image description here][1]][1] and for the ...
{"Voters":[{"Id":3858472,"DisplayName":"CharlyCM"}]}
I have below regex ```js const stringPattern = "[a-zA-Z0-9]*"; const stringRegex = new RegExp(stringPattern,"g"); const str = "there are 33 states and 7 union territory in india."; const matches = str.match(stringRegex); console.log({matches}); ``` why does this result contains whi...
why this regex match whitespace also?
|javascript|regex|
How to get 5 LEVEL hierarchy users from database using PHP and MYSQL
null
Currently, there is no API to remove a property from a collection. But you can replace the object as explained in [hsm207 answer][1]. Here is how to do it with the v4 Python API. ```python my_collections = client.collections.get("Product") # Replace with your collection name prop_to_remove = "description" # Replace ...
I have a Spring Batch application which is successfully running spring batch jobs but i have exception when declaring multiple DirectChannels. The exception happens when i start the "firstJob". Here is the exception: ``` `Caused by: org.springframework.messaging.MessageDeliveryException: Dispatcher has no subsc...
Starting first job causes - Dispatcher has no subscribers for channel exception when declared multiple DirectChannels
|java|spring|spring-batch|spring-integration|
Try the below regular expression: ^\(\d{3}\)\s?\d{3}-\d{4} I added the "\s?" to the regular expression. It checks for an optional space.
WooCommerce - Place Order - Intercept functionality after validation but before processing order?
|woocommerce|
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. ``` ...
Final results in Powershell for future visitors to clean PostgreSQL Archived Location if you don't have replicas. Hope it helps someone. Clear-Host $archdir='\\uncpath\pgsql_arch' $filename=Get-ChildItem -Path $archdir -filter *.backup | Sort-Object -Property LastWriteTime -Descending | Where-Object {$...
I use cloudformation template from other AWS account but today I have this error: Resource handler returned message: "Invalid request provided: AWS::Cognito::UserPoolUser" (RequestToken: d55c7a26-473f-3eda-b1af-fdc97afc5364, HandlerErrorCode: InvalidRequest) My cloudformation template: CGNAdminUser: ...
I have a development cluster, in which I have two namespaces ns-a and ns-b. However, I'd like to create a backup of only nsb and make a copy of it in the whole new cluster. How can I achieve it. Also, if any tutorials or documents on the same. Please share
null
Is it recommended to customize keycloak database to add some tables and columns or there is another method to do that. I don't want to use that attributes table to add data about user. I want to add extra field to the user table like address and phone number..etc
Customize user table used by Keycloak