instruction stringlengths 0 30k β |
|---|
|r|algorithmic-trading|performanceanalytics|blotter| |
null |
Create container component, is reusable and responsive
```js
// src/Components/Container .jsx
import { Row, Col } from 'antd'
const Container = (props) => {
const { children } = props
return (<Row className='container'>
<Col xs={1} sm={2}></Col>
<Col xs={22} sm={20}>
{... |
For swagger your API controller's all public method should be marked with [HttpGet/HttpPost/HttpPut/HttpDelete] or [NonAction] attribute.
If your controller is inheriting from ApiController, make sure your swagger is not complaining on **ExecuteAsync** method.
[![enter image description here][1]][1]
In this ca... |
I am working with Spring MVC. All dependencies of Spring are added so app want to add micrometer-core for io/micrometer/observation/transport/RequestReplyReceiverContext and I did it
My pom.xml
```
> `<dependency>
> <groupId>io.micrometer</groupId>
> <artifactId>micrometer-core</artifactId>
> <ver... |
For loading CSS styles asynchronously, **you should indicate it as a preload stylesheet**. **Whenever you use `rel="preload"` alone, it won't transform to stylesheet on page load. It will remain as `preload`**, so to indicate it as a stylesheet, you should use another attribute such as `as`, which **indicates the type ... |
I have 2 worksheets. The first one is for the working file and the second is for the master file sheet. The master file sheet has 3 columns which are as follows Fund Number, Name, Portfolio Number. In the working file sheet, specifically in column 2, it has the values in the Fund Number Column of the master file sheet.... |
Vlookup Function Excel VBA |
|excel|vba|macros| |
null |
I'm having permission problems when I'm trying to do a query on Firebase Firestore.
This is the code that performs the query.
```
Future<void> fetchData() async {
FirebaseFirestore db = FirebaseFirestore.instance;
CollectionReference diariosRef = db.collection("diarios");
QuerySnapshot feveireiro = ... |
How to find mean value of k nearest points when some values are NaN? |
|geopandas| |
From the [C23 draft](https://open-std.org/JTC1/SC22/WG14/www/docs/n3220.pdf):
7.23.6.1 The `fprintf` function
> 8. The conversion specifiers and their meanings are:
>
> * `p` The argument shall be a pointer to void or a pointer to a character type. The value of the pointer is converted to a sequence of printing c... |
{"Voters":[{"Id":5741073,"DisplayName":"TomServo"},{"Id":2395282,"DisplayName":"vimuth"},{"Id":874188,"DisplayName":"tripleee"}]} |
You could write the pattern like this if there is no single dangling `ββ` at the bottom, but that would give you a single match of all the lines:
(?s).*^ββ$\R\K.*$
[Regex demo](https://regex101.com/r/7g3gji/1)
If you want separate matches (to count them), you could write the pattern as:
(?:[\s\S]*^β... |
So when checking for duplicates in an array (that's what I think the algorithm is for; correct me if I'm wrong), you want to check each element against each other element once. Let's have a 2D array of all possible pairs of elements you can check.
For an array with 4 elements, the 2D array would look like this:
`... |
You can [choose which modules to export to the external code](https://stackoverflow.com/a/78251561/8138591). Additionally, u can *clearly* communicate the **intention** that a code exported from a file should only be used inside a package and not outside of it (**package scoped**).
My solution is based on the idea f... |
|vb.net|filtering| |
{"Voters":[{"Id":6600940,"DisplayName":"Storax"},{"Id":9214357,"DisplayName":"Zephyr"},{"Id":8422953,"DisplayName":"braX"}]} |
You should build `a` tag in your render, the symbol in your map should be the href string
const stocksArray = store.stocks.map((stock, index) => {
return {
id: index+1,
symbol: `/symbol/${stock.symbol}`,
volAvg: stock.volAvg,
mktCap: st... |
I have got bbappend file for one of the recipe in meta-tegra. Appends are dependent on dtc, which has been added to DEPENDS:append section. On bitbaking this recipe, dtc is not getting built.
Below is tegra-bootfiles\_%.bbappend
```
# Hack: The fetch task is disabled on this recipe, so the following is just for ... |
I'm trying to retrieve a parameter value from a config a file.
(Get-Content C:\<ConfigFolder>\basic.conf | ConvertFrom-StringData)."FileLocation"
The value of the "FileLocation" is "C:\temp".
And, value printed on screen is;
"C: emp"
Looks like "\t" is parsed as a Tab.
Is there a way avoid... |
I found a workaround shared by Damian from AppDynamics support that helped me adjust the log levels for both the Proxy and the Watchdog in AppDynamics. Here's a summary of the steps:
- **Proxy Log Level:** The `log4j2.xml` file controls this. You can find it within the appdynamics_bindeps module. For example, in my ... |
I have registration form, I want to validate age for 18 year old only allowed.
```
IconButton(
icon: Icon(
color: Colors.grey[250],
Icons.calendar_month_outlined),
onPressed: () async {
DateTime? pickedDate = await showDatePicker(
context: context,
initialDate: DateTime.now(... |
Your container's ID contains a space but they're illegal.
<div id="Sign-In TempUI"
Get rid of it. Also...
document.addEventListener('DOMContentLoaded',
Why are you in such a hurry? Use LOAD instead...
document.addEventListener('load',
The only time one would need to listen to *DOMC... |
{"Voters":[{"Id":22180364,"DisplayName":"Jan"},{"Id":9214357,"DisplayName":"Zephyr"},{"Id":354577,"DisplayName":"Chris"}],"SiteSpecificCloseReasonIds":[13]} |
{"OriginalQuestionIds":[7524057],"Voters":[{"Id":1043380,"DisplayName":"gunr2171","BindingReason":{"GoldTagBadge":"c#"}}]} |
<!-- language-all: sh -->
[zett42](https://stackoverflow.com/users/7571258/zett42) has provided the crucial pointer:
From the [`ConvertFrom-StringData`](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/convertfrom-stringdata) help topic (emphasis added):
> `ConvertFrom-StringDa... |
I used [this][1] to generate a slideshow. Instead of putting the pictures as background-images, I put them as images in the html inside the div tags, which works very well.
<input type="radio" id="trigger3" name="slider">
<label for="trigger3"><span class="sr-only">Slide 3</span></label>
<div class="... |
Video controls are hidden behind input feature? |
|html|input|video| |
I updated maven version and it resolved both the issue
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
Now my test cases are running perfectly in local as well as in Jenkins both. |
I looking-for solution to sort by relation (hasMany) fields, with max value of two columns.
I prepare starter kit: https://www.db-fiddle.com/f/m371fzUJuQp9dX1yKm4yEm/3
The question is, how to display results from `parents` table, with GREATEST(MAX, MAX) value from two fields, order of course from high to low in L... |
Laravel order with GREATEST with MAX by two columns |
|laravel|max|has-many| |
Replace
this.id.replace("trigger-".$teamid;", "")
By
this.id.replace("trigger-" + <?php echo $teamid; ?>, "") |
JpaSpecificationExecutor's method 'findBy()' does not use Sort object from provided Pageable object.
I try to use **findBy()** method of **JpaSpecificationExecutor** to be able mixing specification and projection, e.g.:
```
var someSort = Sort.by(Sort.Direction.DESC, "someFiled");
var somePageable = PageReque... |
JpaSpecificationExecutor's method 'findBy()' does not use Sort object from provided Pageable object |
The relevant part of [the documentation](https://doc.rust-lang.org/std/fs/fn.rename.html) is this:
> On Unix, if [β¦] `from` is not a directory, `to` must also be not a directory. In contrast, on Windows, `from` can be anything, but `to` must not be a directory.
I.e. `to` *may not be* a directory, but you've passed ... |
According to the code snippet, you provide, `file_path` is a file while `destination_path` is a directory. This is not permitted in rust on linux. According to the [docs](https://doc.rust-lang.org/std/fs/fn.rename.html#platform-specific-behavior):
> On Unix, if `from` is a directory, `to` must also be an (empty) dir... |
|flutter|firebase|firebase-storage| |
null |
```json
[
{
"B4": 14,
"B5": 12
},
{
"B4": 58,
"B5": 54
},
{
"B4": 26,
"B5": 65
}
]
```
I want to create index ID in my uploaded json file. The json file look like as in the image. I want it to be like the following:
```json
[
1: {
"B4": 14,
"B... |
null |
If you have a list of the buttons then you can select a list entry at random. Always remember that the first entry in a list or an array has an index of 0.
If you put all the buttons in a Panel, it can be easier to keep them organised: for example, you can get VB.NET to select all the buttons within that panel. Then... |
Check the version of your llama_index if you are using the current version, kindly use :
from llama_index.core.node_parser import SimpleNodeParser
--------------------------------------------------------- |
I am facing this problem for a while now. When i add a library or package in a flutter project and then run
`flutter pub get`
But when i import that package, it is not available (as if it is not included in pubspec)
As long as i Know, running the command
`flutter pub get`
actually downloads that package but fo... |
Adding new package in a flutter project does not work untill the android studio is restarted |
|flutter|android-studio|flutter-dependencies|flutter-packages| |
null |
I am working on a Node.js application that utilizes Mongoose as the database. Whenever I try to call any function from the MongoDB driver, such as find(), updateOne(), or deleteMany(), I am getting a massive error output in the terminal, but it does not provide any specific error message or useful information about the... |
Getting a Large Error Output When Calling MongoDB/Mongoose Functions Without an Error Message |
|node.js|mongodb|express|mongoose| |
null |
It looks like the issue might be related to the way Istio is handling the redirection of URLs in the VirtualService configuration. One thing you can try is to explicitly set the path prefix in the rewrite field for the /login path to /airflow/login instead of just /login. This way, when the redirection happens, it will... |
Here is what I implemented form last time and this code and is working for most if my test cases but it is not working for these cases
```
#include <climits>
#include <cmath>
#include <iostream>
#include <limits>
#include <stdexcept>
#include <string>
#include <vector>
long long ConvertStringToNumber(std... |
There are a lot of solutions you could implement, basing on my experience, **working with Transform's Tags is way easier** than anything else.
What I would do is create a **Player tag** and *assign it to the* **Player prefab** that you mentioned.
(I just saw you did it so you are already good to go for the next st... |
I am working on FlashCards app and I want to use json-ld for importing/exporting data from the app. I created simple structure but I am not sure if what I have done is valid and the links between the data are properly set.
1. I am not sure if the link between `FlashCardSide:language` and `Dictionary:availableLangua... |
Hibernate manage transaction on standalone application |
|java|hibernate|entitymanager| |
When I run `pod --version` from vscode terminal or macos integrated terminal I get version 1.13.0 which is a "correct" version for me, but when I run the same script as a vscode task I get 1.11.3.
Also `which pod` print `/Users/__/.rbenv/shims/pod` from terminal but `/usr/local/bin/pod` when running as a task.
Wh... |
vscode uses different cocoapods version when running a task |
|visual-studio-code|vscode-tasks| |
Given a matrix like the following:
A User1 User2 β¦ User9
2015-01-01 01:00:00 8,72 58 3 2
2015-01-01 02:00:00 24,46 57 4 3
2015-01-01 03:00:00 37,02 62 4 2
β¦ ... |
In Sharepoint, everytime a new email (.msg or .eml) file is added to a list, I want to open it and extract properties of the message and update some custom columns for the list item. Can you provide a high level view of doing this? |
How to automatically update a column in Sharepoint when an email item is added |
|sharepoint| |
null |
null |
null |
null |
null |
i want to use several linux environment variables inside a sql script that i run with this command :
```
psql -h XXX -p 5432 -U XXX -d XXX -f ./script.sql
```
the content of the script is a succession of this line, but the referencing doesn't work, i.e. it doesn't replace the value, even though env variables ex... |
how to use system's environnement variables in sql script |
|sql|linux|psql| |
null |
I am unsure if you also configured the ChatAPI and forgot to mention here. But in case you haven't, you'll need to.
To do so, go to Google Chat API, then click Manage > Configuration. And use [this][1] for reference.
[1]: https://developers.google.com/workspace/chat/quickstart/gcf-app#publish-app-to-chat |
{"Voters":[{"Id":3001761,"DisplayName":"jonrsharpe"},{"Id":2395282,"DisplayName":"vimuth"},{"Id":839601,"DisplayName":"gnat"}]} |
After a lot of search it was just a problem in the security.yaml :
main:
two_factor:
auth_form_path: 2fa_login # The route name you have used in the routes.yaml
check_path: 2fa_login_check # The route name you have used in the routes.yaml
provid... |
I had to create a PR to a development branch from my own branch in a team project but i mistakenly created a PR to the main branch. what can i do now? can i redirect this PR to dev branch somehow?(Github) |
For me the problem was that I did create a reusable package from an app. I renamed the app but I forgot to rename an import.
The import was:
from blog.models import Post
and it had to be:
from django_blog.models import Post
Rename the import solved the problem. |
{"Voters":[{"Id":466862,"DisplayName":"Mark Rotteveel"},{"Id":9214357,"DisplayName":"Zephyr"},{"Id":354577,"DisplayName":"Chris"}],"SiteSpecificCloseReasonIds":[13]} |
React Native application is throwing the following error when building in Xcode. I am building on Mac M1.
Undefined symbols:
Linker command failed with exit code 1 (use -v to see invocation)
I tried pod install after removing the Pods folder. It doesn't seem to help.
The code builds file in android.
React... |
React Native - RealmJS - Linker command failed with exit code 1 |
|ios|xcode|react-native|macos| |
null |
Here the pg_available_extensions word is selected:

The selection is not visible
I tried to find a configuration parameter that would address this issue and could not find one. I lost hours trying to fix this as there are behavior associated t... |
To correctly implement client-side authentication checks with a JWT token stored in `sessionStorage` (or any client-side storage), you need to ensure that all interactions with `sessionStorage` are happening in the browser, after the component has mounted. This is what `useEffect` allows you to do. In the following cod... |
i have this page component for each product information:
```
export default function Product() {
const { data } = useContext(ShopContext);
const { id } = useParams();
if (!data) {
return <div>Loading product...</div>;
}
const product = data.find((item) => item.id === id);
return (
... |
Here's one approach:
**Sample df**
```python
import pandas as pd
import numpy as np
np.random.seed(0) # for reproducibility
df = pd.DataFrame({f'col_{i}': np.random.choice(range(1, 10),
size=4,
replace=Fals... |
|spring|jpa|spring-data-jpa| |
null |
This is how you can query JSON to retrieve .msg emails within a specified date range.

```json
{
"search": "*",
"filter": "DateSent ge 'start_date' and DateSent le 'end_date'",
"select": "From, To, CC, BCC, DateSent, Subject, ... |
null |
{"OriginalQuestionIds":[36526282],"Voters":[{"Id":2901002,"DisplayName":"jezrael","BindingReason":{"GoldTagBadge":"pandas"}}]} |
The code might not work now as MS introduced separate module for beta.
You need to install the module separately using
*Install-Module -Name Microsoft.Graph.Beta* |
I have a question that seems rather simple and obvious but for the life of me I can't make it work.
For starters my Observability stack is comprised of:
- Prometheus
- Thanos
- Loki
- Grafana
- Alertamanager
All running on kubernetes. For deployment/update I'm using Helm.
Now I want to have multiple rules f... |
How to structure json-ld for export/import |
|rdf|ontology|json-ld|structured-data|vocabulary| |