Latest Questions

How to convert DataTable to List<T> in C#

For convert DataTable to List you can used the AutoMapper Library and you can do it automatically

I am getting this error "AttributeError: 'module' object has no attribute 'Completion'" when I try to use openai

this is my code and I get this error when I try to run it response = openai.Completion.create( AttributeError: 'module' object has no attribute 'Completion' imp

Laravel join multiple query result

when i run the following query, results are listed multiple. there are 3 records in the table but it lists 5 $adverts = Advert::where("category_id", $category-&

LifecycleOwner also if I change Activity

I m trying to build a code to get position of the smartphone from a private SDK. So i m build this code: nextomePhoenixSdk.getLocalizationLiveData().observe((Li

Apple pay button not show in stripe

Hi I am using iphone 6s safari browser but the payment-request-button not show (for website). my all step are correct I used https server (ngrok). also add my d

How can I load an xlsx workbook into R?

I have an xlsx workbook on my desktop with existing sheets. I have a dataframe in R that I would like to add to this workbook as a new sheet. Using library(open

FatFs async read without blocking

I am using stm32f103 and i need to read data from sd card. I am using a coroutine system ,so i don't want to block. Is there a possible way to read asyncly?

Flask static send from localhost to server

I am deploying an application on localhost and listening on a port on a remote server which is bound to a domain, the application shows up fine on localhost and

How to convert varchar2 input parameter to timestamp in stored procedure

We are using a proprietary product to develop our application. This product is capable of connecting to Oracle DB and executes SQL queries and stored procedures

how to pass null value to just one specific key of the one object using same DRF serializer

I'm just passing the same object 2 times in the same serializer but I want to pass key: "retweet": null in one object and in another object I want to pass some

setTimeout block execution code block in NativeEventEmitter callback

I am trying to send a string to the native side (android) with a delay. But setTimeout is blocking the execution. Could you explain what is happening? const eve

NextJS: Error serializing `.data.data` returned from `getServerSideProps`

I'm new to NextJS. I'm working on a simple page in which I need to retrieve data from my backend app. My backend app is a totally separate app written in go. My

Flutter how to update ui when user change size of web application window

I create flutter web application to increase knowledge about adaptive ui, and i stuck with a big problem for me. When i move my application window to other scre

"maxConcurrentRequests" is not working in dedicated ASP for azure function

I have Azure function in V4. and I have host.json as it is mentioned that maxConcurrentRequests is 10 but at the time of execution azure function ignores this s

How to use default interface methods in specific class?

public interface IPrinter { public void Print() { Console.WriteLine("Printing..."); } } public interface IScanner { public void Scan()

Howto pass argument depending on target framework?

My .csproj file uses multi target: <TargetFrameworks>net6.0;net472</TargetFrameworks> and I need the '/p:DefineConstants="TRACE; X64; NETFRAMEWORK;

Socket error - return getattr(self._sock,name)(*args)

I have this error when I try to run this on my server can you help me error: line 228, in meth return getattr(self._sock,name)(*args) TypeError: listen(

Sharing ssh keys with trusted person

Some work needs to be done on remote linux server want to share ssh keys with trusted person. Whats the best way forward xstation

the following arguments are required: -m/--model, -o/--output

I am attempting to run a GoogLeNet code, but then get this error: C:\Users\JG\AppData\Local\Programs\Python\Python39\python.exe C:/Users/JG/PycharmProjects/Goog

ERROR Command failed: ./gradlew assembleRelease --stacktrace

I'm trying to build an apk with bubblewrap, the command is bubblewrap build I'm using codeanywhere to run the test, but I get the following error. Error:

How to generate user specific instances of an exam object with unique questions

I'm creating an online examination system where I have an exam with a list of questions and need to generate a unique instance/record for each user taking the e

YAML stage dependsOn other stage but skipped

Stage is getting skipped eventhough all dependencies seems conditions are present. Here are rquirements for a pipeline: stage 'NextTest' should be run after sta

How to deal with mysqli problems? mysqli_fetch_array(): Argument #1 must be of type mysqli_result

In my local/development environment, the MySQLi query is performing OK. However, when I upload it on my web host environment, I get this error: Fatal error: Ca

In AWS cloud Spark cluster sometimes craches with java.net.ConnectException on checkpoin()

Failure happens quite rarely, and on different tasks but everything is connected with the checkpoint() call. hdfs is used for checkpointing perhaps the problem

Url.Action not able to match a route

in my Mvc controller I have the following action with a defined route [HttpGet] [Route("OrderLineSchedule/{salesOrderId}/{webOrderId}/{orderLineNumber}")]

AntD React InputNumber Increase/Decrease buttons appear to start infinite loop

I am experiencing some unusual behaviour with AntD InputNumber component, specifically using the up/down incrementation buttons: I have a very basic implementa

apply ResNet on CIFAR10 after resizing (pyTorch)

Given a pre-trained ResNet152, in trying to calculate predictions bench-marks using some common datasets (using PyTorch), and the first RGB dataset that came to

OCPP python server issue

I successfully tested the OCPP server by mobility house integrated with aiohttp API in local network. But now I am deploying the websocket server integrated wit

How to use if let statement with conditions?

I know it's possible to express AND logic between if let statement and a condition like this if let (Some(a), true) = (b, c == d) { // do something } But w

XML and XSD mistake

i need help to solve my error with this code of XML and XSD, please if u can check it and tell me a solution of why it doesn't works am gona be your slave this