27,593 questions
-4
votes
0
answers
46
views
pgAdmin import from CSV fails - what data types should these columns use? [closed]
Trying to match data types, but cannot find the right match.
I have a CSV file with the following sample data:
fig_num,name,num_parts,img_url
fig-000001,Toy Store Employee,4,https://cdn.rebrickable....
2
votes
2
answers
43
views
VSCode/Pylance highlights "Import could not be resolved" after moving files from a subfolder to the root
I’m working on a Python project on Windows 11 using VSCode.
I recently reorganized my project by moving all files from a subfolder to the root folder so that the code can be executed directly from the ...
0
votes
0
answers
50
views
Error when wrapping import function in nodejs
I have the following code:
src/main.js
const importModule = async (moduleName) => {
const mod = await import(moduleName);
return mod;
};
const fs1 = await import("fs");
const fs2 = ...
0
votes
1
answer
59
views
Import paths before vs after dockerization
How would you explain the difference between the import paths of other files in any .py file in a different folder/dir when the app is dockerize vs when it's not?
Ex:
in a app/src main.py
from .src....
0
votes
0
answers
55
views
How to import from files in the same TurboRepo package, PNPM
I’m working on a monorepo using pnpm with multiple apps and a shared package (packages/common).
My ws-server app imports types and utilities from packages/common/src/types and messageUtils.ts. The ...
0
votes
1
answer
41
views
Auto import for TS is not working in Intelij IDEA
I have 2 files in my project, and I want to use 1 class, the IDE doesn't propose to import that, how can I fix it? The class I want to import has "export" keyword, and the auto import is ...
0
votes
0
answers
43
views
GAMS csv importing and load issue
i am very new to GAMS and im trying to understand how sets work while importing from CSV and what im doing wrong. I have data as in picture below (prices_wide_example.csv), i would like to import it ...
-3
votes
1
answer
108
views
Avoiding importing the same function twice
I've been programming in Python and ran into a problem that I think makes my code a lot more messy, and I'm trying to find a workaround.
It's a large program, so instead of just dropping it here and ...
0
votes
0
answers
44
views
java25 importing module to itself
MOTIVATION
I am trying to use new feature, Module Import Declarations, on my projects to decrease code complexity.
I have detected that a module can be importted to itself, is it correct to use it ...
1
vote
0
answers
29
views
Did Chrome change their content security policies for importing scripts?
We are dynamically importing modules from esm.sh.
This works well with esm.sh being added to the list of domains for the script-src CSP.
Since Chrome has updated to version 140++ the imports throw an ...
0
votes
1
answer
84
views
Omnet++ Inet4.5 cannot resolve import
I'm new to OMNeT++ 6.1 with INET 4.5. I wanted to create a .msg file where I import the TagBase from inet.common.TagBase. I referenced inet4.5 in Properties -> Project References but it can't ...
3
votes
3
answers
1k
views
How to use uuid with Node.js (v20) when require() throws ERR_REQUIRE_ESM?
I'm building a URL shortener app in Node.js (v20.16.0) using Express.
In my controller/user.js, I try to import uuid like this:
const { v4: uuidv4 } = require('uuid');
But when I run npm start, I get ...
0
votes
2
answers
70
views
How to make android studio use class imports for inline classes
I have this interface:
@Immutable
sealed interface TestUiAction{
data object OnClick
}
When I try to call it in android studio by clicking on auto suggestion:
It imports the class like this:
...
0
votes
2
answers
198
views
I have set up a virtual environment in VS Code but can't import modules
All,
I have:
Installed VS Code
Created a virtual environment (imaginatively named venv)
Activated the environment
Installed simple-salesforce
Tried to import simple-salesforce with the following line ...
-1
votes
2
answers
43
views
how to import a group of functions with a common prefix
Want to import functions starting with foo_ only, but
# testcases.py
def foo_1():
do_1()
def foo_2():
do_2()
def bar_1():
do_3()
def bar_2():
do_4()
# main.py
#!/usr/bin/python3
...
1
vote
0
answers
121
views
Unable to import the compressed ZSTD GeoTiff to PostGIS in Python
I would like to import the compressed ZSTD GeoTiff to PostGIS with the following commands (below) but I get this error: RASTER_fromGDALRaster: Could not open bytea with GDAL. Check that the bytea is ...
1
vote
1
answer
66
views
Running Python functions from other files [duplicate]
I have created a number of .py files containing functions. The files would be organized in a Project_Repertory as follows:
Project_Repertory
Load_Repertory
load_functions.py
main.py
...
1
vote
2
answers
103
views
Spring Boot 3.3: Import entities with Ids provided in a CSV file while having Id auto-generation for new entities?
When my Java application was running on Spring Boot 2.6.2, the entities for which Export/Import features applied were using the following custom id generator:
import org.hibernate.engine.spi....
0
votes
1
answer
42
views
Shopware 6 Import Speed for Pricing and product data
Can someone point me in the right direction to the best solution for importing pricing and product data without Shopware taking hours to import as this process we will need to run on a daily basis for ...
1
vote
0
answers
63
views
When importing python library, package is sometimes found, at other times not found due to location of file in the project
I have the following project structure:
PYTHON_DEVELOPMENT [WSL: UBUNTU2504]
├── mattlibrary
├── test_bench
│ └── testme.ipynb
└── test.ipynb
My problem is that when I import mattlibrary inside ...
1
vote
0
answers
29
views
Supabase/Postgre with PostGIS enabled error while inserting rows: invalid input syntax
I'm pretty desperate. I have just spent more time than I will admit trying to import a file that has lat lons in it - using float8 as data type and it just won't go- I swear I did this before with no ...
1
vote
0
answers
64
views
How To Test Importing File Excel With Real or Fake File Contained Data For Table Database In Laravel PHPUnit
I have a bit of trouble figuring out of how to test import book route of my controller in PHPUnit Testing. I'm Using MaatWebsite Package for the excel.
So, I have real excel file in test/Files/...
0
votes
0
answers
73
views
Load multiple xlsx files from folder tree into R as list
I have a folder structure along a path like this: ":/Users/XXX/Individual reports/". Within this Individual Reports folder, there is a folder for every state and within each state folder ...
0
votes
0
answers
48
views
read.tree() works in RStudio but not in University Computing Cluster
I am trying to do some Bayesian phylogenetic analysis on a university computing cluster, to do which I am first downloading 1000 phylogenetic trees to include in my analysis. To import the trees, I ...
2
votes
1
answer
80
views
Changing a variable in another file, with a function in that file
I have two files. file1 and file2.
file1:
color = (0, 0, 0)
class drawing:
def changeColor(newColor):
global color
color = (newColor)
def drawCircle(x, y, r, c=color)
#...