instruction stringlengths 0 30k ⌀ |
|---|
I am trying to make a strip plot where each row is colored by the variable "ident" and then the points change transparency based on variable "Pvalue" however I want to have a threshold where only points with pvalue <0.1 are colored the rest should be a light grey color.
So far I tried the following:
p = ggplot(... |
Trying to make a strip plot in R where each row is color by identity and points changes transparency based on another variable |
|ggplot2|rstudio| |
null |
I'm trying to make a localhost only webapp using Dash. I know things like electron exist for this, but I'm more comfortable with dash and pyinstaller for my internal application. I want to open something in a separate window and control it from another window and vice versa. I notice spotify is able to do this in open.... |
How does spotify keep the track timer and controls synched across multiple browser windows? |
|javascript|html|web-worker| |
null |
null |
null |
null |
null |
Firstly, rename `sort_object` to a relation-based name, rather than an action name, as more fitting for this bi-directional lookup (especially since there is no [sort][1] involved):
```prolog
object_basket(Object, Basket) :-
object(Object, Type),
basket(Basket, Type).
```
Then, can use [maplist][2]:
... |
Well one of the console log happens each time the button `onClick` callback is clicked, and the other is an unintentional side-effect, so there's no correlation really to the React component rendering to the DOM. Move that one into a `useEffect` hook to see/check the rendering behavior.
```jsx
import { useState, us... |
|android|logging| |
For the SLT (set less than) instruction, according to the RISC-V instruction set architecture it should be implemented as the following:
" Place the value 1 in register rd if register rs1 is less than register rs2 when both are treated as signed numbers, else 0 is written to rd."
[![enter image description here][... |
This can be handled in Angular on the component side instead of the html by using this routine.
- The reference to the collection is made
- A subscription to that reference is created.
- we then check each document to see if the field we are looking for is empty
- Once the empty field is found, we store that docum... |
{"Voters":[{"Id":2764255,"DisplayName":"Nikos Paraskevopoulos"},{"Id":522444,"DisplayName":"Hovercraft Full Of Eels"},{"Id":4216641,"DisplayName":"Turing85"}]} |
I am a pygame beginner and i was working on my first game after some training. I am making a clicker game in which you buy factories that generate revenue. The twist is that there are taxes and you have to manage resources to survive to the next day. The issue seems to be that the timer is detached and is located insi... |
I can't set up a timer in my clicker game |
|python|pygame|pygame-clock| |
null |
I am fairly new to PHP & laravel so looking for some assistance.
For example , i have a table in mySQL database that stores comments by a user. The values for this table are userId,bookId & Comment. I essentially want to build a function in my controller where it will retrieve a list of comments for a specific bookI... |
React Native emulator suddenly stops connecting to the Metro server |
|node.js|react-native|android-studio| |
null |
It is just as simple as [@Holger][1] has [commented][2] to the question above.
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.io.File;
import javax.swing.JButton;
... |
While doing simple `print` found one issue:
```
>>> print("123456".count(""))
7
```
Why it print 7 instead of 6? |
I have a VM which can be accessed via bastion. I want to write a policy definition to deny the access if the user is NOT a member of a specific user group. I started with the following part, but not sure how to continue with the user and user group part in the definition.
{
"mode": "All",
"... |
Azure policy definition to allow the access to a VM via Bastion only for users of a specific user group |
|azure|azure-policy|azure-security| |
The error message you're encountering indicates an issue with node-gyp, which is used to build native addons for Node.js projects. Here's how to troubleshoot and potentially fix it:
Force Python 3 for node-gyp:
Set the PYTHON environment variable to your Python 3 executable path before running npm install:
... |
Is there any chance of data leakage while splitting dataset in this way:
def split_dataset(ds, train_ratio=0.8, val_ratio=0.1, test_ratio=0.1, shuffle=True):
# Get dataset size
dataset_size = len(ds)
# Calculate split sizes
train_size = int(train_ratio * dataset_size)
... |
I have a fixed record file with several millions of records containing sales for several thousands customers. I need to generate file with one record for each customer containing customer id, sales count and sales total.
I've just started to learn COBOL and I do not have idea what is a "COBOL way" to do that.
O... |
Record grouping and aggregation |
|cobol| |
null |
Retrieving list of values from MYSQL data base based on input value(LARAVEL 10 )(GET HTTP METHOD) |
|php|mysql|laravel|api|http| |
I'm encountering a problem with scheduling Prometheus pods on AWS EKS Fargate within my Kubernetes cluster. Here are the details of my setup:
I have configured an AWS EKS Fargate profile named terraform_eks_fargate_profile_monitoring for my Prometheus namespace (monitoring). Here's the relevant Terraform configurati... |
AWS EKS Fargate pod scheduling issue with Prometheus deployment |
|amazon-web-services|kubernetes|terraform|amazon-eks| |
null |
This error:
> Microsoft.Data.SqlClient.SqlException
HResult=0x80131904
Message=A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.)
Source=Cor... |
How to Solve Error Associated with Trusted Authority |
|sql-server| |
Based on site https://allurereport.org/docs/cucumberjvm/ I tried to configure allure reports
to project with junit5 and cucumber. Unfortunatelly report is not beeing generated.
Other reports (cucumber, junit) works correctly and are present.
This is my build.gradle.kts file:
```
plugins {
id("java")
i... |
### `Point` class
Let's start with a point class, in proper Java style:
```java
class Point {
private int[] components;
public Point(int... components) {
this.components = components;
}
public int getDimension() {
return components.length;
}
public int getComponent... |
I was wondering if there is a way to replace variables in PowerShell script block with their value that is defined in a scope. I also don't want to replace variables that are not available in the scope. My goal is to get a Script block that is "self contained" as much as possible.
```
$outerVariable = "hello"
$Co... |
PowerShell replace variables with their values defined in the context, but don't touch unknown variables |
|powershell| |
I got stuck, i making some searchview for find my dummy item but still didnt work, anyone know how it works ? this is my dummy data
```
interface DummyMusicDataSource {
fun getMusicData(context: Context): List<Music>
}
class DummyMusicDataSourceImpl() : DummyMusicDataSource {
override fun getMusicDat... |
How to make searchview works for find my dummy data |
|android|kotlin|search|searchview|dummy-variable| |
I am trying to make a Menu filled with font styles for a particular font. In the code below I have one attempt that is commented out. The code just below correctly prints the styles but I can't get the ForEach() to work. GetFontStyles() seams to return an array of arrays and that internal array contains several fiel... |
How do I get the font styles on MacOS using Swift? |
|swift|menu| |
Put a for loop iteration in a Bootstrap group list button click
I have a lab about addEventListener, where in a click of a button shows your for loop with office locations.
const grupList = document.querySelector("ul");
console.log(grupList);
const listItems = document.querySelector("li");
console.log(listItem... |
|python| |
I have followed an example on how to create a Chrome extension using Vue.js.
[vuejs based extension][1]
It is working fine, and now I would like to pass the URL of an actual tab (for instance) from a background script to the popup page.
I placed console.log statements in the onMessage and onClicked events in back... |
vue.js and chrome extension, getting data from background script |
|javascript|vue.js|google-chrome-extension| |
As of now, I can define a default (for example, in my model for an Integer column I can say `default=0`) and this default will be respected if I insert from my application through SQLAlchemy. However, in the MySQL schema, the default will be NULL. Is there a way to make the SQLAlchemy defaults be set in the schema too? |
Can I make SQLAlchemy defaults apply in the schema too? |
|python|mysql|sqlalchemy|schema|default| |
|reactjs|typescript|next.js| |
We have a K8s cluster where for communication/networking we are using istio's service mesh which has mTLS enabled. Currently there is no such authentication between any services in our cluster, thus any service can call any other service within a cluster.
So my doubt is somehow if one of my container's security is c... |
In kubernetes would istios's mTLS helps in stopping lateral attack in other pod if a pod's security is compromised |
|kubernetes|security|mtls| |
I am debugging a crash and i see following behaviour -
When i attach GDB to the process and do info registers, i see the following value for esp -
esp 0xfd2475d0 0xfd2475d0
Upon doing a disassembly of code where it is crashing, I see it's storing to memory pointed-to by the stack pointer... |
Segfault with ESP outside the [stack] range in /proc/pid/maps? |
|assembly|x86|crash|stack-overflow|stack-memory| |
I have an array declared above the beginning of a for loop as: `$array = array();`.
Now, in the for loop I start inserting values into it.
At some point I make one of its index as another array as `$array[$j]=array();`
And insert some values like, `$array[$j][$l] = id;` and so on.
Now, when I use `print_r($array... |
This is considered as anti pattern in modern React ecosystem.
According to single responsibility principle
keep your business logic in a simple way with custom hooks (Use prototype inheritance in it, if required), To store API calls use Tanstack Query and to store global data use Jotai (Atoms). This libraries are v... |
This can be handled in Angular on the component side instead of the html by using this routine.
- The reference to the collection is made
- A subscription to that reference is created.
- we then check each document to see if the field we are looking for is empty
- Once the empty field is found, we store that docum... |
I'm trying to create a test to check the correct behaviout of my service object,
```ruby
def api_call_post(connection, message, url)
pp message
response = connection.post do |conn|
conn.url url
conn.body = message
conn.headers = @headers
end
check_response(response)
end
..... |
|database|wpf|pdf|webbrowser-control|memorystream| |
null |
So I'm trying to run a CMD check for a package I want to upload to CRAN but when running it on my Windows 11 cmd I get the following error:
```
* using log directory 'C:/Users/Zick/Documents/YEAB/YEAB-master/YEAB.Rcheck'
* using R version 4.3.3 (2024-02-29 ucrt)
* using platform: x86_64-w64-mingw32 (64-bit)
* R ... |
Unable to paste exe from a virtual machine to another virtual machine.
I have installed vmware tool on both computers.
[![enter image description here][1]][1]
help me.
[1]: https://i.stack.imgur.com/mK3mb.png |
On the VMware. Unable to paste exe from a virtual machine to another virtual machine |
|copy-paste|vmware| |
i am trying to get application context for showToast but not able to get it here is my code, always getting error :
>lateinit property appContext has not been initialized
```
package com.coding.APPNAVIGATION.MenuAndNavigationDrawer
import android.app.Application
import android.content.Context
open class... |
|android|kotlin| |
null |
For starters I think you need to add the full path of your mp3 file. For example:
pygame.mixer_music.load('/home/pi/Desktop/myfile.mp3') |
null |
null |
So I'm trying to run a CMD check for a package I want to upload to CRAN but when running it on my Windows 11 cmd I get the following error:
```
* using log directory 'C:/Users/Zick/Documents/YEAB/YEAB-master/YEAB.Rcheck'
* using R version 4.3.3 (2024-02-29 ucrt)
* using platform: x86_64-w64-mingw32 (64-bit)
* R ... |
This CORS thing can be a headache to set especially for the first time. But by being precise you can do.
In your `Program.cs` file, make the following change. Notice that there are two changes to be made one above and another below the `var app = ...` statement:
```
builder.Services.AddCors(policyBuilder =>
... |
{"OriginalQuestionIds":[201323],"Voters":[{"Id":14098260,"DisplayName":"Alexander Nenashev"},{"Id":1377002,"DisplayName":"Andy"},{"Id":535480,"DisplayName":"James","BindingReason":{"GoldTagBadge":"javascript"}}]} |
Easy on MYSQL Workbench. Create a new MySQL user and fill the "Limit to Host Matching" with your IP. Is % by default.
 |
**I am integrate laravel paypal by using srmklive laravel-paypal package (in sandbox and localhost) and send data from form to
paypal function and receive the error**
public function paypal(Request $request)
{
$provider = new PayPalClient;
$provider->setApiCre... |
laravel paypal ssl eror, package used srmklive / laravel-paypal |
|laravel|paypal| |
You have to inform IDE that which file is run setting file and you can do that by
1. Click on Test
2. Configure Run setting
3. Select solution wide run settings file
and select the file which is your run setting file
[![enter image description here][1]][1]
[1]: https://i.stack.imgur.com/JsNCd.png |
I want to make the effect of the scrollview moving along when the view pops up like this:
[](https://i.stack.imgur.com/f68Kg.gif)
However, when I scroll the scrollview to the bottom, the following effect occurs:
[![enter image description here](ht... |
Put a for loop iteration in a boostrap group list at button click |
I process a TEXT log file that contains, among other items, date in this form: 'January 20, 2021 5:26:19 pm'.
I don't have zone information. The system runs in complete isolation, such as offline mode, or no connectivity to the internet. Zero connectivity to the outside world.
I want to save this information to t... |
Saving time to database in the absence of Zone information |