instruction stringlengths 0 30k ⌀ |
|---|
Too many records cannot import in the Web app |
|python|nginx|nginx-reverse-proxy| |
null |
I am using `react-native-date-picker:^4.4.0` package. When I've updated my project's react-native version to `0.73.3` from `0.62.7` it stoped working properly. Now, when I tap the field to open picker it gives me an error both on Android and IOS.
```
ERROR TypeError: null is not an object (evaluating 'NativeModule.o... |
For this problem: https://leetcode.com/problems/search-suggestions-system/solution/, solution 1 states that for Java, _"there is an additional complexity of O(m^2) due to Strings being immutable, here m is the length of searchWord.") I am really scratching my head about this. Why the heck does immutability of string ca... |
I have tables that have hundreds of rows displayed per page, and each row has inputs that can be changed by the user. I want to send only the updated data to the backend so that not too much data will be sent. There is a "save changes" button at the top.
I am not using a form element currently (So to not send the en... |
I have built an ML model API using FastAPI, and this API mostly requires GPU usage. I want to make this API serve at least some amount of parallel requests. To achieve this, I tried to make all the functions def instead of async def so that it can handle requests concurrently (as mentioned [here](https://stackoverflow.... |
How to handle multiple parallel requests in FastAPI for an ML model API |
|machine-learning|cuda|python-asyncio|fastapi| |
null |
Which approach is the better use of `HttpClient` in .NET Framework 4.7?
In terms of socket exhaustion and thread safe? Both are reusing `HttpClient` instance, right?
I can't implement `IHttpClientFactory` right now. It is difficult to us to implement dependency injection
First code snippet:
```
class Program... |
When writing a LINQ query with multiple "and" conditions, should I write a single `where` clause containing `&&` or multiple `where` clauses, one for each conditon?
static void Main()
{
var ints = new List<int>(Enumerable.Range(-10, 20));
var positiveEvensA = from i in ints
... |
Ngrok does not receive the response from my local application when a webhook is tunneled to my local application.
The Ngrok UI shows:
> Waiting to receive a response from your server (17 minutes so far).
My application however shows in the logs that the request was correctly received, processed and a 200 status ... |
Ngrok does not receive response |
|ngrok| |
{"OriginalQuestionIds":[4660142],"Voters":[{"Id":687262,"DisplayName":"BugFinder"},{"Id":328193,"DisplayName":"David","BindingReason":{"GoldTagBadge":"c#"}}]} |
The main issues i think you're having are adding the attributs to the root element:
- `xmlns="http://www.sefaz.am.gov.br/autodesembaraco" `
- `xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"`
- `xsi:schemaLocation="http://www.sefaz.am.gov.br/autodesembaraco enviDeclaracaoMensalAuto_v1.02.xsd"`
The issue ... |
I'm not at Excel to try this right now, but it looks like this will not producing the range string you want:
```
.Range("A:A" & (fVal.Row)).Copy
```
If fVal.Row is row 27 ... this makes A:A27. Maybe VBA is failing here rather than throwing an error.
I think you want:
```
.Range("A" & (fVal.Row) & ":A").Cop... |
```
SELECT *
FROM (
SELECT 'name' col, name, count(*) c FROM mytable WHERE gender = 'male' group by name union all
SELECT 'gender', gender, count(*) c FROM mytable WHERE gender = 'male' group by gender union all
SELECT 'image', image, count(*) c FROM mytable WHERE gender = 'male' group by image union all
... |
Does anyone have a simple telegram client example written in C# that can be run on android?
* I found simple java example for android: https://github.com/androidmads/TelegramBotSample
* I found simple C# example for console application: https://github.com/tdlib/td
But I need a simple example that I can just down... |
Telegram for android on C# |
|c#|android|.net|telegram|telegram-bot| |
I'm getting an inexplicable error in my Eclipse IDE:
The type java.util.Collection cannot be resolved. It is indirectly referenced from required type picocli.CommandLine
It is not allowing me to iterate a List object like the following:
```
import java.io.IOException;
import java.nio.file.Files;
import ja... |
Which approach is better use of HttpClient in .NET Framework 4.7? |
|c#|httpclient|dotnet-httpclient|.net-4.7|sendasync| |
Got the following result when I ran flutter doctor:
Network resources
X A cryptographic error occurred while checking "https://pub.dev/": Handshake error in client
You may be experiencing a man-in-the-middle attack, your network may be compromised, or you may have malware installed on your co... |
`Inheritance` -> Use to inherit the properties/methods of the class (`AbstractClass`) Since the class is abstract, its just defines the common structure definitions, that must be present in the children that inherit it!
When you do inheritance, there is no need for adding in the providers array, seems like an unnece... |
I found the reason why the extracted values are different. If the `<w:pixelsPerInch w:val="144"/>` attribute is set in the WebSettings.xml file of Word, the result obtained will be different from the default result without this attribute |
For the Same wifi connection of computer and mobile.
All these answers are right but they did not mention that the IP address must be the wifi IP.
if you run the program locally and your wifi is from a **Wi-Fi router** then the IP should be Wi-Fi IP.
**[Picture is Here][1]**
[1]: https://i.stack.imgur.com/Q... |
Try
Optional<User> findByEmailAndDeletedAt(String email, DateTime deletedAt);
And call it using
repo.findByEmailAndDeletedAt(email, null); |
Trying to apt update and I am getting this, due to this I cannot install playwright as it fails when I do so
I get this every time i do so
```none
Err:13 https://download.docker.com/linux/debian jammy Release
404 Not Found [IP: 108.158.245.93 443]
...none
Reading package lists... Done ... |
#### Solutions
1. Three ways
- For small projects: write a `compile_flags.txt`:
```
-std=c++11
```
- For big projects: generate `complie_commands.json` by a build system like CMake, which can be enabled by adding this to your CMakeLists.txt file:
```txt
set(CMAKE_EXPORT_COMPILE_C... |
This is intended behavior as Health Connect permissions follow the standard permissions model on Android 14+. You can see the reference to this behavior in the Android developer documentation here: https://developer.android.com/training/permissions/requesting#remove-access |
I have two xaml files:
- one (present in solution1) I can see in the design view.
- the other one (present in solution2) I can't see in the design view.
There's nothing wrong with the second xaml: I can see it when I run the application. But I would like to see it in design view (if ever I need to perform a modifi... |
Does Visual Studio (2022) have a "XAML design debug output" window? |
I am not familiar with `bytemuck`'s internals, but I would guess this is a soundness requirement, as `bytemuck` certainly works with `unsafe` code to perform bit fiddling.
The actual specification of the `Copy` trait is that a type `T` can be `Copy` if a value `x: T` only "owns its bits" (as in Rust's ownership syst... |
Here's how I solved the problem.
Firstly, as the scope of the data grows, you have to give up on looking at all the raw data, because of performance.
What I can do is to reduce the resolution of the data in some way. In prometheus, there are operations named 'overtime': avg_over_time, max_over_time, etc.
If yo... |
I am adding prefab in content at runtime but its not refreshing with new content and I am using fancy scroll view of example of UI extension How can I do that(Fancy scroll example 07) |
How to refresh content in fancy scroll view of UI Extension at runtime Unity |
|unity-game-engine|user-interface| |
{"Voters":[{"Id":5373689,"DisplayName":"Denton Thomas"}],"DeleteType":1} |
{"Voters":[{"Id":21625319,"DisplayName":"TraderInTheMaking"}]} |
0
I am simply creating Elastic Beanstalk and when going to "Set up networking, database, and tags" section and enabling database section it is throwing the below error even I am not providing any parameter related to DB:
Configuration validation exception: Invalid option value: 'db.t2.micro' (Namespace: 'aws:rds:db... |
I faced the same bug a while ago, It only occurs when you have `[autoResize] = true` (it is by default true). So you have to explicitly disable it and handle resizing some other way. |
{"Voters":[{"Id":8690857,"DisplayName":"Drew Reese"},{"Id":2395282,"DisplayName":"vimuth"},{"Id":6463558,"DisplayName":"Lin Du"}],"SiteSpecificCloseReasonIds":[13]} |
I recently received a new Mac computer for work. I regularly use files which have macros built in. I am not the creator of these files/macros and am not an expert in this area.
For one of my files, each time I open it and click "enable macros" I get an error:
>Some controls on this presentation can't be activated.... |
|vba|macros|powerpoint| |
import win32api #https://timgolden.me.uk/pywin32-docs/win32api.html
print("GetWindowsDirectory:", win32api.GetWindowsDirectory()[0])
#or
print("GetSystemDirectory:", win32api.GetSystemDirectory())
Output:
> GetWindowsDirectory: C
>
> GetSystemDirectory: C:\Windows\system32 |
**Description**:
I recently purchased a Moto e22 device running Android 12 and encountered several issues while trying to build my Flutter project using Android Studio.
**First Problem:**
After creating a new Flutter project with no modifications, when I attempted to run the project from Android Studio using the p... |
Take a look at the documentation linked below for telebot, specifically for the edit_message_text method. You're passing the parameters in the wrong order, the resultmsg should be the first parameter passed. The corrected code would look like bot.edit_message_text(resultmsg_x, gpid, msg_id)
[Telebot][1]
[1]: ... |
I have a shared config file that's used in a lot of places. My code doesn't care what extension the config file has. However, some packages expect it to be `.js`, others expect it to be `.ts`. E.g. if I name it `config.js`, then I can import it with zx and not Capacitor. Vice-versa if I name it `config.ts`. Also, I've ... |
|visual-studio|xaml|debugging|visual-studio-2022|output-window| |
I've been delving into Ktor to learn about Websockets, but despite spending numerous hours researching similar questions, I'm still unable to pinpoint the root of my issue. I'm trying to open multiple websocket sessions using Ktor to be able to send and receive messages between the users. However, once I create a webso... |
You can also add the following to `dash_table.DataTable()`:
```
css = [{
"selector": ".Select-menu-outer",
"rule": 'display : block !important'
}]
``` |
You can set the token expiration time by passing 'expires_delta' parameter to the 'create_access_token' function:
```python
from datetime import timedelta
from flask_jwt_extended import create_access_token
from flask_login import current_user
expires = timedelta(days=3)
token = create_access_token(identity=st... |
While Adding the useContext in my react app. I am getting the
Please find the code snippet below.
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-js -->
import React from "react";
import ReactDOM from "react-dom/client";
import App from "./App";
import "... |
React Hook useContext: Uncaught TypeError: render2 is not a function |
|reactjs|react-router-dom|hook| |
`std::set` and `std::unordered_set` on a `string` both pull out the unique characters only, but neither leaves the characters in the original order as they appeared in the string.
There's so much of the STL I am ignorant of, but I wondered if there was an STL way of getting just the unique characters from the strin... |
STL: Keeping Only Unique String Characters AND Preserving Order |
|c++|stl|unique| |
With anything that involves sending messages, always try looking at the actual messages: for IP networking, tcpdump; for D-Bus, use `busctl monitor` or `dbus-monitor`.
For basic types, sd_bus_set_property() doesn't want pointers to the value – it wants the value directly. See the manual for [_sd_bus_message_ap... |
The `sprintf` alone won't do in a `for` loop, you need wrap it in `print`.
> for (i in n) {
+ poblacion <- rnorm(N, 10, 10)
+ mu.pob <- mean(poblacion)
+ sd.pob <- sd(poblacion)
+ p <- vector(length=k)
+ for (j in 1:k) {
+ muestra <- poblacion[sample(1:N, length(n))]
... |
Node import/require files while ignoring file extension? |
|node.js|typescript| |
The example seems to be adopted from https://stackoverflow.com/questions/58119428/how-to-set-default-value-for-row-labels-in-pivot-table-using-poi/58137844#58137844. There my answer explains the basics.
The difference is that the example there uses text items to filter. Your example needs numeric items to filter.
... |
I am looking for a way to read data incrementally from the PVOs to the GCP. My initial hunch was to use Apache Airflow, but I think that would not serve the purpose. Later, I came across the BICC scheduled incremental extracts using the connector console but I am not able to locate any example to load data to GCS. I am... |
I try to make my problem to sample. Something like this:
CREATE TABLE test
(
[No] [bigint] IDENTITY(1, 1) PRIMARY key,
[Title] [nvarchar](100) NOT NULL
)
GO
INSERT INTO test(Title)
SELECT '개인경비 청구서 작성 및 교육'
UNION ALL
SELECT 'a'
CREATE ... |
I'm currently trying to create a custom ScrollViewer that has a zoom and pan functionality implementing UIKit's ScrollView but there's a bug that whenever the screen's zoomed and the app resumes from a sleep state, the view changes its position, shrinks its ScrollHeight , and zooming out positions the grid on the upper... |
One option to achieve your desired result would be to conditionally nudge your labels and set the alignment of the labels using e.g. `dplyr::case_when` inside `aes()`. To nudge the position of the labels I make use of `ggplot2::stage()`:
``` r
library(ggplot2)
library(ggsankey)
df <- mtcars |>
make_long(cyl,... |
null |
You can use a flag, a rookie mistake is to exit a single loop, remember the double break, another practice that is not recommended but necessary in very high performance processes is to use goto and my favorite, a function with a return.
#include <iostream>
// Dont clone vars, use references, for perf... |
I think you have a problem in your imports and are currently importing Dataset from another package. This should resolve your error :
from torch.utils.data import Dataset
|
```py
# import libraries
import numpy as np # Corrected indentation and spelling
import torch
import torch.nn as nn
import torch.nn.functional as F # Corrected extra space
from torch.utils.data import DataLoader, TensorDataset # Removed extra dot
import copy
from sklearn.model_selection import train_test_spl... |
I don't know how exactly you got the initial matrix. But if you get a correct image with different colors after scaling, then each number in the matrix represents a pixel, not a color component of the pixel. And you lost the colors before you even built the initial matrix.
Also, don't use multidimensional arrays in ... |
What is a proper way to get the changed values from a table with hundreds of rows (To be sent as form to the backend)? |
This might be a alternative **https://github.com/yogeshlonkar/lua-import**
Disclaimer: I'm the author of this module |
it is generally a good practice to specify classes for sections in HTML. This can help maintain a cohesive design and make it easier to update the styling of multiple sections at once by modifying the CSS rules for that class. |
I'm trying to follow [Sebastian Lague's Fluid simulation](https://www.youtube.com/watch?v=rSKMYc1CQHE) video in c++ and OpenGL. I'm at the point where we calculate a `propertyGradient` value (timestamp is 14:15).
I'll try to provide all the code that is relevant further down below.
```
float CalculatePropertyGradi... |
Error: No operator '+=' matches float and Vector2 in fluid simulation property gradient calculation |
|c++|opengl|vector|floating-point|operator-overloading| |
null |
`ActivityDesktopView` is a view entity and the dot notation `Activity.Documents` is trying to traverse an array. If you are using the `viewEntityColumn` sub-element then it does not allow traversing arrays and hence the error. This is mentioned in the [View Entities Documentation](https://docs.guidewire.com/cloud/bc/20... |
Pretty much what it says on the tin.
I have a JS script that isn't staying within the div element it is designated to on my page, it "sits" in the footer section instead.
[Page design with the JS script result "sitting" in the footer](https://i.stack.imgur.com/0Dpil.png)
```
<header>
<div>icon</div>
<di... |
If, Anyone else is getting this issue in a React Naive app, It's Probably because of a package you're using. Search for that specific View Controller in XCode which will reveal your culprit. Try updating the package to latest version. |
Although @oguz-ismail's answer would work with the sample output provided, it seems that actual `equery` output is very strange when fed into a pipe.
This convoluted commandline seems to work around the problems:
```
script -B /dev/null -E never -f -q -c '
eix-installed -a | xargs equery depends
' |
tr -d... |
|javascript|jquery|backend| |
|machine-learning|pytorch|torchvision| |
```
expand-close-icon && expand-open-icon
``` |
I updated your `process_excel_file` function and it works:
```
def process_excel_file(excel_file, root_directory):
try:
wb = openpyxl.load_workbook(excel_file)
sheet = wb.active
data_rows = sheet.iter_rows(min_row=2, min_col=1, max_col=4, values_only=True)
processed_data =... |
null |
null |
null |
null |
I am running ActiveMQ Classic as a Docker container. It is running on port `61616`. I haven't changed any settings.
I have created this example queue in the webinterface:
[![enter image description here][1]][1]
Here is the queue definition:
```xml
<queues>
<queue name="ExampleQueue">
<stats size="0" co... |
|ios|uitableview|uikit|swiftui-tabview|uihostingcontroller| |
I tried to deploy Sveltekit project in firebase hosting am facing below error when I enables SSR for my sveltekit project
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'tailwindcss' imported from /workspace/entries/pages/_page.svelte.js
at packageResolve (node:internal/modules/esm/resolve:853:9)
... |
Sveltekit & TailwindCSS - Getting ERR_MODULE_NOT_FOUND for TailwindCSS package for SSR in Firebase Hosting |
|tailwind-css|sveltekit|firebase-hosting| |
Please help me to resolve this issue.
snowflake.connector is unable to import after it is successfully installed in Azure Pipeline.
**Error::**
[Devops error](https://i.stack.imgur.com/9AZD7.png)
**Devops YAML Script::**
```
trigger:
branches:
include:
- snowpipe
variables:
vmImag... |