instruction
stringlengths
0
30k
One of the 4 possibilities here: - No changes made to models that require migrations; - Models not registered. You need to register new models in the `admin.py` file; - Migrations already applied. If you've applied some migrations earlier, but then made some changed that don't require migrations on their own - you...
Recast removes comments
null
I am trying formula `if` with multi conditions in Excel. but the result `#VALUE!`is there is something wrong with my formula please guide me Thanks | DATE | IN/OUT |TIME |DEF IN |DEF OUT |RESULT | | -------- | -------- |-------- |-------- |-------- |--------| | 13-03-24 | IN |7:35:4...
Getting the below error when connecting to Mongo Atlas. Though the warning is there connection is successful and able to access the database. I need to know how to get rid of this warning message CryptographyDeprecationWarning: This version of cryptography contains a temporary pyOpenSSL fallback path. Upgrade py...
CryptographyDeprecationWarning when trying to connect to Mongo Atlas
|python-3.x|mongodb|mongoatlas|
You're seeing the output twice because the python interpreter opens and runs main.py twice; - First when running `python main.py` - A second time when example.py imports main.py via `from main import mods` Each time main.py is interpreted , `printHello()` is then called. To prevent the second time, you can repl...
firstly I'm new to this, I wanna know which file is my data stored on 'we internet' app I'm curious to understand about which p language this app written by? I used apktool but it failed to load additional packages. what “classes” stand for? I know I'm asking more questions, sorry for this, all I need is some ...
I have Ionic 7, Angular, Standalone app. I am currently trying to implement linking anonymous account to registered/loggedin account. First scenario is a user who doesn't have any registered account below. This works fine and I can see anonymous account merged with newly generated account. const anonymousUse...
Firebase link existing user to anonymous account?
|angular|ionic-framework|firebase-authentication|angular-standalone-components|
> I need my health.py to run in background As [David](https://stackoverflow.com/users/10008173/david-maze) [commented](https://stackoverflow.com/questions/78203542/how-to-run-a-background-process-inside-a-child-docker-image-in-docker-container#comment137873369_78203542), you need to make sure the [`CMD`](https://d...
[This video][1] assisted me in finding a solution. Both the server and the client required modifications. This is the full implementation of the server: const http = require('http'); const express = require('express'); const { Server } = require('socket.io'); const app = express(); ...
the problem is the display of LinearGradientBrush on the button, in Android it is correct, in iOS it is not ``` <Button Text="Войти" > <Button.Background> <LinearGradientBrush EndPoint="1,0"> <GradientStop Color="#DA8BFF" Offset="0.1" /> <GradientStop Color="#839BFF" Offset="...
``` m = [[[math.inf] * 10] for i in range(10)] for i in range(len(m)): for j in range(len(m)): if(i == j): m[i][i] = 0 ``` [enter image description here](https://i.stack.imgur.com/YypkA.png) I try to insert zero And I used the debugger to watch the process go. Instead of changi...
Setting Diagnonal of a Matrix to Zero in Python
|matrix|diagonal|
null
Fan.cs ``` using System; namespace Fans { class Fan { private int speed; private double radius; private string color; //default constructor public Fan() { this.speed = 1; this.radius = 1.53; this.color = "green"; ...
#include Header files in C with definition too
|c++|c|linker|header|
null
Lets assume we have a map as below, map<string, map<string, int>> my_map; i want to use insert method in one single line like below my_map.insert("TEST", make_pair<string,int>("ONE",2)); and its not working. i would like to use inner maps for the syntax showed below cout << my_map["TEST"]...
how to insert inner map in one line insert method
|c++|
I'm new to NetLogo and I'm having some problems for which I couldn't find an answer in the internet. I have made colonies within which males and females live. Males have a constant size of 10 and females have sizes set by a random-normal distribution. I would like only females with size >= 10 to mate. However, when ...
All turtles are mating in NetLogo even after setting a condition
|netlogo|agent-based-modeling|
I have tauri command on backend(tauri) that returns a string(light theme value from windows registry). I need to get it on frontend + listen if this string changes. I couldn't find needed functions in leptos or tauri docs. So I came up with this crutch on frontend: ```rust let (is_light_theme, set_is_light_theme) = ...
How to listen to "Backend" value change in tauri-leptos app?
|rust|rust-tokio|tauri|leptos|
make suitable changes as needed. ``` import sys from PyQt5.QtWidgets import QApplication, QMainWindow, QTreeView, QFileSystemModel class FileTreeView(QMainWindow): def __init__(self): super().__init__() self.setWindowTitle("File Treeview") self.setGeometry(100, 100, 800, 600...
We have an online store and I would like to modify the label below the shipping method (hook: woocommerce_cart_shipping_method_full_label) based on the stock status of the products in the cart. Basically, if there is 1 product whose stock status is "to order", then the label for shipping method 1 = "48/72h" and th...
I can't add text to VS Code when committing to GIT
|git|visual-studio-code|
I'm working on a tool for animating 3D objects, and I've run into an issue that I'm not sure how to solve: There is a rotation gizmo implemented, which works fine. However since it's an animation tool, I need to end up with euler angles after a rotation is performed. And the issue is, since I'm converting to quatern...
For the approach you want in your app you need to use protected routes you can learn more in this blog : [: https://blog.logrocket.com/authentication-react-router-v6/ Create normal routes import { createBrowserRouter } from 'react-router-dom'; //import all the page components here export cons...
Why is this namespace unable to be found?
|c#|class|namespaces|
null
I'm kinda new to python and it's the first time managing environments with Anaconda. There's some discrepancy that I can't figure out between my conda environment and my visual studio code, I'll explain: I created a conda environment with python 3.8.11, recognised by vscode: [![vscode config][1]][1] But if I ...
Can't install packages in python conda environment
|python|anaconda|
# aws_cognito_user_pool.user_pool will be updated in-place ~ resource "aws_cognito_user_pool" "user_pool" { id = "us-east-1_xxxyyy" name = "my-user-pool" tags = { "Name" = "my-user-p...
Why does terraform aws_cognito_user_pool always show as "updated in-place" on every single terraform plan?
|terraform|amazon-cognito|aws-userpools|
guard let url = URL(string:"https://blaaaajo.de/getHiddenUsers.php") else { return } let postString = "blockedUsers=245,1150" var request = URLRequest(url: url) request.httpMethod = "POST" request.httpBody = postString.data(using: String.Encoding.utf8); do{ ...
null
Basically your observations are correct. Here's my timings and notes Create 2 arrays, one much larger, and a list: In [254]: a = np.random.randint(0,1000,1000); b = a.tolist() In [255]: aa = np.random.randint(0,1000,100000) The method is faster, by about 7µs in both cases - that's basially the over...
Found the answer... For a Flutter web app, the horizontal scrolling is activated by holding down the shift key whilst using the mouse wheel.
# Option #1 We can do that with a [lifecycle precondition][1] in a null_resource A couple of things before we dive into the code: - Your code has two `sc1_default` variables I'm assuming that the second one was a typo and what you meant there is `sc2_default` - For additional validation use `type` in the variab...
Encountering `Fatal error: Uncaught mysqli_sql_exception: Table 'kopsis.setting_email' doesn't exist in /www/wwwroot/kopsis/config.php:66 Stack trace: #0 /www/wwwroot/kopsis/config.php(66): mysqli->query() #1 /www/wwwroot/kopsis/index.php(2): include('...') #2 {main} thrown in /www/wwwroot/kopsis/config.php on line ...
|mysql|
I submit the same text, but the similarity value is different. It feels like the model chooses one of 3-4 behavior patterns. How can I make the results deterministic? ``` if find(IMAGE_CLASS).get_attribute('class') == "keysMaker_picdiv": description = find(IMAGE_TITLE).get_attribute('title') ...
I get very different comparison results for the same texts. [sentence-transformers/all-mpnet-base-v2]
|comparison|sentence-transformers|
null
Change collab environment to GPU necessary and run this : !pip install git+https://github.com/huggingface/accelerate.git !pip install git+https://github.com/huggingface/transformers.git !pip install bitsandbytes
Whenever you have a [mapped type](https://www.typescriptlang.org/docs/handbook/2/mapped-types.html) of the form `{[K in keyof T]: ⋯}`, with `in keyof` in there directly, it will be a *homomorphic mapped type* as described in https://stackoverflow.com/q/59790508/2887218. That means [`readonly`](https://www.typescriptlan...
React-router is very strict about what can be a child of `<Routes>`. You cannot put any custom component as a child, even if that child renders a `<Route>`. So you will need to redesign your `PrivateRoute` component to work *inside* the `<Route>`. For example: ``` export default function PrivateRoute({ children }) { ...
Unreal Engine | [MULTIPLAYER] Possessing a pawn (thirdpersoncharacter), simple movement with WASD not working
|sql|mysql|
Encountering `Fatal error: Uncaught mysqli_sql_exception: Table 'kopsis.setting_email' doesn't exist in /www/wwwroot/kopsis/config.php:66 Stack trace: #0 /www/wwwroot/kopsis/config.php(66): mysqli->query() #1 /www/wwwroot/kopsis/index.php(2): include('...') #2 {main} thrown in /www/wwwroot/kopsis/config.php on line ...
If you build an application using Flutter, There are many possibilities for sound not to play > 1. You may be using an older version of flutter_local_notifications Please Update it to the latest. > 2. Missing sound in apns payload If you want to play a custom sound, you can add your sound file inside the r...
|php|woocommerce|
Well, I might be oversimplifying this. But, you can invoke a lambda function from within the same lambda function. With the approach I'm explaining below, there's only one lambda function and no other services. 1. Lambda is triggered with email address and `index` value `1` as event parameters 2. Lambda sends the fir...
null
Currently in our app we do not override the system’s default method for alphabetizing data, it will sort capital letters over lowercase letters. How to enable case-insensitive across the application without changing the collation? Database: PostgreSQL Any idea on this ?
# Eror ``` FAILED tests/users/api/test_auth.py::test_create_user_failed_unique_phone_number - RuntimeError: Task <Task pending name='Task-22' coro=<test_create_user_failed_unique_phone_number() running at /app/tests/users/api/test_auth.py:36> cb=[_run_until_complete_cb() at /usr/local/lib/python3.12/asyncio/base_even...
--Remove Duplciates[SKR] --Option A: select * --delete t from(select rowNumber=row_number() over (partition by Member_Key order by Member_Key) , Member_Key, MemberID from dbo.Member m )t where rowNumber > 1 --Option B: with cte as ( select rowNumber=row_number() over (partition by Member_...
First `pivot` the data to a long format, then you can plot the values on the y-axis for each month, defining the groups by the `day_of_week`. ``` r library(tidyverse) df %>% pivot_longer(-day_of_week, names_to = 'month') %>% ggplot(aes(x = month, y = value, color = day_of_week, group = day_...
{"OriginalQuestionIds":[75828537],"Voters":[{"Id":7644018,"DisplayName":"Paul T."},{"Id":7209631,"DisplayName":"vitruvius"},{"Id":22180364,"DisplayName":"Jan"}]}
Input and output of signed single-digit decimal numbers
I have imported 1000 sample rows from various tables into a SQL Server (let's call it `SQLServer1`). I have also imported the rows into the second SQL Server (`SQLServer2`). When I execute the following query on `SQLServer2`, I get no results, however when I execute the same query on `SQLServer1`, I get the expec...
RuntimeError: Event loop is closed when I call db.comit()
|sqlalchemy|pytest|fastapi|factory-boy|pytest-asyncio|
null
As I understand from your question, you store the `date` in Firestore in the following format: 2024/02/29 00:00:00 GMT05.30 Which is not quite correct. Such a field can exist inside a document in Firestore only as a string. I'm saying that because `GMT (Greenwich Mean Time)` is a timezone and the timestamps i...
null
if you are facing the same issue again, try manually copy pasting main.jsbundle in ios xcodeworkspace then run it again
How can I trigger the **handle_generate_automatic_ticket** jQuery function on the processed order once the customer lands on the WooCommerce thank-you.php page? **The problem:** I currently have to click a button on the WooCommerce back end to generate the lottery ticket number that has just been ordered. I need thi...
it seems to me you could achieve your goal by means of formulas if you insert one column and one row you could use this formula =IF(SUM(G$5:G5)<G$2;IF(SUM(F6:$F6)<8;1;"");"") [![enter image description here][1]][1] or you can keep your original rows and columns layout and adopt this other formula: ...
|python|tkinter|
Call [`Language.Haskell.TH.Syntax.addDependentFile`](https://hackage.haskell.org/package/template-haskell-2.8.0.0/docs/Language-Haskell-TH-Syntax.html#v:addDependentFile).
I came across this problem on the internet of c language. The question was that will this code compile successfully compile or will return an error. ``` #include <stdio.h> int main(void) { int first = 10; int second = 20; int third = 30; { int third = second - first; prin...
You are calling `setVal("")`, which is changing the data type from an array to a string.
I would like to create a function that takes three arguments (n,m,d) and it should output a matrix with n rows and m columns. The matrix should be populated with values 0 and 1 at random, in order to ensure that you have a density d of ones. This is what I have come up with so far, just can't seem to work out...
You have to import androidx library like import androidx.preference.PreferenceManager For kotlin DSL: implementation("androidx.preference:preference:1.2.1") For KSP: implementation("androidx.preference:preference-ktx:1.2.1") For more info, you can visit official document of [Preference][1]...
I am using PrivateGPT to chat with a PDF document. I ask a question and get an answer. If I am okay with the answer, and the same question is asked again, I want the previous answer instead of creating a new one. How can I handle this? Are there any options available? settings-local.yaml llm: mode: llamacpp ...
How to locate relevant tables or columns in a SQL Server database
|sql-server|t-sql|
I have been struggling with this issue as well when trying to set up a VSCode remote development container (docker compose build but should not make a big difference) with x11 support. My requirements were as follows, since I intended not to expose my development machine too much to the open internet: - No `network...
I have been struggling with this issue as well when trying to set up a VSCode remote development container (docker compose build but should not make a big difference) with x11 support. My requirements were as follows, since I intended not to expose my development machine too much to the open internet: - No `network...
{"Voters":[{"Id":3403834,"DisplayName":"user58697"},{"Id":6243352,"DisplayName":"ggorlen"},{"Id":22180364,"DisplayName":"Jan"}]}
I'm developing a clock widget in Flutter that displays the current time. I want to provide two methods for updating the time asynchronously: one using a continuous stream of time updates, and the other using a timer that updates the time at regular intervals. **Code Explanation:** *clock() Method:* 1. This m...
From the docs ![](https://i.imgur.com/WQgtocU.png) It is the browser in charge of rendering text, you have to analyze where text is rendered. With Canvas or SPAN Far from perfect. This one: * wraps each word in a ``<span>`` * calculates by ``offsetHeight`` if a SPAN spans multiple lines * of so it found a...
I am learning vhdl and fpga, I have a digilent board Nexys 4 , what I am trying to do is sending via UART a string, I have been sucessfull in sending a character everytime a button is clicked on the board, now I want to send the whole string after every button click but I dont get any output from the terminal(I use pu...
How can I trigger handle_generate_automatic_ticket jQuery function in WooCommerce thank-you.php page instead of manually generating a ticket number?