instruction stringlengths 0 30k ⌀ |
|---|
https://www.zaproxy.org/
The Zed Attack Proxy (ZAP) is an easy to use integrated penetration testing tool for finding vulnerabilities in web applications. It is designed to be used by people with a wide range of security experience and as such is ideal for developers and functional testers who are new to penetration... |
|git|github|repository| |
|perl|openssl|pbkdf2| |
Perhaps there is a more elegant way, but I see that it can be done with [media queries][1]<br>
You can decide which minimal gap should be between plots, add it for their overall width and make this value as `max-width` of a query.<br>
Example:<br>
> if 3 charts 900x600 can fit the screen then place them
We need t... |
I am trying to php artisan queue:work command but it's killed the process and give me an error like this
[2024-03-28 10:10:20] local.ERROR: Call to a member function beginTransaction() on null {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): Call to a member function begin... |
When am trying to php artisan queue:work it's kill the process and give me error log Call to a member function beginTransaction() |
|laravel|jenssegers-mongodb| |
null |
**Edit #3: Final update:**<br>
@SupportUkraine recently updated their (OP accepted) answer to provide two solutions; one version using a `struct`, and the other without using a compound datatype (with the inevitable cost of foreseeably lower performance.)
Below is a similar solution employing a data manipulation te... |
One may argue that JavaScript does not have "nested" classes as such -- there is no way for a class to use parent class scope, for instance, nor would it be meaningful for anything but accessing parent class properties (`static` elements).
A class in JavaScript is just an object like any other, so you may as well de... |
I am using vue-3 and I like to insert a emoji into a textarea.
I have a EmojiPicker component to select emojis. It works well.
My problem is that, after I insert a emoji, the textarea shows the text with emoji, but the ref 'message' is not updated with that value.
I have a case where I can't use message.val... |
null |
From my understanding of two-dimensional arrays, let's say if I declare
```int a[3][3] = {1, 2, 3, 4, 5, 6, 7, 8, 9};```, it will be stored in a memory in exact order.
And the address of each row can be written like this:
`a[0]` is equal to `&a[0][0]`, `a[1]` is equal to `&a[1][0]`, and `a[2]` is equal to `&a[... |
Unexpected result when assigning and printing pointer value of two-dimensional array with its name |
|arrays|c|pointers|multidimensional-array|integer| |
I want to code a downloader app that saves pictures to a folder. The app should work on windows and mac/os, and maybe later on android and ios.
I haven't found a way to pick the target folder. Any idea on how it can be achieve either with blazor or xaml .NET MAUI app?
|
|c#|maui|.net-6.0|maui-blazor| |
null |
I am trying to add schema to a product page.
The product is shackles used in lifting and rigging equipments.
However, in the footer of the page there is the address of the organization and also in the menu bar the links to all the other products is present.
I was wondering whether I should add organization schem... |
Should Organization schema be on every page? |
|html|seo|schema|json-ld| |
I want to run docker in my homelab for any python related projects.
To save diskspace and keep installed python packages across dockers consistent, I am looking for a way to share the installed python packages across the different services.
Services:
- Juypterlab (to create python scripts)
- Kestra (for automate... |
Docker: keep python packages consistent |
|python|docker|docker-compose| |
I have e-commerce product data in JSON format. This data is frequently updated. I am planning to load this data into BigQuery. Given that the JSON files are huge (a few hundred attributes) and there are many updates, I found that it is not very cost-effective to store the entire data in BigQuery and update it frequentl... |
[![picture of the white space][1]][1]
I want to make the white space around flex items smaller. This is essentially a parent flex box with child flex boxes.
heres my html:
```
<div class="parent-box">
<div class="contain">
<div class="modal">
<h2>Plans For The Site</h2>
... |
Thanks to @yaakov-bressler, I was able to use Literal from typing_extensions to solve this, See the code below
from typing_extensions import Literal
class CookingModel_1(BaseModel):
fruit: Literal[FruitEnum.pear, FruitEnum.grapes]
class CookingModel_2(BaseModel):
fruit: Li... |
Error Code;
[![enter image description here][1]][1]
I press the send message key, everything works normally, I press the stop key, again normal, but app.stop does not stop, I get an error when sending a message again
Code;
```
from customtkinter import *
import customtkinter as ctk
from threading imp... |
I plan to create a plugin for Intellij (Android Studio to be more specific) that amongst other things shall modify existing code, e.g. I want to add a new case to a when statement in a given function of an already existing Kotlin file:
```
fun test() {
val num = 1
when(num) {
1 -> NumberOne()
... |
How can I modify Kotlin code from a self-developed Intellij plugin? |
|kotlin|android-studio|intellij-plugin|intellij-platform-psi| |
if(tid\<n)
{
gain = in_degree[neigh]*out_degree[tid] + out_degree[neighbour]*in_degree[tid]/total_weight
//here let say node 0 moves to 2
atomicExch(&node_community[0, node_community[2] // because node 0 is in node 2 now
atomicAdd(&in_degree[2],in_degree[0] // because n... |
I also suffered with this problem. It earned it for me.
I declared in the fragment activity
public static String customerId;
and in the fragment I received referring simply by writing
customerId
I'm not good at programming. Maybe this will help someone |
If you have your file inside a sharepoint / OneDrive folder or something similar, this may also be the root cause of the issue.
I had the same issue and after moving it out of my OneDrive to a local folder, reading the workbook with `pd.read_excel` as is (no other engine, no copying beforehand) worked fine. |
This can be done in a single traversal, without finding the length of linked list.
Please refer the steps below:-
- Append a dummy node at the start, because in order to delete ith node we should have a pointer at i-1th node (case:- N = length of linked list)
- Take two pointers slow and fast, both pointing to d... |
{"OriginalQuestionIds":[14173717],"Voters":[{"Id":580083,"DisplayName":"Daniel Langr","BindingReason":{"GoldTagBadge":"c++"}}]} |
GlobalScope.launch(Dispatchers.Default) {
runCatching {
// Your API call and data processing code here...
// Move notifyDataSetChanged inside the Main thread block
launch(Dispatchers.Main) {
orderAdapter?.notifyDataSetChanged()
... |
I have tauri command on backend(tauri) that returns a string(light theme value from windows registry). I need to get it on frontend + listen if this string changes. I couldn't find needed functions in leptos or tauri docs.
So I came up with this crutch on frontend:
```rust
let (is_light_theme, set_is_light_theme) = ... |
null |
As KDE Plasma Linux Desktop Environment is built on Qt and therefore Qt baked into the system. Are there any extra overheads and extra complexities by running a Qt application on Gnome with Qt installed separately. Apologies if this question has been asked previously.
Many thanks.
I have been running my Qt applic... |
Here's the first thing that I came up with.
1. Pass the separate arrays into your recursive function as separate parameters.
2. Receive the first array as the "master" array, then loop over the subsequent arrays and determine the best course of action case-by-case.
3. If a level of data in an iterated array is an ... |
null |
I am trying to style my own components i have 2 themes defined each in its own style file
Dark theme
```ts
@use "@angular/material" as mat;
@include mat.core();
$dark-theme: mat.define-dark-theme(
// Removed for brevity
);
@include mat.core-theme($dark-theme);
@include mat.all-component-themes($dark-t... |
Angular material getting colors based on theme |
|angular|angular-material| |
We have an Express application with authentication routes (postLogin and getLogin) and session configuration set up using express-session. Despite configuring sessions, I encounter an issue where session data is not persisting between requests.
PostLogin: I am creating the session for the user here.
```
const post... |
In a customer Zendesk form, set subject field to the values of dropdown fields |
|jquery|zendesk| |
Great question! I tried by writing some code and generated the tokens using both Tiktoken and Azure OpenAI SDK. Unfortunately the results are different, so the answer is no. You cannot use Tiktoken to generate the embedding.
Here's my sample code:
```
using Azure;
using Azure.AI.OpenAI;
using Tiktoken;
var ... |
Also, just for the readers after Nov 2023.
From your template, you cannot do:
<a href="{% url 'logout' %}>Logout</a> #won't work
GET method for /logout has been deprecated. [check here][1]
**New Implementation:**
<form method="post" action="{% url 'logout' %}">
{% csrf_token %}
<... |
In this case calling wrapper() would **immediately** execute the function. if you just return wrapper, then you are returning the function itself so that it can be called later by another part of the code |
I have a json response where I need to extract the list of values for **files** and **folders**, however both the number of elements in each list and properties in the json response is not fixed as shown below:
JSON Response:
```
"config.yml" : "project: \n files: \n - file1\n - file2\n folders: \n - f... |
How to parse a string of a yaml file's content in Go? |
|json|string|go|parsing|yaml| |
null |
I've been trying to achieve the result in the table (I've attached an image ) with no luck so far .. I have a table called Nodes consists of ( base doc, current done and target doc).
BaseDocType . BaseDocID
DocType . DocID
TargetDocType . TargetDocID ..
I want to fetch all the related nodes for any specific no... |
Do Qt based applications run better on KDE Plasma than on Gnome with Qt installed as a dependency? |
|linux|qt|gnome|kde-plasma| |
null |
I have an Azure Function with an HTTP Trigger (Java, Runtime Version ~4) and want to override the logging level of this specific function:
```
@FunctionName("Stores")
public HttpResponseMessage getStores(
@HttpTrigger(...
...
context.getLogger().log(Level.FINE, "Test message with level " + Level.F... |
Overriding function log level not working |
|azure-functions| |
I have some python code:
```
class Meta(type):
def __new__(cls, name, base, attrs):
attrs.update({'name': '', 'email': ''})
return super().__new__(cls, name, base, attrs)
def __init__(cls, name, base, attrs):
super().__init__(name, base, attrs)
cls.__init__ = Meta.fun... |
The most important thing is to have standard options.
Don't try to be clever; be simply consistent with [already existing tools][1].
How to achieve this is also important, but only comes second.
Actually, this is quite generic to all CLI interfaces.
[1]: http://www.gnu.org/prep/standards/html_node/Option... |
I want to build a memory game with cards. And one of the things i have to do is select an image from an map called img and write it as a url.
Also i don't know if my code is correct, this is what i tried:
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-html -->
<!do... |
how do i select an image as an url from my map called img? |
|javascript|html|css| |
In my case I mistakened the client Id (a string that looks like `xxxxx-xxx-xxxx-xxxx-xxxxxxx`) with the tenant Id (a string that looks like `myproject.onmicrosoft.com`) |
**Problem Description:** I'm trying to install the audio.whisper package from GitHub in RStudio using the command remotes::install_github("bnosac/audio.whisper"), but I'm getting an error message that says “Could not find tools necessary to compile a package”.
**R Version:** R version 4.3.3 (2024-02-29 ucrt)
**Rt... |
BigQuery external table using JSON files |
|google-bigquery|external-tables| |
I am observing a strange behaviour where GCC (but not clang) will skip a pointer-reset-after-free expression in the global destruction phase and with certain values of `-O?`. I can reproduce this with every version I tried (7.2.0, 9.4.0, 12.3.0 and 13.2.0) and I'm trying to understand if this is a bug or not.
The ph... |
Is this a GCC optimiser bug or a feature? |
|optimization|g++|clang++|object-destruction| |
you need to kill all running processing for that port, the one your app is using
ex:
lsof -i :3000
kill <PID>
if you are running more then one next js apps in droplet or system, for me stopping them all then building worked.
|
How to reference Swift Playground itself?
I am trying to use `NSNotificationCenter` to observe some variable, but i do not know how to implement it on `Playground`.
Here is my code. I just want to observe the `timeout` variable, but without the `willSet` method.
var timeout = false
var cont: Int8 = 1
... |
From https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/limits.h.html :
{CHAR_BIT}
Number of bits in a type char.
[CX] [Option Start] Value: 8 [Option End]
The POSIX issues 7 and 6 specifications state that char has 8 bits.
POSIX standard before issue 6 did _not_ require that. From... |
The reason that it only works for only one subdomain is that `next auth` by default sets the cookies on the domain that the signIn has performed on. To change the default behavior and give it a custom domain (e.g. domain with empty subdomain which means all subdomains `.my-site.com`) while using next auth version 5 we ... |
I am new to rust and trying to calculate the covariance matrix of an NxM Polars DataFrame.
The docs seem to suggest there is covariance functionality as a crate feature, but I cant find any implementation for it.
I looked at other implementations including `ndarray_stats::CorrelationExt` or even RustQuant but seems... |
Calculating Dataframe Covariance in Rust Polars |
|rust|data-science|rust-polars| |
null |
### As far as your question, "what is going on?"
This appears to happen if memory is exhausted during the course of a PDO query. I believe it has something to do with the memory used by PDO Buffered queries and the way the PHP internal code frees up memory after memory is exhausted.
I can reproduce the condition yo... |
The EWS Api supports this through using ExportItems and UploadItems https://learn.microsoft.com/en-us/exchange/client-developer/web-service-reference/uploaditems-operation, most of the blueprism examples for EWS seem to use the EWS Managed API which doesn't support these two operations however there is a Branch where s... |
I have a react Application where I am trying to add the AWS Chat Widget.
It is working but I want to add some additional styling to the launch icon which doesnt seem to be their out of the box - https://docs.aws.amazon.com/connect/latest/adminguide/customize-widget-launch.html
I want too add a tool tip as I have ... |
The CNN website includes a chart for each stock with a price forecast. I was unable to scrape the forecast figure with the following code.
For example: the URL about Tesla stock is:
[https://edition.cnn.com/markets/stocks/TSLA
](https://stackoverflow.com)
The code is:
```
Sub CNN_Data()
Dim request As Object... |
I have the following command
adb -s 077743323A102985 shell am start -n com.instagram.android/.MainActivity
i am trying to start the instagram app via command line, but why does it gives me this error:
Starting: Intent { cmp=com.instagram.android/.MainActivity }
Error type 3
Error: Activity c... |
starting an app using adb command error type 3 |
|android|adb| |
if(tid\<n)
{
gain = in_degree[neigh]*out_degree[tid] + out_degree[neighbour]*in_degree[tid]/total_weight
//here let say node 0 moves to 2
atomicExch(&node_community[0, node_community[2] // because node 0 is in node 2 now
atomic... |
I tried to run a program but it was using ncurses library and that library was not installed in my system
I tried to run a program but it was using ncurses library and I was unable to run it I expected it will work properly |
how to install ncurses library in Android |
|c++|c|installation|ncurses|replit| |
If someone is still looking for a simple solution!
index.html
----------
```html
<link id="theme-link" rel="stylesheet" href="/themes/aura-dark-teal/theme.css">
```
----------
Options API
---------------------
```javascript
data() {
return {
currentTheme: 'aura-dark-teal',
nextTheme... |
Endeavor to both TRIM and apply IN and OUT fades to a number of MP3 files using ffmpeg. Specifically trimming off a [400mS] length from the start, followed by a [400mS] fade up to full volume, then a [400mS] fade down at the conclusion of the recording. My obstacle is making the fade out function correctly.
Have em... |
Implementing trim and fade filters with ffmpeg - MP3 |
|audio|ffmpeg|mp3| |
null |
> I don't understand the `temp` part. How the indexes are adding to `temp`? example `arr = 1,2,3,4,3`: it should return `4,2` but it returns `2,4`.
`temp` captures the array list that the recursive call returns: it contains the matching indices, but only from the given index (`index+1`) onward. With `addAll` all the... |
React useEffect not running after all DOM has loaded |