instruction stringlengths 0 30k ⌀ |
|---|
I think a good and simple solution is to use an adorner to render the masking symbols as an overlay of the original input.
Show the adorner to render the masking characters while hiding the password by setting the foreground brush to the background brush.
The following example shows how to use an `Adorner` to dec... |
The best way to test more complex AWS lambda functions where development time and local infrastructure is the key. Is usage of their official [AWS Lambda docker image][1].
Simple Dockerfile example from documentation:
```
FROM public.ecr.aws/lambda/python:3.8
# Copy function code
COPY app.py ${LAMBDA_TASK_ROOT... |
I have a Discord bot and I want it to delete a "Loading..." message. However it just deletes the user message for the command
```
@client.command()
async def run(ctx):
await ctx.send("Loading...")
await ctx.message.delete()
await ctx.send("Loading Complete!")
```
This raises insufficient permiss... |
How to make a bot delete a message sent from itself |
|python|discord.py|nextcord| |
null |
Just set the major unit to 1 so the axis counts 1 - 8 by 1s.
Add to the x-axis setting
```
chart.set_x_axis({'name': 'X Axis'})
```
```
chart.set_x_axis({
'name': 'X Axis',
'major_unit': 1, # set major unit to 1
})
```
[![Chart with major unit set to 1][1]][1]
<br>
You could also add a l... |
When I debug locally and run `GetEntityReport` with no results, I get a http 404, which is great. When I post this to the remote server the logs report 404, but 403 seems to be returned...which is not great.
Here is my controller, I only included the function that is causing an issue:
namespace ReportServices... |
C# ASP.NET Core Web API incorrectly returning 403 on remote server |
To expand on Guru's answer, When you specify `AsNoTracking()` EF populates entities based on only what comes back from the database, it will not go to the tracking cache to fill in references, and the returned entities will not work with lazy loading which would otherwise fill in non-included references if you have laz... |
node:9720) [DEP0170] DeprecationWarning: The URL http://proxy.example.com:port is invalid. Future versions of Node.js will throw an error.
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:5040) [DEP0170] DeprecationWarning: The URL http://proxy.example.com:port is invalid. Future versi... |
NPM packages installation error ...... its not only about vite its same problem during installing any packages |
|javascript|reactjs|node.js| |
null |
I'm practicing using React queries.
In this code, I expected to invalidate only the ['test'] query key.
However, the ['todos'] query is invalidated and the data is received again from the server.
Applying useQuery options does not change the results.
I would appreciate some help as to what the problem is.
... |
{"Voters":[{"Id":740553,"DisplayName":"Mike 'Pomax' Kamermans"},{"Id":367865,"DisplayName":"Ouroborus"},{"Id":5468463,"DisplayName":"Vega"}],"SiteSpecificCloseReasonIds":[18]} |
{"Voters":[{"Id":3744304,"DisplayName":"connexo"}]} |
When using **kubectl get nodes**, the connection refused error you are experiencing is probably caused by the way your Ansible playbook handles the kubeconfig file.
**See how to resolve the problem and make calico deployment possible here.**
- Make sure the master node's Kubernetes API server is up and worki... |
In my case, I was receiving a custom class on the hub method, but the properties of that class had no setters, so all properties were default values.
So each property needs `{ get; set; }` to be assigned during deserialization. |
In this app the login screen has 3 buttons forget password, sign in and sign up the explicit intent for sign up is working properly but for forget password it force closes the app
LoginPage.java
```
package com.example.myapplication;
#*REMOVED IMPORTS FOR SIMPLICITY*#
import com.google.android.material.tex... |
Explicit intent not working with forget password button also unable to read data from DB during sign in |
|android|android-intent|android-sqlite| |
null |
Try implementing Serializable
public class AccountDTO implements Serializable {
//your fields, constructors, methods etc.
}
[Here][1] is the reference.
[1]: https://stackoverflow.com/a/57866376/17718213 |
1. Return a pointer to the `Node` of interest instead of updating the out parameter `head_dest`. The stack will implicitly hold `cur_list_dest`.
1. The original implementation changes the original list. To create a new list you need to return a pointer to *copy* of the smallest node or NULL. To emphasize that I m... |
my problem solved after changing from wayland to x11, logout and change from plasma(wayland) to plasma(x11) |
I have modified the httpd.conf file as below to open apache server on localhost:81 port instead default port 80.
#Listen 12.34.56.78:81
Listen 81
and
ServerName localhost:81
OR
If we don't want use both the servers at a time, you can simply stop one server and start the another on whic... |
i have a Steam Deck and would like to install GLFW on a Steamdeck, so that VSCode can find the Libary, i use Cmake. I used Cmake on another linux machine with no problems. I think its related to the steam deck and steam os.
I a location in with the following files in usr/lib/cmake/glfw3 :
- glfw3Targets.cmake,
-... |
I run my training on HPC. I set up Python virtual environment for this. However, Python virtual environment gets deleted very often and I have to set it up again. I would appreciate if you would help to cure this. Setting up my Python virtual environment takes quite some time as I have to reinstall many packages and ..... |
Python virtual environment get deleted on HPC automatically |
I saw this piece of code in MDN while I was learning some syntax about Class in JavaScript today, which really confused me. [Here it is][1]:
```javascript
class Rectangle {
height = 0;
width;
constructor(height, width) {
this.height = height;
this.width = width;
}
}
```
If I create an instanc... |
I am using voila Jupyter lab extension. Voila renders all plots, ipywidgets and markdown on one system but not in another system. All my package versions, browsers are up to date
[Plots not rendering on one system](https://i.stack.imgur.com/DgvHd.png)
[Plots rendering on another system](https://i.stack.imgur.com/... |
Voila is rendering plots, ipywidgets and markdown on one system but only markdown in another system |
|plotly|ipywidgets|voila| |
null |
I'm unable to ping/or perform curl to any website from an instance which has only ipv6 address assigned whereas I'm able to ping/access internet if I create a windows instance with same settings (Ubuntu or Amazon Linux instances are not working), some of the details of the ec2 Instance are as follows
ip -6 addr:
... |
|mysql|mysql-8.0|mysql-spatial| |
I have a ksqldbcluster with 2 nodes. Sometimes i might receive an alert from grafana(which i monitor the cluster) that some queries are in error state. When i check the show queries i see that a number of queries have 1 PERSISTENT running and 1 ERROR. I restart first the second ksqdb docker instance. Sometimes is fixed... |
I'm encountering an issue with building a responsive webpage. When testing the page's responsiveness, the width extends beyond the device's width for some reason.
I've tried removing various parts of the code, and I've found that the "introduction" div seems to be causing the problem. When I remove it, the webpage r... |
I have a program written in the Delphi Programming Language that I have to convert to C# using Visual Studio. I have done most of the conversion but ran into a couple of challenges with `VarArrayCreate`.
What I have is this: `Line := VarArrayCreate([0, 1], varVariant);`
I can't seem to figure out a conversion or ... |
What is the Delphi `VarArrayCreate` alternative for C#? |
<!-- begin snippet: js hide: false console: false babel: false -->
<!-- language: lang-js -->
import {
NameServices
} from '../../@core/utils/NameServices.service';
@Component({
selector: 'your-component',
standalone: true,
imports: [
NameServices
],... |
I'm developing a Javascript animation using matter.js. Here is the link:
https://codepen.io/Sergio-Escalona/pen/VwNrwbw
```
document.addEventListener("DOMContentLoaded", function () {
// Basic setup
let Engine = Matter.Engine,
World = Matter.World,
Bodies = Matter.Bodies,
B... |
Selenium code working fine on main laptop, but not on my other one |
|python|pycharm| |
null |
I am trying to create a structure `Student` which contains q substructures named `Course`. Each `Course` is a structure with a credit and point `int` values.
How do I set up my `Student` structure to have an integer number of `Course` structures within it? Thanks
```
struct Student{
int q;
Course co... |
I am trying to understand the internal workings of RowSet.
How does it set the properties data and create a connection?
RowSetFactory factory = RowSetProvider.newFactory();
JdbcRowSet jdbcRowSet = factory.createJdbcRowSet();
jdbcRowSet.setUrl("..................");
jdbcRowSet.setUsername... |
This is because the generic type `S` can have more keys than just `"a"` and `"b"` — that's what the `extends` keyword means in that position: that the generic type `S` must be [constrained](https://www.typescriptlang.org/docs/handbook/2/generics.html#generic-constraints) by `Pick<Test, "a" | "b">` (not that it ONLY has... |
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.");... |
I use Electron.js to build an application that utilizes Selenium WebDriver to automate activities on Chrome. When using the application on platforms like Windows or Mac Intel, it works fine and stable. However, when using it on a Mac M1, it performs very slowly.
Here are the dependencies I have used:
```json
"depe... |
I created an app that generates keyword searchable PDF files with tesseact, but when the PDF file is created, the pages are randomly reordered by one page every few dozen pages. How can I get the PDF file to be created in the order in which the image files were read?
I used pool.map to match order but its not useles... |
The project folder you have opened is not the parent folder of "admin.py" and "admin_instance.py" (or the path of "admin.py" would be relative instead of "c: > ..."). So those files are being treated as isolated Python code files.
Select VScode menu "File" -> "Open Folder" and open "C:\...\Python work\importing", an... |
Use case: I want to generate no-passphrase 2048-byte RSA keypairs I can use for service accounts to authenticate to Snowflake. I need to generate them programmatically to make key rotation practical.
Snowflake docs provide [a manual procedure using OpenSSL at this link](https://docs.snowflake.com/en/user-guide/key-p... |
Are there poor practices in this use of python cryptography package to generate RSA keypair? |
|snowflake-cloud-data-platform|rsa|encryption-asymmetric|python-cryptography| |
null |
Thank you to user @trojanfoe again, who said
"You are overthinking the issue. To move `A` towards `B` at a given speed you need to do nothing more than `auto dir = normalize(B - A); A += dir * (speed * deltaTime);`"
Below is my code modified to incorporate this much simpler solution (this code already has a deltaT... |
I am new in ARCore and i create a WebXR application with the help of codelab and it works fine but it placed the rectile towards floor i want this rectile should be on wall.
```html
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>B... |
null |
I am implementing user authorization using Google using next auth.
The logic is as follows:
1. The user clicks on the login button using Google, after which he is
taken to a page with an account selection.
2. After selecting an account, it is returned back to the page.
3. When the page is rendered, ... |
Data in global storage appears only after the page is reloaded. Redux |
|reactjs|redux|redux-toolkit|redux-thunk| |
I've just installed Wordpress 6.4.3 & MAMP and managed to edit functions.php and saved my changes.
Twenty Twenty-Four: Theme Functions (functions.php)
When I tried to make more changes to the file, Wordpress started displaying the following error message:
> Something went wrong. Your change may not have be... |
JavaScript svg scale issue with matter.js |
|javascript|svg|matter.js| |
null |
Coding a two-dimensional, dynamically allocated array of `int` is a non-trivial task. If you use a _double pointer_, there are significant memory allocation details. In particular, you need to check every allocation attempt, and, if any one fails, back out of the ones that didn't fail, without leaking memory. And, fina... |
How can I get 100 EC2 instances metrics in different regions and account in Amazon managed Prometheus in AWS.. i should get all the metrics disk cpu memory in Grafana.please share me the steps it will be helpful
Not yet tried please guide |
Using Amazon managed Prometheus to get EC2 metrics data in Grafana |
|amazon-web-services|amazon-ec2|prometheus|managed| |
null |
Looks like you're trying to create the directories if your user chooses one of 3 text phrases and the directory doesn't already exist, and complain to your user if they choose something other than the 3 text phrases. I would treat each of those cases separately:
$text = [Microsoft.VisualBasic.Interaction]::Inpu... |
Sometimes, something may go wrong with `npm install` due to network trouble or something. So if you keep on facing the problem repeatedly, it's better to erase `node_modules folder` and re-run `npm install` command. |
Rendering a component via a ternary or switch statement does not have any effect on how React will render them and whether they get unmounted or not in between renders. It seems your issue comes from both statements having different behavior;
```jsx
{cardValue === 'A' ? <ComponentA/> : <ComponentB>}
````
This i... |
Sounds like you are looking for this API?
https://aps.autodesk.com/en/docs/data/v2/tutorials/publish-model/
https://aps.autodesk.com/en/docs/data/v2/reference/http/PublishModel/
|
i have a Steam Deck and would like to install GLFW on a Steamdeck, so that VSCode can find the Libary, i use Cmake. I used Cmake on another linux machine with no problems. I think its related to the steam deck and steam os.
I a location in with the following files in usr/lib/cmake/glfw3 :
- glfw3Targets.cmake,
-... |
|javascript|html| |
An error was generated by MicroSoft JET database engine, could not delete from specified tables.
How can i fix this in order to run my program?
I installed the 2017 version of MicroSoft Visual Studio C++, but the issue persisted. I am expecting it to run smoothly and be able to project and to be used by a project... |
Error generated by MicroSoft JET database, engine could not delete from specified tables |
I have a customer app where they request services. On the screen I'm working on, they can choose up to three dates. However, what I'm having trouble with is I'm unable to append the selected dates to the array and then upload it to the Firestore document. How would you go about this? Should I rewrite my `handleDateCrea... |
Saving Dates Into Array for Uploading to a Firestore Document |
|ios|arrays|swift|google-cloud-firestore| |
null |
you were close with your first approach, you just got the logic a little wrong. the substition removes `list` if it is present in the variable link, meaning the condition will `not` be true if the string list is present. therefore:
`If defined link If /i Not "%link:list=%" == "%link%" goto:Playlist`
Would be the co... |
By default mongoose will buffer commands; this is to manage the possible intermittent disconnections with MongoDB server.
By default, under the event of a disconnection, mongoose will wait for 10 seconds / 10000 milliseconds before throwing an error. This is what happens in your case. Mongoose throws an error after... |
I am having this error when I am installing yfinance. Any solution on that?
kevin@KevindeMacBook-Air test % pip install yfinance --upgrade --no-cache-dir
Collecting yfinance
Downloading yfinance-0.2.37-py2.py3-none-any.whl.metadata (11 kB)
Requirement already satisfied: pandas>=1.3.0 in ./v... |
Problems with the order in which PDF files are created |
|pdf|ocr|tesseract| |
null |
I have a page in Laravel that has a start date, a deadline, and an end date. I want to calculate and display the final date when I enter the number of days (deadline). I have used Laravel Collective for the controls.
start date:
{!! Form::text('StartDate', jdate($task->StartDate)->format('Y-m-d'), ['class'=>... |
problem with change event in javascript for Calculate the new date with a deadline |
|javascript|laravel| |
|html|css| |
I have a ksqldbcluster with 2 nodes. Sometimes i might receive an alert from grafana(which i monitor the cluster) that some queries are in error state. When i check the show queries i see that a number of queries have 1 PERSISTENT running and 1 ERROR. I restart first the second ksqdb docker instance. Sometimes is fixed... |
You should only add an epsilon transition from final states back to the start state.
You seem to have transitions from every state back to the start state. |
Termux does not (yet) appear to support recording directly to mp3 format. To get an mp3, you'll need to convert your recording using ffmpeg.
AWR Wide format has good quality for speech recording.
<!-- language: shell -->
# Begin recording
termux-microphone-record -e awr_wide -f filename.amr
# Sto... |
Here:
```
g++.exe -o bin\Release\GraphicsC++.exe obj\Release\main.o -s ..\..\..\..\Windows\SysWOW64\glu32.dll
```
You are trying to statically link a DLL (glu32.dll). You cannot do that, and your "simple code snippet" does not need OpenGL in any event.
Moreover you cannot normally statically link code buil... |
I'm re-doing a multi-page website I made with Dreamweaver over a decade ago for my Stained glass business. It is old code and I am a do it yourself amateur as a web-site maker, but the site pages look good on browsers, links work, text size ok, images and background graphic look good to me. **I'm trying to get one of t... |