instruction stringlengths 0 30k ⌀ |
|---|
I created a html file using angular material. But components css file has won't apply.
My html file ;
<div class="content-container">
<div class="tree-container">
<mat-tree [dataSource]="dataSource" [treeControl]="treeControl">
<mat-tree-node *matTreeNodeDef="let node" matTreeN... |
One way would be to use [`reduce`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce) which takes an initial value - in this case a new object - and populates its keys and values with the result of splitting each line in the file on the comma with each iteration of the functi... |
so thanks, that helped! So something really happened with my provider, and he started assigning me a dynamic IP address
[![mongoDB][1]][1]
[1]: https://i.stack.imgur.com/DpyG4.png |
I can't find out how to find the current swiping edge of the card swiper.
Flutter code:
```dart
import 'dart:io';
class ExampleMatch extends StatefulWidget {
const ExampleMatch({ super.key });
@override
_ExampleMatchState createState() => _ExampleMatchState();
}
class _ExampleMatchState e... |
How to get the swiping edge in flutter using flutter_swipe_cards |
From your limited question, What I understand is - `sales_data` is your `DataFrame` and `last_purchase_date` is `timestamp`, If my understanding is right, try this:
import pandas as pd
last_purchase_date = pd.Timestamp(last_purchase_date)
def calculate_recency(x):
return (last_purchase_d... |
First post here. I have a rather unique situation. I have a personal project I am working on that involves Microsoft Visual Basic and I am hoping to get some advice on how this code should be structured and what changes need to be made to achieve what I believe is achievable.
Background: I have Macro that currently... |
Duplicating over to here as advised by Laravel
### Laravel Version
11.1.0
### PHP Version
8.3.4
### Database Driver & Version
MariaDB 10.11
### Description
Hi :wave:
I thought I'd just mention this in case anyone else has experienced this since updating to Laravel 11.
I use MariaDB 10.11 i... |
MariaDB service crashes since updating to Laravel 11 oom-kill possible memory leak in Laravel 11? |
|php|mysql|linux|laravel|mariadb| |
I'm not sure if there's a right question for this, but I'd like to know your opinion. To what extent is it a good practice to break wide HTML class lines? I'm using tailwind-ements components of Tailwind CSS, and for some simple code examples like a checkbox, it utilizes wide lines. However, I've started to break the l... |
To what extent is a good practice break wide HTML class lines? |
|html|css|frontend|tailwind-css|tailwind-elements| |
{"Voters":[{"Id":15416,"DisplayName":"MSalters"},{"Id":205233,"DisplayName":"Filburt"},{"Id":3440745,"DisplayName":"Tsyvarev"}],"SiteSpecificCloseReasonIds":[18]} |
java process OOMKilled beside container support |
|java|kubernetes|oom| |
Component without forwardRef passes the test
=
I have a working Preact component and a working test in Vitest. Working minimized samples:
**Component**
```
import { ChangeEvent } from 'preact/compat';
export function DateInput({
value,
setValue,
label,
}: {
value: string;
setValue: (value: str... |
I want to format date string from **"2024-04-02 18:30:00 +0000"** to **"02 Apr"**
```
func convertToDateString(dateStr: String) -> String {
let formatter = DateFormatter()
formatter.dateFormat = "yyyy-MM-dd hh:mm:ss +0000"
let date1 = formatter.date(from: dateStr)
formatter.da... |
Date formatting "yyyy-MM-dd hh:mm:ss +0000" to "dd MMM" in swift |
|swift|date| |
null |
i have checked the node list before adding the 'fetchValues' function to make sure that it have a value , but when i add the function , this error shows up:
Uncaught TypeError: Cannot read properties of undefined (reading 'value')
i dont understand why the code runs with no issues and the opposet when i add the fun... |
app.js:55 Uncaught TypeError: Cannot read properties of undefined (reading 'value') |
|javascript|arrays|jquery-selectors|undefined|nodelist| |
null |
[Here][1] is a python implementation of the **COP-Kmeans** algorithm that supports **must-link** and **cannot-link** constraints.
*Disclaimer*: I have implemented this library
[1]: https://github.com/Behrouz-Babaki/COP-Kmeans |
{"Voters":[{"Id":19368410,"DisplayName":"user19368410"}],"DeleteType":1} |
I made PrivacyInfo file using Apple documentation. I sent to App Store Connect, and I still receive this from Apple:
> Although submission for App Store review was successful, you may want to correct the following issues in your next submission for App Store review. Once you've corrected the issues, upload a new bin... |
Verify my PrivacyInfo.xcprivacy file, please? |
{"Voters":[{"Id":19368410,"DisplayName":"user19368410"}]} |
How to write a Macro that copy and pastes data from one page to another, while validating and dynamically adjusting the size of the target paste area? |
|excel|vba|vbscript| |
null |
I want to extract high, low, close, open of 1st 30minute candle and make it save/plot for throughout the day irrespective of the time frame selected in tradingview chart.
I have tried using various codes, also in one of them open and close of first 30minute candles was plotted but high, low was not achieved.
Exa... |
PineScript v5 : Working with various timeframe inside script irrespective if timeframe selected |
|charts|pine-script-v5|trading| |
null |
Here is the code. ref: https://www.youtube.com/watch?v=Y-HFJkeJyc4&t=405s
`def getTickerPricePrecision(symbol):
resp = client.exchange_info()['symbols']
for elem in resp:
if elem['symbol'] == symbol:
return elem['pricePrecision']
def getTickerQtyPrecision(symbol):
resp... |
I created this structure based on your description and it works
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-js -->
class AlarmObj {
isAlarmOn = true
get getAlarmOnOffStatus() { return this.isAlarmOn; }
}
class ClockObj {
AlarmObj = ... |
{"Voters":[{"Id":6212350,"DisplayName":"TheHungryCub"}],"DeleteType":1} |
I was of the thinking that once a variable is encapsulated, the values cannot be changed by a function or assignment outside its class.
However, in the below code, even after putting the underscore, the value of the String 'name' in the instance 'human' of the class 'Human' can be changed by adding an underscore.
... |
Vitest with Preact: Adding forwardRef prevents mocked useState hook from firing |
|vitest|preact| |
I have 8 divs in a div called card-group these cards should expand and there are also little cards which go to the edge this worked then a added more text at the bottom and the on screen fade in but it messed up the :hover effect.
Here is one of the :hover statements there are 8 of these:
style.css
```
.card-group:... |
i have been using below task to read contents of a file "file.py" from github repo "GITHUB_XXXX" but i am unable to see the actual content of the file. what is the best way to read the contents of the file from github by using git token and ansible?. verified all settings on repo to grant access to read the file conten... |
Why my angular material css file not working? |
|css|angular|angular-material| |
i figured it out, there is a small bug in terraform_python script,
to solve it, just locate where is terraform_python is installed
in ubuntu you can use the command :
pip show python_terraform
after that, locate this line inside __init__.py :
default['auto-approve'] = (skip_plan == True)
repla... |
I have 8 divs in a div called card-group these cards should expand and there are also little cards which go to the edge this worked then a added more text at the bottom and the on screen fade in but it messed up the :hover effect.
Here is one of the :hover statements there are 8 of these:
style.css
```
.card-group:... |
Making a fade in when in sight thing but it messed up my :hover effect for a card thing |
|javascript|html|css|hover| |
null |
There are a few issues:
* Although you have a `return nodeM`, you ignore this returned value when a recursive call has been made. You have `self.inorderTraversal(root.left,tval)`, but don't do anything with what this call *returns*, yet that return could be the node that was found. The same goes for `self.inorderTra... |
Once upon a time when Internet speeds were slow, caching resources made sense but no more...
So I suggest you turn off the rendering engine’s cache via flags.
I use an old version of Chromium for tech reasons and these flags work for me:
--disk-cache-dir=Z:/abc
--disk-cache-size=1
--me... |
Twilio Support Engineer here. Most likely what is happening is that the ringback tone coming from the callee side is being played after call answer. This is common when calling PBX systems or telephony systems. One way to confirm this is to call the number from your cell phone. If you see from your cell phone that the ... |
null |
It is better to build a list of required items and dump it to file in json format.
Something like:
```
import json
with open("data1.json", "r", encoding='utf-8') as f1:
data1 = json.load(f1)
with open("data2.json", "r", encoding='utf-8') as f2:
data2 = json.load(f2)
data3 = []
for item ... |
This will create a public issue which anybody can view and comment on.
Please provide as much information as possible. At least, this should include a description of your issue and steps to reproduce the problem. If possible please provide a summary of what steps or workarounds you have already tried, and any docs o... |
I'm trying to connect AWS RDS to "looker studio", but I keep getting errors... I can connect to tableau and other places |
|mysql|amazon-rds|mysql-connector|looker-studio| |
null |
I am trying do Customization for the copying operation. when editors are doing item copy operation (Right Click Item > Copying > CopyTo), I need to restrict when the selected item having morethan two child levels then, I need to show a warning/Message "Item copying is failed". can you anyone suggest me, how can achieve... |
1. thats the public declaration, the implementation is private and hidden.
2. it's because the setter isn't changing the value of that struct, the setter is just forwarding the call on to an internal object.
3. You need to call the `isPlaying` state getter somewhere in `body` for the set to be detected and `body` to ... |
TL;DR
**conftest.py:**
def pytest_addoption(parser):
parser.addoption(
"--run-slow",
action="store_true",
default=False,
help="Run slow tests",
)
**my_test.py**
@mark.skipif("not config.getoption('--run-slow')", reason="Only run when --run-slow is given")
... |
Opening a file inside a network inside a script run by QProcess(Pyside6) |
Thanks in advance,
does anyone familiar with Proxmox api ? specificly on how to create VM, as part of my bootcamp I'm trying to develop a friendly UI (https://github.com/sbendarsky/Proxify.git) using next.js for proxmox and I cannot find a solution on how to do that.
tried to search the web on how to do that but di... |
how to create a VM with proxmox API? |
|javascript|api|next.js|virtual-machine|proxmox| |
null |
Is this what you are looking for?
[![Setting option][1]][1]
[1]: https://i.stack.imgur.com/hkmUI.png |
This issue can be potentially resolved through two approaches for **two kinds of people**:
#### For people suffering network restrictions
Same here (Blocked by GFW by our gov).
Just use [cnpm](https://github.com/cnpm/cnpm). I got same errors even though I have a proxy or set mirror to `taobao.com`.
```
//... |
I am following an example in *section 7.2* of *A Tour of C++* where I have a class which I want to iterate over in a range-for loop.
First, I have the parent.
```cpp
template<typename T>
class Container {
public:
virtual T& operator[](int i) const = 0;
virtual int size() const = 0;
... |
c++ range-for loop over custom class ::begin() expects 1 argument, 0 provided |
|c++|c++11|c++23| |
The constructor is not where you register your custom element: you register it "immediately" with your class declaration, and then if you want your code to start running only after the browser has finished loading that in, wait for it.
And note that, because we can call `customElements.define` statically inside a cl... |
Encapsulation does not seem to work in dart |
|flutter|dart|class|variables|encapsulation| |
null |
A lookup table is an option. You can paste data from Excel into a lookup. |
> First, why if I remove the condition PRIVATE(indi,inde) from the
> directive !$ACC PARALLEL DEFAULT(present) I get the following runtime
> error?
By default, scalars are thread (vector) private, but when calling a seq routine from a gang region, only one thread executes the routine. Hence the other thread's "in... |
I have a ClockObj which has an AlarmObj in a "HAS A" OOP relationship. Or should I say injected through the constructor.
Inside the AlarmObj I have a isAlarmOn boolean variable. I am returning it using getter.
`get getAlarmOnOffStatus() { return this.isAlarmOn; }`
So inside ClockObj I have:
`if (this.AlarmO... |
Using vue 3.4 and vite 5.1 and I have the standard alias set in my vite.config.ts
````
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
````
So far so good. Works beautifully. I can do this with no problem:
````
<img src="@/assets/images/image.jpg" alt='an image'>
````
and the image shows... |
read contents from a file on git using ansible |
|github|ansible|token| |
null |
I downloaded a package from Nuget Package. It's not a commonly used package, however;
The package works in a Console App but does not work in a Web API App.
(Console App and Web API version of .NET 5.0)
Can such situations occur? What could be the reason for this? I searched online but couldn't find a reason.
... |
Nuget Package works in console app but not in Web API app |
|c#|asp.net|.net|asp.net-core|asp.net-web-api| |
null |
I want some suggestions from you, I am creating some WordPress websites and I am making changes directly in live websites, I have read at some places that we should not make changes to live website we should prefer to create staging site first then make change in staging environment and then sync it with live website.
... |
Can I make changes directly in a WordPress live site or should I do it in staging first then make it live? |
|wordpress|web| |
null |
Good day,
Could someone please assist with how to achieve the below. So the what happens is I need to take the first "Addition" which is the "Total_COB_Growth" + "Sum_of_Previous_Interest" where the "Sum_of_Previous_Interest" is dependent on the LAG of "Additions" if that makes sense. I can't get it right in SQL to ... |
I have a middleware function that sets some utility clients on the request object. When the response finishes it destroys the connections.
```typescript
export const setRequestUtils = (req: Request, res: Response, next: NextFunction) => {
req.dynamoClient = new DynamoStorage();
req.s3Client = new S3();
r... |
Is my closure in an expressjs middlware causing a memory leak? |
|node.js|express|garbage-collection|closures| |
So I am trying to build a WearOS companion app for my React Native app. I am using, as a guide, an example project provided on Medium.com; the link follows: https://medium.com/@bevkoski/establishing-communication-between-react-native-and-android-wear-apps-1c8fd7bd5704
Everything in terms of building the custom Nativ... |
One way is to calculate where each box is to be and position them absolute.
Here's a simple example.
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-css -->
.container {
width: 100%;
height: 100px;
border: 1px solid brown;
display: flex;
... |
{"Voters":[{"Id":526535,"DisplayName":"manojlds"},{"Id":804840,"DisplayName":"thrau"},{"Id":10871073,"DisplayName":"Adrian Mole"}]} |