instruction stringlengths 0 30k ⌀ |
|---|
I'm trying to bring up a VM through `virsh define`, `virsh start`. The command doesn't show any errors and `virsh list` shows the VM is running. However, I can't access to the console, so I checked the libvirt log.
There are a few errors reporting:
```
virStorageFileBackendFileRead Failed to open file '/dev/...': ... |
virStorageFileBackendFileRead Failed to open file '/dev/...': Permission denied |
|virtual-machine|kvm|libvirt| |
Suppose you are limited to 7 bits for a floating-point representation: 1 sign bit, 3 exponent bits, and 3 fraction bits.
First I convert `3/32` to the binary `0.00011`, then to the standard scientific notation of `1.1 * 2^(-4)`. At this point I realize my exponent field will be `-1`, which is not valid. I try to rep... |
How can I remove Textfield focus when I press return or click outside Textfield? |
I'm trying to solve a non-linear equation with nleqslv, and I know a priori if I want a positive or negative solution (it's a dataset on choice under risk, and I'm trying to compute the risk aversion coefficient for each individual under CRRA assumption. Since I can observe the DMs' choices, I already know if each DM i... |
I am new to Rust but recently came across a problem I don't know how to solve. It's to work with nested (and multi-dimensional) value-key pair arrays in Rust that is dynamically generated based on string splitting.
The sample dataset looks something like the example below:
Species | Category
Dog | Eu... |
In Rust, possible to downcast a trait to an owned type? |
|rust|lifetime| |
Style your text inputs with a [color][1] of your choice. In your CSS, add a rule like this:
input[type=text] {
color: white;
}
[1]: https://www.w3schools.com/css/css_form.asp |
If A Change the Font Size in other page . It will automatically change in the Default Font Size
I will change the font in Settings .It will be Update in My database And The database Font Size Is Fetch.
that fetch font size i have to given in My texarea |
i want to change the font size in web application using c# code |
|.net|web| |
null |
How to write multiline text to textarea in Laravel |
|php|laravel| |
From my understanding, all four of these methods:
`predict`, `predict_on_batch`, `predict_step`, and a direct forward pass through the model (e.g. `model(x, training=False)` or `__call__()`)
should all give the same results, some are just more efficient than others in how they handle batches of data versus one sample... |
Header dateClick is not firing/working in full calendar v5 |
|fullcalendar-5| |
I'm looking to setup alarms based on thresholds of particular log events, such as "failed logins". I have an Insight query that returns all my log entries I'm interested in. Is there a way I can setup metrics and alarms based on Insight queries? I found an editor to do this in Metrics but unable to save it, and can't... |
Setting up alarms for Cloudwatch Insight Queries |
|amazon-cloudwatch|aws-cloudwatch-log-insights|cloudwatch-alarms| |
null |
At this date you can only run JavaScript, TypeScript or Python code to be run on Cloud Functions. Consequently, you shall convert it to one of those languages.
You can use the **[Dart compile to JS compiler][1]** to convert and generate JS code from you Dart code.
```console
dart compile js
```
Beware that thi... |
|database|character|converters|abap| |
I fixed the error by finding out the $HOME/.buildozer/android/platform/ has a zip file, then i just unziped it and it worked. hope this helped. |
I fixed the error by finding out the $HOME/.buildozer/android/platform/android-sdk has a zip file, then i just unziped it and it worked. hope this helped. |
I'm learning spring boot & microservices, I have created 3 services one is running on port 9000 2nd on 8080 but while building 3rd I've tried using many other ports like 6341, 5030, 4661 and even tried using random port number but I'm encountering ECONREFUSED error in Postman
I did try listing all the LISTENING... |
How to choose port number for various microservices? whatever port number I use is already used-blocked or I'm not able to use them |
|java|mongodb|spring-boot|microservices|port| |
null |
|sapui5| |
**I try to provide some more kontext:**
ultralytics_crop_objects is a list with like 20 numpy.ndarray, which are representing pictures (59, 381, 3) e.g.:[ultralytics_crop_objects[5]](https://i.stack.imgur.com/x6QvJ.png).
I started passing a single picture out of the list to recognize.
pipeline.recognize([... |
the problem you are facing is cors restriction.: Ensure that your API server is configured to allow requests from the domain or IP address you are using. If CORS is not properly configured, the browser may block requests from different origins. you can also download allow cors extensions from chrome web store. thanks |
I'm developing a mobile application in React Native. The application has the `<TextInput/>` for entering SMS codes:
```js
const [pinCode, setPinCode] = useState('');
const pinCodeRef = useRef();
// crutch so that the user's keyboard opens automatically
useEffect(() => {
const timeout = setTimeout(() => {
... |
I have multiple points (lon, lat) for a range of countries. These points are related by an ID that when connected creates a line.
aus:
id country point_id lon lat
1 Australia 0 130.1491 -19.57520
1 Australia 1 129.9958 -19.48760
1 Australia 2 129.... |
{"Voters":[{"Id":4850040,"DisplayName":"Toby Speight"},{"Id":2864275,"DisplayName":"Iłya Bursov"},{"Id":139985,"DisplayName":"Stephen C"}],"SiteSpecificCloseReasonIds":[18]} |
DataMapper
----------
> An Object Relational Mapper written in PHP for CodeIgniter. It is designed to map your Database tables into easy to work with objects, fully aware of the relationships between each other.
Website: http://datamapper.wanwizard.eu/
Gas ORM
-------
> A lightweight and easy-to-use ORM f... |
I'm trying to solve a non-linear equation with nleqslv, and I know a priori if I want a positive or negative solution (it's a dataset on choice under risk, and I'm trying to compute the risk aversion coefficient for each individual under CRRA assumption. Since I can observe the DMs' choices, I already know if each DM i... |
Just found out that the GC is not all that great at handling cyclic references in some cases...
Use a WeakReference<RefType> and this creates a dead end anyway.
Coming from C++ its been a bumpy road with the GC.
In c++ unique and shared pointer are just more powerful.
GC is ok but then... meh... :) |
I have a User entity which has one many to many relationship with Authority table and many to one with UserGroup and another many to one with company.
I am using a Projection Interface named UserDto and trying to fetch all users with the help of entity graph with attributePaths as authorities, company and userGroup... |
I'm using roproxy instead of roblox to get around cord measures, requestbody is username,ctype ,password and useridand for the headers I'm just doing xcrs token:xcrs. It's just returning 403(). Is this an xcrs token thing? Couldn't find anything about it online.
Ideally, it would print the incorect password error, o... |
I am trying to use ARMCC Keil toolchain with CMake in vscode. I copied asm/compiler/linker flag from a working Keil project, except that I don't use .crf and .d files everywhere.
I have a strange behavior while being in debug with Cortex-debug extension in vscode. It compiles, links, but I noticed that when a functi... |
Estimating distance between points and its relative elevation for multiple countries and geometries, using R sf |
|r|geospatial|elevation| |
Navigate to Environment Variables. Edit PATH. If you have multiple paths there for multiple python versions, make sure the one you would like to be used by default is above PATH for other versions.
Keep check of hierarchy of PATH in both User Variables and System Variables. |
I see two options:
Using manual computation of a [timedelta](https://pandas.pydata.org/docs/reference/api/pandas.to_timedelta.html):
```
df = pd.DataFrame({'date': pd.date_range('2024-01-01', '2024-01-10')})
df['next_Monday'] = df['date'].add(pd.to_timedelta(7-df['date'].dt.dayofweek, unit='D'))
```
Or with an ... |
I have an application to predict the size of a fish in an image. I have built a FastAPI endpoint --`/predict/`-- that runs the multi-step process to make that prediction. The steps include two calls to external APIs (not under my control, so I can't see more than what they return).
When I run my code just from the ... |
Creating subclasses explicitly would probably work better in your case, as you have seen.
Instead of creating a class factory function, define the common behaviour of all derived classes in the base class and make specifics depend on class variables defined by subclasses.
In an example which is similar to yours, ... |
It seems you have `logo` and `stickylogo` image fields in the `$translatable` array of your model.
Please remove and retry. |
I am facing an issue when trying to config quarkus test running pipeline on GitLab.
I usually get the error
`Caused by: org.postgresql.util.PSQLException: Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.`
I used maven to exec... |
I'm dealing with a little problem that I need to solve. I have an application in Django and I need a websocket, but I don't like Django channels, so I created a socket server in Flask and I'm trying to connect Django to it, by creating middleware that when called starts a process that sends messages through the process... |
Django socketio process |
|python-3.x|django|websocket| |
null |
{"Voters":[{"Id":5389127,"DisplayName":"Gaël J"},{"Id":354577,"DisplayName":"Chris"},{"Id":874188,"DisplayName":"tripleee"}]} |
I'm wondering if the SamuelSackey code has an error, in
lib/supabase/server-client the code is not spreading the options.
See lines 18 and 22 from the repo (https://github.com/SamuelSackey/nextjs-supabase-example/blob/main/src/lib/supabase/server-client.ts)
set(name: string, value: string, options: Cookie... |
You can easily split this CSV using .iloc function
so first read your CSV as dataframe:
import pandas as pd
my_csv = pd.read_csv('my_csv.csv')
create 2 variables with where you will define parts of dataframe as new dataframe eg.:
df1 = my_csv[:3]
df2 = my_csv[5:]
if columns are not red we... |
While the form is open in the Designer go to menu Tools > Form Editor > Form Settings... In new dialog check "ID-based" check box.
When you rebuild the project all `QCoreApplication::translate` calls in `retranslateUi` will be changed to `qtTrId`. Also, all parameters in those calls will reset to empty string. If yo... |
I have been using Azure containers for my project . I'm using different containers for backend app and frontnend. i have created a sidekiq process enclosed in radis cahce server on azure. as i trigger a task to run sidekiq process , sidekiq container is terminating shortly after starting. |
my Azure sidekiq process is terminating right after starting? |
|azure|sidekiq| |
null |
You can customize the [`hoverinfo`][1] property (like for `textinfo`, don't have to rewrite `hovertemplate` entirely). The default value is `'all'`, which corresponds to the flaglist :
'x+y+text+percent initial+percent previous+percent total'
You want to remove the `percent total` flag, eg.
```lang-py
fi... |
# 2 search bars with dropdown suggestions, selectable by both mouse and arrow keys (TypeScript)
```css
li.cursor {
background: yellow;
}
#Item\ 1, #Item\ 2 {
font-weight: bold;
font-size: 40px;
}
```
```tsx
import { useState } from "preact/hooks";
const list1 = ['rabbits', 'raccoons', 'reind... |
I have a problem with ng-select (I am using Angular 10).
I Want To Bind Value Of Dropdown But I Get Undefined
Also Got Problems With Clear Form (Clear Function Is Not Working On This Field)
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-js -->
export class Collectionm... |
Is it possible to represent -3/32 as a binary floating-point value using only 7 bits |
|floating-point|binary| |
The below seems to provide a viable alternative version.
Two parts:
1. Simplify code
2. Discuss, but not resolve, occasional occurrence of the specific error mentioned
The simplified code below seems to provide expected response for the 'hotel' tag; and for the 'motel' tag only a future warning -- "osmnx/featur... |
Reactjs' delete keyword is an interesting one. My lint complains when I use it.
When you call `delete new_state[curr_counter]` inside the `set_visuals` callback, you're directly modifying the existing object in the state. React expects state updates to be replacements with entirely new objects. Since you're modifyin... |
I'm reading in serial data from a serial USB device with python.
I want to compare the received data with a predefined string if it matches.
Reading the data works fine the problem is this if-statement:
```
if serialInst.in_waiting:
startPacket = serialInst.readline()
z = "iohioowwcncuewqrt... |
I am creating a memoization example with a function that adds up / averages the elements of an array and compares it with the cached ones to retrieve them in case they are already stored.
In addition, I want to store only if the result of the function differs considerably (passes a threshold e.g. 5000 below).
I ... |
Memoization yields slower results |
|python|dictionary|python-decorators|memoization| |
specific_value is not matching i believe while iterating the child elements. Hence you are not able to click the color. Try to print the child.text data and verify the specific value manually.
another solution use child.get_attribute('innerText') to get child text data. |
# Material-UI Data-Grid v7
import { styled } from '@mui/system';
import { DataGridPro } from '@mui/x-data-grid-pro';
function DataGridGeneric(props) {
return (
<CustomDataGridPro
disableColumnMenu
{...props}
/>
);
}
export default DataGrid... |
I have a geometric dataset of point features associated with values. Out of ~ 16000 values, about 100-200 have NaNs. I'd like to populate those with the average of the values from the 5 nearest neighbors, assuming at least 1 of them is not also associated with a NaN.
The dataset looks something like:
```
FID PPM_P ... |
Cannot connect to Postgres Database when running Quarkus Tests with Gitlab ci |
|database|docker|continuous-integration|gitlab-ci|quarkus| |
null |
I'm trying to get the id of the last element in my json file through an api to be able to add an element without a random id , i want it to be like 1,2,3,4 etc... but i can't figure out how (i wana do that bc i can't use an id with letrers ). Thank you in advance.
|
Trying to get the id of the last element in my json file through an api |
|javascript|json|api| |
null |
{"Voters":[{"Id":269970,"DisplayName":"esqew"},{"Id":286934,"DisplayName":"Progman"},{"Id":2494754,"DisplayName":"NVRM"}],"SiteSpecificCloseReasonIds":[]} |
{"Voters":[{"Id":5648954,"DisplayName":"Nick Parsons"},{"Id":1599751,"DisplayName":"PeterJ"},{"Id":16540390,"DisplayName":"jabaa"}],"SiteSpecificCloseReasonIds":[19]} |
I am referring to the question from https://stackoverflow.com/q/64034813/23914212 as my VS code does not connect to host. There one suggestion is to delete the bin folder in vscode-server. Unfortunately, I am unable to find it anywhere on my computer. Is there any specific file within the VS code window itself where I ... |
I cannot find vscode-server for VS code |
|vscode-server| |
null |
Your diagnosis of the first result is correct. The second is a result of the behaviour of aggregating functions: `collect()` returns one row even when there are no incoming rows.
See [this article][1] for more information.
[1]: https://neo4j.com/developer/kb/understanding-aggregations-on-zero-rows/ |
I have to write sudo before running any npm command in my VS code terminal in MacBook Air (OS: macOS Sonoma 14.4).
Example: sudo npm install
sudo npc create-react-app my app
If I didn't "sudo" the command will not execute, while others users are doing without writing sudo.
FYI: I have node.js v20.10.0 and npm ve... |
How to fix npm errors without writing sudo in macOS? |
|node.js|npm|terminal|node-modules|sudo| |
I have a small project only have :
1) implement simple rest api with com.sun.net.httpserver.HttpServer
2) Hibernate + JPA
as you know , hibernate does not support nested transactions, and i won't use frameworks like `Spring` or `jakarta/javaEE` .
I want to know :
Is this good idea to pass Entit... |
How do I do a proper if statement with data from a serial device in python? |
|python|pyserial| |
null |
I've spent the last few days on this, but I can't figure out how to calculate account returns using AcctReturns and PortfReturns in blotter in a way that the results makes sense.
This is the code:
```
library(xts)
library(blotter)
library(quantmod)
library(quantstrat)
library(PerformanceAnalytics)
rm(list... |
Problem calculating account returns (AcctReturns) in Blotter |