instruction
stringlengths
0
30k
While installing npm package from github getting error with message "is not valid repository name"
|github|npm|
Firebase Authentication Fails Only on release Version of Android App
I'm working with python for some years, and when it comes to unit testing and mocking I used to mock the collaborators of the unit under test where they are declared, for example if I want to mock a function called **my_function** declared in **my_module.py** module and used in my unit under test, I would write `...
where to mock in python
|python|unit-testing|mocking|
I upgraded build-info-extractor-gradle to the [latest 4.x release](https://mvnrepository.com/artifact/org.jfrog.buildinfo/build-info-extractor-gradle) and that fixed the issue. ``` buildscript { dependencies { classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.33.13" } } ```
I hope you are well. I have a question related to PostgreSQL. I created an application with login. The password is hashed with bcrypt, and so far everything is fine. But today I asked myself, what if the database is hacked, and the hash code in the password column is changed? That's why I would like to know if in POSTG...
How to block editing per column in PostgreSQL?
|sql|database|postgresql|
null
It looks like you're using Akka Classic's implementation of the ask pattern, `akka.pattern.Patterns.ask`. This implementation is logically equivalent (there are some slight optimizations under the hood) to spawning an actor which schedules a timeout message to itself and then sending a message to the askee purporting ...
WordPress won't allow you to have duplicate term slugs in the same taxonomy, they need to be unique in the database. However, we can extend WordPress core to make the url structure work while maintaining the unique term slugs. Using your example: `cars/ford/parts` and `cars/toyota/parts` urls where `ford_parts` and ...
>1. Put it through C# Function App that by the way takes it and is supposed to output the SAME FILE (so no Excel manipulation) If you are sending binary which is converted from base64 data, then you need to give something like this: { "$content-type":@{body('Get_file_content_using_path')['$content-type'...
null
I Have a "For **Loop**" In ASP.NET Core Like This : `<button type="submit" Form="FormActive" name="id" value="@item.I"></button>` <!--It Will Create SomeThing Like This:--> <button type="submit" Form="FormActive" name="id" value="1"></button> <button type="submit" Form="FormActive" name="id" valu...
I am creating an infinite marquee slider from right to left. When the user hovers over it, it will stop. Upon hovering out, it will start again. It's working but not smoothly. it's a little bit of jumping. Would you help me out with this? Please find the below code <!-- begin snippet: js hide: false console:...
Infinite marque slider is a little bit jumping
|html|jquery|css|slider|css-animations|
I'm trying to run C code on my Windows, but I have a low-end PC, and I don't think I *should* install Visual Studio. How do I only install the C/C++ compiler that comes with it, without installing Visual Studio itself.
|c|visual-studio|visual-c++|
You can use parameters ``` @pytest.mark.parametrize("x, y", (("aa", "aab"), ("xx", "aaabc"), ("aab", "ababa"))) def test_canConstruct(x, y): sol = Solution() assert sol.canConstruct(x, y) is True ``` and get the results individually ``` x.py::test_canConstruct[aa-aab] PASSED [ 3...
The most trivial way to download a binary file from an FTP server using VB.NET is using [`WebClient.DownloadFile`](https://learn.microsoft.com/en-us/dotnet/api/system.net.webclient.downloadfile): Dim client As WebClient = New WebClient() client.Credentials = New NetworkCredential("username", "password") ...
I have a webpage with two <picture> elements that each have <a> in front of them. The images are inline, next to each other. Whitespace is between these two elements (not sure why, but I'm fine with the small gap between them) and the whitespace itself has a little underscore or bottom-border type of characteristic to ...
I have written a code for finding prime numbers using sieve of Erasthenes algorithm, but the problem is my code works as it tends to be, but for only some numbers. It shows like "entering upto-value infinitely" as the error and for some numbers it works perfectly. As I started recently studying C in-depth I couldn't fi...
I found this comment... https://github.com/lovell/sharp/issues/3295#issuecomment-1186927843 and tried this... nitro: { hooks: { 'dev:reload': () => require('onnxruntime-node') } } Now I get a different error but I'm not sure if it's related or just another problem tha...
Maybe you can try this. I just tried it and it is working now! ``` conda update conda conda update conda-build conda install -n base conda-libmamba-solver conda config --set solver libmamba ``` This issue helped me a lot: https://github.com/conda/conda/issues/11919
Use dic to store key and expired time. This should work your code. from datetime import datetime, timedelta key_expiration_map = {} def generate_key(): key = str("4255") expiration_time = datetime.now() + timedelta(days=0, minutes=1) #Key expires in 1 day and 30 minute...
I would like to point out that I have been dealing with this issue for 1 month. I'm open to any suggestions. I have form pages that receive input data from the user. These pages contain a component called basa-crud-page. This base-crud-page component uses Template Driven Forms and the codes inside look like this. Th...
I am terribly sorry if this isn't the right place to ask but what I am hoping is that someone can explain what is going on in plain English. We're CompanyA and we were recently bought over by CompanyB. Our application was called after our Company, so for simplicity's sake let's say that we wrote an App and it was bu...
I've written the following code to compare the theoretical alpha = 0.05 with the empirical one from the buit-in t.test in Rstudio: ``` set.seed(1) N=1000 n = 20 k = 500 poblacion <- rnorm(N, 10, 10) #Sample mu.pob <- mean(poblacion) sd.pob <- sd(poblacion) p <- vector(length=k) for (i in 1:k){ muestra ...
Check your backend server port like this `http://localhost:**5000**/` and same port number using in your API to fetch the data in frontend like this `http://localhost:**5000**/books/${id}`
I have been working on a project for some time Some time ago, I committed a large file by mistake and then pushed it Now, every time I want to push the changes, that large file must also be pushed, which is about 200 MB, even though I deleted the file from the project. Note that I cannot go back to previous commit...
Is there a way to delete a large file that has already been sent to git by mistake?
|git|github|
null
You should try to use `LauncherActivity` instead of `MainActivity`. The package name of the LauncherActivity is also a little bit different. To sum up, the following command will start Instagram app from the terminal: adb -s 077743323A102985 shell am start -n com.instagram.android/com.instagram.mainactivity.L...
I have the following command adb -s 077743323A102985 shell am start -n com.instagram.android/.MainActivity i am trying to start the instagram app via command line, but why does it gives me this error: Starting: Intent { cmp=com.instagram.android/.MainActivity } Error type 3 Error: Activity c...
I've written the following code to compare the theoretical alpha = 0.05 with the empirical one from the buit-in t.test in Rstudio: ``` set.seed(1) N <- 1000 n <- 20 k <- 500 poblacion <- rnorm(N, 10, 10) #Sample mu.pob <- mean(poblacion) sd.pob <- sd(poblacion) p <- vector(length=k) for (i in 1:k) { mu...
Looking for information regarding user.config files and what causes these to be created by a .NET Framework application
|c#|.net|vb.net|user-config|
I'm using ASP.net C# and I have a table for products where I have a function that gets called whenever there is a change in a dropdown list selection. My function works perfect currently, but only if there is 1 row of data. If there is 2 or 3 rows or more, it only works for the top row and not individually for each row...
How to make a jQuery function work for same element in all rows of a foreach loop instead of just the first row?
|javascript|c#|jquery|asp.net|asp.net-mvc|
Please make sure your dagger version should be updated. [![enter image description here][1]][1] https://github.com/google/dagger/releases [1]: https://i.stack.imgur.com/z1nz8.png
It is possible to use attributes on the source files like file size and file modified time: ``` SELECT "$path", "$file_size", "$file_modified_time" FROM my_table LIMIT 10 ```
I am trying to setup OpenTelemetry Tracing with exports traces to Jaeger and Datadog Here is extracted example that I used. All containers is running and no errors in console. For jaeger url directly it is working and I see my traces but when I trying to change URL to `otel-collector` it is not sending traces. I d...
The following self explanatory and complete playbook meets your requirement: ```yaml --- - hosts: localhost gather_facts: false vars: inc_numbers: [ A, B, C, D, E, F, G ] users: - username: u1 status: active - username: u2 status: active - username: u3 ...
I was trying to add a p5.js sketch to my [Svelte](https://svelte.dev/) project, when I noticed that the sketch seemed to be running much slower than it was in the p5.js [web editor](https://editor.p5js.org/). To test my suspicions, I timed the execution of the draw call with `performance.now()`. Results in the p5.js...
I was consuming remote Kafka producer event and facing Class not found exception. so finally I removed configuration form .properties file added below config class in consumer. Here is my application.properties. spring.application.name=payment-service server...
I want to perform some analysis of source files in Gitlab-managed project. The analysis is about computing frequencies, counting unique strings etc. I came to conclusion that the plain bash `find`|`grep`|`sed`|`sort`|`uniq`-based solution would encounter its limits very soon. Hence I decided to use bash commands only t...
I tried creating a jar file from a project that's using JavaFX in Visual Studio Code.. When I run the app inside VSCode it works fine, but when I export it to a jar file it throws an error: > Error: LinkageError occurred while loading main class HelloFX > java.lang.UnsupportedClassVersionError: Preview features are ...
1ST CODE VARIANT: ``` let getLastDayOfMonth = function(year, month) { let date = new Date(); date.setFullYear(year, month, 28); while (date.getMonth() === month){ date.setDate(date.getDate() + 1); } date.setDate(date.getDate() - 1); return date.ge...
What is the difference?
|javascript|
null
I'm trying to animate a sine wave made out of a Shape struct. To do this, I need to animate the phase of the wave as a continuous looping animation - and then animate the frequency and strength of the wave based on audio input. As far as I understand it, the `animatableData` property on the Shape seems unable to han...
unable to run jar files (LinkageError, UnsupportedClassVersionError)
|java|javafx|jar|
null
I am writing an app using WebView to load my html, css, js and get some problems when loading the html. Here is the MainActivity ``` public class MainActivity extends AppCompatActivity { HTMLDataBase myDB1; ContentTableDataBase myDB2; CloudTableDataBase myDB3; InterviewDataBase myDB4; Con...
You can make the enum constants have powers of 2 as their values, and use bitwise or to combine them into a single enum value. Example: ``` // You can optionally add the [Flags] attribute to this enum ColliderType { A = 1, B = 2, C = 4, D = 8 // and so on } ... ColliderType combi...
To query a list of products from Google Play Billing Library version 5 (or later), you typically use the QueryProductDetailsParams method. Here's a general overview of how you can do this: val productList = ArrayList<QueryProductDetailsParams.Product>() productList.add( ...
I'm writing a function to reduce the key by 2 times. The function accepts a key in the following form: ``` Buffer.from('0xe581d529cc69816e768432a8aa09178470c9b1e703951f4a85e0dab7d8008e2a9e9e179', 'hex') ``` so that I can reduce the key I need to convert it to a string. The `toString()` or `toString('hex')` method...
null
I have written a code for finding prime numbers using sieve of Erasthenes algorithm, but the problem is my code works as it tends to be, but for only some numbers. It shows like "entering upto-value infinitely" as the error and for some numbers it works perfectly. As I started recently studying C in-depth I couldn't fi...
use [**`customtkinter.CTkImage`**](https://customtkinter.tomschimansky.com/documentation/utility-classes/image/) not [`ImageTk.PhotoImage`](https://pillow.readthedocs.io/en/stable/reference/ImageTk.html#PIL.ImageTk.PhotoImage). Try this. ``` import tkinter import customtkinter from PIL import Image # ,ImageTk...
{"OriginalQuestionIds":[77768982],"Voters":[{"Id":11107541,"DisplayName":"starball","BindingReason":{"GoldTagBadge":"visual-studio-code"}}]}
If you encounter this error in Expo, it is likely due to incompatible versions of some dependencies in your project. run `npx expo-doctor` then `npx expo install --fix` This fix the issue for me.
There are two ways which is what I found. Either go to the directory where kernels are residing and delete from there. Secondly, using this command below. List all kernels and grab the name of the kernel you want to remove ```lang-none jupyter kernelspec list ``` to get the paths of all your kernels. The...
Good morning, I am creating a site on Wix. I created a CMS database with dynamic pages. It works very well. I would however like to add a map for each trip (each page is one trip). So I created a Velo javascript table with the list of points to display on the map. Can you help me display these points dynamically (...
Wix and mapbox integration (CMS)
|wix|mapbox|velo|
null
After further research I found another conversation on CodeProject saying to use [`HasButton()`][2]. If I add this override to my class: BOOL HasButton() const { return TRUE; } Then it will show `...` on the right, which is at-least a step forward! Then, I used the code search feature in Visual Studio...
A preload script has to be attached to a window to be accessible: ```js new BrowserWindow({ ... webPreferences: { preload: path.join(__dirname, 'preload.js') } }); ```
I came across this problem recently for Vercel deployment. And i created `server_install.sh` file. ``` #!/bin/bash sed -i '' -e "s/git@bitbucket.org\/org_name\/repo_name.git#v1.0.1/git+https:\/\/$BITBUCKET_USERNAME:$BITBUCKET_PASSWORD@bitbucket.org\/org_name\/repo_name.git/g" package.json yarn install echo...
This is considered as anti pattern in modern React ecosystem. According to single responsibility principle keep your business logic in a simple way with custom hooks (Use prototype inheritance in it, if required), To store API calls use Tanstack Query and to store global data use Jotai (Atoms). This libraries are v...
When we commit something, Git starts tracking the folder/project. For unnecessary files, we can also delete those from the project. To delete the `.idea/` folder from the project, follow these steps as shown below: 1. Make sure that, you have added ```.idea/``` to your ```.gitignore``` file. 2. Run these follo...
File docker-compose.yml: ``` version: '3.9' services: wagtail: build: ./wagtail/ra_pegas ports: - "8000:8000" volumes: - ./wagtail/ra_pegas:/app links: - postgres postgres: image: postgres:16.2 ports: - "8001:5432" command: - "postgres" ...
|python|math|matrix|pytorch|matrix-multiplication|
PHP Startup: Unable to load dynamic library 'fileinfo' (tried: C:\xampp\php\ext\fileinfo (The specified module could not be found), C:\xampp\php\ext\php_fileinfo.dll (The specified module could not be found))
Store Values From a Multi-Area Range in an Array - **2D Array** <!-- language: lang-vb --> Sub Test2D() Dim ws As Worksheet: Set ws = ThisWorkbook.Worksheets(1) Dim rg As Range: Set rg = ws.Range("A3:C3,A5:C5,A7:C7") Dim MyArray() As Variant: ReDim MyArray(1 ...
Problem running wagtail(CMS for django) and postgresql in Docker Compose
|postgresql|docker-compose|wagtail|
null
You cannot directly use `localStorage` to init the state value because as you said `localStorage` is not available on the server side. You can init the state with a default value and use an `effect` to update its value as soon as the app is loaded on client side. ``` const [color, setColor] = useState<...>('...
You can use Docker [Volumes](https://docs.docker.com/storage/volumes/) > Volumes can be more safely shared among multiple containers. You can define Volumes on `dockerfile`, `docker-compose` file or on `cli` But to share volumes, you should define named volumes. You can do so using `cli` or `docker-compose`...
Error finding and rectification of my C code for finding prime numbers
There are two ndarrays, a and b I would like to parallel iterate through array a, and update array b at the same time. `a.par_iter().enumerate().for_each(|(i, data)| { b[i] = data + 1; });` However, I'm getting the message "cannot borrow b as mutable, as it is a captured variable in a Fn closure" I kno...
Rayon cannot borrow as mutable
|numpy|rust|numpy-ndarray|rust-ndarray|
null
I am creating an operating system and I created a child process using C with this code: ```c #include <stdio.h> #include <stdlib.h> #include <sys/types.h> #include <unistd.h> #include <windows.h> int main() { FILE *fptr; // Open a file in read mode fptr = fopen("filename.txt", "r"); /...
I have a DataFrame with a structure and want to convert it to another structure. firstName names variableName variableValue abc123 v_001 varX 1.0 abc123 v_002 varX 2.0 abc123 v_001 varY 3.0 abc123 v_002 varY ...
**Create a material.module.ts file importing all Material Packages:** import {MatSnackBarModule} … import { CUSTOM_ELEMENTS_SCHEMA, ModuleWithProviders, NgModule } from '@angular/core'; @NgModule({ imports:[MatSnackBarModule], exports:[MatSnackBarModule], schemas: [CUSTOM_ELEMEN...
Running the following command in **Developer PowerShell** pane within VS2022 fixed the problem for me: msbuild /target:Restore <YourSolution.sln> This command restored NuGet packages needed by MAUI project. After this command completed (and 15-20 seconds passed), a dialog appeared asking for Android SDK insta...
I've worked with many off the shelf systems including ones that were highly modified to meet specific business needs. Don't do it. Find a way to aggregate the data you are interested in your own system and tie it to Keycloak. Don't modify Keycloak. Every modification you make to Keycloak will drastically increa...
For me, adding "ts-jest/presets/default-esm" preset like below solved the issue. jest.config.js: ``` export default { testEnvironment: 'node', moduleNameMapper: { "(.+)\\.js": "$1", }, preset: 'ts-jest/presets/default-esm', // or other ESM presets } ``` Ref: https://kulshekhar.git...
Docker OpenTelemetry Collector contrib instrumentation issue with .NET