instruction stringlengths 0 30k β |
|---|
|python|ui-automation|pywinauto| |
null |
Since Mysql 8.0.19 it is possible to use the VALUES statement: https://dev.mysql.com/doc/refman/8.0/en/values.html
I have done so in some JOIN statements and have very big performance differences which I do not understand.
If I use the VALUES statement in simple INNER JOIN like:
```
SELECT *
FROM table t1
... |
|python|google-chrome|selenium-webdriver|chrome-for-testing| |
I am using spring integration flow to read file from a file server. My app will be running with multiple instances. I want to insure that each instance processes any file only once. Here is what I am using so far:
1. SFTP Inbound Channel Adapter (to read messages based on a poll)
2. SftpPersistentAcceptOnceFileLi... |
I'm starting a project with dotnet 8 and graphql (hot chocolate) and I use Visual Studio editor..
Everytime I create a new Mutation for graphql, I need to remember to create the class as sealed, and to add two attributes, for example:
```
[ExtendObjectType(typeof(GraphMutation))]
[Authorize]
public sealed c... |
Custom classes templates under different folders |
|c#|asp.net|.net|visual-studio|editor| |
null |
I have a userform that gives the user 6 choices. They can either click on the appropriate choice on the userform or press a number 1 thru 6 on the keyboard. My issue is that the keypress or keydown event never triggers. I need to capture the key pressed and check if it in number 1 thru 6 "when the userform is displayed... |
Excel VBA: Can't capture key stroke |
|excel|vba| |
Hi i have a slider on my home page and a hamburger nav and font size change in one file, however. they do not all work unless i split them into different files. Why is this? can someone explain please?
I have added the external file link to each of my pages, if i were to take the script out and out it straight into ... |
Remix v2 no layout file for index route? |
|remix| |
I don't have much experience using OPL and would appreciate any guidance on correcting my mistakes. I'm attempting to implement the RCPSP model by Pritsker et al. (1969).
Link : [Here](https://www.google.com/books/edition/Scheduling_of_Resource_Constrained_Proje/CNncBwAAQBAJ?hl=fr&gbpv=1&dq=RCPSP*&pg=PA79&printsec=fro... |
Seeking Assistance with Resource-Constrained Project Scheduling Problem (RCPSP) Implementation in OPL for CPLEX |
|cplex|opl| |
null |
In `readux-thunk@3` there is no longer any `default` export, so with `import thunk from "redux-thunk"` `thunk` is undefined.
Compare [v2][1]
```typescript
...
const thunk = createThunkMiddleware() as ThunkMiddleware & {
withExtraArgument<
ExtraThunkArg,
State = any,
BasicAction extends Actio... |
over the weeks I have created a chunked infinite heightmap terrain. The chunk system is very simple and is not the topic of this question. The topic of this question is how to create a terrain heightmap with the possibility of blending between different textures/materials (grass, dirt, sand, etc.) smoothly.
A chunk ... |
Multiple different textures/materials on 3D heightmap |
|javascript|opengl|glsl|webgl|webgl2| |
null |
I get access violation if I'm allocating memory to `list->v[list->length]`
```
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
typedef struct {
char* denumire, * producator;
int cantitate;
}produs;
typedef struct {
produs** v;
int lungime;
int capacitate;
} Lista;
produs crearePr(cha... |
We can create a composable function for creating ImageRequest and inject our httpclient into the ImageRequest:
@Composable
fun coilImageRequest(): ImageRequest.Builder {
val httpClient: HttpClient = koinInject()
return ImageRequest.Builder(LocalPlatformContext.current).fetcherFactory(
... |
{"Voters":[{"Id":-1,"DisplayName":"Community"}]} |
I solved the issue by providing a custom implementation of the `IApiDescriptionGroupCollectionProvider` where I adjusted the code of the `GetCollection` method:
var context = new ApiDescriptionProviderContext(actionDescriptors.Items);
foreach (var provider in _apiDescriptionProviders)
{
... |
null |
I want to replace all "i" elements with "span" elements.
I try many things but it didn't work.
I didn't find either error messages and debug JavaScript code in my browser.
I want to replace for example:
```
<i class="icon-user"></i>
```
to
```
<span class="icon-user"></span>
```
I try those but nothi... |
You can fix this by removing the canary mod.
I ran into the same issue as you and after adding mods one by one, the problem was the canary mod.
|
I found a workaround
I added a plugin on my pom.xml to copy itself to each module and rename. This happens before the docker build
```
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven... |
Just use this property on the input tag
onInput={(e) => {e.target.value = Math.abs(e.target.value);}} |
Access violation after reallocating memory |
|sockets|mule|mulesoft|mule4|mule-connector| |
If you want to make sure specific props are not defined you can define them with `prop_name?: never`.
So for the example in the question it would become:
function dbQuery(): User[] {
return [];
}
function getAll(): GetAllUserData[] {
return dbQuery();
}
class ... |
The **OK()** method in the controllers accepts an object that gets converted into the body of the response.
Why don't you just use *dynamic*, or *object* through the call stack and populate it with anonymous objects created from your database? |
Short answer is, no you can't, at least not easily. A bit-vector of size N encodes exactly `2^N` elements. Hence, whichever bit-vector size you choose, you can't represent exactly 3 elements. You'll have some "junk" left over even with 2-bits. This means that you have to "modify" each operation (by essentially applying... |
I'm trying to animate a sine wave made out of a Shape struct. To do this, I need to animate the phase of the wave as a continuous looping animation - and then animate the frequency and strength of the wave based on audio input.
As far as I understand it, the `animatableData` property on the Shape seems unable to han... |
|internationalization|json-ld| |
null |
Do you need to load language specific JSON-LD script if your site is in multiple language? My site is available in 5 languages. My JSON-LD is written in English. Do I need to load JSON-LD script for the detected language?
|
Do I need to load language specific schema\JSON-LD for each language the site supports? |
|internationalization|schema|jsonschema|json-ld| |
{"OriginalQuestionIds":[41265266],"Voters":[{"Id":1746118,"DisplayName":"Naman","BindingReason":{"GoldTagBadge":"java"}}]} |
You can certainly simplify the repeated code using a custom function and avoid the double `groupby`. Using [`groupby.tranform`](https://pandas.pydata.org/docs/reference/api/pandas.core.groupby.DataFrameGroupBy.transform.html) for the second column:
```
def pct_cumprod(s):
return s.pct_change().fillna(0).add(1).c... |
I receive this error on my app log:
```
[error] unsupported data type: &[]
```
What I'm trying to do is to run a `SELECT` query to a many-to-many data using `json_agg()` where the data type in the struct that I'm using is `[]string`
this is the `GetArticleById` Struct
```
type GetArticleByID struct{
ID... |
How To Select an Array Using GORM Raw in PostgreSQL? |
|database|postgresql|go|struct|go-gorm| |
null |
I am working on android app where I need to allow the app to access location and I am looking for a way to make the user go directly to access location setting page where he can find the options:
allow all the time,
allow only while using the app
ask every time
don't allow
I tried using the blow code but ... |
{"Voters":[{"Id":13288265,"DisplayName":"jksevend"}]} |
I do have a gstreamer pipeline string running with `gst-launch` `(CreateVideoPipelineSinkWithLaunch)`.
Now I want to build the same pipeline in code with `go-gst` (golang bindings).
The resulting pipeline `(CreateVideoPipelineSink)` does run, but for some reason the webrtc frontend is showing a frame every 30s only... |
GStreamer launch pipeline to code with different result |
|go|gstreamer| |
{"OriginalQuestionIds":[41265266],"Voters":[{"Id":1746118,"DisplayName":"Naman","BindingReason":{"GoldTagBadge":"java"}}]} |
Just put a `\` in front:
`\Context::getContext()` |
I cannot figure out what is wrong with the protobuf Python code generation (I did check a couple of other similar questions)...let me share some details below.
I have the following folder structure:
```
βββ ors-proto
βΒ Β βββ bin
βΒ Β βΒ Β βββ buf-Linux-x86_64
βΒ Β βΒ Β βββ grpc_python_plugin
βΒ Β βββ buf.yaml
βΒ Β ... |
Incorrect/incomplete python pb2 file generation with buf |
|python|java|maven|protocol-buffers|buf| |
I used a **ready-made template** for my **asp.net** project...
I don't know much about html and Css,
I just **deleted and customized** some of the code by trial and error.
I spent 20 days on this back end and front end...
To **test mobile response**, I **minimized my web browser** in PC...
everything was... |
I've the same problem with the test. but i mock hooks in this way:
```jest.mock("react-dom", () => ({
...jest.requireActual("react-dom"),
useFormState: () => [{}, () => {}],
useFormStatus: () => ({ pending: false }),
}));
```
when i mock both hooks the tests are passed but I'm getting other errors:
``... |
I'm having an issue with JS (with which my knowledge base is not large). Excuse me if this seems like a simple fix, but I cannot figure out what my problem is. I'm pulling from an array, and displaying images with links tied to the images, that lead to an external site. My issue is, I want to display the "genre" undern... |
Here is a slightly edited version that will work in the expected way:
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-js -->
$("form").on("input",function(){
const checked=$(".form-check-input:checked").get().map(el=>el.value)
$("#selected-cases").val(che... |
Any have idea about how to read data from a TCP connection,
In my requirement I need to read data from TCP and process that data and write response back to TCP servers.
But I don't see any receive operation with the Sockets Connector.
Need to know how can we replicate only read functionality in Mule 4 |
Sockets Connector - is there any way to read data instead of send and receive - Mule 4 |
|excel|excel-formula|count|concatenation|countif| |
I have a Blazor WASM app that references a library that uses resource files to provide translations. The culture to use is specified explicitly by an option rather than using `CultureInfo.CurrentUICulture`, _et al._. I have a selector in the UI that allows the user to select the language to output, but I can't get th... |
Localization in satellite library hosted in Blazor WASM |
|localization|blazor-webassembly| |
I have two JSON files: One for Locations, another for Objects at a location.
locations.json =>
[
{
"Name": "Location#1",
"X": 0,
"Y": 20
},
{
"Name": "Location#2",
"X": 0,
"Y": 19
},
...
]
objects.json ==>
[
... |
android studio open location permission page directly |
|android| |
> I tried to pass a a child module output to another child module as variable or input using terraform and I was able to provision the requirement successfully.
This configuration require multiple steps to be followed as one resource was depends on another.
**`Step 1:`**
To pass the names of the Resource Gro... |
null |
In which order `storage` event is received?
For example, tab_1 executes code
```typescript
localStorage.set('key', 1);
localStorage.set('key', 2);
```
and tab_2 executes code
```typescript
localStorage.set('key', 3);
localStorage.set('key', 4);
```
They execute code simultaneously.
Questions:
- Can 2... |
DECLARE @date VARCHAR(10)
SELECT @date = CONVERT(varchar(10),
DATEADD(day,
CASE
-- If today is Monday, set the offset to -3 days (previous Friday)
WHEN DATEPA... |
I want to call Fortran subroutines from Matlab and get the output from them. I'm using Windows 7 x64 and Matlab R2021b.
I have tried compiling in Matlab using mex command.
At
```
mex -setup FORTRAN
```
I have choosen Intel Parallel Studio XE 2019 for Fortran with Microsoft Visual Studio 2015.
In mex settin... |
What software is required for compiling Matlab mex file from Fortran Silver-frost FTN95 project? |
|matlab|fortran|mex|silverfrost-fortran| |
null |
I am trying to get a virtual machine to send a string/list to a second virtual machine and then have the second virtual machine return a string to the first virtual machine.
To do this, I have decided to go with a python socket server and client script.
The virtual machines are both hosted via Oracle.
Here is the... |
I implemented my own custom router which routes request coming into my server.
router.use('/admin/', adminRouter);
the router here is that of express.router()
The adminRouter:
function makeAdminAPIRouter({
adminAuthController,
electionController,
}: Controllers) {
r... |
Req.params is undefined |
|node.js|express| |
env variable and path is setting done but graalvm is not available.
```sh
java --version
java 22 2024-03-19
Java(TM) SE Runtime Environment (build 22+36-2370)
Java HotSpot(TM) 64-Bit Server VM (build 22+36-2370, mixed mode, sharing)
gu install native-image
'gu' is not recognized as an internal or external c... |
{"Voters":[{"Id":1255289,"DisplayName":"miken32"},{"Id":16217248,"DisplayName":"CPlus"},{"Id":2756409,"DisplayName":"TylerH"}],"SiteSpecificCloseReasonIds":[11]} |
{"Voters":[{"Id":1145388,"DisplayName":"Stephen Ostermiller"}],"SiteSpecificCloseReasonIds":[18]} |
{"Voters":[{"Id":522444,"DisplayName":"Hovercraft Full Of Eels"},{"Id":794749,"DisplayName":"gre_gor"},{"Id":839601,"DisplayName":"gnat"}],"SiteSpecificCloseReasonIds":[13]} |
When using diffusers like
```
from diffusers import AutoencoderKL, DDPMScheduler, UNet2DConditionModel
```
I get the following error:
```
ImportError: cannot import name 'DIFFUSERS_SLOW_IMPORT' from 'diffusers.utils' (/opt/conda/lib/python3.10/site-packages/diffusers/utils/__init__.py)
```
Also tried dow... |
|python| |
I updated **readOnlyRootFilesystem: true** in my cronjob yaml but started getting the error
OSError: [Errno 30] Read-only file system: '/absolute/path/to/your/folder'
I further added an empty directory
volumeMounts:
- name: tmp-volume
mountPath: absolute/path/to/your/folder
volumes:
- name: tmp... |
having problems with my js external file with html |
|javascript| |
pipeline {
agent any
stages {
stage('checkout') {
steps {
git 'https://github url'
}
}
stage('mvn compile') {
steps {
sh 'mvn compile'
}
}
stage('mvn tests') {
ste... |
Your parameter declaration is a bit incorrect. This results in an invalid OpenAPI definition being generated by FastAPI, which in turn causes codegen errors.
In FastAPI, query parameters are required by default unless the parameter is nullable (e.g. `string | None`) or has a default value. So you don't need the `req... |
@Giulio Centorame
as I said before: your data lacks a clear/unique separator. I did some research on your example file (file1_header.txt) and took a closer look at the file, and what you can see immediately is that there is no unique separator.
Your first column (f.eid) is seperated from the 2nd one (f.3.0.0 ... |
I have table which represents sequence of points, I need to get sum by all possible combinations. The main problem is how to do it with minimum actions because the Real table is huge
|Col1|col2|col3|col4|col5|col6|ct|
|:---|:---|:---|:---|:---|:---|:-|
|Id1 |id2 |id3 |id4 |id5 |id6 |30|
|Id8 |id3 |id5 |id2 ... |
C# Map JSON Serialization and Deserialization to Reference Object Using Object Property |
|c#|json|deserialization|jsonserializer| |