Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
31 views

I tried to import some MD files into PolarDB vector database. Some files hit errors like follow: Failed file: monthly_2021_07_05.md Log file: import_with_errors.log Error context: 2025-10-28 17:23:07,...
Tony's user avatar
  • 21
0 votes
1 answer
76 views

I have two vectors of equal length, one integer vector and one boolean vector. I want to calculate the product of elements in the integer vector where the corresponding boolean vector has consecutive ...
haru's user avatar
  • 3
5 votes
0 answers
208 views

I implemented a simple 2D array wrapper using a single contiguous std::vector and, benchmarked it against std::vector<std::vector<>>. Surprisingly, array2d is just slightly faster! #...
Ali Sedighi's user avatar
0 votes
1 answer
106 views

I have a DolphinDB table with an array vector column. I need to remove duplicate rows based on subset relationships within that column. Sample Input: sym prices a [3,4,5,6] a [3,4,5] a [2,4,5,6] a [5,...
xinyu zhang's user avatar
-1 votes
1 answer
113 views

print(krit) names weight 1 may 36 2 mayer 49 3 mayo 35 4 mali 50 > mean(krit$weight) [1] 42.5 > typeof(weight) [1] "double" > typeof(names) [1] "character&...
Belinda Omino's user avatar
0 votes
1 answer
45 views

I was trying to do something for a project where I create two random 3D vectors, project them onto a 2D plane by removing their x-component, taking the dot product between the two to find their ...
Mr. L's user avatar
  • 1
Advice
0 votes
3 replies
114 views

This is the program I am using: fig, ax = plt.subplots(figsize=(4, 4)) t, dt = np.linspace(-4, 4, 10, retstep=True) x = t y = t**3 - 9*t xy = np.stack((x, y), axis=1) n = len(xy) d1ydx1 = np....
Andrew's user avatar
  • 1,226
Best practices
0 votes
3 replies
90 views

I am working to practice on some simple parameterized curve given by: import numpy as np import matplotlib.pyplot as plt fig, ax = plt.subplots(figsize=(6, 3)) t = np.linspace(-4, 4, 100) x = t y = ...
Andrew's user avatar
  • 1,226
0 votes
1 answer
47 views

I am using the cross-sectional engine and need to store multiple rows of fields as a single array vector. However, I have encountered several issues during the process: The scenarios I attempted are ...
xiao feng's user avatar
-8 votes
2 answers
234 views

I tried using the std::getline() function with a vector, and I want to make something that turns the following user input: 3 AA AA BB BB CC CC into the following output: AA AA, BB BB, and CC CC [...
BAMA DWI MUSAYA's user avatar
0 votes
1 answer
128 views

I'm trying to estimate the population growth of a population with different growths rates, shown below r <-c(0.5, 1.0, 1.5, 2, 2.5, 2.6, 2.7, 2.8, 2.9) I'm trying to fill N_List with the ...
Jordan S Davis's user avatar
0 votes
1 answer
43 views

I'm working with DolphinDB V3.00.3 and need to transform a vector by duplicating each element consecutively, while keeping the original order and final vector length the same as the input.​ Example​ ...
Dongyun Huang's user avatar
0 votes
0 answers
30 views

I have to import ecu extract ARXML file into the COMASSO toolchain. I find the option in file->import->BCT->EcuExtract. when I try to import ecu extract then tool requires .oaw and .ext files ...
Abhishek Kumar's user avatar
1 vote
1 answer
65 views

Apart from the known safety concerns documented for unsafeFreeze / unsafeThaw, is there any issue using these functions with non-pinned backing data (that is, as I understand everything except Vector....
ron's user avatar
  • 9,458
0 votes
1 answer
48 views

I want to compute the mean vector of a vector field in avizo, but I'm struggling. I extracted the eigenvectors of my tensor with the module 'extract eigenvector', whih resulted in multiple vector ...
AvizoNoob's user avatar
0 votes
1 answer
76 views

I am trying to demonstrate that $v_1 + t(v_2 - v_1)$ is a parameterized line using vectors $p_k=v_1 + \frac{k}{8}(v_2 - v_1)$ for $k=0\ldots 8$ with tails at the origin, and then the vector $u=v_2-v_1$...
Pynex's user avatar
  • 3
0 votes
1 answer
192 views

Take this: std::vector<std::vector<uint8_t>> v_data; The internal vectors store bytes of around (~256 bytes each). There are about (15-20) of these vectors stored in the containing ...
The Welder's user avatar
  • 1,099
0 votes
0 answers
129 views

I am trying to read a TTree from a ROOT file and copy some variables into a flat tree. And it works just fine for a lot of variables (as for ntracks in the example below), but when it comes to a ...
raphf's user avatar
  • 11
6 votes
3 answers
196 views

I have a 1D NumPy array, and I want to find the index of the last non-zero element. The vector consists only of 1s and 0s, not sure if this is relevant information. For example: import numpy as np ...
lightping's user avatar
-1 votes
1 answer
173 views

After some extensive search I could not find a clear answer to the following issue. When one is to compare the 1D (vector<type>) vs 2D (<vector<vector<type>>>) vector ...
rk85's user avatar
  • 163
0 votes
1 answer
98 views

I'm trying to implement the use of vectors in my application. I raised the version of Spring boot to 4.0.0-M1. This also gives me hibernate 7. Added EXTENSION vector to Postgres Added dependency: &...
tabool's user avatar
  • 46
1 vote
1 answer
142 views

I have been developing a POC application to load a PDF into the Autodesk GUIViewer3D, and using a custom extension, draw PolygonPaths and PolylinePaths over the PDF. My extension is simple, it adds a ...
Skuffd's user avatar
  • 331
3 votes
0 answers
101 views

I want to load 4 floats per thread. I know they are not 16 byte aligned. What is the best way to do this? Specific conditions: I cannot align the array without replicating the data because other ...
Homer512's user avatar
  • 15.1k
4 votes
2 answers
220 views

My problem is the following : std::vector<struct pollfd> vec = { ... }; // Actually a member variable on a Server object for (auto iter = vec.begin(); iter != vec.end(); ) { if (...
Azyrod's user avatar
  • 151
1 vote
2 answers
108 views

I am very new at the ST monad, and have reached my wits end in trying to correct the error in the code below. I have a buildChain function, which we can assume works, takes an Int and returns a list ...
Alfy B's user avatar
  • 167
0 votes
0 answers
47 views

I'm having trouble deflecting a projectile (Fireball) when it enters the trigger of an object (Shield / Deflector). This is a 3d game with a top-down view, it should only deflect in the x and z ...
Maxime Dupuis's user avatar
1 vote
1 answer
84 views

I want to add properties window with auto properties based on struct fields. I'am downcasting every field, but for Vec<> and Option<> I have to duplicate all code, how can I automatically ...
Kravtsov Hryhorii's user avatar
0 votes
0 answers
44 views

I'm using a Jquery library JSVectorMap (https://jvm-docs.vercel.app/docs/available-maps) to generate interactive SVG-based maps and add markers to them based on coordinates. This works great and I ...
Senne Vandenputte's user avatar
0 votes
3 answers
214 views

If vectors are stored contiguously, as long as they are not made smaller or reallocated, any iterator pointing to an element within it should be valid. The following code would be defined: #include &...
BadUsername's user avatar
0 votes
0 answers
26 views

I am working on a system that parses psd file into json so I can create the layers in our data structure. I use ag-psd for the parsing. ag-psd In the docs there is this snippet // complex parsing ...
machve's user avatar
  • 81
4 votes
2 answers
189 views

I want to understand lifetimes and the elision rules better. Suppose we want to extend a Vec<i32> (really Vec<&i32>) fn extend_vector( v: &mut Vec<&i32>, x: &...
Markus Klyver's user avatar
1 vote
2 answers
73 views

Solution requirements: Pre C++11 Statements: Function someFunction exists, that accepts 2D vector as vector of string vectors: vector2d. Class someClass exists, that contains 1D vector of strings: ...
KamilK's user avatar
  • 11
1 vote
0 answers
73 views

i have a very simple image Image( imageVector = vectorResource(Res.drawable.swords), contentDescription = null, modifier = Modifier.width(82.dp) .clip(shape = ...
Nogi's user avatar
  • 154
2 votes
2 answers
195 views

I have this class: class Socket { [...] pollfd* fdPtr; }; And I have a Manager class that creates the actual pollfd objects and adds them to a std::vector named pollFdsVec, to then poll on ...
desynchedneo's user avatar
4 votes
2 answers
206 views

Suppose I have the following list of vector List <- list(c(1:3), c(4:6), c(7:9)) To get the required result I have the following code in Rcpp totalCpp <- {"#include <Rcpp.h> using ...
Cantor_Set's user avatar
1 vote
1 answer
63 views

I have a Vector, M, with size N and a Tensor, d, with size NxNxD. My aim is to perform the matrix multication M*d[i,:,:] for each i to get a new matrix with size nxD. Now I could just do it like this: ...
william paine's user avatar
1 vote
1 answer
75 views

I've been hunting for what I would hope would be a std function, but can't find it. I'm looking for function or method that gives vector overlaps. So, assuming the two vectors: let my_vector1 = ["...
lilHar's user avatar
  • 1,883
4 votes
1 answer
98 views

For Vec2, Vec3, and others from Data.Vector.Fixed.Boxed, I see a Functor instance, so something like this type-checks: fff :: B.Vec2 Int -> B.Vec2 Int fff = fmap (+1) and fmap is just Data.Vector....
Enlico's user avatar
  • 30.3k
14 votes
7 answers
1k views

I have 2 vectors as below Vec1 = c(1,2,3,4) names(Vec1) = c('Val1', 'Val2', 'Val3', 'Val4') Vec2 = c(10, 11) names(Vec2) = c('Val2', 'Val4') Is there any easy way to subtract Vec2 from Vec1 based on ...
Bogaso's user avatar
  • 3,896
1 vote
0 answers
119 views

I thought the point of emplace_back was to forward arguments to the constructor instead of constructing a temporary object, but here it gives me a long nasty compiler error I can't interpret, whereas ...
H.v.M.'s user avatar
  • 1,746
2 votes
1 answer
102 views

I have been trying to integrate boost geometry into a project but run into an issue when I return a polygon geometry from my custom class. The following is a minimal example that reproduces what I am ...
Steve's user avatar
  • 21
3 votes
3 answers
143 views

I have the following strings: remove_none <- "B,B,C,C,D" remove_A <- "B,B,C,C,A" remove_only_one <- "B,A,C,A,C,A" I want to remove only one A if there is at ...
HelloBiology's user avatar
0 votes
1 answer
74 views

Suppose we want to generate and store a large number of integers. We dont know exactly how many, but we know that we wont have more than some significantly larger number. If we use a std::vector to ...
aeterna's user avatar
1 vote
1 answer
151 views

I'm trying to understand the difference between the vector.similarity.cosine Cypher function and the gds.similarity.cosine function in Neo4j. According to the Neo4j documentation, both are used to ...
Gal Shubeli's user avatar
1 vote
0 answers
279 views

I have setup a Custom Embedder to use with knowledge and tools, but keep getting the error: litellm.AuthenticationError: AuthenticationError: OpenAIException - The api_key client option must be set ...
lazzy_ms's user avatar
  • 1,392
0 votes
1 answer
267 views

I'm working with a vector database (qdrant) and using semantic search via embeddings (Sentence Transformers). My use case involves queries like: "Give animals other than cats" or "List ...
Vummenthala Sai ramana reddy's user avatar
1 vote
1 answer
133 views

I want to write a Snowflake scripting block where I embed some text, then do some cosine similarity search. Ideally I would like to be able to assign the embedded text to a variable so I can re-use in ...
Xedni's user avatar
  • 4,791
0 votes
0 answers
53 views

I'm working with vectors and need to find the index (or position) of a specific value within a vector. I want to know if there's a built-in function that returns the index of the element I'm looking ...
James Oregon's user avatar
0 votes
1 answer
104 views

std::vector<std::vector<bool>> grid(4, std::vector<bool>(4, true)); std::for_each(grid.begin(), grid.end(), [](auto& row) { std::for_each(row.begin(), row.end(), [](auto& ...
YuZ's user avatar
  • 463
2 votes
4 answers
315 views

I have this existing working code, which I am trying to convert to implementation: Bitmap *pbitmap = new Bitmap(L"images.png"); nWidth = pbitmap->GetWidth(); nHeight = pbitmap->...
Gorlash's user avatar
  • 81

1
2 3 4 5
708