instruction
stringlengths
0
30k
Since there is almost no description about the Use Case, what the input could be look like including edge cases, extremes, etc., not sure if the following minimal example could be a feasible approach ```lang-yaml --- - hosts: localhost become: false gather_facts: false vars: my_list: - /tm...
I am searching for the methods to implement a custom payment gateway in OpenEdx Tutor Ecommerce. As far as i have found, OpenEdx as of now doesn't support custom payment gateway. which means that we would have to make changes in the codebase rather than use plugins. Can anybody guide regarding it? anything rega...
How to integrate a custom payment gateway in OpenEdx Tutor Ecommerce?
|python|payment-gateway|openedx|
`enter code here`i am trying to do the beaglebone black with `core-image-sato` build using yocto project version 4.0.16 (kirkstone). I am using Ubuntu 20.04LTS The build `MACHINE ?= "beaglebone"`, and then I encountered an ERROR during the process. The error is related to `core-image-sato-1.0-r0 do_rootfs`, and the ...
How can I tell that a query runs multi-threaded in QuestDB?
|sql|database|questdb|
You should check the execution plan for your query. You can see it by adding EXPLAIN clause at the beginning of the query text: ```sql EXPLAIN SELECT timestamp, first(price) AS open, last(price) AS close, min(price), max(price), sum(amount) AS volume FROM trades WHERE symbol = 'BTC-US...
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 - ``` <?php Class Team extends Database { private $dbConnect...
**I have 2 clusters,both publicly accessible,same security groups,but in different public subnets,I can connect to one cluster from local, but not the other. Tried connecting via cluster ip, tried adding my ip as well as 0.0.0.0/0 to security groups, rebooted cluster after allowing public access, nothing helped.** ...
I'm new one in Django and trying to develop website. What I need is to use slugs in URLs in Django. When I use id's everything works well. I have done the following steps: 1. I have a model Posts with . ``` class Post(models.Model): title = models.CharField(max_length=100) slug = models.SlugFiel...
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...
Using an Enum inside a Class as a Function parameter outside of its Class
|c++|windows|class|enums|
null
I'm trying to implement some basic auth for a NextJS app. I have a FastAPI backend which sends a JWT as a cookie on a successful login, which I can see setting the cookie in chrome dev tools, but I can't access this in NextJS. The FastAPI code for the token request is: ``` @router.post('/users/token') async ...
Accessing/Sending Cookies with NextJS
|next.js|cookies|fastapi|
you can manually transform the data in order to compare them to a uniform distribution: ``` transformed_data = -np.log10(p_values_data) expected_quantiles = stats.uniform.ppf(np.linspace(0.001, 0.999, len(transformed_data))) ``` and then the command you've already provided
{"OriginalQuestionIds":[1535327],"Voters":[{"Id":523612,"DisplayName":"Karl Knechtel","BindingReason":{"GoldTagBadge":"python"}}]}
I'm using df.compare where I'm doing a diff between 2 csv's which have same index/row names, but when it does df.compare, it does the diff as expected but gives the row index numbers as 0,2,5,... where ever it find the diff between the csv's. What I'm looking out is instead of the row numbers where It finds the diff, ...
i am trying to do the beaglebone black with `core-image-sato` build using yocto project version 4.0.16 (kirkstone). I am using Ubuntu 20.04LTS The build `MACHINE ?= "beaglebone"`, and then I encountered an ERROR during the process. The error is related to `core-image-sato-1.0-r0 do_rootfs`, and the details are attac...
Hello You can check this tool from google [Google Vision Api](https://cloud.google.com/vision?_gl=1*fac9wt*_up*MQ..&gclid=Cj0KCQjwncWvBhD_ARIsAEb2HW_oca4BYUArStP5y35WD5cf5lWarhAdkEsyFF8s_X0OtSIOEKfDHnMaAuQ3EALw_wcB&gclsrc=aw.ds)
null
"Best" is obviously subjective, but your proposed approach works well. And it describes the only limitation, forcing the use of one over the other. > I would say if it's single column unique then can use `unique=true` at column level and if unique key contains multiple columns then use `@UniqueConstraints`. Of c...
The code below raises `TypeError: insert_image() takes 2 positional arguments but 3 were given`. Can someone tell me how to fix it? ``` class PDFEditor: def __init__(self, input_pdf_path): self.pdf_document = fitz.open(input_pdf_path) def add_image(self, page_number, image_path): pdf_pag...
Getting 404 error when trying to use slugs in Django
|django|slug|
null
`''file:///......../node_modules/openai/core.mjs:285 throw new APIConnectionError(cause: response);` `APIConnectionError: Connection error. at OpenAI.makeRequest (file:///......../node_modules/openai/core.mjs:285:19) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) ...
when i use openaiAPI, a error such as "APIConnectionError: Connection error."
|node.js|openapi|
null
I have below regex <!-- begin snippet: js hide: false console: true babel: false --> <!-- language: lang-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 = s...
I'm working on my thesis about Ethereum and I want to extract some historical data on a daily basis from 2016 to now (on an hourly basis could be perfect but I can do with daily). The data I need are : - Daily transaction on the Ethereum blockchain - Daily market capitalization (or supply because I already have ...
Historical data scrapping / collection for Ethereum
|python|api|ethereum|blockchain|
null
Currently there is no `Name` field in the model `Genre`, however there is a `name` field. `catalog migration 0001_initial` indicates this was not always so and it changed at some point. <pre><code>migrations.CreateModel( name='Genre', fields=[ ('id', models.BigAutoField(auto_created=True, primary_ke...
We have 1 scenario where user accidentally voided the payment through datachange using Check#voidCheck() method. Is there any way to unvoid the payment ? CC Version : v9.0.4 , PL Version : v9.14.11
How to unvoid payment in ClaimCenter
|guidewire|
I'm currently trying to build a trello-like application with lists and tasks. I wanted to incorporate drag n drop functionality so I added the dndkit library. I've [managed][1] to make the tasks sortable between the lists, and I would like to make the lists sortable aswell. However when I try to nest DndContext and Sor...
You can simplify your code a bit. See if this works with your word list: ``` import java.nio.file.*; import java.util.*; import java.util.stream.*; import java.io.*; public class WordList { public static void main(String[] args) throws Exception { System.out.println(new WordList().readWordsFromF...
Doing: ```dart switch (item.runtimeType) { case TodayDivider: ... ``` uses a [constant pattern](https://dart.dev/language/pattern-types#constant) that compares the `Type` object returned by `item.runtimeType` for equality. Equality for `Type` objects is object identity; they compare equal only to themsel...
I can get an Azure Site Recovery plan with powershell : $RecoveryPlan = Get-AzRecoveryServicesAsrRecoveryPlan | where {$_.name -eq "MyRecPlan"} But how do I get a list of all the VMs in this plan with powershell?
Azure Site Recovery - Powershell - How to get a list of all the VMs in a Recovery Plan
|azure|powershell|
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 | 3 | | red | 6 | If Col1 contains "ed" return t...
API cannot connect to SQL with Docker
|c#|asp.net|sql-server|docker|docker-compose|
I'm trying to write this code and I'm only partially done. Not sure how to finish it. Tried many times only to get errors. See attachments for partial code. [code 1][1] [code 2][2] this is the program and what the output should be. only hla basic instructions. use jmp and cmp for loops PROGRAM 6: Crazy 8s Ga...
I've deployed OpenStack via DevStack on an Ubuntu server (IP: 192.168.1.9). I'm seeking guidance on exposing OpenStack instances to my local network (IP range: 192.168.1.x). How can I configure OpenStack to allow instances to be accessed from my host machine using local network IPs without encountering conflicts? Any i...
How to Expose OpenStack Instances to Local Host Physical Network?
|openstack|openstack-neutron|
null
<html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.4/jquery.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.4.0/p5.js"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.m...
The problem of making a card rotation sound when you click on the green space underneath the card while it is turned behind its back
|javascript|html|css|frontend|backend|
You will need to change a little your HTML as below (taking out the image and moving also the .buz class at fifth position inside .container_team). You can use then the columns:2; layout for your .container_team and display:inline-block for its children (named here ib) . <!-- begin snippet: js hide: false console: f...
{"Voters":[{"Id":13434871,"DisplayName":"Limey"},{"Id":20002111,"DisplayName":"Friede"},{"Id":16217248,"DisplayName":"CPlus"}],"SiteSpecificCloseReasonIds":[11]}
I'm creating a subroutine in rust which converts a custom datatype which represents an object's attributes and it's values into that object, but I have no idea how to do so... I'm doing this because I want to create objects from the users input, my plan is to first take the input and parse it into the custom data ty...
Please, I'm trying to use Apache Camel to load routes during runtime. Version 4.0.4, Jdk17 and no spring-boot usage. ``` var routesLoader = camelContext.getCamelContextExtension().getContextPlugin(RoutesLoader.class); Resource resource = ResourceHelper.fromBytes(path, xml.getBytes()); routesLoader.loadRoutes(re...
org.xml.sax.SAXException: The matching wildcard is strict, but no declaration can be found for element 'camelContext'
|java|apache-camel|
null
I'm trying out CSES Subarray Sum II - https://cses.fi/problemset/task/1661 and I'm sure of the logic but I'm getting different TLEs in CPython and PyPy3 Here's my code: ``` from sys import stdin, stdout _, x = list(map(int,stdin.readline().split())) arr = list(map(int,stdin.readline().split())) d = {0: ...
The character `'\r'` is _carriage return_. It returns the cursor to the start of the line. It is often used in Internet protocols in conjunction with newline (`'\n'`) to mark the end of a line (most standards specifies it as `"\r\n"`, but some allows the wrong way around). On Windows the carriage-return newline pair...
Use a set, aggregate with [`issuperset`](): ``` Type = {3,4,5} df['Date'] = pd.to_datetime(df['Date']) keep = df.groupby('Date')['Type'].agg(Type.issubset) out = df[df['Date'].isin(keep.index[keep])] ``` Variant: ``` Type = {3,4,5} df['Date'] = pd.to_datetime(df['Date']) out = df[df.groupby('Date')...
{"Voters":[{"Id":2372064,"DisplayName":"MrFlick"},{"Id":22180364,"DisplayName":"Jan"},{"Id":354577,"DisplayName":"Chris"}]}
I would like to be able to pass a parameter through two functions, but defining the parameter that is use with a variable. This would avoid having to specify every possibility of what the parameter could be. See the following example for what I'd like to achieve: ``` run_multiple <- function (parameter_name, pa...
Its because of the `*` which is a quantifier that allows for zero occurrences, meaning it can also match empty strings, change it to `+` which is quantifier for one or more occurrences <!-- begin snippet: js hide: false console: true babel: false --> <!-- language: lang-js --> const stringPattern = "[a-zA-...
A simple replacement with both, the old and the new values provided explicitly, would be to traverse to the desired item by iteration and selection, then using that as the LHS for an assignment: ```sh jq '(.run_list[] | select(. == "role[test09]")) = "role[hello]"' input.json ``` [Demo](https://jqplay.org/s/2BX75...
If you have similar enums which are all based on a single value, you can also let them implement a common interface: ```java public interface ValueAware<V> { V getValue(); } ``` And then use the following method to find instances based on a value: ```java public static <T extends Enum<T> & ValueAware<V>, V...
I want to get the user for example to be able to register with Steam and be able to link his Discord account. So far I have managed to get a user to register with Steam (or any provider like Google) but I have not found any documentation on how to link accounts (Google =\> Discord). So far i have this: **Program....
ggplot & latex2exp don't show correct symbols
|r|ggplot2|latex2exp|
import scala.reflect.runtime.universe._ object CaseClassUtils { def productElementNames[T <: Product: TypeTag]: Set[String] = typeOf[T].members.collect { case m: MethodSymbol if m.isCaseAccessor => m.name.toString }.toSet }
I have the following three tables in a mysql database: grades: id st_id Q1 Q1 ------------------------------- 1 20001 93 89 2 20002 86 84 3 20003 89 92 4 20001 93 89 5 20002 86 84 6 20003 ...
PS F:\SCALER\NODE JS\Module1\mongoose> npm install mongoose npm ERR! code EPERM npm ERR! syscall mkdir npm ERR! path F:\ npm ERR! errno -4048 npm ERR! Error: EPERM: operation not permitted, mkdir 'F:\' npm ERR! [Error: EPERM: operation not permitted, mkdir 'F:\'] { npm ERR! errno: -4048, npm E...
Can anyone help to solve this
|javascript|mongodb|npm|mongoose|installation|
null
[![enter image description here][1]][1]How about an Container with child and foreground decoration starting from the bottom? Please change the CupertinoColor or CupertinoIcons to Color or Icons if you use Material instead of Cupertino theme. Container( foregroundDecoration: const BoxD...
Another possible solution: [[x for x in idx.get_level_values(level)] for level in range(idx.nlevels)] Output: [['A', 'A', 'B', 'B'], ['C', 'D', 'C', 'D']]
Creating TP/SL orders using `trading-stop` doesn't provide orderId, so when you don't have orderId you can't cancel it through their `cancel order` api. You can cancel the TP/SL order using [trading-stop][1] API, just pass `takeProfit='0' 'stopLoss='0'` > takeProfit: Cannot be less than 0, 0 means cancel TP. > ...
How to implement account linking in Blazor Web App?
|authentication|oauth|blazor|openid|
null
Could yo try this: **/node_modules/ please. Example of .dockerignore file (Best Practice): **/node_modules/ **/dist .git npm-debug.log .coverage .coverage.* .env .aws
If I run the code below, xStep1 does not have an attribute named pivot. According to the doc's it should have this attribute. Any help would be appreciated. x=Diagonal(10000) x[1,3]=0.3 x[3,1]=0.3 xStep1=chol(x,pivot=TRUE)
chol(x,pivot=TRUE) does not have attribute pivot in R
|r|linear-algebra|matrix-factorization|
I'm a beginner to C++ and I'm trying to figure out how to generate random numbers within a certain range. I have the following code, however when run it outputs the same random number 5 times. If I run this without the for loop several times, one after the other, it seems as though there is a pattern where the number c...
How to get a truly random number in C++
|c++|random|
null
I'm working on a recommendation system using TensorFlow and TensorFlow Recommenders (TFRS), and I've run into a perplexing issue during the initialization of the FactorizedTopK metric within my RecommendationModel. Specifically, the error emerges when the model attempts to add a weight named "counter" in the Streaming ...
Using TypeORM for node/typescript: If we have this: ```typescript export const AppDataSource = new DataSource({ // ... synchronize: false, // Recommended for production migrations: ['path/to/your/migrations/*.ts'], // Specify your migrations directory }); ``` if the db is out of sync with the code,...