instruction
stringlengths
0
30k
I have an Enum that I already use for multiple other purposes, however in those cases I use the Enum like a public variable of the class meaning I can access it like `EntityManager.FAll`. However, in the new use case I have for it I want to use the Enum in that class as a function parameter of another class's function...
How to omit SecurityTokenReference from KeyInfo using wss4j?
|java|wss4j|
null
I tried this script but didn't go well. ``` def generate_grid(): grid = np.zeros((10, 8), dtype=int) # Fill the first row with black and the last row with white grid[0] = 1 grid[-1] = 0 # Generate random grid until all conditions are met while True: grid[1:-1, :] =...
2D interlocking puzzle script not working
|grid|2d|connectivity|
null
|excel|excel-formula|
|excel|indexing|excel-formula|match|approximate|
I have created a database that has one table that keeps track of employee skills and another which displays projects that these employees can be assigned to. I need to have multiple employees asigned to the same project but i do not know how i would do this and when i try to use query to fill in this space with anythin...
How to assign multiple Foreign keys to one box in an sql table with PHPmyadmin
|php|sql|database|phpmyadmin|
null
|json|powerbi|powerquery|
|prometheus|grafana|offline|grafana-loki|
I recently fine-tuned a model to recognize if a sentence was inside the context i choose, and in doing so, preparing a well-structured dataset made it all. You could cross-use another model that accepts all the answers you wish after using the one you're fine tuning to get the masked word. Dataset Sample: ... 1 ...
There are two errors in your code. ## 1. Files on the web are case-sensitive You load the file `searchbar.js`, but your file is called `searchBar.js`. Small/Big letters might not be important on a Windows PC, but they are important on the web. ## 2. You are loading a named export, but you want the default W...
Try this selector to get every div element whose id attribute contains the sub-string "tippy-" div[id*="tippy-"] {display: none !important;} **NB:** Since you’re hacking someone else’s script (video embeds) you’d better use a FLEXIBLE solution like this (use an asterisk not a carat) or you’ll be back to sc...
I have an Azure function project within a [GitHub repository][1] (AnkiSentenceCardBuilder being the Azure function project) and I want to pull the backend code out into a new sub repository, so I can reuse it with other presentation layers, such as a WinForm. In order to keep the Git history, I planned on updati...
Pi4J minimal example's LED doesn't blink
|raspberry-pi|pi4j|
null
I'm trying to write a xUnit test for `HomeController`, and some important configuration information is put into `Nacos`. The problem now is that I can't get the configuration information in nacos. Here is my test class for `HomeController`: ``` using Xunit; namespace ApiTestProject public class Home...
how to configure the IDE settings to recognize.story files (or any other file extension you're using for JBehave stories) and associate them with a text editor that supports syntax highlighting. I tried running my .story files . All code is in black and cannot move to next function on click+enter .
To enable syntax highlighting with color for JBehave stories in Eclipse
|eclipse|selenium-webdriver|testing|syntax-highlighting|jbehave|
null
I want to set up a conditional reverse proxy feature with Envoyproxy, based on an OAuth access token, between my users and my application. I have already present a keycloack instance generating access tokens, and inside the generated access token there is a already a custom attribute "mygroups" with a list of business...
I am trying to analyse execution time of a query. I used the following statement to check CPU and elapsed time: SET STATISTICS IO, TIME ON; For a single query, I can understand the CPU and elapsed time. But when it comes to a complex query, say as follows (Pretty big and for the time being, not sharing any sa...
Found a number of issues here: First, range in line 25 is calling a sheet, not a range of cells. I have changed it to `e.range` to call on the event object. Also, I believe you have to use an installable onEdit trigger to utilize the mail service. I changed the name of your function from `onEdit` to `onMyEdit` an...
From the docs > Derives a store from one or more other stores. **The callback runs initially when the first subscriber subscribes** and then whenever the store dependencies change. > ...you may need to retrieve the value of a store to which you're not subscribed. **get** allows you to do so. **This works by creat...
I have a springboot application which uses Google Cloud Storage Buckets. Now for the local development the default `gcloud auth application-default login` works fine but this app is to be deployed on a cloud. Though I have tried setting up the spring configurations to use the enviroment variable `GOOGLE_APPLICATION_...
Deploy Springboot app on heroku which is using google storage services
|spring|spring-boot|google-cloud-platform|heroku|google-cloud-storage|
null
Eventually I used the `isIgnoredFile(file: VirtualFile)` function in the `com.intellij.openapi.vcs.changes.ChangeListManager` class in combination with the [ProjectFileIndex](https://github.com/JetBrains/intellij-community/blob/master/platform/projectModel-api/src/com/intellij/openapi/roots/ProjectFileIndex.java) that ...
Got it. In Plasma 6, the presence of a shadow under the popup widget depends on the current style. For the Breeze style (which is default for Plasma 6), you need to add a dynamic property `_KDE_NET_WM_FORCE_SHADOW` and set it to `true`: ``` cpp class CustomPopup : public QWidget { Q_OBJECT public: exp...
I think the answer to question may lie [here](https://stackoverflow.com/questions/14220321/how-do-i-return-the-response-from-an-asynchronous-call/14220323#14220323), but I can't understand the answer. The value of `searchedItem` remains unaltered. The following is my pseudocode. ```lang-js try { let searchedI...
I have a common search bar to search products on every page , so how to search products on the backend using the search words. like in e-commerce sites if we search black shoes , we get all products related to black shoes even if the listed products' names do not have the terms 'black' , 'shoes'?
I have a flutter application thats generate a pdf with flutter pdf package. I want to automate the process of generating the **exact** pdfs every "month" for example. hence, thought of using the same pdf generation function I already wrote in my app in cloud function that will be called with google tasks. how can...
run dart script from firestore cloud functions
|flutter|dart|google-cloud-firestore|google-cloud-functions|
I am trying to crop images to detect faces using dlib but I keep getting this error,[The error](https://i.stack.imgur.com/B3ywF.png) I have downloaded the .dat file in the same directory where the .ipynb file is stored but the issue persists. I downloaded the file from dlib.net.
Unable to open shape_predictor_68_face_landmarks.dat
So i have managed to store my image on firebase storage from my node js backend and storing the link to that image in my database also but when I try to go to the URL where my image is stored I get the error in the image attached so looked it up and tried changing my rules for my storage to allow read from all but stil...
how to access image stored on firebase cloud storage
|reactjs|node.js|firebase|
Here is a slightly edited version that will work in the expected way: <!-- begin snippet: js hide: false console: true babel: false --> <!-- language: lang-js --> $("#selected-cases").on("input",function(){ const ids=this.value.split(",").map(v=>v.trim()); $(".form-check-input").each(function()...
There is another way to put a click application into a continuous loop. For this solution to work, `click>=3` is required. By tweaking your `main()` function a little bit to look like this: def main(): while True: try: cli.main(standalone_mode=False) exce...
|machine-learning|image-processing|computer-vision|face-detection|
null
There is an important difference in assignment. These two assignments are not equivalent: df['j'] = df['j'].astype('uint8') df.loc[:,'j'] = df['j'].astype('uint8') - Indexing with `[...]` replaces the series. The new series comes with its own `dtype`, the existing `dtype` is discarded. - Indexing w...
I grabbed an image and added a title (`MUPPETRY`) and description (`PUPPETRY`) in **Adobe Lightroom** using the metadata panel like this and then exported as JPEG: [![enter image description here][1]][1] In case you are wondering, I chose silly names for near certain uniqueness. --- It seems that **Lightroo...
I want to create a login system in the react native app using firebase auth. In there a i have used ValidateJS for the frontend validation. But i am stuck with how to implement the confirm password field. I am not able to validate that the Confirm Password field is same the the Password Field. I have pasted the cod...
How to validate if Confirm Password is same or not with the Password in React Native using ValidateJS?
How to pull out backend code from an Azure function into a sub repository while keeping git history?
|c#|git|visual-studio|github|azure-functions|
I am trying to perform a brute force attack using Burp Suite on a login page on my localhost and it is giving me a status code 200 for each value it is checking or sometimes it is giving me a status code 411 for each value. This includes the correct value for the username and password as well what do I do? how do I get...
Brute force attack using burp suite
|security|brute-force|burp|
null
There's no penalty for using two header tags, but make sure it makes sense.
With Rest Assured i'm parcing rest-response and comparing arrays. Response body: { "error": { "errorObjects": [ { "risks": [ { "description": "Risk1", "riskId": 6654152 }, ...
Rest-Assured and Hamcrest matchers not working with comparing arrays of ints
|java|arrays|assert|rest-assured|hamcrest|
Try this selector to get every div element whose id attribute contains the sub-string "tippy-" div[id*="tippy-"] {display: none !important;} **NB:** Since you’re hacking someone else’s script (video embeds) you’d better use a FLEXIBLE solution like this (**use an asterisk not a carat**) or you’ll be back t...
|javascript|syntax|comments|
|json|supabase|supabase-database|
I think you should create [ingress Class Trafeik](https://docs.k3s.io/networking#traefik-ingress-controller) based on the documentation. Probably it work easily on AWS or GCP since ingress classes are auto propagated on platform managed clusters. Consider also using [pathType: Prefix](https://kubernetes.io/docs/c...
I am building a dynamic animation based on user input, I read the input and create corresponding `Animated.timing()` objects that I then pass into `Animated.sequence`, which I set to loop. Simplified code would look like this: ```js let animations = []; for ( /* read user input, use it to define params of the an...
Run code when `Animated.timing()` in `Animated.sequence()` completes
|javascript|reactjs|react-native|animation|
A=np.arange(4*5).reshape(4,5) T=np.array([1, 1]) R=np.einsum('i,jk->ijk',T,A) B=np.array([1,100]) C=R-np.reshape(B,(2,1,1)) Your answer are C[0],C[1]
You return values from your functions but you don't assign these values to any variables. Here is the corrected code: ```py import numpy as np import pandas as pd def user_input(): while True: weather_type = input( "Which weather type (temperature, humidity, pressure, or rainfa...
|react-native|validation|react-native-firebase|
<%= link_to "Invite Admin", new_admin_invitation_path, method: :get, class: 'btn btn-primary btn-sm me-2' %> when i click on this button i am redirecting to the sign in page and getting 401 Unauthorized error in logs. i want to redirect to the new page not on sign in page
Devise:Invitable redirecting me to sign_in
|devise|devise-invitable|
null
Lets init a state, giving object as initial state. To update any property of the object, we usually clone state and re-set using setter. But in following example, without any setter, I can update properties of that object and they are reflected on the dom without any complain. ```typescript import React, {useSt...
We have have a Windows Task Scheduler job that runs an Excel xlsm file with some command line arguments as below: Program/script: "C:\Program Files (x86)\Microsoft Office\Office15\EXCEL.EXE" Add arguments (optional): "C:\File\Path\MyMacroEnabledFile.xlsm" /e/Arg1,Arg2 We would...
Is there a way to pass Today's date as a command line argument to Excel from a Windows Task Scheduler Job
|excel|vba|scheduled-tasks|command-line-arguments|
To future Django coders. If you get this message in your Django Channels Consumer subclass, make sure the correct methods are marked as async: ``` async def disconnect(self, close_code): pass ``` is the correct way. Without the prefix async, I get the same above error, whenever my client calls cl...
OAuth access token attribute based reverse proxying of http ressources
|oauth-2.0|keycloak|envoyproxy|role-based-access-control|
null
### Description Hello, I'm working with CakePHP 4 and facing an issue with Paginator links not respecting my custom route definitions. To give you a context, I've set up a custom route like so: ```php $builder->connect( "/categories/{category}", ['controller' => 'Items', 'action' => 'category', 'i...
CakePHP 4 Custom Routing Issue with Paginator Links
|php|cakephp|pagination|cakephp-4.x|
So apparently dotnet core has a [```System.Net.IPNetwork```][1] struct that makes this a lot easier than having to twiddle bits inside a Uint32. We can set up your sample data like this: ``` $sites = @" sub1;10.41.92.0/29 sub2;10.41.92.40/29 sub3;10.188.2.0/24 sub4;10.248.232.0/21 sub5;151.156.179.0/24 ...
|node.js|google-cloud-firestore|google-cloud-functions|
null
SOLVED. The problem was in the Security Atributes on the Source for Role or Group Schemes. It was the wrong selection. The right selection is Access Control User Roles Asssignments.
|html|list|button|blazor|
I have two plots, and I would like to put them in an html file, with an option to alternate between them by selecting different titles. Is this possible in plotly ?
how to add multiple plot in alternating plotly html file in python
|html|plot|plotly|
I have a simple ui, which should print every key that I've pressed. I need to generate signal **once** per real key-press. How can I achieve that? In default, tkinter generates signal once, than waits about 0.5 sec and starts generate signal in loop, until *KeyRelease* event happens. ``` if __name__ == '_...