instruction stringlengths 0 30k ⌀ |
|---|
React component to display crypto price live data |
|reactjs|next.js|finance|cryptocurrency| |
null |
So I have a scientific data Excel file validation form in django that works well. It works iteratively. Users can upload files as they accumulate new data that they add to their study. The `DataValidationView` inspects the files each time and presents the user with an error report that lists issues in their data tha... |
Remove the `@Component` annotation from your `@interface` class and add it to the `@Aspect` class. Then, modify your @Around annotation to: `@Around(value="@annotation(fully.qualified.package.here.ValidateUser)")`.
By the way, instead of creating a custom aspect to authenticate and authorize a user I strongly sugges... |
Unfortunately, data validation share the same feature with the function of dropdown list, so it seems no way to combine them together unless using Google Apps Script.
To limit A:A contains only 20 "Yes", you may use a custom formula
```
=COUNTIF(A:A, "Yes")<=20
```
in the data validation setting sidebar.
[valid... |
I would like to iterate over the Cartesian product of every pair of elements in a list:
```
let x = vec![1, 2, 3, 4];
for i in 0..3 {
for j in i + 1..4 {
println!("{} {}", x[i], x[j]);
}
}
```
```
1 2
1 3
1 4
2 3
2 4
3 4
```
So far so good. I wanted to attempt the same thing with ... |
|transactions|finance|one-time-password|google-2fa| |
null |
Following [these instructions][1] for installing superset on GKE kubernetes cluster. But I keep getting error: `superset-init-db "some pods failed"` as can be seen here:
[![enter image description here][2]][2]
If I check the logs of the `superset-init-db` I see this:
```
UserWarning: Using the in-memory stor... |
|sql|database|db2|dbeaver| |
A list containing sets can't be directly converted into dataframe. The requirement of converting into dataframe is
the input should be:
1. Either two dimentional `list`
2. Or a `dict` in which the values of each key of the `dict` should be a list
So, in your present scenario, each `set` inside the `list` can ... |
Let's assume a car has a maximum acceleration of 30 km/h per second. That means if we want min accuracy of one km/h, we will need to get the data every 1/30 second or every 33 milli seconds.
I don't think it's possible to get less than 1000 milli anyway, see here:
https://stackoverflow.com/questions/15800686/get-gps-... |
I found that this command worked well for swapping 4 bytes for endianness
```none
xxd -e input.bin | xxd -r > output_bs.bin
```
|
{"Voters":[{"Id":4785110,"DisplayName":"maraca"}]} |
![devtools screenshot][1]I'm not a developer but working with one to try and get a fix for my web application.
This specific issue is not happening on any desktop computer but appears to be happening on my MacBook Pro when using Safari (not Chrome) and my 5th Gen iPad in both Safari and Chrome.
When I access a ... |
You have to connect your css in your html code
<link rel="stylesheet" href="your file path (Example: style.css)">
Put this in the head of you html File :D |
I have a Silverstripe 4 website which I want to have a sticky header to the GridFields. Once I scroll down the header should be on top.

I tried adding custom css but it did nothing:
```
Controller:
$extraFieldsConf = GridFieldConfig... |
below is the code I tried.problem FOR COLUMN C the toggle button to show hide does not appear but for Column B it appears.
```
import { Component } from '@angular/core';
import { BHeaderComponent } from './CustomHeaderComponent';
import { ColDef ,ColGroupDef,GridApi} from 'ag-grid-community';
@Component({
se... |
Ag-Grid-Angular=> how do we Hide and show child columns based on button click available on column header |
|angular|typescript|ag-grid| |
null |
I am curious how really lambda function in set algorithms works or the algorithm behaves for the given lambda function in C++ . In below example I am using std::set_difference algorithm for two map.
```
std::map<std::string, int> map1{ {"test1",1}, {"test2",2}, {"test3",3}, {"test4",4},{"wxyz5",10}};
std::map... |
Alternatively, if you want the `flatten` attribute to have any effect, you have to make the JSON flattened. That means that the `artifact` key is replaced by its contents:
```
{
"version": "0.2a",
"build_date": "2023/12/12",
"libraries": [
{
"path": "somepath",
"url": "someurl"
... |
# TL;DR
Have two separate images one running node and another running nginx for static content.
# How-to
Set up a Nginx proxy that would host the static content more efficiently and have the nuxt service run on a separate container but only handle calls that are not handled by the static content.
```Dockerf... |
You should check for `randomUUID` to be available as `Crypto` is release since 2011 and `randomUUID` since 2021 (see [Crypto - Browser compatibility][1]). It is possible that you have a version without `randomUUID`. Check it via `typeof`. It returns `undefined` as a string and therefore fails. I dont see more things to... |
Issue with "Empty Message" In a Discord Bot |
|python|discord.py| |
null |
If you want to center content in webpage only via HTML is by using `center` tag.
```html
<center>
<h2>Hello world</h2>
<img src="https://picsum.photos/200" alt="200px square image by picsum" width="200" height="200">
</center>
```
However it is `deprecated` and is recommend to use CSS instead.
- Centering cont... |
I am creating a function to create an approximate solution for differential equations using Euler's method. I can get the code to work, but ran into trouble when trying to convert this into a function. Namely, I am having difficulty getting my function to correctly call the formula.
**This original code worked we... |
null |
I'm working on automating a login process using Puppeteer for a website that utilizes Netscape cookies for authentication. I've obtained the necessary Netscape cookies from a previous session and now I want to use them to log in programmatically. However, I'm encountering some difficulties in implementing this process.... |
After a particular email template change on one of our top performing emails we noticed the open rate dropped from a consistent 70% to 15%, this happened just by changing the content of the email itself and nothing else(domain, ip, subject etc. all remained the same)
We follow all email guidelines, have SPF, DKIM an... |
I am trying (inside Jupyter notebook) to connect mysql database using a Python client.
inside a jupyter notebook, I type the following code:
import mysql.connector as connector
connection=connector.connect(user="your_username", password="your_password")
I then receive a massive error message as shown in the att... |
Multiple errors when trying to import mysql.connector by using a python client in Jupyter notebook |
|python|mysql|jupyter-notebook|mysql-python|mysql-connector| |
null |
Struts 2 file upload and save |
Instead of trying to initialize multiple sub-queries within a single filterdescriptor, create a list of filter descriptors:
if (facets != null && facets.Any())
{
var filterDescriptors = new List<Action<QueryDescriptor<Product>>>();
foreach (var facet in facets)
{
fi... |
I have some z values spanning over a grid of, say, 8 x and 10 z values. The z values can be depicted as a heatmap over the x-y plane (left subplot). Now I want to fit a surface to the same data that are shown in the heatmap. However, the fitted surface (right subplot) does not at all look like the heatmap. What am I do... |
Broadly speaking, you are right -- there should be some persistence mechanism to make dynamic allocation work. But in the narrower context of your question, I would go with a firm'ish NO because modern Spark versions provide other means to persist and serve shuffle blocks beyond External Shuffle Service (ESS). This is ... |
Try this `from ..clustering.clustering_experiment import run_clustering`. The two dots before clustering is to get out runners folder as your import statement is in embedder_cmd.py.<br/>
If that doesn't work and you get the "no known parent package" error, try without dots, like this `from clustering.clustering_experi... |
[Reference 1][1]
**Problem :-**
Look below.
```python
application = ProtocolTypeRouter({
"websocket": URLRouter([
path("ws/notifications/", consumers.NotificationConsumer.as_asgi()),
]),
})
```
It's `notifications`.
And
```javascript
const ws = new WebSocket('ws://localho... |
Teeing an iterator at every iteration |
|rust| |
I've been working on addressing a specific constraint in OPL and attempted to write code to solve it. However, it's not functioning as expected. Could anyone provide guidance on the correct approach to do that.
Here is the constraint:
[![constraint image][1]][1]
The full code of the model in OPL : [Edited], th... |
I was having the same problem on M1 chip with Jupyter. Implementing [this][1] solved it for me.
Basically:
````
curl -LO https://github.com/lxml/lxml/releases/download/lxml-4.9.4/lxml-4.9.4.tar.gz
tar xzf lxml-4.9.4.tar.gz
cd lxml-4.9.4
python3 setup.py build --static-deps
pip install lxml-4.9.4/
````
... |
I have an issue with PF on M3. The VPN connects, but there is no internet access. The VPN configuration and VPN list are identical to another computer (M1). There are no errors upon startup.
```
scrub-anchor "com.apple/*"
nat-anchor "com.apple/*"
rdr-anchor "com.apple/*"
dummynet-anchor "com.apple/*"
anchor "com.... |
|cmake|visual-studio-2022|vcpkg| |
I'm facing an issue with maintaining a circular shape for images on smaller screens using CSS. Here's the problem I'm encountering:
I have a layout where I display images in a circular shape using the border-radius: 50%; CSS property. However, when I resize the screen to smaller breakpoints, the circular shape of th... |
The code below solved my problem.
```
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<RootNamespace>App12</RootNamespace>
<ApplicationManifest>app.manifest</ApplicationMa... |
According to https://learn.microsoft.com/en-us/troubleshoot/sql/releases/sqlserver-2019/cumulativeupdate19 there is also a fix for the memory leak:
2068768 - "Fixes a gradual memory leak in the SQL Server process (the high usage under MEMORYCLERK_SOSNODE) caused by the Log Reader Agent in transactional replication." |
I need a transliterator for python that will be configured the same way as PHP one. My PHP based transliterator is configured with these rules:
```
$transliterator = Transliterator::createFromRules(
':: NFD;'
. ' :: [:Nonspacing Mark:] Remove;'
. ' :: NFC;'
. ' :: [:Punctuation:] Remove;'
... |
Python transliterator that holds the same rules as PHP one |
|python|php|transliteration| |
Parse error: syntax error, unexpected variable "$servername" in C:\xampp\htdocs\crud\connection.php on line 3
I met this line when I run my php code. Any help please?
I was creating a form to link with a database using php. The connection was supposed to be successful per the video I followed but this was my enco... |
Is there a solution to this problem in PHP? |
|php| |
null |
I'm encountering an issue with data reception from the front-end to the back-end. While sometimes I successfully receive data from one browser, it doesn't seem to work consistently across other browsers. Additionally, I'm struggling to receive data from my smartphone. I've developed a front-end that sends data to the b... |
The solution is to update the `zginstall.rex` script to test for ISO-8859 and do an `iconv` to IBM-1047 for those files prior to using the `oget` to copy the file into a z/OS dataset or PDS member. |
When I define a molecule with qiskit's PyscfDriver, it has a certain number of (spatial) orbitals. In this example, I define a NaH molecule and get an object with 10 spatial orbitals. I would like to reduce this number by reducing some orbitals from the active space. I intend to the FreezeCoreTransformer as in
`F... |
I have a C++ code from the Sapera LT SDK user manual that acquires images from a Nano camera and displays them live. The problem arises when I attempt to build a project in Visual Studio 2022, as I encounter numerous errors.
**I have provided detailing the steps outlined in the manual to build the project.**
(I ... |
- You can use the service principal with never expired client secret to keep the API Connection authenticated as started in this [SO-Thread](https://stackoverflow.com/questions/63840381/do-api-connections-retain-their-authorisation-state-indefinitely).
- Alternate way is to re-authenticate the same API Connection us... |
how to fix PF on M3? |
|macos|firewall| |
null |
I wrote a PHP function which can be used without Phar.
It also works with long filenames and was tested with big TAR archives. Compatible with PHP 5 to 8.
Usage:
```
<?php
$ret = tar_extract ("filename.tar", "./path-to-extract/");
if (empty ($ret["errText"])) {
print ($ret["fileCnt"]." files extracted.");... |
My problem is that the download does not start when I send the form the first time I created it in a view and it worked but for order and efficiency I decided to pass part of the view to the model but it does not work
```
class Archivo(models.Model):
Archivo = models.ImageField(upload_to="Seccion1")
... |
Download image to client Django |
|django| |
Help me write code for authorization through the Ely.by skin system for the python launcher
I tried to rewrite the code from php to python but it didn’t work, I also looked for information on the Internet but couldn’t find it. I would like that when you click on the button, a registration site opens and as a result ... |
Python Minecraft Launcher Ely.by |
|python|launcher| |
null |
xy = Score(list(cox_ph), formula=Surv(time,status)~1,data=cox.train, metrics=c("brier","auc"), null.model=FALSE,times=time.int,debug = TRUE)
Extracted test set and prepared output object.
Trained the model(s) and extracted the predictions
merged the weights with input for performance metrics
added wei... |
In the Git tab in VS Code, there are a number of features I never use, I prefer typing my command lines.
Is there a way to only view changed files in different repos of the workspace?
It is very hard to read and navigate between repos with the big commit button, commit input, and short cut commands. |
How can I make VS Code's Source Control View only show changed files and nothing else? |
{"OriginalQuestionIds":[36553631],"Voters":[{"Id":6738015,"DisplayName":"Compo","BindingReason":{"GoldTagBadge":"batch-file"}}]} |
Same as for the [static files][1], I needed to put my database outside my home folder and not next to my python files.
[1]: https://stackoverflow.com/questions/2078160/static-file-with-modwsgi-in-django |
Here are functions that used to remove extra spaces.
**removeExtraSpace** used o remove all extra spaces from a paragraph.
**removeExtraSpace** used to remove all extra spaces from the right side of the paragraph.
**leftExtraSpace** used to remove all extra spaces from the left side of the paragraph.
<!-- ... |
So I have an Azure DevOps pipeline which ha s a specific github repository and I’ve added the entire yml pipeline config in another github repo which is a submodule.
Unfortunately when I am trying to go to the main pipeline config file in order to select the path of of the yml from the submodule it seems that I cann... |
Referencing yml file from submodule in main pipeline |
|azure-devops| |
I had this issue when using node and the google Firebase API - here is what fixed it for me:
Loading module from “http://127.0.0.1:8080/node_modules/firebase/app/” was blocked because of a disallowed MIME type (“text/html”)
Loading failed for the module with source “http://127.0.0.1:8080/node_modules/fireba... |
In WooCommerce, does anyone know a way to Remove the Add To Cart button when On Backorder is selected in Inventory, and still keep the On Backorder text on the front end? This would be site wide?
Tried to work this out with:
```
add_action('woocommerce_single_product_summary', 'check_if_backordered', 1 ); function... |
Hide WooCommerce add to cart if product is on backorder but display stock status |
|php|wordpress|woocommerce|product|stock| |
Im a college student I have minimal knowledge in prolog so any help is appreciated. The error i am getting is " uncaught exception: error(instantiation_error,name/2) " below i will have every place where "name" shows up in my code
```
parse_square(Square, File-Rank) :-
name(Square, [F,R]),
name(File, [F... |
need help debugging prolog |
|debugging|prolog|gnu-prolog| |
null |
I have Console App by c# to upload many files to google drive by Google Drive API.
I do check before upload this is files, if i have the files with the same name in my Google Drive,
I need function to replace it files by C#. |
I am trying to create a simple app that uploads an image from a web form to a S3 bucket. The problem I am having is with accessing the Access keys in my app. Initially, I was using aws-sdk v2 and was trying to read the environment variables stored in a .env file:
// Configure AWS SDK
AWS.config.update({
... |
null |
I am currently trying to work out how to install an additional .exe with my visual studio applicaiton. It works in General but it don't know how to check before the installation if the additional .exe is already installed.
I assume the best option is to check the registy for a similiar entry and then check the resul... |
Install additional .exe with Visual Studio Installer |
|c#|visual-studio|visual-studio-2022|visual-studio-installer| |
Create `SecurityFilterChain` in `@Configuration` class as standard `@Bean` and `@Order` is easy.
I need add `factoryMethod` to the `@Configuration`. I don't know how to run this factory method injecting properties, `HttpSecurity` bean multiple times and add it to security context.
My problem:
I have `Map` of prope... |